Thoughts on Web Development with ASP.NET Dynamic Data, Castle Active Record, jQuery

For the past month or so, I have been working in a large international Pharma company. The interesting thing, perhaps, for my readers, is that it is in something very different than what I have been doing the last 4-5 years. No SOA, no ESBs, no WCF, no WF, no Smart Clients. I work in a Web Development Center as an Technical Architect responsible for between 200-300 internal and external (mostly) ASP.NET 2.0 sites with the addition of 6-8 per quarter.. Things are pretty conservative because of Pharma. We even have some ASP but mostly everything is stock ASP.NET 2.0. My days are now filled with ASP.NET, controls, jQuery, AJAX, etc and not WCF. The interesting dynamic is that there is a large subset of these applications that are very simple "Web pages over Data" applications. These applications are very simple and don't really have any business logic. They are simply CRUD pages. Now, my default architecture, as I have written about here in the SOA Part 5 topic, and in many, many posts when I was working at Algorithmics is NOT a Data Driven approach. I now prefer to create rich Domain Model [Fowler] and use Domain- Driven Design [Evans] with the Layer modeling actual business domain with Ubiquitous Language. As many in the ALT.NET community and elsewhere, I  converted from being a Data-Driven Architect to modeling the business and using a Data Mapper [Fowler] a.k.a OR/M to persist to Resource Layer.  I am a big user of the Evans Patterns here:  Repository, Factory, Entity, Value Type.

The thing is though, that many of our applications just don't fit into this (a bunch do as well). Being an Architect is about making choices and there is no one standard answer to all problems. I have always been impressed with Ruby On Rails, Scaffolding, and the ActiveRecord Pattern. Many of our simple applications fit very well into the feature set offered by ASP.NET Dynamic Data projects in .NET 3.5 SP1. ASP.NET Dynamic Data is a web application scaffolding framework from Microsoft, shipped as an extension to ASP.NET, that can be used to build data driven web applications. It exposes tables in a database by encoding it in the URI of the ASP.NET web service, and the data in the table is automatically rendered to HTML. The process of rendering can be controlled using custom design templates. Internally, it discovers the database schema by using the database metadata. The problem is that it's .NET 3.5 SP1 and we are on .NET 2.0 for now until next year.

Thus, I re-took a look at the ActiveRecord Pattern. It was interesting, particularly with our need to be conservative in Pharma, when my colleague reminded me about Castle Active Record. So, for the last week and 1/2 I have been immersed in Castle Active Record. I have been impressed with two things: it's simplicity and its abstraction over NHibernate. Its so much easier to use than raw NHibernate. I am well aware of the issues involved with ActiveRecord and the mixing of database access with domain logic but I think it makes sense for a certain class of applications. I am also seeing it's OR/M and approach as a bridge to the Entity Framework and ASP.NET Dynamic Data which we will probably use later this year.

Resources:

Published 01 October 2008 01:33 PM by Sam Gentile

Comments

No Comments

Search

Go

This Blog

News

    The content of this site are my own personal opinions and do not represent my employer's view in anyway.

    Profile for SamGentile

MVP

Blog Information Profile for SamGentile

Tags

Archives

Syndication