paliktar wrote:1. In order to make nopCommerce more pluggable I think that all methods must take only 1 business object parameters instead of n parameter like now. I’m talking about the Manager Classes and Data Access Classes. Look at PlaceOrder method in OrderManager it takes almost 90 parameters ( a nightmare if you want to extend this method), if this method will have only 1 bussiness object (Order) as parameter if you want to extend this you will have to add a new property in Order and DBOrder and change only The Sql Data Access method.
2. All the manager classes should be interfaces and loaded with dependency injection (Ex: Unity). With this if you make some modification you will have to extend the manager and override only the target method (which will have only 1 business object)
3. The mapping methods between Business object and Data objects should use something like AutoMapper (http://automapper.codeplex.com/ ) it’s faster to write the mapping rules and if you want to extend an object you will add only a new mapping rule instead of overriding the mapping method.
4. Split the application in 2 : the admin app and client app. All the methods used in client site should be web service methods (WCF). In this way you can make your presentation site in whatever technology you want. With this it will be put the foundations of managing multiple client sites from one admin app
1 - Agree, so many parameters make extending or maintaining these methods a nightmare.
2 - Definitely 1 up for using an IoC container although StructureMap FTW! :p A big win for DI is that it makes everything more testable which brings me to my next point, we need some proper tests in nopCommerce.
3 - Personally I think we should scrap the data objects and go for a DDD approach and repository pattern. For me, our domain objects are what is important. Let the repository figure out how to save them. The db objects currently don't server much purpose and in most cases are identical to their business counterparts.
4 - Can see where you are going with this but this would be a massive job with the current codebase and I don't think there is that much of a requirement for this at the moment - presuming everyone is happy managing their store through a browser and doesn't want a thick client app?
A few more requests / suggestions:
5. Switch to Mercurial for source control - it's now supported on CodePlex. It really makes developing against a remote repository so much easier
6. We need a quicker release cycle. Currently it is one fairly major release every 3-4 months. I would like to see much more frequent minor releases (containing bug fixes, minor feature enhancements etc.). And if you switch to mercurial you will find this even easier to do.
A project that has recently switched to Mercurial is mojoPortal. You can read http://blogs.planetcloud.co.uk/mygreatdiscovery/post/Setting-up-a-mojoPortal-development-environment.aspx this blog post that demonstrates how you can set up your own custom projects whilst still being able to pull in the latest changes from the remote repository.