Rapid LOB development for WPF and Internet

Posted 22.5.2008 by janrep

Recently I did a presentation for the company that wanted to switch their set of LOB apps from older MS technologies to the .Net 3. They wanted to target multiple clients (web, WPF) and support n-tier deployment. This is what CodePlant is about, so I had an easy task describing and showing CodePlant. At the end of the presentation the audience was pretty impressed. Explaining the stuff helped me to realize what the pillars of  CodePlant were. Here they are.

Model driven approach

This is a must. Your business analyst has to be able to describe the business domain in a reasonable structural and visual way. UML is nice for describing the model but usually too far away from other development and deployment tasks. The idea of DSL that Microsoft came up with a couple of years ago is closer, the problem is that for LOB you have to create a set of DSL models that have to be shared and integrated, which is not very well supported in the current implementation of the DSL Toolkit. That’s why in CodePlant we have created our own Model Repository and Designer Tool (in WPF), that allows describing all aspects of the business domain and target application behavior.

Metadata everywhere

When you invest in a model, it would be a mistake not to use it at runtime. The important part of a model is used partly for code generation and partly as metadata at runtime. The metadata spans all layers of the application, from UI interface, through business objects to the database. Changing the metadata can change behavior of the application without full recompilation, and allows dynamic modification on customer side.

The runtime framework

You have the model and the metadata describing your app and you need the complete runtime environment that understands these definitions. Very shortly it has to contain:

  • Data Layer
  • Application infrastructure - tracing, logging, caching, exception handling ....
    Business abstractions support
  • Business entities - data persistence, materialization , query support
  • Business operations
  • Business rules and processes
  • Distributed environments support - both offline client support and multiple server environments

 

UI layer

All the previous steps would be for nothing ,if the end user could not see and input the data,. This is maybe the most important part, and it is also usually underestimated in enterprise applications because they are not very user friendly. In today’s world you have to support at least 2 types of UI. The pure Web interface, of course with AJAX in mind, and the full Windows client, where WPF represents the right choice for the future. Maybe Silverlight can be involved in the game in a short time.

In CodePlant we provide the following for WPF and for pure AJAX UI:

  • Edit controls that are aware of the metadata (e.g.  That a property is read-only so the UI can pick it up).
  • Grid, Form – flexible and smart controls. How smart  these 2 controls are is what makes your app successful or not.
  • Navigation and composition – both heavily metadata driven

 

Security

CodePlant allows defining security elements so early as in the model. You can define security roles, role groups and assignment of privileges for business abstractions. They are grouped in policies for easier deployment and versioning. At runtime we create a security context based on user authentication. The context exposes roles and effective user privileges to all layers including the UI, so we can modify the user experience on the fly.

Deployment

Because you want to target different environments (2-tier, 3-tier, web, smart client, offline), you should be able to create packages and deployment scripts that simplify all these tasks. Don’t forget for patches, updates and upgrades, it is still a piece of software with lots of bugs and changes.

Tools

It would be difficult to do all this stuff and not to have tools that support it. Of course we use Visual Studio for coding and Team foundation server for code repository.

But we have created a bunch of other tools for speeding up the development:

  • Metadata modeler
  • Form designer
  • Report designer
  • Query designer
  • Deployment manager
  • Documentation editor

So this is the CodePlant. There is a lot of stuff and a lot of work inside. When we select features that we are going to implement in CodePlant, we always consider how it helps the overall productivity, to really keep it RAD.

In a future posts I will try to describe selected parts and components of CodePlant in more detail.

kick it on DotNetKicks.com