Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at
S#arp Architecture 0.7 now supports NHibernate 2.0 Beta 1

S#arp Architecture 0.7 represents a major upgrade to the infrastructure of S#arp Architecture - but the overall architecture, with respect to application layering, remains the same.  This release is far simpler to work with than previous versions while still providing plenty of flexibility.  A huge thanks goes out to Frank Laub who has provided terrific feedback and guidance on making S#arp Architecture simpler while using it on real-world web applications.  This release's many changes include:

  • NHibernate 2.0 Beta 1 integration is now included.
  • Integration with Spring.NET has been dropped. Spring.NET is a fantastic library with world class AOP, IoC support, and many other modules. But for S#arp Architecture, a simpler approach was found for performing dependency injection without the need for external configuration files. If you're still in need of many of Spring.NET's terrific libraries, you'll want to take a look at release 0.6.* which comes preconfigured with Spring.NET.
    • The ~/SpringConfig folder no longer exists
    • There is no more SpringInteropController
    • The Spring XML generator has been dropped from ProjectBase
  • GenericDAO now uses the native NHibernate session.
  • HTTP Modules are no longer needed to support the Open-Session-in-View pattern for NHibernate session management.
  • All configuration, such as the DB connection string, is now just within web.config.
  • Concrete types needed for Dependency injection are now declared at the top of each dependency interface; e.g., IOrderDao.
  • NHibernate session storage mechanisms, for both web and unit-tests/winforms have been added to ProjectBase.Data and ProjectBase.Web.
  • The Identity attribute has been renamed to DomainSignature to better reflect its purpose.
  • Controllers now simply inherit from the base MVC Controller.
  • ProjectBase.Web.ControllerFactory has been introduced with built in dependency injection.

I'm confident you'll be very pleased with the changes and would highly recommend upgrading your project if you're already using this framework and do not need the many powerful utilities found within Spring.NET.

Billy McCafferty

Posted 07-10-2008 12:36 AM by Billy McCafferty



Steve wrote re: S#arp Architecture 0.7 now supports NHibernate 2.0 Beta 1
on 07-10-2008 10:54 AM

I think one part of Spring.NET that I really enjoy is that I can start 'simple' and then apply more if needed.

I'll check this out though to see how you handle the DI and NH transactional support.

I'm concerned without Sharp# support of Spring.NET that the Spring.NET guys won't be as motivated to help.  You were a main reason I saw effort to move forward.

On the positive side it reduces one more dependency when MVC upgrades to beta status  :)

S#arp Architecture Updated (version 0.7) : { null != Steve } wrote S#arp Architecture Updated (version 0.7) : { null != Steve }
on 07-10-2008 10:59 AM

Pingback from  S#arp Architecture Updated (version 0.7) :  { null != Steve }

Billy McCafferty wrote re: S#arp Architecture 0.7 now supports NHibernate 2.0 Beta 1
on 07-10-2008 12:56 PM

It was a difficult decision to remove Spring.NET from the architecture, especially after the support the Spring.NET team has provided.  Spring.NET is a spectacular framework and full of a lot of terrific features.  But when it came right down to it, its removal brought S#arp Architecture closer to the mantra of being "the simplest thing that could possibly work."  So although it no longer has the bells and whistles that Spring.NET could potentially provide, it still accomplishes exactly what I need it to with much less configuration.

Martin wrote re: S#arp Architecture 0.7 now supports NHibernate 2.0 Beta 1
on 07-11-2008 4:57 AM


Major turnaround, but I think the right choice for the majority of use cases.

I think you should still have a base class for unit testing though that wraps the tests in a transaction and rolls back.

With the current implementation save tests will be committed.

Thanks again for a fantastic framework

Billy McCafferty wrote re: S#arp Architecture 0.7 now supports NHibernate 2.0 Beta 1
on 07-11-2008 12:45 PM

That's a great point Martin...the unit test rollback that Spring provided was a great feature.  I'll add that functionality, accordingly.

Steve wrote re: S#arp Architecture 0.7 now supports NHibernate 2.0 Beta 1
on 07-14-2008 9:58 PM

Makes sense, thank Billy.

Actually, the more I work with Spring.NET the more confused I am on how it all works  :)

So, simple is better here I think

bookmaring service wrote re: S#arp Architecture 0.7 now supports NHibernate 2.0 Beta 1
on 03-14-2013 5:08 PM

rwyDBc I loved your article post.Really looking forward to read more. Great.

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Google Reader or Homepage Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of
Red-Gate Tools For SQL and .NET


SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
NHibernate Profiler
Balsamiq Mockups
JetBrains - ReSharper
Web Sequence Diagrams
Ducksboard<-- NEW Friend!


Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers


Community Server (Commercial Edition)