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 JavaScript Client-side JavaScript
Talking at MIX09: Las Vegas and the continuum
One of my dreams is going to come true: Since the very first time I attended MIX in 2006, I have wanted to talk there. MIX has a very special meaning for me. It is in the Venetian conference rooms that I heard about Windows Presentation Foundation and what would later become Silverlight. It is there that me and my two colleagues Andreas and James decided that we wanted WPF for the project we had just started at Siemens. A decision that was definitely the right one, from a technical point of view ......

Posted On Saturday, February 21, 2009 10:33 PM

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

Google search on my website
I've been wanting to add a search box to my website for quite some time, and also wanted to play with Google AJAX Search API. Turns out it's a very easy API to use! I simply wrapped their search control in a PositionedNode and FadedNode, and added a higher-lever object to "hide" Google's syntax and offer a higher level interface. So from today, you can now use the "Search" menu to search the website and also (in the same dialog) this blog. Read the rest of this entry » ......

Posted On Saturday, September 1, 2007 11:20 PM

Updated PositionedNode (DHTML effect) / Arrived in Tacoma
End of January, I made an update to my PositionedNode DHTML effect, but too busy with WPF activities, I never managed to publish it. Having just sat 14 hours in a plane, I finally took the time to do it. There are 4 major changes: With V1.2, it's now possible to use any CSS unit to position the HTML element, for example em, points (pt), pixels (px). This functionality uses the JavaScript class gslb.CssLength. It's now possible to specify all the style attributes in external CSS files, using either ......

Posted On Monday, March 26, 2007 1:17 PM

Updated FadedNode (DHTML) / Archived old JavaScript pages
This DHTML fading effect, where a given node's opacity changes smoothly from one minimum value to a maximum value and back, has been updated. The update is very minor: Now it's not necessary anymore to define an opacity in the node's "style" attribute. The opacity can be defined in external CSS files, or even not be defined at all (in which case the opacity is equal to 100%). Also, I archived my old "JavaScript consulting" pages. Most of the advices given on these pages are still valid, but the pages ......

Posted On Saturday, March 24, 2007 10:19 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

JavaScript guidelines published
In agreement with the head of our R&D department, I published my firm's JavaScript Coding Guidelines. I work for Siemens Building Technologies. We developed these guidelines for a web application project in 2004, based on our C# guidelines. Please note the following: The purpose of publishing this document on the World Wide Web is to promote and encourage consistent practices in the JavaScript programming community. We publish this document as information only. Siemens will not accept any responsibility ......

Posted On Monday, February 5, 2007 3:19 PM

JavaScript: CSS length manipulation and conversion
CssLength class: In the course of improving my DHTML PositionedNode, one thing I really wanted is to be able to handle other units than just pixels. In order to do that, some conversions are needed. To make this easier, I developed a helper class named CssLength. Converting from one unit to the other can be tricky. The conversion depends on quite a few things (mostly the way font size is set in the node's hierarchy in the DOM), and there is not a simple arithmetic way to convert ems to pixels for ......

Posted On Saturday, January 27, 2007 10:49 PM

DHTML effect: Positioning
Continuing to clean up the DHTML effects I use on my site (see my previous post), I published a Positioning and Scrolling effect. It's quite handy, in that it allows to easily keep a DOM node (DIV, ...) in sight of the user at all times. This can be used, for example, for a "floating menu" like I have on my main page. The DOM node moves with a variable speed. What I especially like in the way this effect is implemented is that the user can specify his own function to calculate the speed of the DOM ......

Posted On Monday, January 15, 2007 9:38 PM

DHTML effect: Fading
I am working on a new addition to my RealSimpleBlog control (more about that later), and that gives me the occasion to clean up a few DHTML effects I have on my website. The goal is to make a JavaScript library, which, contrarily to the well known prototype.js or others, should be lean and modular, and use advanced JavaScript programming technique while sticking to accepted best practices for JavaScript programming (quite a program... To achieve this, I have one JavaScript file per effect (this allows ......

Posted On Saturday, January 6, 2007 10:14 PM

Saving files with JavaScript: CExplorer (demo)
Many people assume that client-side JavaScript cannot perform file-system operations on the client computer. Actually, the objects needed are often found in the browsers, and the rest is only a matter of compatibility (the way IE saves files is very different from the way Firefox saves files...) and of permissions. In order to perform critical file-system operations, the script must be granted privileges. There are different ways to get these privileges, and unfortunately, these are very different ......

Posted On Monday, June 19, 2006 1:54 PM

Setting cookies with JavaScript: CCookie
I posted my CCookie JavaScript object in answer to a question asked in comp.lang.javascript. This object offers an abstraction to the cookie interface present in the web browsers, and allows using methods instead of manipulating the cookie string directly. The code is self documented, and I'll extract the documentation soon. To document my JavaScript object, I use an extended version of the XML code documentation used in C#. The extensions allow to specify the type of a parameter, of a return value... ......

Posted On Tuesday, June 13, 2006 8:34 PM

Copyright © Laurent Bugnion | Powered by: