SourceForge.net Logo

Document

Project Analysis

Author

Hazem Torab

Date

18 March 2005

 

 

Mission

Our mission is to create an easy to use add-in for visual studio .NET to be used in generating the xml mapping files and persistent object which is required when anyone intends to use the NHibernate library.

 

Development Environment

We will make this library using Visual studio .NET 2003 because most of the development team have only VS.NET 2003 not 2005, but we can convert it to 2005 if we found that all the team have vs.net 2005

The development language will be C#

 

 

The Add-in

 

The add-in will be displayed in the Tools menu

when the user clicks on it, it will be shown as a tool box like the solution explorer tool box.

 

* Adding new database to this solution (see the next section.. )
 Synchronize the current selected element (for example if the selected elements are 3 tables it will generate the mapping files and the persistent objects for these tables)
 Configuring the current selected element, (for example if the current element was the database it will configure the cache provider, driver class, dialect, and all other elements which saved in the configuration file, but if the current selected was a table it can configure the primary key generator, the mapping data type of each field, the name of each mapping element,)

* List of all databases when the user right click on the database he/she will has the option to synchronize, configure or to delete it from the project, when the synchronize option selected it will generate all the mapping files, and persistent objects of all tables, views, and relations

 All the relations which nsych will detects (1-1, M-1, 1-M, M-M) it may be difficult to detect M-M relations but it will be a great option if we did it
All user's table and views in this database when the user right click on it he/she will has the option to synchronize or configure, when the synchronize option selected it will generate all the mapping files, and persistent objects of all tables and views
 the table, the view or any other element will have the option to synchronize or configure
 All the elements have the option to be refreshed to see if the database schema where changed

 

Database types supported

we should make our design to allow adding any number of database types by making an abstract class and if we want to support any new database we just implement a sub class of this base class

For the time being we will support only one database type so we can test the all the features in the add-in, and all other types can be supported after testing, this database will be MySQL because it's free and all of the development team can download it.

 

Adding New Database

To add a new database to the current project the only requirement is the database connection string (see the picture) and all the other values will be auto detected or set to the defaults. The other value are like (database name, database type, dialect, cache provider..)

 

 

Future features

1-     Supporting all database types

2-     Supporting auto complete inside the xml mapping files, and configuration file

3-     Adding a Query builder like sql server query builder but it will build the query using the persistent objects and generates HQL

 

General Note

This add-in should be very user friendly, without many configurations and without many windows to generate the required output, we can achieve that by auto detect many configuration values and by setting the default values for the optional with the most used or the recommended values. And if the user want to change these values he/she can use the configure option