February 04, 2007

CSLA for .NET

If you read one technical book this year I implore you to consider Rockford Lhotka's Expert C# 2005 Business Objects (or Expert VB 2005 Business Objects if curly braces don't float your boat). This book does a marvelous job of describing the necessity for developers to strive towards a flexible means of interacting with data in a manner that's separated from presentation, modular, secure and scalable. The book then introduces CSLA - the author's answer to this need in the form of a free .NET library. After finishing the book and completing two projects that follow the CSLA methodology, I'm very pleased with the results and plan to continue using this framework in the future.

With CSLA, developers are encouraged to design responsibility-driven business objects that receive much of their core functionality by inheriting from the framework. This way all the plumbing for authorization, validation, n-tier scalability and n-level undo is already baked in. Additionally, care was taken to made sure that objects adhering to CSLA ideals are still first class citizens when data binding to WinForms and WebForms.

Throughout the book Rocky takes time to explain his choices regarding the code and design patterns that went into developing CSLA. It gave me an appreciation for the elegance and flexibility of his solution and prepared me for the later half of his book detailing usage of the framework in a sample project.

Using CSLA in my own projects has forced me to look beyond the practice of mapping objects 1-1 against a database schema (eg. the ADO.NET DataSet). Instead, it has led me to write my data-related objects based on the needs of my application, not the structure of my database. This subtle shift in mindset has greatly helped me to plan my projects more effectively and has generally resulted in more organized code.

The latest version of CSLA along with news regarding Rocky's books can be found here. Be sure to check it out!

November 28, 2006

Tips For Exam 70-536

I'm happy to report that I recently passed Exam 70-536: .NET Framework 2.0 - Application Development Foundation. This test is one of the requirements necessary to obtain Microsoft's new MCTS certification. And since the MCTS certification is a pillar in the new accreditation structure, its relevance to the professional developer cannot be ignored.

Here are a few suggestions I'll toss out to anyone interested in preparing for this exam:

  1. Purchase a good certification study guide. I used the one by Microsoft Press (click here for details) mainly because it was the only one available at the time I needed it. The book wasn't terribly noteworthy (and it even contained some minor errors) but at the end of the day it served its purpose as a prompt to direct my personal study times. By next year new study guides with even better authors (such as Amit Kalani) should be hitting the shelves.

  2. Take notes on topics as you learn. I found it valuable to jot down notes as I studied the API's in the framework. These notes were also a helpful review during the last few days leading up to the exam.

  3. Become good friends with MSDN. Though a study guide is good, it will only get you so far. The scope of this exam is very large and MSDN provides many helpful supplements to fill in the gaps.

November 08, 2006

.NET Framework 3.0 Released!

The .NET Framework version 3.0 was released this week. This iteration sees no change to the existing class library or the underlying CLR. Instead, it simply adds some significant new APIs on top of the existing 2.0 framework.

The new APIs are as follows: Windows Communication Foundation, Windows Presentation Foundation, Windows Workflow Foundation and Windows CardSpace. Click here to download the redistributable.