NHModeller

Login

Username

Password





Register   Reset password
A DSL based NHibernate generation tool

What is NHModeller ?

NHModeller is a tool aimed to simplify the developement cycle of an NHibernate based application. Differently from other code generators approach, NHModeller centralize the entity definition on a text based, Domain Specific Language. The engine used to parse the DSL is the Microsoft "Oslo" SDK, at present in CTP. By parsing the entity definition file, NHModeller generates the code for the classes, the mapping files (hbm.xml) and the schema definition script for the database. To simplify the dsl editing, some intellisense is provided, if you use NHModeller as an Intellipad plugin. The other option is to use NHModeller as  a command line based console application.

Why NHModeller does not use a graphical approach ? Just because editing a graphic model takes longer than dropping some text lines, and furthermore, the DSL can be generated easily by some other tools, for example to create a model by reverse engineering an existing database.

Why don't use the regular XML as a source to generate classes and schema definition ? Just because writing XML files is generally difficult, expecially for non programmers. NHModeller aim to allow non programmer to drop some ideas in the design stage of the application, and helps the coder to write in a more readable fashion.

Currently NHModeller does not handle all the NHibernate mapping details, at present the following concepts are implemented:

  • Native Keys ( implicit ) or any other simple key ( not composite )
  • Property Mapping
  • One-To-Many mappings
  • Many-To-One mappings
  • Many-To-Many Mappings
  • Lazy / Eager fetching
  • Subclass

 

 

 

Getting Started ...

To start using NHModeller you need the binary of the Microsoft Oslo CTP, and the binary for NHModeller itself. You can obtain these in the download page.

You can follow the instruction to use NHModeller in the command line version, or as an intellipad plugin. If you like, you can use intellipad as the editor and run NHModeller as a command line application as well.

Even if there is not (yet) a complete documentation you will find useful some code samples here.