Atlas & NetTiers, a match made in heaven (Part 1)
As mentioned in my previous post, Time to learn Atlas..., I am trying to quickly get up to speed on Atlas for a future project. While I am waiting on requirements to be solidified, I decided to put together a prototype containing some of the site features I wanted to implement using Atlas, including: dynamic DataGrids, Autocompletion Textboxes, Drag & Drop Html Elements, JavaScript client WebService calls, external Map Service mashups, etc.
Since most of these functions are data-driven (as with most interesting Atlas examples), I needed to find a dummy datasource to play with. I decided to use the Northwind sample DB due to its simplicity, and (more importantly) since I already had it setup on it my local Sql Server instance.
Next step, I needed some Sql for basic CRUD operations. I started to write this by hand, then I remembered the NetTiers code generation templates built on top of CodeSmith & the Microsoft Enterprise Library Application Blocks. If you arent familiar with NetTiers, check out its documentation to learn more aobut the What's? Why's? and How's? of this excellent open-source project.
Basically, I did the same thing explained in this NetTiers tutorial, which unfortunately I didnt find until afterwards.
The specific NetTiers template settings I modified were:
- SourceTables = All
- SourceViews = All
- IncludeComponentLayer = ServiceLayer
- IncludeXmlAttributes = True
- GenerateWebService = True
- IncludeAtlasLibrary = True
- IncludeAtlasToolkit = True
Within a few minutes after executing the NetTiers template, I had a fully functioning playground for Atlas, complete with strong-typed ObjectDataSource controls for every table with full CRUD operations, and with multiple SELECT options available on all Primary and Foreign Key columns. Wow!
In the future, I'll discuss some of my Atlas examples, how NetTiers improved my productivity, and list lessons I learned along the way.
(to be continued)