I spoke about this chestnut briefly at DDD8, and I want to start expanding on the subject.
My plan is over the next few weeks to start talking more about multi-tenancy in our web-apps, and to get everybody else doing the same - speaking to other developers after my talk I realised that we're not alone, people are working on solutions but they're just not talking about it.
By getting some dialogue going, I hope we can generate a public description of what is good and what is bad about attempting to build multi-tenant applications on top of ASP.NET MVC, and what our possible avenues of achieving this can be.
The suggested topics I aim to cover in this series of blog entries will (to begin with) be somewhere along these lines: (As I've already written most of the material!)
- What is multi-tenancy and why do we want it?
- The building blocks of a multi-tenant application in ASP.NET MVC
- How I integrated MvcEx into NerdDinner to give it some multi-tenant capabilities
If there is anything else you think I should cover as part of this series, then let me know by either Twitter or the comments field below.
I am loathe to go into detail on what I consider to be the other 90% of the multi-tenancy story - your domain, the rest of your codebase, managing your databases/configurations etc, as you can get all of that information from people who are far more versed in the subject than I.
But, if pushed on a particular subject I guess I will describe how I deal with those issues in the codebases I have control over, and you'll have to take it (as you should take anything written on these pages) with a pinch of salt.
Wow.
That was a wonderful day, and the sessions I ended up going to were:
- @ICooper's session on MVC Architecture (preaching the choir but good to be re-assured)
- @robashton's session on Multi-tenant ASP.NET MVC (obviously)
- @holytshirt's session on Mono (Good to see this project is advancing well)
- @garyshort's session on JClosure (Lovely!)
- @blowdart's session on the crystal maze
The last session was interrupted constantly by the MVPs and associated crowd because Barry is leaving the UK and heading off to MS to learn how to spell :)
There isn't much specifically to talk about really, it's been said by everybody. The event was well organised, the post-event meal was also surprisingly kept in control and the post-event drinks ... well I'd had no sleep the previous night so I left early. I believe fun was had by all however.
My talk? I think it went okay - I was a bit nervous presenting on a subject that doesn't get talked about openly all that much, and worried the audience might throw a few massive spanners in the works (although I am open to change, I don't want to be told outright I'm wrong in the middle of a talk!)
I spoke a bit fast, and had a minor emergency at the start when realising I needed an adapter for my laptop, but was saved by the team whose job it was to babysit me and massive thanks goes to them for saving my presentation :)
My slides can be found here, and demo code can be found here.
The nerd dinner multi-tenant example can be found on the MvcEx codeplex site (http://mvcex.codeplex.com) - but I'll be hoping to improve it beyond its "suitable for demo" stage and do some blog entries on the rationale behind some of the decisions/concepts found within over the coming weeks.
It's not perfect, it's not anywhere near done and as I keep telling people, it's just for reference purposes (at present), feel free to make suggestions, contributions and etc and we'll get there in the end. Multi-tenancy is the future you know?