Geeks With Blogs


What I do:

Identity Mine

MVVM Light


What I am:

Microsoft Most Valuable Professional, Client Application Development

Microsoft Certified Technology Specialist, Windows Presentation Foundation

WPF disciples


View my profile on LinkedIn

Creative Commons License
Diary of a Code Trotter by Laurent Bugnion is licensed under a Creative Commons Attribution 3.0 Unported License

All source code on this blog is licensed under the MIT license.

Copyright (c) 2006 - 2011 GalaSoft Laurent Bugnion

Laurent Bugnion (GalaSoft) Diary of a Code Trotter ASP.NET 2.0
Redesigning my website with the help of Expression Blend
I decided to completely redesign my website (yes, it's about time, I know). For this process, I decided to inspire myself (loosely) from my good friend Robby Ingebretsen's site, which is both simple and beautiful. Read the rest of this entry » ......

Posted On Sunday, October 19, 2008 9:53 PM

Converting and customizing XAML to PNG with server-side WPF

One Tweet by Oliver Sturm ( the other day got me to thinking. He was asking about the possibility to host graphics for a web site in XAML format, and the best way to render it.

Read the rest of this entry »

Posted On Friday, October 10, 2008 12:48 AM

Microsoft to add jQuery in Visual Studio: Why I think it's great
The news took the community by surprise and the reactions are overwhelmingly positive: Microsoft is going to ship jQuery with the ASP.NET MVC framework (very soon) and with Visual Studio (in a near future). For more details, ScottGu and Scott Hanselman are talking about that in a very complete way. Read the rest of this entry » ......

Posted On Monday, September 29, 2008 12:44 AM

TweetMyPage V0.2 - Now with "from TweetMyPage" indicator
As soon as I had my info page online, I asked Twitter to accept TweetMyPage as a Twitter application, and to mark the messages posted with TweetMyPage with "from TweetMyPage". Note for developers: There is a form to fill on the Twitter API page. It's really fast, and one day later I got the answer that it was accepted. Read the rest of this entry » ......

Posted On Thursday, May 29, 2008 11:00 AM

Porting to VS2008 / New WPF book / Pictures of Sicily
Porting to VS2008 I am working on a few ASP.NET projects I do privately, and had a small issue, which I couldn't debug in VS2005. I decided it was time to give a serious try to VS2008, so I converted most of my private ASP.NET projects to VS2008, and everything wen smoothly. I didn't take any risk, and I chose to continue using .NET 2.0 for these projects, so that only the IDE changes, but not the framework. After a very fast and painless conversion, finding the error was a breeze (I was having problems ......

Posted On Thursday, August 2, 2007 9:40 AM

Scott Guthrie talks about the future or ASP.NET and Orcas
The ReMix event was nice, well, not really comparable to Las Vegas, of course, but it was nice to see the demos again. For me, in fact, the real opportunity was rather to connect with other people interested in these technologies, and in this aspect it was really nice. I've been wanting to meet Ronnie Saurenmann (the guy behind the Zurich Airport XBAP and the "Outlook-like" WPF hands-on lab) for quite some time, I hope for the beginning of a nice collaboration. Of course the icing on the cake was ......

Posted On Monday, June 18, 2007 8:17 PM

ReMix Zurich tomorrow
ReMix 07 Zurich I will be attending ReMix in Zurich tomorrow. This event will be specially interesting this year due to the presence of Scott Guthrie for the keynote and 2 presentations. I'll hear even more of Scott in the evening, at the DotMugs (.NET Managed User Group of Switzerland) where he will be speaking about ASP.NET and Orcas. I am very happy to hear Scott again, this will be the thrid time (after MIX06 and MIX07), and I sure hope I will have many more occasions ......

Posted On Sunday, June 17, 2007 8:39 AM

Problems caused by concurrent asynchronous calls to web services
What's COMET? When an Internet Application needs to be updated regularly, the only possible choice is to use polling. The HTTP protocol makes it impossible to have the server "push" data to the client. The faster the client needs to be updated, the faster the poll must be. Of course, there are limits, for example due to the network speed, the load, etc. A possible alternative is known under the name COMET. (Note: COMET is usually used as an alternative to AJAX, and AJAX implies the use of JavaScript ......

Posted On Tuesday, January 30, 2007 10:06 PM

Happy new MVP year!
First of all, Happy new year. I am not really into the whole new year celebration, and I most certainly don't think that just because a digit gets changed in an arbitrary number, suddenly there will be no more wars, no more tragical events, no more hunger... So it's a bit hard for me to get in the celebration craze, and we spent a quiet evening. Nonetheless, happy new year to all readers and may next year bring you and your families what you all wish :-) Today, to start the year, I had a nice surprise ......

Posted On Monday, January 1, 2007 10:05 PM

On the road to Silverlight: Download...
Now that my site has been cleaned up, I want to add Silverlight content to it soon. I blogged about my plans here, and first of all I need to download all the development environment. That also includes Orcas (Visual Studio 2007) which is currently still in Beta. I didn't install it before because Microsoft told us that it was a bad idea to install it on a non-virtual machine, and that uninstalling it was very difficult. Since the last Beta 1 version, however, things are better and I have been told ......

Posted On Sunday, June 10, 2007 8:54 AM

Mobile blogging with my RealSimpleBlog ASP.NET control
OK, it seems to work rather well! We're now in Penang, and I am able to post pictures and blog entries. One very small problem only: The hotel sure has wireless network in the lobby, but you can only use it if you connect from the (wired) connection in your room first... So for me it's totally useless, as I didn't take my laptop but only my PDA. There are solutions: going to the internet cafe downstairs, or using the wireless access at Starbucks, but it's all a little less convenient than planned. ......

Posted On Saturday, July 15, 2006 8:25 AM

All ready to go... RealSimpleBlog control, Integration in PhotoAlbum
We're flying to Malaysia tomorrow... no wait... today (12.07.2006) after noon. And I managed to reach my goal, which was to integrate the RealSimpleBlog control V0.1 in my PhotoAlbum. Here are the features: I can edit blog entries (XML files) on my LifeDrive (Palm OS PDA), and then FTP them to my server. The entries are rendered by the control on the PhotoAlbum's main page. I can FTP pictures to a folder on my server. Another control I wrote creates a tabular view of the pictures' thumbnails. Actually, ......

Posted On Tuesday, July 11, 2006 10:15 PM

Back to ASP.NET this week / Silverlight plans / Chinese plans
ASP.NET: Updating RealSimpleBlog I decided to make an update (V0.5) to my RealSimpleBlog control. This control is used to display blog entries integrated in an existing webpage, without having to install a heavy infrastructure. Since it's a control, and not a framework like other existing blogging systems, it doesn't disrupt existing pages and integrates seamlessly without needing a lot of administration. To be fair, the control is still in an early stage, and I don't feel that I can distribute it ......

Posted On Saturday, June 2, 2007 9:00 AM

Another breaking change in ASP.NET 2.0: Session.SessionID
I only recently became aware of another breaking change in ASP.NET 2.0: In order to optimize session state management, some changes have been implemented. One of the most puzzling ones when you're not aware of it can be reproduced as follows: In ASP.NET 1.1, create a new web application. Add a label to the page, name it lblSessionID. <asp:Label Runat="server" ID="lblSessionID" /> In the code behind, add the following code in the "Page_Load" method: protected void Page_Load(object sender, EventArgs ......

Posted On Sunday, February 25, 2007 2:51 PM

JavaScript code minimizer (not obfuscator!)
A few years ago, I translated Douglas Crockford's JsMin from C to C#, because we wanted to use this functionality in our build process. JsMin is a code minimizer for JavaScript. It will remove all comments, empty lines, turn tabs into single spaces, etc... The goal is to reduce the size of JavaScript files to the minimum necessary, without modifying the functionality. Additionally to reducing the script's size, JsMin also makes it more difficult to read, however it is not an obfuscator. Objects, ......

Posted On Friday, February 23, 2007 4:47 PM

RealSimpleBlog features description, first draft
I just published the features description document (first draft) for my RealSimpleBlog control. After having published V0.4, which corrected quite a few bugs and added new functionalities, I needed to take a small break from code, and to take a step back to think of the next version. The result of these thoughts is compiled in the (incomplete) features description, and in the list of bugs and enhancements after V0.4. The major enhancement in that next version is going to allow me to use the RealSimpleBlog ......

Posted On Friday, December 22, 2006 10:53 PM

PhotoAlbum V1.12.2 released
I published V1.12.2 of the PhotoAlbum web application yesterday. Even though my "daytime job" took me quite a lot of time and energy lately (without even mentioning the kids ;-), it's been quite a major release, with a lot of bugs and enhancements. Thumbnailed view More screenshots here and here. I am especially happy to have unified the way all the controls on the page react, by implementing common functionalities in a base class. For example, each control is able to extract its embedded files (JavaScript, ......

Posted On Saturday, December 16, 2006 9:40 PM

WPF: SessionID management with CookieContainer
Following this post, I succeeded in adding cookie management to my latest WPF prototype. Cookie management in WPF and in WinForms applications is needed when you use a stateful web service, which uses HttpSessionState to store data about the current Session. When a web method is marked with the EnableSession parameter, the web service's Session property is set (otherwise it is null). However, the client must provide a way to store the cookie in which the SessionID (a unique string identifying the ......

Posted On Wednesday, October 11, 2006 9:20 AM

Session management in Web services: The power of Global
Following this post, I found it necessary to study more in detail the session management in ASP.NET web service applications. For quite some time I was very puzzled, because even the simpler tests would fail miserably, and a different SessionID would be returned on every call. In order to solve that problem, I got back to the roots. First, I developed a ASP.NET 1.1 web service, and tested a web method in a web browser, using the asmx URL. This returns a test page with useful information about the ......

Posted On Wednesday, October 11, 2006 7:28 AM

A simple AJAX service using Plain Old XML (POX), Part 1: Server-side implementation
I posted on my website an article showing in detail how to use an ASHX generic HTTP handler to answer simple AJAX requests. This is itended as an answer to many questions on various newsgroups I visit, asking how to use web services to perform simple tasks. In many cases, using SOAP based web services is overkill, and it's much easier and faster to use AJAX with plain old XML (POX) as a transport medium. It has actually become even easier with ASP.NET 2.0 and the ASHX handler, which allows lightweight ......

Posted On Friday, October 6, 2006 11:55 AM

Malaysia and Singapore pictures clean-up (ASP.NET PhotoAlbum)
I cleaned up and reposted the Malaysia and Singapore pictures from this summer. Before that I had to correct a few small bugs in my RealSimpleBlog custom control, which is now in version V0.2.2. It's a work in progress, which eventually will allow the user to place a blog-like content on any webpage he wants. Most existing systems nowadays are fullblown blog applications, and are more difficult to integrate smoothly in existing websites. The pictures page display the pictures interpersed with the ......

Posted On Sunday, September 24, 2006 1:32 PM

Using C# generics to extract enumerated flags from a numeric value
I posted a new page on my site, demonstrating how to use generics to extract enumerated flag values from an integer value in a generic way. I wrote this utility class, because I wanted a way to execute actions on the server using a URL query parameter sent from the client. Until now, when I wanted to execute an action, I was using a URL like: Then I was mapping the value 3 to an enum value, and would execute the corresponding action before rendering ......

Posted On Sunday, September 17, 2006 8:31 PM

Technical blogs and newsgroups I read
A colleague asked me what blogs I read, and I thought it would be interesting to blog about that ;-) My main activities in programming in the moment are .NET, especially ASP.NET, and WPF. ASP.NET also includes a lot of JavaScript programming, which was always one of my favourite subjects anyway. About JavaScript, I don't read blogs, but I can recommend the newsgroup comp.lang.javascript. I learned most of my JavaScript there over the years, and though the tone is sometimes passionate over what may ......

Posted On Saturday, September 16, 2006 9:08 AM

Converting a ASP.NET 2.0 Website to a Web Application Project
Version 1.12 of my PhotoAlbum web application was built using the "New website" menu in Visual Studio 2005. This creates a website project, which I was curious to try, as I didn't have any experience with it. I come from ASP.NET 1.1, where the model is very different. For example, you precompile the website before deploying it (in ASP.NET 2.0, it's not compulsory; you can deploy the ASPX files together with the CS files and it is compiled on demand). Also, in ASP.NET 1.1, you have total control on ......

Posted On Tuesday, September 12, 2006 7:43 PM

GalaSoftLb.Web.PhotoAlbum: V1.13 planning
I published V1.12 of the PhotoAlbum web application last week. Now is time for some planning, and preparing the next version. Since the PhotoAlbum uses other controls and utilities, I will coordinate all the versions and release them together with the PhotoAlbum's next version. The next PhotoAlbum release will be V1.13. I think that the one after that will be labeled V2, because most of the old code and the old structures will have been replaced by then. However it's not 100% sure yet. Together with ......

Posted On Sunday, September 10, 2006 6:53 PM

PhotoAlbum V1.12
I just published an important step towards V2 of my PhotoAlbum. Compared to the version I published on the 29th of August, there are no big functionality changes, except that it's now possible to add legends to the rotating headers on top of the main page, and to cycle through them using a "Next header" link. I will pack the code and make a custom control with it, to make it easier to add to a page (not that it's difficult now anyway). However, I made very big changes to the folder structure in the ......

Posted On Thursday, September 7, 2006 7:26 PM

PhotoAlbum works
I published yesterday a new version of my PhotoAlbum. This is the web application (running on ASP.NET 2,0) in which I experiment technologies which I find interesting in the moment. It's also my journal andmy pictures' gallery. During the holidays, I used this platform to post pictures and blog entries daily from Malaysia/Singapore, using two custom control I had developed for the occasion: RealSimpleBlog and Thumbnails. RealSimpleBlog is a control which is able to read XML files in a directory, ......

Posted On Tuesday, August 29, 2006 6:00 PM

Excel integration in (ASP).NET using OleDb
Most of my private programming time lately has been invested in my PhotoAlbum's new version, in which I implement bug corrections and prio 1 improvements over the version I used during the last holidays in Asia. I will publish that version soon together with a list of improvements. One important feature (or so I thought) is the ability to import the content of an Excel file into the XML files I use in the PhotoAlbum system. I use an Excel file as main repository for all my pictures' information, ......

Posted On Friday, August 25, 2006 2:23 PM

(Possibly breaking) change in ASP.NET 2.0
A colleague of mine made a comment to me last week that led me to a discovery: ASP.NET has a major change of behaviour, which might be breaking existing application: When a directory located under the web application root is deleted, all existing sessions are terminated, and the application ends. Why could that be breaking existing applications? Well, in theory, web applications should be stateless. However, it's very difficult to do more than very simple web apps without saving at least some information ......

Posted On Monday, August 21, 2006 8:37 AM

Mobile blogging now from Singapore
We left Penang this morning and are now in Singapore. I posted a lot more pictures in my PhotoAlbum, and practice showed a few fields for improvement: The file structure is too complex. I should be able to post all files in one folder, and if needed, the application should dispatch the files in the corresponding folder. When I FTP from my PDA, changing folders takes too long time. I forgot that the PDA uses linefeed only as line break, when the server uses carriage return-line feed (rookie mistake, ......

Posted On Monday, July 17, 2006 2:20 PM

RealSimpleBlog custom control (V0.1): Style sets and Integration
I didn't write for some time about my RealSimpleBlog control because I was quite busy with other subjects (WPF mostly). However, I am making nice progresses, and I think I can say without too many risks that the integration in my PhotoAlbum will be ready before we fly to Malaysia on wednesday. Actually, I also integrated the control on my main page, and if you select this link, you will see it in action! I also set the page up to generate a static HTML file on demand, so the old address is still ......

Posted On Friday, July 7, 2006 7:51 PM

RealSimpleBlog custom control (V0.1): Day 6
After a day-long hiking in the mountains of Appenzell with my 2 daughters and my sister, including a refreshing short swim in a cold mountain lake, it's very tired that I finished implementing the Priority 1 requirements of my RealSimpleBlog control. The last element missing was a thumbnails banner, i.e. a row of 1..n thumbnails and possibly some HTML formatted text following. Typically, I use this in my PhotoAlbum to illustrate some text with a few small pictures, and add a "More..." link leading ......

Posted On Saturday, July 1, 2006 1:47 PM

RealSimpleBlog custom control (V0.1): Day 5
I reached my goal for today, which was to implement the Image element. So now my blog control can display: Date, Title, Text, Frame, List, Image. The last one I still need to write is a small element displaying a thumbnail banner. Since thumbnails are made actually images, I can reuse my method, so it should be fast. I reworked the XSD schema, because the Image element was really too simple in the last version. I extended it with a Link, a Target for the link, and a ALT attribute, which is also used ......

Posted On Tuesday, June 27, 2006 8:46 PM

QuickNews and AvantGo
I spent yesterday's evening working on the other project occupying me in the moment, which will link QuickNews to AvantGo (two Palm OS programs which one can use to read RSS feeds). How to link them? Well, QuickNews is very good because it's fast, efficient and to the point. However, it doesn't render HTML, it cannot follow links, so sometimes it's just too short. AvantGo, on the other hand, is a HTML compliant reader, can follow links, can be used to browser online or offline (you have to synchronize ......

Posted On Tuesday, June 27, 2006 8:43 PM

RealSimpleBlog custom control (V0.1): Day 4
Nice job this weekend. I moved forward a lot, implemented major features, tested most of them pretty extensively, thought about the future, and learned new things. So far, the features implemented are: Date, Title, Text, Frame, List. Features not implemented yet are: Images, Thumbnails. That should follow soon. Another important feature implemented: Each entry has an attribute "archive-older". If this attribute is set to "true", no older entries will be displayed after the current one. However, if ......

Posted On Sunday, June 25, 2006 8:28 PM

RealSimpleBlog custom control (V0.1): Day 3
I did quite a lot of work yesterday, implementing the following elements: Title, Paragraphs, Frames. One feature I like in the control is that you can write big chunks of texts without having to care about formatting the text: the control will automatically insert <br /> and <div> elements to separate the text in smaller chunks. All you have to do is insert one carriage return, or two carriage returns. That will speed up text input. By the way, what I used to call V1 will actually be ......

Posted On Saturday, June 24, 2006 7:02 PM

RealSimpleBlog custom control (V1): Day 2
I spent an exciting evening yesterday starting to work on my RealSimpleBlog control. As usual when programming really starts, a few question arose, but mostly everything was very clear in my mind, thanks to the simple, but complete list of requirements I intend to implement before we go in holidays. That proves once again that even in a one-man team, even when programming private projects, even just as a hobby, a few simple rules help to be more efficient and to write better code. Off the top of ......

Posted On Thursday, June 22, 2006 7:15 PM

RealSimpleBlog custom control (V1): Day 1
I started writing my RealSimpleBlog control yesterday. The goal is to have V1 up and running by July 12th, which is the date we're flying off to Malaysia for 3 weeks holidays. I plan to integrate the control in my PhotoAlbum, and to blog on that page while I am away. That will provide a nice test for the concept. V1 will be pretty basic, considering I'll have only 3 weeks to implement it. But it will be the basis for future development, and I am pretty excited about it. RealSimpleBlog V1 Requirements ......

Posted On Wednesday, June 21, 2006 11:30 AM

Copyright © Laurent Bugnion | Powered by: | Join free