In this short article I would like to answer the question that some of you might have "Why should I use CMS for my website". As an example of such CMS I will use Liferay which is primary system I use.
What is CMS anyway?
Lets first define what CMS system is. CMS is just an abbreviation for "Content Management System" which is a software that simplifies the process of creating and modifying digital content. The main two areas for which CMS systems are used are:
- Web content management - creating web content such as pages on your website or articles on a blog
- Enterprise content management - digital documents management in a collaborative software
Beside these two there are many other things that typical CMS supports such as:
- Managing the digital assets like videos or images
- Users, authentication, roles
- Multiple languages
- Administrator panel for non technical users
- Content hierarchy which means that pages can have subpages, images can be grouped into directories etc.
- Tools for improving SEO of your site
Of course there might be much more features (or less) depending on the CMS software you use.
But are the CMS systems actually popular?
At this point you might wonder are the CMS systems popular at all? Well actually yes. According to W3Techs.com five most popular CMS systems have almost 50% of the market share:
As you can see the number one is definetelly Wordpress which has around 40% market share.
Well should I use Wordpress then?
You might wonder - if wordpress is so popular, should I use it as well? Well it depends. If you need a simple personal blog or a website for small company then... yes! You should definitely consider Wordpress as your CMS system. Although if you need more complicated website with your own modules, advanced permissions system, best performance, clustering etc then wordpress might just be not enough. Wordpress, like everything else, has its pros and cons and the main property of wordpress is its simplicity. While it's advantage for small sites it also might be a huge disadvantage for bigger ones. For example if you want your site to have a lot of users with different roles and permissions or you need to synchronize data with third party system like SAP or perhaps you want to develop your own application for your employees and you need a lot of custom modules then it might just be too simple for your needs.
What are my options then for more sophisticated website?
Actually there are quite a lot of advanced CMS systems and it would be hard to present any details about all of them (or at least half of them) and that's why in this post I will only focus on one of your options and perhaps in the future I will also write a blog entry about some others.
Today I will focus on Liferay though.
What is Liferay then?
Well since the previous part of this article was focused on CMS systems then... well you guessed correctly, Liferay is one of them. Unlike Wordpress it's more complicated though and it also gives you much more possibilites when it comes to creating and managing your website.
Does it mean you can't use it for a simple website? Of course you can! You just probably don't want to :) Let's then talk about few properties of Liferay or, in other words, reasons why would you want to consider it or not as your web platform. Of course it would be hard to go through all of them and that's I will just mention few - of course in the end every platform needs to be considered in details for specific use case (in which I can of course help, just write to me and I will try to do my best!).
Advantages of using Liferay
Lets first go through advantages and then I will also talk about disadvantages
Advanced pages hierarchy and documents & media/web contents segregation
Liferay is quite great when it comes to configuring your webcontents, pages or your media. You can have folders with different media types or different web contents. You can have pages and subpages. Actually everything can be organized which is great for huge sites with thousands of different kind of assets. Of course you can also categorize your content and use tags, whatever you need.
Liferay can also handle searching through different kind of assets you might have in one common way. You can easily choose for which kind of assets your search box should look for. You might for example only look for pages or you might want to search your whole system (pages, users, images, blogs, etc) - it's totally up to you but Liferay gives you a lot of options that you can configure.
Advanced users & permissions system
Liferay has advanced permissioning system. Almost everything in Liferay has its own permission so you can easily decide what exactly you want users to see or be able to do. If you develop your code it's also easy to create your own permissions so then they can be easily managed from the control panel without any technical knowledge.
Another important thing is the number of possibilites you have to organize your users. You can create multi level structure of users using organizations or you can simply group your users using a thing called "User groups". Or you can use them both to fill your needs in a best possible way. After you organize your users you can then easily assign them to different roles or sites to give them access exactly to things you want.
But what if you already have your users in some system? Well the great thing is that you have out of the box integration with different, most popular systems (LDAP, SSO, CAS, Facebook and many more) so perhaps you don't need even a line of code to integrate users between systems.
Multiple instances or sites on same server
Well imagine that you're creating system you plan to sell to different companies. For example a system in which company's employees will be able to create holiday requests, organize their worktime and stuff like that. For obvious reasons you don't want to mix these users on same server, they should not see each other. Company X should not even know that company Y is also using the same system. Of course they also want the urls connected to their company so for example x.com and y.com. On the other hand if you have a lot of clients then creating another server and then managing it for each of them might be a hard and expensive process.
In such scenario Liferay virtual instances might be handy for you. Each client might be on his separate instance. Each instance has its own pages, users, roles, content and even its own url. Basically everything is separated which decreases the costs and also might cut time to market since you don't need different server, you just need to create new instance for your new client.
But hey! That's not all. The company X might want to have different sites for different kind of employees and you can also easily do that. So each client can has its own virtual instance and on each of these instances you can have as many different sites with different pages as you need.
Basically whatever you imagine is probably possible.
As the number of clients increase one server might be not enough. That's fine though as Liferay has "native" support for clustering. I wrote about clustering in Liferay before in Step by step guide for creating clustered Liferay environment article and therefore I won't go into too many details but lets just say it's simple. Because of the out of the box support for clustering it is not only easy but also gives you different configuration possibilites - you can do it almost automatically with multicast but if that's not an option (for example because servers are not in the same network or because of the cloud limitations) then you have different options like TCP unicast.
No matter if you need clusters in Docker, Kubernetes or just few machines in the cloud - you can handle that quite easily.
Custom, reusable parts of the page with portlets and custom modules
Of course Liferay won't handle all of the business needs you might have now or in the future. In such case you can simply create your own modules in Java. Liferay has support for many things you might need like database access using ServiceBuilder, creating the service layer, creating well structured code base with OSGI modules which also makes it possible to deploy modules without the need of restarting anything. You also have different possibilites of creating the presentation layer.
Liferay uses portlets which are modules that can be put on any page of your site and they act as a frontend which your users will see. Portlets are standarized thing in Java, described by JSR-168, JSR-286, JSR-362 specifications. Because of this it's also possible to use for example Spring MVC portlets.
Basically creating modules is a huge topic but lets just say you can do quite a lot.
In some cases it also might be crucial to extend your Liferay to your needs. For example you might need to change some translations, modify view just a little bit or add some extra logging when user login or logout. There are tons of different scenarios such as these and actually Liferay supports extending quite well. You don't need to modify framework code but instead you have different ways of extending or modifying your Liferay in a way that won't break once Liferay is updated. Because of that it's not only easy but can be done in a safe way.
There are also some extension points which are available directly in the control panel - for example you can add a custom field to things like Users or Sites and then you can use these custom fields in your custom code to meet your needs.
Liferay is great because of number of options it gives to you but because of this it's also more complicated. Like I mentioned in the beginning - you probably don't want to use Liferay if you just need a site with few static pages.
Of course if now you only have few pages but you plan to grow then you might want to start right away with CMS like Liferay, just keep that in mind and if you can consult your decision with someone more experienced.
For a simple site (like this blog) you don't need too much server resources. Even something like 300mb of memory might be sufficient for you needs. You can even just buy a server with already installed Wordpress or has a script for installing it with few clicks. In Liferay you will need much more resources even for an empty portal which means more expensive server. Also you will need to configure it on the server yourself, along with the database or you need to pay someone to do it for you.
Again, these server costs are not that big but it's just another reason why for simple site something else might be enough and cheaper.
Wordpress like plugins/themes
If you have used Wordpress before (or any other popular CMS) you might know that you can do tons of things with already existing plugins. A lot of these plugins are also free which is also great. That's sadly not a case with Liferay. There are tons of already available options so for many cases you will be fine but if you wanted something less popular (lets say to add some SEO stuff) then in Wordpress you had a chance to find a plugin which does that for you. The marketplace in Liferay on the other hand is quite small so if something isn't available in Liferay then you will probably not find an existing plugin for it. In such scenario you need to find someone who will write required module for you.
The same thing is true for themes. For Wordpress you will find thousands of them, a lot of which are free. In Liferay you will only find few.
But like I mentioned before, Liferay is not meant for simple pages so custom development is most likely thing that you just need to have on your mind.
To sum it up. In many cases you should consider using CMS for your website. Depending on your needs it might be the best to use simple one like Wordpress or Joomla or you might consider something more advanced like Liferay, Kentico or Adobe Experience Manager.
Each of the solutions has its own advantages and disadvantages. I hope I gave you at least a little understanding why you should also consider Liferay in your project. Of course I mentioned just a few properties but there are much more and there are many uses cases for it. Sometimes you will use as a bank site, sometimes you will just keep content in it and use it as a Headless CMS and sometimes you might want to develop a whole SaaS with it. Because of so many uses cases and options in Liferay it would be hard to list them all and therefore it's always good to ask someone more experienced to help you find a tool that will work best in your scenario.