O/R.Mapper.&.CodeGen

Found this interesting post on O/R Mappers Vs. Code Generation in TheServerSide.Net.

O/R Mappers usually come in the form of 'library' DLLs and they can conveniently map your database tables into classes (or objects) for your application's consumption. CodeGens usually read your database schemas and attempt to churn out codes that you will most likely be writting over-and-over again. Obviously depending on the type of applications you are building and your architecture, both will have their own advantages, applicability and disadvantages.

Coincidentally, the stage where Paladin is right now is between the two of them. To some developers, it is an O/R Mapper and to some it is a code generator (courtesy of the BEWizard tool). To be frank, Paladin aims to be neither. It is the current stage of development that puts it in the perspective and the perspective will change once it evolves to the next stage.

But since we are here, let's look at some characteristics of Paladin. At the moment, it does provide O/R mapping in its framework and the feature appears to be the most visible one. In fact, it's O/R mapping capabilities are still a little lacking as compared to other more mature OPFs. If you look at Paladin's CoreAdapter you will notice simplicity in the code.

This is because most OPFs are developed to support generic implementations and they need excessive checking, typing, schema handling and all that plumbing to support it. Paladin conveniently shifted these complexities to its code generator - the BEWizard.

While most OPFs rely on 3rd party code generators i.e. Codesmith, Paladin comes with its own integrated code generator to manage what is to be generated for its own framework.

From my experience, a different paradigm is needed to build this where you need to identify what are to be generated and what are to be coded into the library. Striking a balance between the two is essential to make things work at optimum performance.

Anyway, there is still a long way more for Paladin to evolve into something I have in mind but if you are already using Paladin on the 'field', I would love to hear from you.

*HuGs*

No comments:

Post a Comment

Popular Post