Is there an easy way to associate a culture to a Tenant in Orchard. The aim is to build a website with a subdomain (or a domain) dedicated to a specific culture. This is something quite easy to achieve with umbraco, and is the only reason why I did not start yet to work with Orchard.
Actually, it is fairly easy to set-up a culture for a specific tenant as there are finally two different websites. The inconvenient in this solution is that you have to reproduce the config for both each time.
http://orchard.codeplex.com/discussions/267530
Related
VS2013 update 4, MVC5
Still relatively new to MVC. To divide functional domains within an MVC project the use of Areas seems clear from these posts (olderSOlink, newerMVC5link).
Is there ever a reason that sub-domains would be integrated as part of a solution involving different functional domains of a given MVC project? I don't have a reason to want to make use of sub-domains, I'm just asking because I don't know if there is some advantage I should know about.
Is it even possible without great difficulty? For example, can logons transfer across sub-domains? Would there be other difficult issues to address?
At present the project I am building is 'relatively' small and will have around 5 major domains so I'm assuming Areas is the best architecture to isolate these domains, but I wanted to ask for guidance before I go too far and make decisions that would make the use of sub-domains difficult in the event there is a compelling reason to use them in a single MVC project.
I generally use subdomains to separate major application functionality or if I have multiple servers that I want to be on the same domain name.
To answer your login question, if you are using the same application you will remain logged in on the whole domain (depending on your method of using sessions, the cookie will be accessible to the domain as a whole).
If you are questioning using subdomains, they are really just a naming scheme so you could categorize your 5 major applications into one domain with different paths (eg. /portal, /store, /etc..) then later you could point store.domain.com -> domain.com/store. So it's pretty flexible in the end.
I have learned much and solved a lot of problems coming up with multi-tenancy.
But one problem still exists. I have to offer a tenant-specific resource file because our customers want some text a little different then other customers.
Is there a way to implement a multi-tenant resourceManager? I haven't found anything else in the www.
We needed the same functionality in a web forms project and ended up implementing our own IResourceProvider, finding inspiration in http://msdn.microsoft.com/en-us/library/aa905797.aspx. That way we could have files like Default.aspx.rex, Default.aspx.da-DK.resx and Default.aspx.da-DK.xyz.resx, where xyz was the customer name. This worked quite well. Going this way seems to imply using the App_LocalResources and App_GlobalResources folders.
However, those folders are not the MVC way of using resources and will cause problems. For instance, they will not work properly with unit testing. As a last resort you might find it useful though.
I'm building a new SAAS application and was looking for some advice on the most appropriate framework to use. I realize that no single framework will likely be able to do all this, but I thought I'd ask the community and try to find one that solves the hardest problems.
Requirements
Single code source. (each customer will have either a subdomain, or a distinct domain, but everyone should be running off the same code base and same servers)
Should be able to update the programming source once and have all the tenants pick it up
Session information should either be kept in a cached store, or just in cookies (no shared state)
Multi-tenant database functionality built in. (Based on the domain used to reach the application, the framework should automatically use the database connection information assigned to that domain)
Each customer/domain may have their own template for the web pages. Templates need to be assignable on a per-customer basis and kept outside the application code
Security and rapid prototyping is more important than speed
There will be a lot of CRUD type screens, so simple built in functionality for this is desired
I have pretty lengthy Java and PHP experience, but would only consider PHP as a last resort for this. My Scala, Python and Ruby experience is a bit rustier, but I would not mind coming up to speed if they offer a significant advantage. I've looked at the Play! Framework and like it (fulfills #1, #2,#6 very well), but the multi-tenant aspects are not very strong. I've done several projects using Grails and it handles everything except #3 and #5, and can be hacked to do the rest.
I would say that the third point is rather independent of grails/play/whatever in general. If you need a shared cache there is a multitude of providers for this and there are plugins for most of them in Grails.
The multi-tenancy in grails is pretty mature and much less intrusive than the solution from the blogpost in Sebastiens answer. Whether or not you use single tenancy (multiple databases) or multi tenancy is more or less transparent to your code and most of the headaches are abstracted away. Do be aware that you need to do some smart indexing (like including the tenant id in a multi column index etc) to not get very sad speeds when your data starts to grow.
As for externalized views, you can either slap them in the database or symlink them into your webapp and just keep them in separate numbered folders. Then from the tenant plugin, you can use TenantUtils.getCurrentTenant() and simply render from the appropiate folder "/" + (tenantID ?: "default") + "/whatever/view/path". This way, layouts etc can be shared across tenants if you so please and you simply put tenant specific stuff in the tenant specific folders.
You can probably do this in play too, or , but I don't see anything hindering you from doing this just fine in Grails.
My $0.02 on this question.
Actually Play! fits well to what you'r looking for.
Read this post:
http://www.lunatech-research.com/archives/2011/03/04/play-framework-writing-multitenancy-application-hibernate-filters
It works great. You can even make this filter work so that you can expose the crud module to customers and they'll only get their own data...
For very large applications, sharding seems not supported yet (no hibernate shards handled yet i think).
There's a multidb plugin to work with multiple db, but it seems not working very well yet...
I've heard that Grails' Multi-Tenant plugin offers some good tooling for several different methods of multi-tenancy.
"Each customer/domain may have their own template for the web pages.
Templates need to be assignable on a per-customer basis and kept
outside the application code"
I assume you mean they each have their own layout/skin. There are several techniques to execute this:
You could manually assign layouts based on tenant. <meta name="layout" content="${tenantName}/main" />
Write your own tenancy aware LayoutDecoratorMapper and override the default GrailsLayoutDecoratorMapper in sitemesh.xml
Figure out how to override and enhance Some internal tools dynamically resolve views(per tenant) or resources (GrailsViewResolver, GrailsConventionGroovyPageLocator, GrailsResourceLoader, etc.)
In PHP you can use Innomatic Platform for building multi-tenant (isolated databases) applications:
http://www.innomatic.org
I have an app that I need to white-label and deploy for a client. The functionality will be identical, all the pages will be nearly identical. The only real difference will the missing logo/styling and the use of a SSO-like system instead of regular forms auth. The authentication part is no problem, as that can just be injected. But what's the best way for me to do different master pages / config files by site?
'Best' means least likely to cause problems and maintenance headaches. Attributes that would be good: quick/easy to implement, quick/easy to maintain.
You could write your own view engine in ASP.NET which loads a different theme depending on the customer that logs in.
This way you can load different cascading style sheets, master pages, views....etc.
About a year ago I wrote a post on this:
https://github.com/geersch/ThemedViewEngine
I would like to provide localization for my website in Azure.
I went with a classic aspx website since localization is supported by classic asp out-of-the-box and I have only a few pages. I want to keep it simple so MVC might be overkill.
I plan to register only 1 Azure web role for the site (foo.com) but would like virtual paths for localization, eg. foo.com/de-de, etc.
Azure does not allow virtual folders like IIS, so I think I can use Request.Path and do some jugglery to detect the virtual (localized) path.
Can you think of any other clean method? Maybe some web.config tags?
Thanks
Maybe you can do something with ASP.NET routing?
yes, sorry I did not see your response earlier and that's exactly what I used.
I was not aware that we can use routing in web forms:
http://msdn.microsoft.com/en-us/library/cc668177.aspx
I defined my localization pattern in the RegisterRoutes, like:
routes.MapPageRoute("loc",
"{language}-{country}/{action}",
"~/default.aspx", true)
Rather than page load, I use the InitializeCulture() event and set the thread culture based on the values as derived from the route spec., e.g. string lang = Page.RouteData.Values["lang"].ToString();
Remember to check for nulls, etc.
Think of putting this in a base Page class of yours.