I’ve been fairly quiet over the last few months. Most of that is due to the new addition to my family (my new son, Harrison), but some of it is because I am in mad scientist mode. That entails a ton of reading and prototyping. I’ve been taking a close look at the available ORM’s in the market – and trying to understand a lot of the arguments / concerns around the ADO.NET Entity Framework – namely persistence ignorance and the like.
I’ve also started taking a good, close look at NHibernate again (thanks Yitzchok, for prodding me). Back in 2005 / 2006 time frame I had looked at NHibernate and I wasn’t diggin’ it. We were looking to use it as the base data access framework in our product and I was pretty well against it at the time. Things change. It has matured (as have I
) and it looks to have a lot of upside. So I am strongly considering it for the direction we want to go in with dashCommerce. I am watching what the Entity Framework guys are doing, but their solutions to POCO usage and object state maintenance puts the burden back on the developer and I’m not digging that. We’ll see how it shakes out, but right now, I’d say NHibernate is the front runner. Thoughts?
I’ve also been looking at the Managed Extensibility Framework. dashCommerce is going to get bigger and bigger and I’m looking for ways to manage that growth and to allow developers to extend the base product fairly easily. The MEF is still pretty young, and I haven’t gotten into the weeds with it yet, but it does look promising so I’ll keep you posted on what I find. If anyone out there has some in the weeds experience with the MEF, I’d love to hear it.
One thing I would like to do is capture some of the refactoring work in some screencasts. It seems to me this might be pretty neat and valuable to people. Greenfield development is always pretty easy, but how do you take a system like dashCommerce and refine it to have a better separation of concerns, a better SOA architecture, etc.? Does that sound like something you might want to see? No promises, as those things take some time to prepare, but I’d like to hear if you think there would be value there?
Happy Holiday Season to Everyone!
While writing this, I was listening to "Northern Downpour" by Panic At the Disco
November 24, 2008 at 12:42 pm
I too really like NHibernate and vote for it as the DAL for dashCommerce.
As for the MEF, due to the size and complexity of commerce apps, it would be wise to create your own.
Castle has great support for that. I absolutely love the way N2CMS implemented it. I suggest you take a look at it.
It would be great to have global application events that external assemblies can take a wake at. For example AddToCart(ItemEventArgs e) and Charging(PaymentEventArgs e)
November 24, 2008 at 8:49 pm
I don’t think I want to write my own MEF – so I’m not sure why you suggest that, but I am curious about what in Castle framework supports the model. I just found NServiceBus based on someone’s suggestion in the ALT.NET forums. There might be more options than I had thought.
December 1, 2008 at 9:45 am
NHibernate isn’t perfect, but overall i’ve been happy with it. Are you planning to do an MVC version of dashcommerce any time in the future? Or add TDD to the mix?
December 3, 2008 at 6:41 pm
@craig – MVC – maybe. There are going to be a lot of changes with the next rev, so it’s possible. But I think there is a fair amount of work to be done on MVC – i.e. there is no page lifecycle, so it lends itself, in it’s current incarnation to a particular programming / UI style.
Regarding TDD – that is more of a practice / process. It’s not really something I can “deliver” – other than the tests. Unit tests are great, but I have seen anywhere from 100% to 300% code bloat because of it. That’s a lot of additional work – and I don’t have the bandwidth to add that to all the other stuff. But I am thinking on it. I really do like them – honest.
January 2, 2009 at 3:29 pm
chris.
About the castle framework. It supports IAutoStart (which greatly helps initializing dynamically added assemblies) and has a great support for scheduled events with heart beats and everything (which can be initialized in dynamic assemblies automatically using IAutoStart.
There is much more in castle, such as dependency injection (I would put behind a facade though) and ActiveRecord (which can be very helpful with NHibernate).
Another thing I would like to throw out to encourage your switch to NHibernate is the dialiect provider model. If you build with nihibernate strictly, your database can be changed (mysql, oracle) and the application wont even know the difference. This has come in handy greatly with TDD. For example, I created an embedded sql server express database in my test assembly, and NHibernate dynamically creates the db schema and runs the unit tests against it. Very useful seeings how I don’t ever have to even tough the database. If I edit any nhibernate mapping files, the db will reflect that immediately.
That’s developer friendly!
January 2, 2009 at 3:46 pm
> and NHibernate dynamically creates the db schema and runs the unit tests against it.
This is one of the things I like about NHibernate. The idea of having the application manage the schema is a big bonus / upside. Although, I am sure it would have the DBA’s out there shivering in their boots.
You will need extended rights to perform these operations – although I am not yet sure what those permissions are (probably just dbo for SQL Server), but I could be very wrong here. Can I look you up for some help on these things?
RE: scheduled events, I am thinking Quartz.NET for that stuff, but knowing Castle has something to support it as well is nice. I wrote something for my version of dC that supports automating processes and it’s worked quite well, but it lacks something to keep it alive in cases where the AppDomain recycles or shuts down.
I am also investigating Expert C# 2008 Business Objects and the CSLA framework (reading the book now).
Determining the stack is still the hardest part of architecting a solution.
January 7, 2009 at 5:39 am
First time I have heard of Quartz.NET. Thanks for the reference! I’m going to try it out and see if I can sit it behind my current scheduler facade.
By the way, I like the sound of using the CSLA.NET with NHibernate to achieve database independence. Check out http://code.google.com/p/cslaptrackerfactory/ for a sample implementation.
January 12, 2009 at 9:52 am
Hi Paul,
Thanks for the link – I am sure it will be a big help.