October 2007 - Posts
In place of writing something like:
protected string GetUrl(Information info)
{
if (info is News)
return ResolveUrl(string.Format("~/news.aspx/{0}", info.NormalizedTitle));
else if (info is Publication)
return ResolveUrl(string.Format("~/publications.aspx/{0}", info.NormalizedTitle));
else
return string.Empty;
}
I would use on the presentation layer only an extension method on my business entity class of type Information to add a GetUrl method!
It would keep the business entity light on the different other layers, and add web responsibilities on the presentation layer.
And would end like so:
<a href="<%# ((Information)Container.DataItem)).GetUrl() %>" title="<%#Eval("Title")%>">
<%#Eval("Title")%>
</a>
Something to test when I will install Visual Studio 2008!
I had a little issue to install Camtasia 5 on Vista and the solution is there
Camtasia.msi /passive
If you want to read what is New in Camtasia 5 follow this link.
I set out to change that. Companies would no longer be able to select me from a generic lineup of candidates. Instead, I would select companies. Companies that I respected, companies that shared my passion for software. Armed with thirty years of hindsight, I would no longer let random, chance opportunities determine my career path. I will choose where I want to work.
If you love software as much as I do, you deserve to work at a company where people come to work not to punch a clock, but because they love software, too. You deserve to work at a company where software engineering is respected. You deserve to work at a company where peers meet to enjoy building software together.*
Coding Horror: Remember, This Stuff Is Supposed To Be Fun
That's exactly why I chose to work at innoveo solutions.
Tonight I reached a new milestone on my current development for my portal Tech Head Brothers.
You might know, or guessed, from one of my last post; "Tech Head Brothers Silverlight Streaming framework" that I am working on adding Silverlight Streaming to Tech Head Brothers. I first released a little framework to ease the development against the REST API of Silverlight Streaming. Now I went further on with a first vertical slice of the whole solution.
The solution is composed of four parts:
- a client application to post the video
- a service to receive the posted video
- an admin web application to publish the video
- a web interface to display the video
After quite some discussions with Mathieu about the best posting user experience for the different authors we finally decided that using Live Writer was the best solution! And now that I have the first vertical slice I am really happy about the choice we made, because it makes the solution easy for the authors but also for us implementing the solution.
The client application customize Live Writer with a SmartContentSource plugin letting the author upload it's video to Silverlight Streaming but also posting all information to Tech Head Brothers as a blog post.
The cool point here is that during the development of innoveo solutions website; my new company, I wrote a generic blog engine that basically let you define a blog just by adding an httphandler and implementing a Converter class:
Definition of a new blog, that will be used in the httpHandlers part of the web.config
public class VideoBlog : GenericBlog<Video>
{
public VideoBlog() : base(new VideoBlogAssembler())
{
}
}
Definition of the converter class, converting an business entity to/from a Post
public class VideoBlogAssembler : IBlogAssembler<Video>
{
/// <summary>
/// Converts the specified video.
/// </summary>
/// <param name="video">The video.</param>
/// <returns></returns>
public Post Convert(Video video)
{
Post post = new Post();
post.dateCreated = video.PublishDate;
post.description = video.Description;
...
The admin part was quick to develop just extending the page I already had for articles publication.
And finally Mathieu did a great job on the XAML Silverlight Player and all the javascript part that I juste needed to integrate.
So now you know it, yeah we are adding Video to Tech Head Brothers and I hope really soon.
If you want to get all the latest news about the service you might read the blog or subscribe to the rss.
Good news for the user of SkyDrive (a live service) was just extended from 512MB to 1Gb

This trick is coming from my friend Nix.
If you are developing a site containing Google Adsense you might know that clicking on your own ad is not allowed.
To be able to test and click on your own ad and still follow Google AdSense Program Policies, just add following to your pages:
<script type="text/javascript">google_adtest = 'on';</script>
Tech Head Brothers Silverlight Streaming framework is an implementation of Silverlight Streaming REST API as a class library and a set of Workflow Foundation activities focused on the Hosting Content on Silverlight Streaming.
I have implemented this light framework (some functionality are still missing) as a class library and Patrice Lamarche (http://patricelamarche.net) implemented the Workflow Foundation part of it.
The following picture shows the classes used in the framework:
It is basic with a Manager class (SilverlightStreamingManager) using a set of Command classes (AddFileCommand, DeleteFileCommand, GetFilesetFilesCommand).
Uploading a Video is as simple as those few lines:
SilverlightStreamingManager mgr =
new SilverlightStreamingManager("TOBEDEFINED", "TOBEDEFINED");
string fileset = "testvideo";
if (mgr.UploadVideo(@"T:\_Projects\Silverlight\SilverlightStreaming\media\fiona.wmv", fileset))
Console.WriteLine("Uploaded sucessfully!! ");
else
Console.WriteLine("Something went wrong !!");
You also might prefer to use the corresponding workflow activities delivered or even the sample workflow:
Enjoy!!
I guess you already had the following problem; you want to delete a folder or a file and the operating system just tell you that it is impossible because one application locks it. For sure you have no clue which is the bad application doing it!
In the past I was using a little application (which I can't remember the name) but I tend to remove tools from my system if another can achieve the same result. Now to do that I use Process Explorer from Windows Sysinternals, this tool replace my Task Manager and add lots of features.
So to use Process Explorer to find which application locks you file/folder use the menu Find / Find Handle or DLL:
Then type the filename or folder name in the search box and click search.
In the following example I search a PDF that is locked by Foxit Reader.exe:
Enjoy it!
More Posts