The Importance of the ALT.NET Movement
Or: Why Should I Care?
I know some of you are probably saying to yourselves, “what is the ALT.NET movement”? In short, the movement is a growing community of .NET developers who are frustrated with the tooling and guidance provided by Microsoft, as well as the closed, insular nature of the .NET development community. The movement is aimed at educating the .NET community and showing that there are proven alternatives to “the Microsoft way” in terms of software architectures and that there are mature, viable alternatives to the development tools produced by Microsoft. So why is this important?
These Lessons have Already Been Learned
There are countless examples of proven practices and tools that are common in other object-oriented environments from Smalltalk to Java to Ruby that Microsoft has been slow to embrace or promote in .NET. Automated unit testing and test-driven development (TDD) have never been given much support from Microsoft, yet it is an important part of a quality-first approach and has long been a core practice in Extreme Programming. Model-view-controller (MVC) architectures have been around since 1979 and are widely used in other object-oriented platforms like Java. The wildly popular Rails platform for Ruby is based around an MVC architecture. Yet it has never been promoted by Microsoft, and has always been difficult to do in ASP.NET.
Object-relational mapping (ORM) is another architectural pattern that has long been ignored (and even dismissed) by the .NET community. Object-oriented design produces models that are conceptually very different than the models used by relational databases, resulting in an “impedence mismatch.” An ORM framework aims to mask the complexity of this mapping, allowing object-oriented software to evolve independently of its relational data store. Hibernate has practically become the standard ORM in the Java world since its creation in 2001. It is integrated with all the major application frameworks and is even used by Google. Why not apply these lessons to .NET development?
Your Job Could Be Easier
In the mainstream Microsoft development community, the majority of the focus is placed on data-centric architectures and rapid application development through visual tooling. Chances are that if you’ve ever worked on larger-scale projects, or systems that need to evolve over time or be maintained for any period of time, you’ve run into problems with the Microsoft way and encountered pain. The Microsoft endorsed approach to data access has long been to work from the data model, building stored procedures, and accessing the procedures through data access objects (DAOs). Using code generation techniques, this can be a fairly fast process, using metadata to create both the stored procedures and DAOs instantly.
But what happens next? What if you’ve put business logic into the stored procedures? What if you’ve customized your DAOs? What do you do when you have to add new columns to one of your tables? You end up having to manually update your insert procedures, your update procedures, and probably a handful of retrieval procedures. Then you have to update all of your DAOs to match the updated procedures. You may end up with some DAO methods that only partially populate your business objects. If so, you have to mentally keep track of how you got the data and whether that particular method returned all the data you need. And how would you go about unit testing your application?
If you’re working on a small project, or a throwaway prototype, this might not be a big deal. On the other hand, if you’re working on a larger project or if your system is evolving from month to month over a year or more, you’ve got a lot of pain ahead of you. Why not use an ORM? Microsoft is finally getting with the times and releasing their own ORM solutions, like the Entity Framework and Linq, but these aren’t the only options. In fact, they may not be the best options for you. Both are in their 1.0 releases and have limited support for databases beyond SQL Server. Mature alternatives exist. For example, NHibernate is a .NET port of Java’s Hibernate ORM framework. It is built on a solid foundation, backed by 5+ years of experience and lessons. It supports all the major databases out of the box, and can be easily extended. It performs well. It is built on top of ADO.NET, and makes it fairly easy to use custom SQL or stored procedures using the ADO.NET API you’re already familiar with. Plus it is an open source tool, meaning that there is zero cost involved.
The point here isn’t that you should always use an ORM, or that you should use NHibernate rather than Entity Framework or Linq or some other .NET ORM like WORM or LLBLGen. The point is that mature, viable alternatives exist. MVC frameworks like Castle MonoRail and Spring.NET have evolved from implementations in the Ruby and Java worlds. Unit testing frameworks like NUnit and MbUnit are free and have been around a lot longer than Microsoft’s current offering, which is still only available with the professional edition (or higher) of Visual Studio 2008. One of the primary objectives of the ALT.NET movement is to increase awareness of these alternatives within the .NET community.
Microsoft is Listening… and Responding
This movement wouldn’t be so important if Microsoft wasn’t listening. Fortunately they are, and the ALT.NET movement is already having a huge impact at Microsoft itself. The movement was named by Microsoft MVP Dave Laribee in April 2007 and quickly gained momentum in a segment of the MVP community and the .NET open source community. Over the next several months, Microsoft made a number of key hires from within this community, including high-profile bloggers like Scott Hanselman in July and Phil Haack and Rob Conery a few months later. This instantly created high volume, high impact dialog between Microsoft’s development teams and the ALT.NET community, and showed Microsoft’s commitment to the community.
These people weren’t brought in to act as Microsoft marketing drones, either—they are programmers, after all. They joined Scott Guthrie and company in the developer division to lead work on the ASP.NET MVC framework. In October, the framework was publicly unveiled at the first ALT.NET conference in Austin, Texas. The framework itself shows that Microsoft is listening, and is truly acting on a lot of the feedback it receives. It is designed to be extensible and integrate with current open source IoC containers like Windsor, Spring.NET and StructureMap. It is designed to be testable, and Microsoft has provided guidance on creating testing templates for open source testing frameworks like NUnit, MbUnit, and xUnit.net.
In March 2008, MSDN Magazine focused on a number of ALT.NET topics, including the ASP.NET MVC framework, the concept of inversion of control (IoC), and the process of continuous integration. The issue concluded with an article from Jeremy Miller entitled “What is ALT.NET?”.
More recently, the ALT.NET community has expressed serious concerns about Microsoft’s new Entity Framework. The EF Team responded to the concerns, and while no changes will be made to the upcoming release, the response was both quick and candid, and pledged a more transparent design process going forward. Hopefully they will follow the lead of the ASP.NET MVC team.
At any rate, Microsoft’s commitment seems clear. The ALT.NET movement will continue to have an impact on the tools and guidance released by Microsoft, and that will have an enormous impact on all .NET developers. If you’d like to try to make sense of it all, look beyond Microsoft to the ALT.NET community. Hopefully ALT.NET will continue to expand its outreach into the broader .NET community, providing guidance on non-Microsoft tools and continuing striving to incorporate ideas from other developer communities into mainstream Microsoft development.
More Resources
If you want to stay informed about your options as a .NET developer beyond the Microsoft press releases, or want to learn more about how practices and patterns from other platforms can be applied to .NET development today, the ALT.NET community can help.
- “What is ALT.NET?” by Jeremy Miller, March 2008 issue of MSDN Magazine
- “ALT.NET important to the viable future of the Microsoft ecosystem” by Udi Dahan, October 2007
- ALT.NET Yahoo Group
- Altnetpedia
- CodeBetter.com
- Alt.NET Podcast
No comments yet. Be the first!
Leave a comment