Blogs
One of the questions that comes up more often when I talk to community members, partners and customers is, should I use communities or organizations in my project?
If you haven't asked yourself this question before, let me add some background. Liferay portal is known to have great multi-tenancy support. That means that you can have many independent sites within a single installation of Liferay. There are two ways to build sites in Liferay, organizations and communities, and each one has its own characteristics.
When I am asked this question, I always like to go back to the origin of each of them, because I think it helps understand the differences:
- Communities: they were created as a way to have groups of pages that could display content and applications. The reason why they were called communities is because the goal of all the initial implementations was to build online communities, but since then people have really been using communities for things for which the term may not apply so well such as corporate sites, product sites, event sites, etc. That's perfectly fine.
- Organizations: they were created as a way to organize users in a hierarchy. The great thing of this hierarchy is that it allows delegation of user administration, which is a key feature needed by some of the largest installations of Liferay where there are hundreds of thousands or even millions of users. Later, we realized that many people were creating a community associated to each (or several) of their organizations. But keeping this association manually was a bit of a pain, so we improved organizations so that they could have their own site. (For the curious, we did it by creating a community underneath but hiding that fact from the end user).
Keeping this explanation in mind it should be easier to decide which one to use. If your main purpose is to organize your users and delegate their administration, you should use organizations (It is important to always remember that an Organization Administrator will be allowed to edit the profile of all the users of the organization). If you also need the organization to have pages, then you can use that feature to save time.
If all you want to do is create a website with pages, content and applications that can either be accessed by anyone or just by a group of members of the site, then communities is the best choice.
And of course, remember that you can safely use both communities and organizations within the same portal.
I hope that this explanation makes it easier for you the next time you ask yourself this question, but whenever a question comes up so often I think we should ask ourselves why. We have done it and have been discussing internally how we could improve the product to avoid the question altogether. We have been thinking about several solutions and we are very happy with the one we have found. In fact is super simple, and that's always a good thing.
Improvements in Liferay 6.1 to simplify the creation of sites
Let's start with the great news, in Liferay 6.1 you will not have to decide whether to use communities or organizations upfront. Sounds good, right?
Let me explain what will change and how that will be achieved. The first change that we will be making is to rename what we currently know as Communities and call it Sites. The reason for this should be obvious if you have read the rest of this entry, people have been using Liferay's communities to build sites for a long time so it's always a good way to make things easier to understand to give them a name that means exactly what people use them for.
Of course we will still allow creating sites whose purpose is to serve for building online communities. In fact we plan to make it easier and faster to do that by using predefined site templates for community building.
How about organizations? They will still be the main way to organize users in a hierarchy and they will also have the ability to have an associated Site. The main change that we will be making is that if it has one, the Site of an organization will not be invisible. In other words, when the administrator goes to the Control Panel to the Sites Administration application (which is currently known as Communities Administration) he/she will be able to see all the sites, including those that are associated to an organization.
Additionally, it will be possible for an administrator to associate an existing site to an organization at any time. Of course it will also be possible to undo this association whenever wanted. When a site is associated to an organization the following things will happen (this doesn't change from 6.0, but I prefer to still explain it):
- All users of the organization will become members of the site automatically. That means that they will have access to the private pages of the site and will be able to do any action that has been configured to be doable only by members.
- The name and description of the Site will be automatically synced with those of the organization (to save the administrator time).
As you can see, the changes that will be introduced won't be large, but it will make the life of developers building portals using Liferay easier. If someone asks you, how do I build a site to do XYZ? There will be one and only one option that you can choose, while still keeping the benefits that we had before.
Furthermore, as we have started working on theses changes and we keep having many benefits that we hadn't thought of to this simple changes. For example, it will be very easy to have a user who is an administrator of the site of an organization but not of the users of the organization without creating custom roles. Also, it will simplify the management of roles and avoid some duplication that is necessary now some times. Not only that but it will also help make Site Templates more powerful, so expect improvements in this area too :)
We hope you like this idea and of course we would really welcome beta testers (maybe I should say alpha testers) that would like to try these changes as we build them in Subversion to give us feedback.
Finally, you might be wondering if this will require any complex upgrade. The answer is no, because there are no significant changes in the APIs or database model, so all your sites will be kept and those that were associated to an organization will stay that way. The only things that will need to be upgraded (and this will be done automatically for you) is related to organization roles. For example, Organization Administrators, will be automatically made Site Administrators, so that they can keep managing the site as they used to. But now you will have the flexibility to assign both roles or only one to your users.

