Tuesday, December 11, 2007

ASP.NET MVC is here

ScottGu has announced the CTP release of ASP.NET 3.5 Extensions. This is great news for ALT.NET and really has made my week. As regular readers might realise the key part of this release for me is the MVC (Model-View-Controller) framework for ASP.NET.
“ASP.NET MVC: This model view controller (MVC) framework for ASP.NET provides a structured model that enables a clear separation of concerns within web applications, and makes it easier to unit test your code and support a TDD workflow. It also helps provide more control over the URLs you publish in your applications, and more control over the HTML that is emitted from them.”
I think this finally gives ASP.NET developers some much needed flexibility. The guys at Microsoft are taking pains to point out this is not a replacement for the existing WebForms model, but they point to the following reasons to use the new framework:
  • It allows developers to use the MVC pattern with ASP.NET more cleanly than ever before.
  • It makes it easier to implement RESTful (Representational State Transfer) systems and to control your URLs using ASP.NET
  • The MVC pattern allows for easier unit testing of business logic behind pages (now in controllers) and therefore helps promote the use of Test-Driven Development with ASP.NET.
I have some personal reasons for looking forward to this framework that may be too politically sensitive for the ASP.NET guys to admit to:
  • This kills off the one form per page restriction, allowing for XHTML that more closely matches the functionality of the page.
  • No more viewdata is a pain, but it also means that ASP.NET developers can now more easily incorporate other client-side frameworks into their applications (e.g. Yahoo! User Interface Library, Script.aculo.us, Prototype, etc)
  • Ruby on Rails is looking a whole lot less attractive as ASP.NET MVC offers much of the same clarity of design whilst leveraging my existing ASP.NET skills.
I will probably devote a few more blog posts to exploring this interesting ASP.NET development, so feel free to let me know (via the comments) what you might be most interested in knowing about.

Monday, December 10, 2007

Elcom is hiring

My workplace (Elcom Technology) is looking to hire two junior .NET developers who are looking at working in a medium sized shop (35 staff overall, with 14 developers) and looking to get mentored and grown to become gurus in their own right.

The job ad is on Seek. Please feel free to apply or mention it to your friends.

This is one of the best places I've ever worked at, and there is a great bunch of experienced developers here you can learn from. This might be the start of your own personal walk on The Long Road:
To become truly good at programming is a life's work, an ongoing enterprise of learning and practicing.
Ron Jeffries

Wednesday, November 21, 2007

Yahoo! Pipes rocks without Flash or Silverlight

Roy Osherove is talking lots about Yahoo! Pipes and they look very interesting – here is a screenshot of one I was in the middle of creating (you can't see it, but my mouse pointer was a hand-shape holding the bottom end of that curved pipe):


The idea behind it is an interesting one, bringing Unix command line pipes (|) to a web-based GUI:
“Pipes is a powerful composition tool to aggregate, manipulate, and mashup content from around the web.

Like Unix pipes, simple commands can be combined together to create output that meets your needs:
  • combine many feeds into one, then sort, filter and translate it.
  • geocode your favorite feeds and browse the items on an interactive map.
  • power widgets/badges on your web site.
  • grab the output of any Pipes as RSS, JSON, KML, and other formats.”
Here are some more screenshots, firstly me choosing to add a sort-by clause to the results:


Lastly the final results of the pipe, showing a visual representation of the shape, plus the details of what was actually used, and the results in the main panel:


I've published this pipe and given it a nice name so you can see the results yourself.

This is a great example of using a dynamic HTML interface to do something useful on the web. Let me repeat that a different way - there is no Flash/Silverlight used here!

Tuesday, November 20, 2007

Visual Studio 2008 and .NET 3.5 released!

Microsoft have given us developers an early Christmas present by releasing Visual Studio 2008 and .NET Framework v3.5 today! See Scott Guthrie's post about the release for full details.

The bits I'm waiting for the most are the VB.NET improvements, particularly Lambda Expressions which might give us the ability to use some of the niftier BDD test framework's features in VB rather than needing to write executable specs in C#. The new web designer interface and CSS/JavaScript improvements will be welcome ones too. Then there are other features that look nice, but I am less excited about, LINQ being foremost of those.

The piece I am most eagerly awaiting is not yet released, that is the ASP.NET MVC framework, which will give us .NET developers the same sort of simple and clean structure Ruby on Rails developers have been enjoying.

Wednesday, October 10, 2007

Chad Fowler's Big Rewrite


Chad Fowler by pragdave
The hirsute Chad Fowler, author of My Job Went to India and Rails Recipes, has an excellent series of blog posts up about The Big Rewrite, when a successful software product is targeted for a major rewrite, often in the latest and greatest new language / framework / database / platform / etc.
“You’ve got an existing, successful software product. You’ve hit the ceiling on extensibility and maintainability. Your project platform is inflexible, and your application is a software house of cards that can’t support another new feature.

You’ve seen the videos, the weblog posts and the hype, and you’ve decided you’re going to re-implement your product in Rails (or Java, or .NET, or Erlang, etc.).

Beware. This is a longer, harder, more failure-prone path than you expect.”
This is something we're struggling with at Elcom Technology. We have a successful content management system product that is highly flexible, configurable and chock-full of features - but it is also carrying a legacy of non-web standards compliant design decisions. A major rework of the current system is possible, but it is tempting to see the amount of work as so great that it justifies spending that time on a complete rewrite in a newer language/framework/database/platform/etc.

Amongst the options we have are to use Ruby on Rails, especially if we can do it within Visual Studio 2008 (via IronRuby), increment to .NET 3.0/3.5, replace SQL Server 2005 with an Object DB, or even just look at adding our unique intellectual property as webparts in Microsoft's SharePoint 2007 (now including their CMS solution).

Having just helped do the initial design on an upgrade of our Image Library component Chad's point about Software as Spec really hits hard. In his words:
"Make it do what it already does." That’s a tempting and simple way to view software requirements on a rewrite project. After all, the system already exists. The question of "what should it do when…" can presumably always be answered with: "what it already does".

“programmers can easily oversimplify the interface, and assume they know the capabilities of the system.”
There are two major problems with this assumption. The first, and most disruptive, is that the programmers don’t know what questions to ask. This is especially true if the programmers weren’t the original developers of the system (most often the case on a major technology shift), but even a programmer who did the original implementation of a product won’t remember every nook, cranny, and edge case. What’s worse, with the fragile safety net of an existing implementation, programmers can easily oversimplify the interface, and assume they know the capabilities of the system. If a combination of drop-down selections results in a whole new corner of the system, how are they to know without stumbling onto it (or performing an exhaustive and expensive test cycle)?

...

“Existing code is good for discovering algorithms—not complex, multistep processes.”
Based on my own experiences and conversations with thousands of software developers around the planet, I unscientifically conclude that almost all production software is in such bad shape that it would be nearly useless as a guide to re-implementing itself. Now take this already bad picture, and extract only those products that are big, complex, and fragile enough to need a major rewrite, and the odds of success with this approach are significantly worse.

Existing code is good for discovering algorithms—not complex, multistep processes.
An initial reading of the Image Library code made it clear that determining the existing functionality from the code only would be a very difficult task. As a core part of CommunityManager.NET it was called from all sorts of parts of the system, with subtly different behaviours depending upon where it was called from. To make matters worse the configuration options to allow it to handle the range of functionality different clients required added another layer of obfuscation and confusion. Talking about the functionality further with other developers that had worked on previous iterations of the Image Library made it clear that there were a large number of edge cases lurking to trap an unwary developer that attempted a simple rewrite.

The solution was to start with the existing module and work on adding functionality incrementally, initially replacing the image upload control, and then eventually moving to new screen designs, and perhaps enhanced search functionality. In other words we avoided a rewrite and went for changing what was already there (but in a major way).

It does provide food for thought, if this is representative of our modules (and I know it is of at least some of them) then a complete rewrite needs to be approached very carefully, and preferably with a well-understood specification, or permission to vary functionality significantly from our existing application. Peter McBreen's thinking about software craftsmanship suggests that successful applications should not be rewritten, but rather nurtured and taken care of so that there is little justification for a major rewrite and plenty of reasons to keep improving the existing codebase.

Perhaps you've recently worked on this sort of Big Rewrite, what were your experiences?

P.S. This rant in favour of simple software is a fun read (if, um, fruity) and educational dissection of arguments against simple software. Perhaps what we need is a simpler CMS?

P.P.S> James Shore has a great blog post about software rewrites too, and he includes some advice on what to do.

Thursday, September 13, 2007

A big shout out to Alan J Lee!

A big shout out to my compadre Alan J Lee , who has just entered the world of blogging. One of his first posts is about a Silverlight presentation we had yesterday from Microsoft Developer Evangelist Michael Kordahi.

Keep on blogging Alan!

Wednesday, September 05, 2007

Go Wallabies!

Some great footage of the Australian rugby team:

My favourite player, Stirling Mortlock:

What happens if we meet the All Blacks in the semi-finals?