I recently came to some insights while soaking in a hot bath last night. Please tell me if I’m wrong.
The forum application that I am working on is being designed primarily to satisfy my own requirements and available software, although I plan on releasing it to the general public in some fashion once it’s done.
The software I have available includes vs2008pro and sql server. I have no plans to get licenses for other backend systems, nor do I have the funds to do so.
One of the things I’ve been trying to do that was giving me problems was developing this as if it were a large scale corporate application, and making use of various abstraction libraries and using much touted patterns and conventions that make like easier for such projects. This may have been the wrong way to approach it.
Trying to come up with a set of external libraries to accomodate such an effort has ended in turmoil since all of the RTM releases for the various things have inconsistant dependancies. I have looked into building these myself, and have made some decent progress, but in doing so, I began to wonder if all that code and effort was really affording me any true benefit.
Considering my position, it would seem that the following assertions hold true:
-
My injection needs are simple, and unchanging enough, where using the overloaded constructor method is appropriate and efficient. Why reference a serveral thousand line code library to add support for something when adding a single function to a class does the same thing? If I used a DI library, and set some custom mappings in Global.asax, compiled the app, and later want to change a mapping, I still have to recompile the app once I edit the Global.asax file. Why not just edit the default constructor of the instancing class instead?
-
My persistence needs are also simple, and unchanging enough, where using the DataContext designer, skipping the IRepository<T> layer and moving right into top level interfaces, concretes and a ContextFactory is appropriate and efficient.
Some other things to consider are:
-
When the project is done and offered for download, I would really like people to be able to load and build the solution without having to have knowledge of anything but the mvc framework, and that which comes with visual studio.
-
Personally, I am not really comfortable with, nor am I impressed with, NHibernate’s Criterion objects. Rather, I like the way LinqToSql syntax works.
-
I also really like the idea of distributing a single dll for my project and not a lof required dll’s to boot. I like the single project convention. While I don’t like the Models folder specifically, I do add other folders to the root to contain my namespaces. There will not be any hot-swapping of domain, service or persistence layer dll’s here.
So honestly gang, have I hit upon the “truth” about my project? Or have I just gone off on a tangent.