Yes this blog post is related to the promotion detailed below. Just thought I would point it out :) Why post it? Well:
(1) I have heard Typemock Isolator is a good mocking framework especially when it comes to testing legacy code so I don't mind promoting it in this way
(2) I've used Rhino.Mocks in the past and like it but would like to be able to also try out Typemock (beyond a trial) so this will give me a chance to compare both.
(3) I've used NUnitASP (http://nunitasp.sourceforge.net/ support ended in Jan 2008) in the past and wanted to see what the asp testing framework was like.
(4) This promotional offer may be useful to other developers who also wanted to use TypeMock but couldn't or wouldn't buy it.
What is this new bundle/promotion:
Unit Testing ASP.NET? ASP.NET unit testing has never been this easy.
Typemock is launching a new product for ASP.NET developers – the ASP.NET Bundle - and for the launch will be giving out FREE licenses to bloggers and their readers.
The ASP.NET Bundle is the ultimate ASP.NET unit testing solution, and offers both Typemock Isolator, a unit test tool and Ivonna, the Isolator add-on for ASP.NET unit testing, for a bargain price.
Typemock Isolator is a leading .NET unit testing tool (C# and VB.NET) for many ‘hard to test’ technologies such as SharePoint, ASP.NET, MVC, WCF, WPF, Silverlight and more. Note that for unit testing Silverlight there is an open source Isolator add-on called SilverUnit.
The first 60 bloggers who will blog this text in their blog and tell us about it, will get a Free Isolator ASP.NET Bundle license (Typemock Isolator + Ivonna). If you post this in an ASP.NET dedicated blog, you'll get a license automatically (even if more than 60 submit) during the first week of this announcement.
Also 8 bloggers will get an additional 2 licenses (each) to give away to their readers / friends.
Go ahead, click the following link for more information on how to get your free license.
I mainly do these short announcements via my twitter account http://twitter.com/jmandia but I have been looking forward to digging into Prism v2 but held off until it was released (which is now :D).
I am glad to see guidance come out that covers WPF and Silverlight and it has been good to see how Prism v2 has changed over the 10 drops they did (and the fact that they asked for feedback on their thoughts on naming conventions and the ideas they were investigating).
The prism team were also very responsive to queries (even ones sent over the weekend. Cheers!).
Anyway this should warrant some of your time if you are interested in Silverlight and/or WPF.
http://www.microsoft.com/downloads/details.aspx?FamilyID=fa07e1ce-ca3f-4b9b-a21b-e3fa10d013dd&DisplayLang=en
John
I had resisted signing up to Twitter as I really didn't see the point and now that my little family has grown over the festive season I have even less time (I've heard that reading tweets can become addictive :D ).
I did however see how Twitter could fit alongside my other tools/sites. Twitter will be used for short tech posts instead of this blog (I'd like to keep the points of interest posts going and add some bigger posts in the future).
So if you are interested you can follow me on http://twitter.com/jmandia
Recent tweets:
John
Another release I thought would come during the PDC has been released:
Microsoft ASP.NET MVC Beta
Click the link above to go to the Microsoft download page.
Some points about the release (Headings taken from the What's New section):
- MvcFutures.dll is not included in the beta (as it wouldn't be included in the final release)
- The Beta installer installs the ASP.NET MVC assemblies (System.Web.Mvc.dll, System.Web.Routing.dll, and System.Web.Abstractions.dll) into the GAC.
- New Simple Membership Features in the Default Project Template
- New Filter Types for Authorization and Exception Handling
- New Output Cache Filter
- Changes for ASP.NET AJAX
- Namespaces in Routes
- New Interface for Enhanced Testability of TempData
- ActionInvoker Extensibility Improvements
- ViewDataDictionary (minor change)
- ViewEngine Improvements
- Helper Improvements
- Controller and Filter Improvements
Bug fixes:
- Fixed a bug in which the ignore-routes setting (created by using the IgnoreRoute extension method) affected URL generation.
- Fixed a view engine caching bug when the application is not in debug mode (that is, when debug="false" is set in the Web.config file). This bug occurred if different action methods in different controllers had the same name. In that case, an action method could render the view for the wrong controller.
- Fixed a bug in OutputCacheAttribute in which cached authenticated content did not require authentication. Even though the content is cached, if it requires authentication, the user should be required to authenticate first before seeing the cached content.
- Fixed a bug in which RenderPartial does not work when tracing is turned on.
- Fixed a bug in the Html.TextArea helper method in which an overload was not looking in ViewData for its value when the provided value is null.
- Fixed the OutputCacheAttribute.CacheProfile property so that it works in Medium Trust.
If you haven't looked at ASP.NET MVC before because it was a preview I would have a look at this release to see if ASP.NET MVC is for you (or your current/future project at least :D).
Thanks to Tomoharo Nagasawa for spotting this.
John
It looks like Adobe have just released version 10 of their Flash Player with a bunch of enhancements. Now that Silverlight 2 is out the competition really begins.
http://www.eweek.com/c/a/Application-Development/Adobe-Releases-Flash-Player-10/?kc=rss
Now that the foundation is laid (a subset of the .net runtime across browsers and operating systems) it will be interesting to see how regular future releases are as the competition heats up. The introduction of Silverlight is good for us but also good for Flash developers as it encourages Adobe to continuously look at ways in which they can improve their Flash/Air offering. Will we see Silverlight enhancements every year (e.g. announced at Mix) or sooner? The fact that the Silverlight player updates itself may make this more likely than not.
I’m looking forward to the PDC to see what is planned for future releases (printing support would be nice ;-) ).
John
Well I think most blogs already have this covered but Silverlight 2 is out!
http://weblogs.asp.net/scottgu/archive/2008/10/14/silverlight-2-released.aspx
One question I asked (after I said congratulations on the release of course :D) was:
I have a question regarding a point made in the press release:
"Improved server scalability and expanded advertiser support. This includes new streaming and progressive download capabilities, superior search engine optimization techniques, and next-generation in-stream advertising support."
My question is about the "superior search engine optimization techniques" part. I am assuming you mean superior to Flash? I don't really care if it was meant to imply Flash or something else (don't want to kick that discussion off :D) but I can imagine that a lot of thought was given to what should be included in the press release and I was just wondering if there was more information about these superior search engine optimization techniques?
This is an area that interests me a lot so I was just wondering if something new has been added recently to Silverlight or if a document/whitepaper/article was published that I somehow missed?
Anyone else know if there is something I missed (I know there are ways of making Silverlight SEO friendly and I have mentioned them in the past but I was wondering if I missed something new)?
http://www.itproportal.com/articles/2008/10/14/bbc-partners-adobe-make-iplayer-platform-agnostic/
So the bbc iplayer will be a Flash/Air based implementation (The bbc got complaints that the iplayer only worked on certain operating systems). It is a shame Silverlight wasn't picked as that would have been a great win (in terms of increasing the installed base of Silverlight and in terms of a great case study on the power of Silverlight). The one thing really missing I guess is Linux support (I don't think the BBC could go with Moonlight for that side of things just yet). Who knows maybe everything isn't set in stone yet :D
John
In my last points of interest post I mentioned that an announcement was going to be made today. I thought it would either be a release date announcement (if they were going to miss the PDC) or that Silverlight was actually released. Well it appears it is not out now but will be by the end of tomorrow.
Looking forward to it.
Thanks to Ken Cox for spotting this first.
Press Release available from here.
John
I've often commented on my wish for the Silverlight team to focus a little more on Search Engine Optimisation (and printing support....but that's a topic for another day) as I feel that this is one area that could put off a lot of business users (yes you can argue that it is an application and if your application is content rich then possibly your application should be built in asp.net with occassional use of Silverlight to add "islands of richness").
There are ways of having a search engine friendly Silverlight application (my plan was to have something more solid by now but life has been busy...it is however still on my todo list :D) but I was/am hoping that it does get some attention either now or in the near future.
Looks like Adobe are aiming to do this:
http://finance.paidcontent.org/paidcontent?GUID=5882489&Page=MediaViewer&Ticker=ADBE
"Adobe Flash Technology Enhances Search Results for Dynamic Content and Rich Internet Applications
Adobe Systems Incorporated (ADBE) today announced the company is teaming up with search industry leaders to dramatically improve search results of dynamic Web content and rich Internet applications (RIAs). Adobe is providing optimized Adobe® Flash® Player technology to Google and Yahoo! to enhance search engine indexing of the Flash file format (SWF) and uncover information that is currently undiscoverable by search engines. "
I know the team are busy and they only have so much time/resource etc and I really do think they are doing a great job I just wish this and printing support (sorry couldn't resist) got some attention instead of focusing on X number of controls (Third Party Vendors will fill any gap soon enough).
Update: http://googlewebmastercentral.blogspot.com/2008/06/improved-flash-indexing.html more information about this for those of you who are interested.
John
I use CC.Net quite a lot now with Perforce and ClearCase and I was recently asked to help out a team who were having some problems.
A CI project had been setup on CC.NET and it "seemed" to be running fine.
Someone would checkin the file and the project would detect the changes. Unfortunately the files on the build server were not actually being updated :S
Looking at the log files revealed the following (replaced project specific details with general text):
First it detects the change:
2008-03-31 14:44:56,734 [PROJECTNAME:INFO] Project: 'PROJECTNAME' is first in queue: 'QUEUE.NAME' and shall start integration.
2008-03-31 14:44:56,734 [PROJECTNAME:DEBUG] Perforce plugin - running:FileName: [C:\Program Files\Perforce\p4.exe] -- Arguments: [-s -c workspacename -p perforceserver -u perforceaccount changes -s submitted "//depot/PathToProject/..."@2008/03/31:14:02:52,@2008/03/31:14:44:56] -- WorkingDirectory: [] -- StandardInputContent: [] -- Timeout: [2147483647]
2008-03-31 14:44:56,734 [PROJECTNAME:DEBUG] Starting process [C:\Program Files\Perforce\p4.exe] in working directory [] with arguments [-s -c workspacename -p perforceserver -u perforceaccount changes -s submitted "//depot/PathToProject/..." @2008/03/31:14:02:52,@2008/03/31:14:44:56]
2008-03-31 14:44:56,859 [PROJECTNAME:DEBUG] info: Change 189451 on 2008/03/31 by developer@projectbuild 'Build: revert previous change ('
2008-03-31 14:44:56,859 [PROJECTNAME:DEBUG] exit: 0
Then it describes the change (by specifying the changelist number):
2008-03-31 14:44:56,859 [PROJECTNAME:DEBUG] Perforce plugin - running:FileName: [C:\Program Files\Perforce\p4.exe] -- Arguments: [-s -c workspacename -p perforceserver -u perforceaccount describe -s 189451] -- WorkingDirectory: [] -- StandardInputContent: [] -- Timeout: [2147483647]
2008-03-31 14:44:56,859 [PROJECTNAME:DEBUG] Starting process [C:\Program Files\Perforce\p4.exe] in working directory [] with arguments [-s -c workspacename -p perforceserver -u perforceaccount describe -s 189451]
2008-03-31 14:44:56,968 [PROJECTNAME:DEBUG] text: Change 189451 by developer@projectbuild on 2008/03/31 14:40:44
2008-03-31 14:44:56,968 [PROJECTNAME:DEBUG] text:
2008-03-31 14:44:56,968 [PROJECTNAME:DEBUG] text: Build: revert previous change (cruisecontrol check)
2008-03-31 14:44:56,968 [PROJECTNAME:DEBUG] text:
2008-03-31 14:44:56,968 [PROJECTNAME:DEBUG] text: Affected files ...
2008-03-31 14:44:56,968 [PROJECTNAME:DEBUG] text:
2008-03-31 14:44:56,968 [PROJECTNAME:DEBUG] info1: //depot/PathToProject/ChangedFile.cs#5 edit
2008-03-31 14:44:56,968 [PROJECTNAME:DEBUG] text:
2008-03-31 14:44:56,968 [PROJECTNAME:DEBUG] exit: 0
So far so good.
CruiseControl.Net calls Perforce passing it the server, the user, the workspace and the view to check for changes. It then gets back the relevant changelist number(s). Using the return changelist number(s) it describes the changes.
Next step is to retrieve the changes:
2008-03-31 14:44:56,984 [PROJECTNAME:INFO] 1 modification detected.
2008-03-31 14:44:56,984 [PROJECTNAME:INFO] Building: intervalTrigger triggered a build (ForceBuild)
2008-03-31 14:44:56,984 [PROJECTNAME:INFO] Getting source from Perforce: C:\Program Files\Perforce\p4.exe -s -c workspacename -p perforceserver -u perforceaccount sync
2008-03-31 14:44:56,984 [PROJECTNAME:DEBUG] Perforce plugin - running:FileName: [C:\Program Files\Perforce\p4.exe] -- Arguments: -s -c workspacename -p perforceserver -u perforceaccount sync] -- WorkingDirectory: [] -- StandardInputContent: [] -- Timeout: [2147483647]
2008-03-31 14:44:56,984 [PROJECTNAME:DEBUG] Starting process [C:\Program Files\Perforce\p4.exe] in working directory [] with arguments [-s -c workspacename -p perforceserver -u perforceaccount sync]
2008-03-31 14:44:58,250 [PROJECTNAME:DEBUG] error: Request too large (over 200000); see 'p4 help maxresults'.
2008-03-31 14:44:58,250 [PROJECTNAME:DEBUG] exit: 1
The Problem:
The problem is that CruiseControl.Net is passing Perforce the workspace and the view when it is checking for changes but only specifying the workspace when it is performing the update (to be fair the CC.NET documentation actually tells you that they won't use the view for synching or labelling). The team used one workspace for more than one project and restricted the view on that workspace for their CruiseControl.Net projects (you could argue that you should have one workspace per project but this approach made it easier for them to maintain). When it tried to synch the entire workspace it hit a limit and "....the computer says No..." was the result (as seen above). Unfortunately this doesn't cause the build to break so everything seems fine which is a bit worrying.
Possible fixes:
- Update the Perforce code so that it specifies the view as well as the workspace when doing a synch
- Tell people to create a workspace per project the reduce the risk of this happening again
- Ask the Perforce admin to increase the limit so that Perforce doesn't return an error
The second choice would be hard to enforce (although you could try), the third option isn't a real fix (i.e. if people continue to use a single workspace you'll come across projects that would cross the limit again in the future and you don't really want project A synching an entire workspace and in doing so update the files for project B, C and D).
So I went with the first option (I'll be asking the CC.NET team why they don't use the view and point to this post as a possible change for them to use if they wish. If they can tell me a good reason why you shouldn't do this or indeed if anyone else knows why you shouldn't then I'll update this post with the reason).
So now you have two options (unless this change is added to the next CC.NET release):
- Update the source directly and have your own customised version of CC.Net (actually it would be a customised version of ThoughtWorks.CruiseControl.Core.dll)
- Create a plugin that provides the fix (it still requires you to maintain the Perforce related code but means you can easily pass the plugin to other teams and you're not as tied to the Core assembly).
I tried both and prefer option 2.
So where is the code you need to change (you need to download the sourcecode for CruiseControl.Net)?
- CruiseControl.NET-1.3.0.2918.source\project\core\sourcecontrol\Perforce
What file actually needs the change?
- CruiseControl.NET-1.3.0.2918.source\project\core\sourcecontrol\Perforce\P4.cs
Within this file there is a private method (line 248):
private string CreateSyncCommandLine()
{
string commandline = "sync ";
if (ForceSync)
{
commandline += "-f ";
}
return commandline;
}
The change that could be applied is as follows:
private string CreateSyncCommandLine()
{
string commandline = "sync ";
if (ForceSync)
{
commandline += "-f ";
}
commandline += ViewForSyncCommandLine;
return commandline;
}
ViewForSyncCommandLine was a new private method I created and added:
private string ViewForSyncCommandLine
{
get { return View.Replace(",", " "); }
}
Great, so how do I create a plugin and how do I use that in a CruiseControl.Net project?
- Start VS and create a C# Library project (call it ccnet.YourName.plugin. CruiseControl.Net looks for plugins matching the following ccnet.*.plugin.dll).
- Add the Perforce folder (CruiseControl.NET-1.3.0.2918.source\project\core\sourcecontrol\Perforce) to your Library project.
- Update the namespaces to reflect your project.
- Add a reference to the ThoughtWorks.CruiseControl.Core, NetReflector and ThoughtWorks.CruiseControl.Remote assemblies (resharper/vs should help add the relevant usings but reference your own implementation of the P4 classes/interfaces just to keep things simple).
- Apply the changes mentioned to the P4.cs file above (also change the ReflectorType attribute to reflect your custom plugin e.g.:
[ReflectorType("p4custom")]
public class P4 : ISourceControl
- Build the project.
Now you don't have to copy all the files across and there are different ways of doing this (you could try to inherit as much as possible from the Core assembly). This is just one possible way of doing it that gives me the flexibility of customising the P4 block further should I need to and reduce my dependency on the Thoughtworks assemblies (the hope is that support for this is added but I still need to find out why they decided not to do it this way, so be warned there may be a good reason for not doing this).
You should now have an assembly you can drop into the CruiseControl.NET\server folder.
The only other thing you would need to change is the sourcecontrol block entry type name (all the perforce settings stay the same) in your CruiseControl.Net project e.g.:
<!--
Perforce Source Control Entry -->
<sourcecontrol type="p4custom">
<view>//depot/PathToProject/...</view>
<executable>pathtop4exe</executable>
<client>workspacename</client>
<user>perforceaccount</user>
<port>perforceserver</port>
<applyLabel>false</applyLabel>
<autoGetSource>true</autoGetSource>
<forceSync>false</forceSync>
<p4WebURLFormat>perforceurl</p4WebURLFormat>
</sourcecontrol>
Restart the CruiseControl.Net service and test the project that was giving you trouble.
I hope this helps anyone that comes across this problem. If you have <applyLabel>true</applyLabel> in your block then you need to take into account that labelling does not take into account the view (I have it set to false and use NAnt when I need to label anything but it is something to consider if you do use it).
John