Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Include Page
TOOLS:Header, DesignTOOLS:
Header, Design
scrollbar

Introduction (NHibernate)

Current version of DelftShell - Q1, 2008 uses XML file format as a project store. It works ok for a simple applications where number of objects contained in the project is not so big or where size of those objects is not so big. When size of the objects becomes bigger - use of XML files as a data store format does not sound as a scalable and robust solution. Those objects can be for example: models, maps, grids, time series, model results, etc. Current intention is to switch to an embedded database file format to be used as a project store. It can be one of SQLite, Access or any other embedded database file format.
Another reason is that using XML serialization it seems to be very complicated to serialize objects implementing interfaces such as IModel, IDataItem. For that reason they were implemented as abstract classes.

In .NET access to the databased database is implemented using ADO.NET, however in this case syntax of the SQL queries used to access data dependents a lot from the concrete database driver implementation which. Another problem is that all data should be handled manually (convert from relational model to objects and vice-versa). There are number of libraries available which can help to access data from a database:

  • NHibernate and probably NHibernate.Linq in the future - provides an easy to use framework for mapping an object-oriented domain model to a traditional relational database. See also NHibernate Best Practices

Advantages from use of the ORM libraries over simple ADO.NET implementation are clear and should not be underestimated:

...

More information about NHibernate can be found here:

In a short functionality provided by NHibernate can be shown on the following drawing:

...

Note: drawing is taken from a Java version of Hibernate and contains method names in Java notation.

Anchor
project-states
project-states

Project States in DelftShell

Image Added