Geek Dad Blog on Tumblr
It's been very quite on this blog for a while now. Probably because I don't seem to find any time to write a blog post anymore. So I decided to create yet another blog where I will share video, links, images that inspire me as a Developer, but also as a Dad. And this Dad thing is probably also one of the reasons that I don't blog anymore
So check it out here : hufkens.tumblr.com
It doesn't mean that this blog is dead, so from time to time you wil get a small post about code or work related stuff. I am also active on Twitter so you can also follow me there.
Cheers!
Downgrade from iPhone OS 4.0 beta to v3.1.3
After the announcements about Apple iPhone OS 4.0, I immediately went to the Apple Developer site and downloaded the beta version. I never installed a beta version of the iPhone OS before so I thought that it would be stable enough for daily use. But it turns out that if you have only one iPhone (like most of us) then I would not advice you to install it yet.
This is what I encountered during the last couple of days:
- Because I own 3G, I missed the key feature of Multi-Tasking. And with no multi-tasking what's left?
- Folders: they work but for me they don't add something I was missing. It's also a bit difficult to darag and drop apps in and out folders.
- Mail: Nice new feature. Now I can read both my mailboxes from one list. This one actually is very nice.
- I could not test iBooks, iAd, Game Center.
- Some applications didn't work correct anymore. One of the apps I use a lot and cannot miss is TomTom, but it became very unstable. I also encountered minor issues with other apps, but most of them worked.
- The reason why I really wanted to downgrade was that I had to reboot/reset my iPhone more in the last couple of days, then since I owned it.
And (being new to installing beta firmware) I found out that you could not easily revert back to the current 3.1.3 version of the OS. After a bit of "Googling" and experimenting, finally these blog posts helped me out :
- Just Another iPhone Blog: Quick Tip: Downgrading 4.0 beta to 3.1.3
- iClarified: How to Put an iPhone Into DFU Mode
This worked for me, so I hope it works for you too. I now have a stable phone again
Microsoft Techdays 2010
This year's Techdays came at the right time. I am currently actively working on a project built with Silverlight and WCF RIA Services. So some of the sessions should be right up my alley. Overall it was a pretty good conference. The content was a lot more actual then last year, which meant that we got a lot of MIX10 content.
These are the sessions I attended:

- Silverlight 4 tour de force, with a little WPF sauce on top (Gill Cleeren & Katrien De Graeve)
- Developer Walkthrough: how we built De Kinderpuzzel (Boris Rogge)
- C# 4.0 and beyond (Anders Hejlsberg)
- A day in the life of a Silverlight/WPF Integrator (Laurent Bugnion)
- ASP.NET MVC 2: Ninja Black Belt Tips (Scott Hanselman)
- Building Windows Phone Applications with Silverlight (Giorgio Sardo)
- Understanding the Model-View-ViewModel pattern (Laurent Bugnion)
- Introducing the Windows Phone 7 Series developer experience (Charlie Kindel)
- Building business data-driven applications FAST using WCF RIA Services and Silverlight (Gill Cleeren)
So, let me give you a quick recap of some of the sessions I attended, and what I got out of it for myself as a Silverlight UI Developer. My first day started with Gill Cleeren & Katrien De Graeve giving us an overview of the new features that will be available in the new versions of Silverlight and WPF. It proves again that Microsoft is definitely going very fast in adding new features to the Silverlight platform. Most of those features I already mentioned in my previous post, but it was nice seeing some of this goodness in action. Now come on Microsoft, let's release it and we really can start using it.
Another unexpected, but interesting session was the lunch session where Boris Rogge (metanous) gave us an insight into the architecture and code of the application used in the TV show De Kinderpuzzel. I liked his session because the story sounded so familiar: short deadline (3 weeks), last minute design changes and pragmatic choices in coding. The result worked an looked pretty nice. I sure would like to work on a MS Surface project one day (but preferably with a bigger deadline).
Next up was Technical Fellow Anders Hejlsberg about the new C# 4.0 features and most of the new stuff boils down to support for dynamic programming. This can be done through the dynamic keyword in C#. The following code shows the use of the dynamic keyword:
int sum = calc.Add(10, 20);
it let's you call an object, for example a Javascript function on the HTML page or a COM Object without knowing it's members at compile time. The actual call the the Add method will be resolved at runtime. Pretty cool stuff, it makes C# a dynamic language in a statically typed way way. If you want to know more about this, read this post by Scott Hanselman. At the end he shows us a demo of what the future has in store for the CLR.
Then Laurent Bugnion showed us some Blend goodness and a list of tools that can be very useful while integrating the Design into the actual application. I suppose his slides will be up later on, but I remember the following tools: Silverlight Spy, Kaxaml. He also reminded me that I should be using Blend more, because if I see him using the tool it all seems so easy. Why do I always end up editing the XAML manually? Because this can be a painful experience.
I am not actively working with ASP.NET anymore, so I had no expectations about Scott Hanselman's session. It just appealed to me because of the word Ninja in the session's title. After warning people that it was really a session for advanced ASP.NET developers, I still stayed in my seat and relaxed. He showed a lot of cool features, and especially T4 (aka. Text Template Transtormation Toolkit) seems like a damn powerful tool and best kept Visual Studio Secret. I can't actually explain what it does, but you can read all about it on his blog. The session was great and he was definitely the best speaker of the day. Too bad the session was a bit out of my league.
To end the long day, I decided to stay until the very end to attend the Windows Phone 7 Series session. Giorgio Sardo showed us some of the features already available in the current CTP version of the WP7 Developer tools. It all felt very familiar, so if you have some Silverlight knowledge you can go ahead and start creating apps for the Phone. You can debug your application on the emulator or directly on the device. This opens up the Market Place for a very large community of developers.
The session I looked forward to was the session about Model-View-ViewModel on the second day. I am currently working on a project that uses the MVVM pattern, and I was curious to see what the MVVM Light Toolkit could add for me. It was good to see that the implementation I did was very similar to the one in the Framework. Although I still have to get used to using those lambda expressions myself, I really likes the Messaging and Commanding framework. I am definitely going to use it, when I need it, and yes tomorrow I will start using lambda expressions myself. If you want to see his session checkout my previous post that contains his session at MIX10. The session was clear, nicely built up, and I will use it as a reference if I ever have to explain MVVM again to fellow developers.
To conclude, the Microsoft Techdays this year were a success for me. See you next year
Understanding the Model-View-ViewModel Pattern
This post is a follow-up on my previous post concerning the Model-View-ViewModel Pattern in Silverlight. Laurent Bugnion (@LBugnion) talks about his MVVM Light Toolkit and explains the Pattern in his session at MIX10.
If you want to start implementing the Pattern check out the the MVVM Light Framework on CodePlex or read the tutorials on GalaSoft. The Framework is easy to use and lightweight. It also adds support for Commands in Silverlight, which is not supported in Silverlight 3 and it contains a lightweight Messaging Framework to communicate between different ViewModels and/or Views.
Next week I'm going to the Microsoft TechDays 2010, so if you're planning to go make sure you check out his Laurent's session. See you there.
Exciting times for Silverlight Developers
I am currently working on a large Silverlight application. It's a challenging project on architecture and UI implementation. With the announcements at Mix 2010, it's definitely a good time to be a Silverlight Developer. The platform has taken a big step forwards in version 3, but check out the long list of new features in Silverlight 4 RC (source: silverlight.net).
New Features for Application Developers
- Comprehensive printing support enabling hardcopy reports and documents as well as a virtual print view, independent of screen content.
- A full set of forms controls with over 60 customizable, styleable components. New controls include RichTextbox with hyperlinks, images and editing and Masked textbox for complex field validation. Enhanced controls include DataGrid with sortable/resizeable columns and copy/paste rows.
- WCF RIA Services introduces enterprise class networking and data access for building n-tier applications including transactions, paging of data, WCF and HTTP enhancements.
- Localization enhancements with Bi-Directional text, Right-to-Left support and complex scripts such as Arabic, Hebrew and 31 new languages including Vietnamese and Indic support.
- The .NET Common Runtime (CLR) now enables the same compiled code to be run on the desktop and Silverlight without change.
- Enhanced databinding support increases flexibility and productivity through data grouping/editing and string formatting within bindings.
- Managed Extensibility Framework supports building large composite applications.
- Exclusive tooling support for Silverlight, new in Visual Studio 2010. Including a full editable design surface, drag & drop data-binding, automatically bound controls, datasource selection, integration with Expression Blend styling resources, Silverlight project support and full IntelliSense.
Developer tools
- Fully editable design surface for drawing out controls and layouts.
- Rich property grid and new editors for values
- Drag and drop support for databinding and automatically creating bound controls such as listbox, datagrid. New datasources window and picker.
- Easy to pick styles and resources to make a good looking application based on designer resources built in Expression Blend.
- Built in project support for Silverlight applications
- Editor with full intellisense for XAML and C# and VB languages.
Empowering richer, more interactive experiences
- Fluid interface enhancements advance application usability through animation effects.
- Webcam and microphone to allow sharing of video and audio for instance for chat or customer service applications.
- Audio and video local recording capabilities capture RAW video without requiring server interaction, enabling a wide range of end-user interaction and communication scenarios for example video conferencing.
- Bring data in to your application with features such as copy and paste or drag and drop.
- Long lists can now be scrolled effortlessly with the mouse wheel.
- Support conventional desktop interaction models through new features such as right-click context menu.
- Support for Google’s Chrome browser.
- Performance optimizations mean Silverlight 4 applications start quicker and run 200% faster than the equivalent Silverlight 3 application.
- Multi-touch support enables a range of gestures and touch interactions to be integrated into user experiences.
- Multicast networking, enabling Enterprises to lower the cost of streaming broadcast events such as company meetings and training, interoperating seamlessly with existing Windows Media Server streaming infrastructure.
- Content protection for H.264 media through Silverlight DRM powered by PlayReady.
- Output protection for audio/video streams allowing content owners or distributors to ensure protected content is only viewed through a secure video connection.
Move beyond the browser
For Sandboxed applications
- Place HTML within your application enabling much tighter integration with content from web servers such as email, help and reports.
- Provide support for ‘toast’ notification windows, allowing applications to communicate status or change information while the user is working on another application through a popup window on the taskbar.
- Offline DRM, extending the existing Silverlight DRM powered by PlayReady technology to work offline. Protected content can be delivered with a persistent license so that users can go offline immediately and start enjoying their content.
- Control over aspects of UI include window settings such as start position, size and chrome.
For Trusted applications
- Read and write files to the user’s MyDocuments, MyMusic, MyPictures and MyVideos folder (or equivalent for non-windows platforms) for example storage of media files and taking local copies of reports.
- Run other desktop programs such as Office, for example requesting Outlook to send an email, send a report to Word or data to Excel.
- COM automation enables access to devices and other system capabilities by calling into application components; for instance to access a USB security card reader.
- A new user interface for requesting application privileges access outside the standard Silverlight sandbox.
- Group policy objects allow organizations to tailor which applications may have elevated trust.
- Full keyboard support in fullscreen mode richer kiosk and media applications.
- Enhancements to networking allow cross-domain access without a security policy file.
- Custom Window ‘chrome’ to provide a highly branded experience
Silverlight for Windows Phone
And on top of that Microsoft announced that Silverlight is the application development platform for Windows Phone 7 Series. High performance gaming is also supported through the XNA Framework. Silverlight for Windows Phone supports core Silverlight capabilities in managed .NET code with XAML including.
Read more about Silverlight for Windows Phone here:
- Silverlight for Windows Phone - silverlight.net
- Windows Phone 7 Series Developer Training Kit - Channel 9
- Windows 7 Phone for Developers
Now please Microsoft give me a Windows Phone, so I can start developing
Playing with Maven & NativeProcess API in AIR 2.0
I have been playing with Adobe AIR 2.0 beta 2 for a couple of weeks now. And because we use Maven for our bigger development projects at Nascom, I decided to create a small proof of concept app to wrap the most used Maven commands. Off course Maven is a very powerful asset when building big Java based applications, but for a some of my colleague Flex developers it can be a frustrating experience. Working with the command line is not the preferred thing to do for a developer that is working most of the time on building user interfaces.
So to avoid these frustrations and to experiment with Adobe AIR 2.0 beta 2, I created this small app that calls some of our most used maven commands:
- mvn flexmojos:flexbuilder (generates the Flex Builder project settings)
- mvn jetty:run (starts the Jetty webserver)
- mvn jetty:stop (you will need to and an extra setting in the project's pom.xml file)
- ...
So what's this post all about?
First it's about the code that uses the new NativeProcess API available in Adobe AIR 2.0 to call Maven commands and process (display) the output of these commands. On the other hand I have built a small tool that could be useful for all you frustrated Flex developers that have to know commands to start and stop servers, and all that magic mojo stuff (Flexmojos). The current example only has a very limited list of commands (see above). But it could be a start for another great productivity app, because with the NativeProcess API you can now take advantage of almost everything on your OS. Only be aware that when doing this you are mostly writing OS specific code.
How does it work?
Start the application in Flash Builder and drag and drop the pom.xml (this is a Maven project file) file from the root of the project to the app, and then the xml file will be parsed. There are normally al least two modules: a server (war) module and a flex (swf) module. And they each support different commands.
There are however still a couple of issues. So if anybody can help me out here, that would be very appreciated.
- Because the NativeProcess can't call .bat files directly, you need to use a workaround calling cmd.exe and passing the mvn.bat file as a parameter. It works great while running from Flash Builder. But in the installed app it shows the cmd.exe window. Read more about this issue here. So if anybody has a solution, that would be appreciated.
- UPDATE 30-10-2010: As you can read in this forum thread, this issue is going to be fixed in the 2.0 release. That's good news, so I might go through with this small little app.
- At the moment there is only support for windows. Of I figure out how to run the Maven process from a Mac I will add Mac support. More about issue that here.
- If you run the server and close the app, then the server (java.exe) still keeps running in the background.
- And it lacks a lot of features, so feedback is welcome.
If you are interested, check out the code on Google Code: it's called The Ma(ven)trix.
Model-View-ViewModel in Silverlight and Flex
Last year I have been working a lot on Flex applications, and because of this I usually take my experience from Flex development and apply it to Silverlight. One example is the PureMVC framework that we use at Nascom for most RIA applications we build. The framework also has ports towards other technologies and one of these is the C# Silverlight port. I recently checked it out but they seem to have trouble keeping up with the speed of Microsoft's Silverlight releases.
So let's see if I can bring some of the patterns I learned while developing Silverlight into the world of Flex. One specific pattern that I want to talk about is the Model-View-ViewModel pattern. It's a specialization of the PresentationModel design pattern introduced by Martin Fowler specific for the Windows Presentation Foundation (WPF). Yeah, but what about the MVC pattern? Doesn't that already cover all our problems? In the MVC pattern, the model is the data, the view is the user interface, and the controller is the programmatic interface between the view, the model, and the user input. This pattern, however, does not seem to work well in declarative user interfaces like Windows Presentation Foundation (WPF) or Silverlight because the XAML that these technologies use can define some of the interface between the input and the view (because data binding, triggers, and states can be declared in XAML). And for the same reason it also applies to Flex, and even more to Flex4 because MXML will become more declarative in the future.
So what is the Model-View-ViewModel? The pattern is an adaptation of the MVC pattern in which the view model provides a data model and behavior to the view but allows the view to declaratively bind to the view model. The view becomes a mix of XAML and C#, the model represents the data available to the application, and the view model prepares the model in order to bind it to the view.
Probably most Silverlight developers out there are already familiar with this pattern, but I created two small sample applications (one in Silverlight 3 and one in Flex4 beta 2) to compare both technologies and give you an idea how it works. Both applications do exactly the same thing. They load an XML file with data (Phones) and display this data using data binding. You can change the amount so that you can see the total price changing. Yeah, this is definitely no rocket-science (doh, should have used rockets!) , but it works. The Silverlight client loads the XML file using LINQ. LINQ is pretty cool and powerful, but it still takes more code to parse an XML file in Silverlight than it does in Flex using e4x.
You can download the source files for the Silverlight 3 and Flex4 demos here.
Model-View-ViewModel in Silverlight 3
Model-View-ViewModel in Flex 4 (right click to view source)
What do you think? I find this pattern easy to use in applications that depend heavily on data binding like Silverlight and maybe also Flex. But I think I will still be using PureMVC for my next big Flex Project.
Awesome iPhone app: Hipstamatic
I wanted to share my experience with a must have iPhone app, Hipstamatic.
The Hipstamatic for iPhone is an application that brings back the look, feel, unpredictable beauty, and fun of plastic toy cameras from the past.
Hipstamatic was a short-run plastic camera developed in the 1980's by two art school dropouts in Wisconsin, USA. It was never mass produced because the makers died in a tragic accident. You can read more about this in the Wikipedia Article and the Great Hipstamatic 100 Tribute page.
It is definitely one of the best designed applications in the AppStore. It actually feels like you are using a real analog camera. This app also has a very good implementation of the In App Purchase. The camera comes equipped with a couple of lenses, films and one flash. But you can buy other available lenses, films and flashes to create your unique photographs. At the time of writing the app is only 1,59 €, so that's a no-brainer. Buy this app and and get amazed with the user experience and the awesome photographs.
I have been playing around with the application and you can find my pictures on Flickr. There is already a great community growing on Flickr. Check out all the pictures tagged with Hipstamatic.
Checkout how it works in this video:
The cyclist iPhone app: PedalBrain
I haven't been riding my bike a lot lately. Mainly because it's winter now, but also because of the fact that I want to spend as much time as possible with my son. But maybe this can get me back on my bike in the spring time.
I have tried several GPS tracking devices when riding my bike: GPSKit, Trails, GPSies and RunKeeper. Especially the last one is a great app, but they are still initially created for runners or hikers.
Today however I discovered the existence of the PedalBrain iPhone app. It looks very nice, has integration with ANT+ enabled devices and I immediately fell for the Carbon Fiber mount that can be mounted on the steerer tube. An yeah, it's still a prototype but I would definitively buy it. Off course it also has a website where you can analyze your workouts. This is how they describe the product:
Pedal Brain can be thought of as three integrated products. First, it's an iPod and iPhone ANT+ accessory. Second, it's a complete training log. Third, it's a coaching platform.
If you want to find out more about this promising looking app check out their website.
Silverlight 4 beta announced
Today at the Microsoft Professional Developer conference, Scott Guthrie announced the availability of Silverlight 4 Beta. Yes it's still a beta but the feature list is quite impressive:
- Webcam and Microphone access.
- Mousewheel and Right-click support.
- HTML Hosting in WebBrowser (not really sure if this is good or bad, cause it brings an embedded IE into every browser)
- Elevated thrust, Local File access, COM interoperability, Notifications "Toast" API.
- Network authentication, basically support for basic authentication, ...
- Right-to-left and bi-directional text
- Enhanced data-binding features.
- Official Google Chrome support.
- For more details and an extensive list of the new features check Tim Heuer's blog or the Silverlight.net site.
Some of the features were just missing and have been available in the Flash platform for a long time, but I am impressed by the speed that those features get implemented by the Silverlight development team. They have also added a lot of offline features that moves Silverlight even more towards Adobe AIR. One advantage I see here is that, once a user has installed the Silverlight plug-in he/she doesn't need an extra installation for running offline applications with access to the file system and elevated access.
I haven't seen the file size of the Silverlight 4 beta plug-in, but I am definitely curious to see how they can squeeze in all those features and still keep the download small enough.
If you want to try this out you will need at least the following tools:




