For me Sharp Arch. was a love/hate relationship. I work best with lists so let me explain why I loved it, why I hated it and then what I moved on too.
- Love
1. Taught me an incredible amount about proper application design. This was invaluable and I will always appreciate Sharp Arch for that and have fond memories of Sharp Arch because of this.
2. Introduced me to IOC/DI, which really brought together a very clean design structure. Again very invaluable.
3. Provided a strong NHibernate infrastructure, which in turn taught me a lot about best practices for using NHibernate.
4. Introduced me to FluentNhibernate. wow! Nothing more to say than wow... (was using xml mappings before, ugh!).
- Hate
1. Always being a version or two behind the latest
asp.net mvc framework.
2. Repository pattern: Initially seemed like a good idea providing an additional abstraction but over time it was mostly an additional layer to do crud work between the controller/WCF service and nhibernate. A semi abstraction layer between the ORM and the controllers. By requiring this additional repo layer caused (for me) added work that overall provided no long term gain. (In the direction I went this was kind of replaced with services, see below...). To help better explain this...
I went from: Session <--> Repository <--> Controller/wcf service.
And moved to: Session <--> Services (Exposed through REST/internal (services can call other services)) <--> Controller/Rest Endpoint
3. ISessionStorage: Great idea if your always doing web apps. Automatically provides a new nhibernate session per web request, but if you used SharpArch in a win forms/console app you quickly found out it only sort of worked. It caused memory issues initially because there is no session per request in these types of apps. So to sum this up, the lack of support for non web apps was a bit of a frustration.
4. No real services other than WCF. I went deep into WCF and worked with it for awhile. I found it to be one of the most convoluted and complex "web services" framework I've used in .net. Configuring and extending WCF is a nightmare. For example SSL in a WCF self-hosted instance resulted in numerous configuration sections in the app.config. Even MS has quieted down about WCF and has been promoting Web API.
5. SharpArch project appears dead, little to no progress over the last few years. This is a bit dis-concerning. One person on here stated that to few people contributed. I never contributed because at the time I was still new to the framework and did not feel I understood the overall framework well enough to contribute.
- What I moved too
I eventually found the framework ServiceStack. It provided a much simpler framework over Sharp Arch. All repositories are gone away. Working with NHibernate is done through the services. A service in ServiceStack has multiple endpoints; json, xml, soap, and html. A service can be used as a web service endpoint (think Web API) or as a controller or both! Services can call other services. I can go on and on about it's benefits, but their own site beautifully explains it's benefits better than I can. See
https://servicestack.net/ and
https://github.com/ServiceStack/ServiceStack/wiki.
Some people may say we'll service stack is a paid product. Yes but it's also open source. In addition, if your product is open source you can also use it for free (I think, may need to verify this). Also all the source is available for you to view in github as well. Also if you can't go open source you can fall back to their 3.9.x version, which is fully open source.
In summary please don't take this as an attack on Sharp Arch. On the contrary Sharp Arch was the #1 factor for making me a better programmer/engineer/developer. I still believe every .net developer should be introduced to Sharp Arch. It is definitely an incredible framework and a good stepping stone.
For anyone reading this. Thanks for listening. It's very much appreciated.
Stephen