DeKlarit 3.5 and Enterprise Library

Last week we released a new DeKlarit version. We put a lot of effort in this one, and I’m quite proud of it.

 

The main new feature is support for Microsoft Enterprise Library. The rationale for doing it is outlined here (PDF). 

 

One of the DeKlarit’s core features is the generation of the business logic layer. Authorization checks must be performed in that layer, so we are using the Security Application Block to do accomplish it. The good thing about using Enterprise Library is that you can plug any authentication/authorization provider you want.

 

DeKlarit also supports generating a presentation layer, and if you use the presentation layer generators, the checks are also performed there, so you won’t see the ‘Save’ option in the Customer form if you don’t have rights to perform that action.

 

We also use Enterprise Library for Caching, Configuration and Encryption.

 

Gaston built a cool VS.NET-integrated editor for DeKlarit add-ins, which are like the scripts used to create new code generation tools (i.e.  the presentation layer ones). You can tell DeKlarit which VS.NET projects you want to create, the templates you want to apply and when you want to apply them. You can also edit the templates in VS.NET.

 

These features required a redesign of our underlying framework but it was worth it.

 

On the other hand, there’s a feature that was quite simple to implement, and I think it’s very cool (I won’t explain it here because it’s well explained there ;). When you are writing the BL layer, you can live without it. It just requires you to write code to retrieve the primary key using the natural key. But when you are generating the presentation layer, if your metadata model does not have that information, then there’s no way to generate the right form.

 

 

2 Comments

  • "On the other hand, there’s a feature that was quite simple to implement, and I think it’s very cool (I won’t explain it here because it’s well explained there ;). When you are writing the BL layer, you can live without it. It just requires you to write code to retrieve the primary key using the natural key. But when you are generating the presentation layer, if your metadata model does not have that information, then there’s no way to generate the right form. "

    But isn't that making your BL and even DAL code be modelled how you would like to create the GUI? Isn't that 'bad design' ? For example: the gui should reflect the functionality, not how the data model is constructed and vice versa(!).

  • If you write a BL, and you want to refer to the Person by SSN, you BL class will receive the SNN and somehow get the primary key value.



    This is not UI functionality but BL functionality. We are just automating that process.



    On the other side, as a code generation tool is limited by its metadata, adding the necessary metadata to Deklarit to handle this case (slightly) improves the power of all the code that can be generated based on the model. One thing that is improved is UI code generation.



Comments have been disabled for this content.