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
Now I usually aim to have either my own content or a collection of links (a points of interest post) instead of a single link to another site but I know a lot of people are on the lookout for anything they can find out about Silverlight 2.0 and Mix so I thought I would post this links.
DNR have just done a podcast with Scott Guthrie (well the first part is with him) where he provides more information about MIX (sounds like SL 2.0 will also have a calender control etc).
Anyway here is the direct link for those of you who want to know more before the big event.
http://www.dotnetrocks.com/default.aspx?showNum=316
John
It looks like Sandcastle has now moved to codeplex.
http://www.codeplex.com/Sandcastle/Release/ProjectReleases.aspx?ReleaseId=9921
I've been looking at CI (primarily using CC.NET) a lot over the last few months and have been encountering issues with NDoc (given that it is no longer developed and there was never a proper .Net 2 release). I looked at Sandcastle a while back and wasn't happy with it (it seemed like it needed too much work to get working and it was slooooooooow).
I tried the last release and thanks to community projects like Sandcastle Help File Builder was able to easily hook it up to CC.NET. I ran it against a codebase that took 4 hours to generate documentation and that time was cut down to 20 minutes (so some definate improvements on that end).
Some things that still cause me some pain (could be Sandcastle Help File Builder):
-
It doesn't like interop assemblies (fails on my setup)
-
It requires your projects to have xml generation on (not a big deal I know but can be to some people)
-
Dependencies list (I wish there was an option to automatically detect this)
-
Speed (It still seems slower than NDoc)
Anyway haven't tried this latest release so let's see if things are even better (Msft have introduced a GUI in this release but mention it is not intended to compete with community projects).
John
UPDATE: Sandcastle Help File Builder (http://www.codeplex.com/SHFB) are coming out with an update for the latest release on the 22nd. I've not tested the latest version of Sandcastle yet (waiting on SHFB as the old version isn't compatible with the January release) but I hope that the BuildAssembler.exe improves as right now it is using up 837MB of memory and 50% CPU utilisation on a build server as I write this!!
One of my new resolutions was to look at Silverlight more closely, especially with regards to search engine optimisation which is something I raised back in May in my "Points of interest #6" post.
What are some of the things I like about Silverlight (this is not a complete list but some quick points in relation to this post):
- The browser / browser version is taken out of the equation (to a degree). I should hopefully no longer need to worry about html, css and JavaScript support across different browsers and different operating systems. If something looks good on IE 6 on XP it should look and behave the same on Firefox on the Mac.
- Easily enhance the user experience (I know Ajax and Flash can achieve this as well)
- Develop every aspect of your application with C# (or any other managed supported language) - yes I eagerly await Silverlight 2 Beta 1 (although I know you can still achieve a lot with Silverlight 1).
Now this is a reduced list (there are many posts out there explaining the benefits Silverlight 1.0 / 2.0 will bring) but point 1 and 2 add a lot of value and if you are not sacrificing seo then you are onto a winner (although in cases where you are building a pure application e.g. an insurance quote application seo plays a lesser role).
I thought I would gather links, posts and my own stuff under a custom domain so I bought http://www.silverlightseo.net and just before the new year (30th December) I knocked up a Silverlight page and uploaded it to see if I could get it indexed by the search engines.
Less than a week later I am glad with the initial results:
Now it surprised me how quickly I got in there (initially I added http://www.silverlightseo.net to my signature for my forum posts on asp.net/silverlight.net and recently I added a link to my blog and posted about it but other than that there are no links pointing to this site that I know of) but I'm glad to see that the approach was accepted and the content indexed.
Now two useful posts about SEO and Silverlight are Michael's October post where he talks about using xslt to extract the content from Xaml and put it into html and Nikhil's May post (I know there are more out there which I will be adding to www.silverlightseo.net as time goes on).
When I did this test I had the following in mind:
- If I generate content (at the moment it is a hard-coded text) where should I store it in the generated Xaml or the host html page?
- I selected to have the content rendered in html and have Silverlight extract the rendered text from the host page.
- How would a search engine view what I was doing (am I trying to show one thing to search engines and something completely different to users)?
- The content that is rendered on the html page (in the future by asp.net) is the same content that is displayed within the Silverlight application (consider Xaml as a different form of CSS. CSS can be used to style html tags and Silverlight is providing a style and displaying it using xaml tags).
- Now you wouldn't want to display the same text twice so I altered the Z index of the Silverlight control and made the height and width 100% (I thought I might get my hand slapped for that but it isn't being used for keyword stuffing or anything sinister so I would hope it continues to be accepted).
- Should I go Silverlight all the way or look for a hybrid asp.net/silverlight solution (now by this I do not mean an asp.net app with a silverlight control e.g. a slideshow or video player?
- Since Silverlight is so new I would say start off with a hybrid approach and take the lessons you learned developing asp.net sites and see if you can apply them to Silverlight. Now since this was a demo I haven't decided what I think the best approach would be (I've also not looked at Silverlight in enough depth to even pretend to know what the best approach is when Silverlight is concerned) but I am considering trying the following approach:
a) A Xaml file per view (instead of having everything within one file) that loads additional pieces of xaml (controls) if and when required.
b) For each view render the content in html and have Silverlight intelligently extract it. At the moment each textblock calls a JavaScript method that checks the host page for any content with the same id as itself (Loaded="contentdisplaycontrol_loaded").
c) Use either the new ASP.NET MVC Framework or Castle's MonoRail to navigate around the Silverlight Application/Site.
I've not tried this out fully yet but intend to in order to see if the hybrid approach presents the best of both worlds (yes moving from one view to another means a page load but you can still have a nice user experience for view related actions and it could still look very slick).
- What about accessibility or printing?
- Screen readers will be able to read the html text and as far as printing is concerned hopefully there will be a printing solution for Silverlight 2.0 but until then you can style the html text via css to look nice when it is printed in Firefox (I've not done that yet so it looks unsightly). Unfortunately IE print preview shows a skewed picture of the Silverlight content.
Now the Xaml/Javascript can easily be pulled from www.silverlightseo.net if you want to look under the covers but the description I've given covers the concept.
If you have any Silverlight / SEO related content please let me know and I'll look to add it when I have the site fully up and running.
John
Goodbye 2007, Hello 2008!
2007 had its ups and downs but it will always be considered a great year as 2007 was the year I became a dad.
Things to aim for in 2008:
- Learn Silverlight (I've had a quick play and read books but I really want to learn it by building an app or site of some kind).
One of the ways I'll be aiming to learn Silverlight is by looking at Silverlight and it's impact on SEO (Search Engine Optimisation/Optimization). I'll aim to do this through a site focused on that subject http://www.silverlightseo.net - Learn LINQ and WCF
- Perhaps look into Iron Ruby or Iron Python to complement my C#
- Continue to focus on CI
- Spend more time with my family
- Run twice a week, swim at least once a week
- Catch up with old friends more often than I managed in 2007
- Try to learn a new language (not code related)
- Restart my POI (Points of Interest) posts
Happy New Year to you all.
John
Hi All!
Just wanted to say Merry Christmas to everyone. I know l stopped blogging about 6 months ago but the reason behind that was I became a dad for the first time and little Sofia came into our lives.
Now everyone says this and I can vouch that it is true, when you do have a kid it is fantastic (yes there are sleepless nights although we have been very lucky in that respect) and you put many other things to the side.
I'm manage to squeeze in some time to stay up-to-date on the latest .Net tech (and some non .Net related things) but haven't had the time to keep my Points of interest posts going (possibly in the new year).
I've been following Silverlight with great interest and I'm glad it has been rebranded as Silverlight 2.0 as 1.1 didn't sit right. I'm also glad about the extended feature set but hope they include some of the features I feel would ease adoption (printing support [add your vote] http://silverlight.net/forums/t/516.aspx etc).
.Net 3.5 is out which is great (just need to find a project where I can actually use it) and I've been following the Fran's posts (http://weblogs.asp.net/fbouma/) about Linq to LLBLGen Pro with interest. I've used every release Fran's has put out but feel he is going to gain a much bigger audience when he has a friendlier way of utilising the code LLBLGen generates.
Anyway have to keep this short and sweet as I'm at the in-laws for Christmas dinner in Denmark.
Merry Christmas and a Happy New Year to you all.
Roll on 2008.
John