Posts Tagged ‘Enterprise architecture’

.NET and the elusive MVC pattern

Tuesday, November 18th, 2008

A couple weeks ago, I went to a Microsoft “Heroes Happen {Here}” event.  (Good process should mean that there is no need for heroes, but that is a topic for another blog!).  Anyway, part of the development track was an introduction to MVC for .Net.  MVC has been around the J2EE world for so long, its passe.  However, there has never really been a good implementation of it in the .NET world.

MVC or Model-View-Controller is a design pattern that is used by architects to enforce an enterprise capable design.  The advantage is that the GUI is very light weight – since it is only concerned with displaying data passed to it (the VIew in MVC) and the Model handles all the underlying business/persistance with the all powerful controller being a lightweight bridge between the two.  It scales well, is easily extensible and extremely consistant from one section of code to another – making easy to maintain.

When I started my last project, I looked for a .NET MVC example.  I found a couple articles on the web and 2 books that had dedicated space to it, but none of these examples really seemed to capture the power of MVC.  In fact a couple completely missed the point altogether.

I decided that many people treat the code behind page in .NET as a mini-controller, so maybe it really didn’t make sense to try to apply the MVC pattern in .NET.  There were other ideas floating around.  Martin Fowler’s MVP pattern was a good, but somewhat complex alternative. In the end, I spun my own architecture.

When I heard that Microsoft was coming out with an example of the MVC pattern, I was skeptical.  I, personally, had decided that the MVC pattern didn’t fit within the .NET framework well.  The example they showed at the Heroes event was well thought out.  It’s not 100% ready for prime time, but its close.

What do I mean?  Well, setting up a project for MVC is simple. You choose the MVC project type and Visual Studio works its magic.  As long as you keep your naming conventions and directories straight and don’t put anything into the code behind, it all works great.  However, there is nothing to enforce any of this.  You are relying on developers behaving well.  They will, in the beginning of a project.  By the end of a project, they are more worried about meeting deadlines than following the architecture.  Microsoft said that there next version of MVC may not have any code behind pages.  That will feel a little stange to the hard core .NET developers, but it will make life much easier for the Architect and Team Lead.

Can a SOA be created using Agile methods?

Tuesday, October 30th, 2007

A friend pointed out an interesting blog called RUP versus Agile for SOA Methodology by Eric Roch.  The initial premise seemed to be that Agile methodologies don’t provide enough structure to build a SOA.  My initial belief was that he misunderstood what was meant by agile methodologies.  He referenced extreme programming (XP) as his example of an agile methodology.  Granted, XP would not be my first choice for putting together a SOA either.  That really isn’t it’s purpose.  However, XP certainly can be used to create web services for the SOA.

He goes on to state that a lightweight version of RUP could be fabricated to provide design “deliverables”.  By deliverables, he means the structure and design used to enforce a set of standards across the SOA.  He does point out that, “RUP’s iterative nature and focus on architecture early in the process are well-suited for SOA.”  The key according to Mr. Roch is to keep the process lightweight and iterative.  What really struck me as fascinating is that is exactly the purpose behind OpenUP.  OpenUP is a lightweight version of RUP that is highly compatible with Agile development techniques.  Of course, OpenUP won’t really deal with the enterprise architecture requirements of the SOA either unless that is part of the architectural constraints of the various projects within the SOA.

Basically, Mr. Roch is treating a SOA as a single project rather then a series of projects build over a period of time by different groups who are experts only within the varying domains of the SOA.  An overarching architecture needs to be in place to define the domains and the governance processes and ensure that it meets its potential.  Otherwise, all the process in the world applied to individual projects will leave the business with nothing more then disjointed and conflicting web services.   The reality is, the problem he is trying to resolve has nothing to do with Agile vs non-Agile.  It is all about SOA architecture and governance.  Agile methodologies work well within that framework.  In fact, it is reasonable to assume that since one of the promises of SOA is the ability to respond quickly to changing business needs, that Agile methodologies are the perfect complement for a SOA.

Unfortunately, Mr. Roch is unfamiliar with the benefits of using a lightweight process framework like OpenUP to drive agile development.  I think if he was more aware of the benefits, he would see that using OpenUP and Agile development could be a win-win for the development teams creating the underlying services that make up the SOA and the architects trying to enforce the governance.

DoDAF and RUP — The Department of Redundancy Department?

Monday, July 30th, 2007

I’m currently the architect on a project that is heavily RUP (Rational Unified Process) centric.  As we are pushing through the government’s C&A (Certification and Accreditation) process, the government project manager “found out” that the project must comply with the DoDAF (Department of Defense Architecture Framework).  This was a little bit of a surprise since you would normally expect this type of requirement to pop up somewhere closer to Inception.  But, here we are, so the goal is to meet the requirement without having to recreate the architecture and design that has been developed under the Rational Unified Process.

DoDAF is a framework that is designed to handle almost anything that the Department of Defense may need to acquire/build.  It provides no methodology – just “views” of the enterprise.  These views are broken into 3 categories (Operational, Systems, Technical Standards) as well as the ominous sounding “All View”.  These “views” are, in fact, a series of documentation and diagrams used to provide insight onto the project from a particular perspective.

RUP is a process for building applications.  It can be seen as a set of best practices to help ensure that the project will meet the customer’s needs.  It includes its own set of documentation (UML) for accomplishing the same goals as DoDAF.  So, my initial reaction was that this was going to be a major exercise in being redundant.

The good news is that it is not turning out to be the case at all.  RUP employs UML to model the application.  DoDAF does not specify UML, but considers UML to be an acceptable method for completing many of the views.  So, much of the work is done.  Obviously, it would have been better to have employed the DoDAF with RUP from the beginning and keep everything in sync.  Given that the both use UML, it would be fairly straightforward to follow the RUP process while complying with DoDAF without much additional work.

Some interesting links on the topic:

http://www.ibm.com/developerworks/rational/library/mar06/widney/index.html

ftp://ftp.software.ibm.com/software/rational/web/whitepapers/G507-1903-00_v5_LoRes.pdf.