-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Campaign Controller #3
Comments
Yes, our controllers need to go on a diet. We have IoC and a Services namespace for this, we just need to move the appropriate amount of that stuff out into those services. They're auto-wired so if you put "IMyFunkyNewService" as a ctor arg of a controller, it will automatically make sure that the MyFunkyNewService concrete instance is passed-in. |
This is one of those points where there is a bit of complexity we need to manage.as we go about this. There are many databases (conceptually) - one for each charity. So we need to have it be super-easy and obvious when writing the modules how to get the current charity database and very hard to get the wrong one. This is so we can have multi-tennant application instances and be very confident we're never cross-connecting the data. The central database needs to know all of the instances so it can redirect traffic to the right places (and provision/remove databases) |
Hi Paul, I have to confess that in the dying minutes I could get a hold of the 'I can change the proj file' pill / batton so I had to add a db ref into the QuickDonate view as I couldn't add a ViewModel file... Please don't shoot me but it might want fixing while you're at it... Cheers, Kim. On 24 Oct 2011, at 15:41, Paul Stack wrote:
|
I agree Kendall - we need to be able to handle this correctly - I am working on separating the layers for now for cleanliness - that way we can work efficiently on the multi tennant aspect of the project :) Kim dont worry - it needs to be shipped :) Neil I have been working under that assumption all morning ;) |
Hey guys
there is a large dependency on the DataAccess layer throughout the campaign controller. This is caused by a new instance of the DataAccess layer being called in a lot of methods in this way:
Campaigns db = new Campaigns();
Campaign savedCampaign = db.Insert(campaign);
return savedCampaign.Id;
We really need to get this moved out of the Controller
I think this would be a big milestone for Separation of Concerns
Paul
The text was updated successfully, but these errors were encountered: