Maarten Balliauw {blog}

ASP.NET, ASP.NET MVC, Windows Azure, PHP, ...

NAVIGATION - SEARCH

Just Another Wordpress Weblog, But More Cloudy

4322759659_6cab114506_b Slides of my talk at the PHPBenelux conference last weekend are online. Bit of a pity my live demo went wrong due to my www.azure.com trial account going into read-only mode while doing the demo.

Abstract: "While working together with Microsoft on the Windows Azure SDK for PHP, we found that we needed an popular example application hosted on Microsoft’s Windows Azure. Wordpress was an obvious choice, but not an obvious task. Learn more about Windows Azure, the PHP SDK that we developed, SQL Azure and about the problems we faced porting an existing PHP application to Windows Azure."

Thanks for joining the conference and my session! And thanks to the PHPBenelux crew for organizing their first conference ever, it rocked!

MSDN session on ASP.NET MVC

As promised to all people attending my online session on ASP.NET MVC this afternoon, here is the slide deck I’ve used.

I must say, doing a presentation using Live Meeting and a Microsoft Roundtable device seemed a bit strange at first. However, the setup that is used to do this kind of sessions is really cool to work with! Make sure to check Katrien’s blog for all other Live Meeting MSDN sessions that are planned.

kick it on DotNetKicks.com

Speaking at DevDays 2009, The Hague (and more)

DevDays09, The NetherlandsSome Great news (at least: I think this is great :-)): Kevin Dockx and I will be giving a session on PHP and Silverlight at the Netherlands DevDays09. This event, aimed totally at developers, will take place on May 28 and 29th in The Hague (Den Haag). It’s the first time the DevDays are hosting sessions related to PHP, and it’s also the first time I’ll be speaking at an event of this size.

Our session will cover the basics of Silverlight and show you how you can create rich web applications using the best of 2 worlds: Silverlight and PHP.

dpc09_speakerNext to this event, we’ll be doing this very same session at the Dutch PHP Conference in Amsterdam, which will take place June 11 – June 13th. Yes, we are evil, doing a presentation on Microsoft technologies at a PHP event.

And now that I’m announcing upcoming sessions anyway… I’ll be doing a session on mocking at VISUG (Visual Studio User Group Belgium). Come visit us at May 7th! This session will show you the basics of unit testing without having to rely on external dependencies like databases, WCF services, ... and will show you how you can reproduce behaviour in a unit test that might be otherwide difficult to test.

Oh, and another one: MSDN Belgium is hosting some virtual events. I’ll be doing a session on the ASP.NET MVC framework (in Dutch) on April 23 at 14:00. Check the MSDN pages for more info (yet to come). Here’s the abstract of that session:

"Join us for this 90 min session and get a developer-focused overview on ASP.NET MVC (Model-View-Controller), a new approach in building ASP.NET applications. Learn how the new ASP.NET MVC framework differs and can be an alternative to the current ASP.NET Web Forms framework. This session will help you to learn how to take advantage of ASP.NET MVC to build loosely coupled, highly testable, agile applications. You will see how ASP.NET MVC provides you with fine-grained control over both HTML and JavaScript."

Sample chapter from ASP.NET MVC 1.0 Quickly

image Here’s a shameless, commercial blogpost… With yesterday’s 1.0 release of the ASP.NET MVC framework, I’m sure the following sample chapter from my book ASP.NET MVC 1.0 Quickly will be of use for people starting ASP.NET MVC development: Your first ASP.NET MVC application.

When downloading and installing the ASP.NET MVC framework SDK, a new project template is installed in Visual Studio. This chapter describes how to use the ASP.NET MVC project template that is installed in Visual Studio. All ASP.NET MVC aspects are touched briefly by creating a new ASP.NET MVC web application based on this Visual Studio template. Besides view, controller, and model, new concepts including ViewData—a means of transferring data between controller and view, routing—the link between a web browser URL and a specific action method inside a controller, and unit testing of a controller are also illustrated here.

In this chapter, you will:

  • Have an overview of all the aspects of an ASP.NET MVC web application
  • Explore the ASP.NET MVC web application project template that is installed in Visual Studio 2008
  • Create a first action method and corresponding view
  • Create a strong-typed view
  • Learn how a controller action method can pass strong-typed ViewData to the view
  • Learn what unit testing is all about, and why it should be used
  • Learn how to create a unit test for an action method by using Visual Studio's unit test generation wizard and modifying the unit test code by hand

Download the free sample chapter here. Or order the full book, here. That’s a better option ;-)

By the way, if you are interested in the book writing process itself, check my previous blog post on that.

kick it on DotNetKicks.com

Announcing my book: ASP.NET MVC 1.0 Quickly

ASP.NET MVC 1.0 Quickly It’s been quite a job, but there it is: Packt just announced my very first book on their site. It is titled “ASP.NET MVC 1.0 Quickly”, covering all aspects ASP.NET MVC offers in a to-the-point manner with hands-on examples. The book walks through the main concepts of the MVC framework to help existing ASP.NET developers to move on to a higher level. It includes clear instructions and lots of code examples. It takes a simple approach, thereby allowing you to work with all facets of web application development. Some keywords: Model-view-controller, ASP.NET MVC architecture and components, unit testing, mocking, AJAX using MS Ajax and jQuery, reference application and resources.

That’s it for the marketing part: let’s do a retrospective on the writing process itself. Oh and yes, those are my glasses on the cover. Photo was taken on the beach near Bray-Dunes (France).

When did you have the idea of writing a book?

I'm not sure about that. I've been blogging a lot on ASP.NET MVC last year, wrote an article for .NET magazine, did some presentations, ... It occurred to me that I had a lot of material which I could bundle. Together with that, my project manager jokingly said something like: "When will you write your first book? With all that blogging." So I did start bundling stories. First of all, I overlooked the whole ASP.NET MVC technology (preview 2 at that moment) and decided there were enough topics to talk about. A draft table of contents was built quite quick, but I gave up on writing. Too much information, not enough time, ...

A few weeks later, it must have been around the beginning of May, 2008, I did start writing a first chapter, thinking I'ld see how the writing itself would turn out, if it fit in my schedule, ... It worked out quite well, each 10-20 days gave me a new chapter. I also started looking for a publisher when I was finished with chapter 6 or so. Having reviewed some books for Packt, I contacted them with a proposal for my book.

After having a look at the other 6 upcoming books (here and here), we decided we could go for it, focusing on a hands-on book which rapidly guides you into the wonderful world of ASP.NET MVC.

How was your experience of writing your book?

Looking back, it was an interesting experience. I decided to write in English, which is not my native language. That was actually quite a hard one: writing in English is no problem, but writing a good, solid and interesting piece of text is just not that easy when writing longer texts than the average blog post. Another thing is that I tortured myself writing about a product that was not even beta yet! I started writing with ASP.NET MVC preview 3, updated it all to preview 4, 5, beta, release candidate, ... Lots of changes in the ASP.NET MVC API or concepts meant lots of changes to make in chapters I already wrote. Luckily, I survived :-)

I only contacted a publisher when I had finished 60% of my book. If you are considering writing: don't do this! Contact a publisher at a very early stage: they normally give you lots of advice upfront, which I only received after contacting them. Advice earlier along the way is always better, so that's something I would definately do different.

Speaking of advice: when writing was done, the book entered review phase. Different people received the draft version and could provide comments and suggestions. Thanks Stefan, Troy, Vivek, Jerry, Joydip and people at Packt for your time in reviewing my draft version! Reviewer comments really made the book better and required me to do some small rewrites, elaborate more on certain topics.

What tools did you use for writing?

There are some tools that you really need when writing a technical book. One of them is a text editor, in my case Microsoft Word 2007. Together with that, Visual Studio 2008 and regularly updated ASP.NET MVC versions were required. Being scared of losing data, I decided to also use a source control system for sample code ánd for my Word documents. All of these files were stored in a Subversion repository located on my server, being backed up every day to different locations. Doug Mahugh laughed at me when I said I was using Subversion, but it did a great job!

Other tools I used were Paint.NET and MwSnap, both for creating screenshots in my virtual PC running Windows Vista and Visual Studio 2008. I also used Achievo for time tracking purposes, since I was curious how much time this book writing would actually cost me.

How much time did you spend writing?

First of all, this is not going to be 100% accurate. I did track writing and development time during writing, but I already had a lot of material to work with. But here's an overview (numbers in hours):

image

That is right: writing a book consumes only a little more than 100 hours! But still, I already had lots of material. I'd say to double the number for an accurate timeframe.

Now I hear the next question coming... Here's the answer already: Yes, I have a girlfriend. We are working on our home (planning phase is done, searching a contractor at the moment), visiting family, doing daily stuff, blogging, work, ... It al worked out to fit together, but still: there have been some busy moments on evenings and weekends. Thanks, people around me, for being patient and caring during these busy moments!

Are you getting rich out of this?

Of course, I can grab a couple of beers (for a couple of times), but don't think writing a book will buy you a car... I just felt that I had lots of valuable information that I had to share, and writing a book seemed like the best option to do that. Creating a "to read"-list? Make sure to add ASP.NET MVC 1.0 Quickly to it.

kick it on DotNetKicks.com

Checking username availability with jQuery (screencast)

A new screencast has just been uploaded to the MSDN Belgium Chopsticks page. Don't forget to rate the video!

Checking username availability with jQuery

Abstract: "This screencast explains how to use jQuery and the ASP.NET MVC framework to quickly add a username availability checker to a user registration page."

kick it on DotNetKicks.com

PHPExcel featured in php|architect / November 2008

Cover of php|architect / November 2008 Nice to see that there's a lot of activity going on related to PHPExcel! This weekend, I receievd my electronic copy of php|architect / November 2008 featuring an article on generating PDF and Excel files using PHP. Guess which library is being used in the second part of the article...

While reading the article, I noticed a very cool thing: the author, Aaron Wormus, is using a convenient way to generate charts in PHPExcel using Google Charts API. Since PHPExcel currently does not support creating graphs, this is really a good method to use charts in PHPExcel generated Excel files. Here's a screenshot of the generated file in the magazine:

image 

Sweet!

Article on ASP.NET MVC in .NET magazine #21

.NET magazine 21 Yesterday, I received the new Dutch edition of .NET magazine containing my article on the ASP.NET MVC framework. Since the article was written quite a while ago, soucre code is no longer up-to-date. Readers who are interested (or anyone else interested in ASP.NET MVC) can download up-to-date code examples on the ASP.NET MVC guestbook page.

kick it on DotNetKicks.com