Monthly Archives: December 2011

.Net AppGen release

Download instructions are going out today for the initial release of the .Net AppGen.  We have two new newsgroups setup;

For questions on writing T4 templates

For questions on using the T4 templates

We’ll make a decision on whether to host the T4 template project on our Subversion server or on Codeplex next week.

Here is an excerpt from the “getting started” document that’s included in the download:

.NET offers many choices for application architecture; from placing the data access code directly in the
UI through datasets and data source controls, to creating a data access layer that talks to the database,
and using an n-tier architecture approach that consists of multiple layers and objects to pass data back
and forth.

While embedding data access and business rule code directly into the UI is generally easier, in some
cases it’s not the best approach for a given project.

.NET supplies a data control structure called the ObjectDataSource which gives us the possibility to use a
3 tier design model. It supports an architecture whereby all Sql commands are embedded into a middle
tier. You only have to supply the underlying object and map the methods from the Business Layer to the
different Sql commands.  And while I am talking about Sql and ADO.Net right now, take a look at the
image below.  The data access layer can (and soon will) support using the Clarion Driver technology;
both direct drivers and thru the IP driver, as well as other access approaches like using a webservice.

n-tier with ObjectDataSource

In this initial release of the .Net AppGen the templates for both Web and WinForm make use of the
same 3 tier architecture using the ObjectDataSource. This first release supports ADO.Net for the data
access, and our next update will utilize the same 3-tier architecture; but the data access layer uses
Clarion drivers and our LinqToFile provider.

We realize that this release can be a bit of a leap – moving from the ABC data access layer or direct
driver use in the Clarion chain to a 3-tier architecture model means there is a bit to learn.  But it’s well
worth exploring it, even if after the fact you choose to keep your development closer to our Win32
model (we intend to support that as well). The same n-tier architecture model will be implemented in
future templates to support using other object-relational mapping frameworks; like Microsoft’s Entity
Framework and nHibernate.

If you follow along with the steps below (for either Web app or WinForm) you’ll end up with a
“Enterprise architecture” style 3-tier app, and possibly find that you like it. Most of the problems that
you will run into come in 2 flavors; ADO.Net connection strings that refuse to connect but return no
errors (usually a backend config issue), and for web apps; IIS configuration issues. Hopefully your trip will
avoid them but don’t be surprised if you have to battle configuration issues.
3 tier Application

We’ll create two projects for our web application.  We’ll first create the Model application; this will
create a reusable assembly (DLL) that defines and contains all of our data access objects to be used in
our Web Application.


For the rest of the story refer to the GettingStartedWithT4templates.pdf in the download!


New build this weekend

The install team detected a few problems after separating the Win32 and .Net IDE components, and that coupled with a change to the compiled  .tt template path info delayed today’s release – but we’ll be working over the weekend until it “ships”.  Sorry for the delay!