Developer resources
Developer documents
-
Cuyahoga Template Development Guide (Cuyahoga 1.5.x)
2/21/2008 4:53:00 PM Published by Martijn Boland Number of downloads: 12300 -
Cuyahoga Module Development Guide (Cuyahoga 1.5.x, VS 2005)
5/8/2007 9:40:00 AM Published by Martijn Boland Number of downloads: 20885 -
Cuyahoga Module Development Guide (Cuyahoga 1.0.x, VS.NET 2003)
10/6/2005 11:15:00 AM Published by Martijn Boland Number of downloads: 21220
Developer articles
Dynamic modules and O/R mapping with NHibernate
One of the more challenging things of O/R mapping is how to handle modules that are dynamically loaded (especially when they are in different assemblies). The core engine of the website doesn't know which modules are going to be loaded so it can only initialize the mapping of it's own domain classes.
Cuyahoga handles this by providing a central facility (a Singleton wrapper around NHibernate's SessionFactory) where modules can register their domain classes. When registering, a check is being performed if the class is already mapped. If not, the classes are added to the mapping configuration and the SessionFactory is rebuilt. The caller recieves a notification that the SessionFactory is rebuilt and stops executing. The browser is then redirected to the same url whereafter page execution starts again, but now with the mapping information in place and nicely integrated with the mapping information of the core domain classes.
Comments
-
About the NHibernate HTTP Module, why not put session handling in CoreRepositry as well? that way, u may use your CoreRepositry not just over web, but you may use it on, for example, windows app as well.
by C.W. Chan - 8/5/2005 4:52:28 AM
Back