The basic principles of how Cotonti is built
Comments: (0)
Ratings:
Author: Trustmaster
Submitted by: Trustmaster   Date: 2009-01-17 15:14
 
First of all we need to say that Cotonti is a successor of Seditio CMS which is in turn a successor of Land Down Under and that means that it is not just yet another new born portal system, but it is an inheritor of more than 7 years of quality work legacy. It means that as a new project it tends to follow the most important of modern web development trends but meanwhile to keep the best of oldschool traditions.

Procedural Codebase


Sure you are going to say that it is obsolete, outdated and must die forever. You would like to claim the object oriented programming is the world savior and is the only paradigm to survive ever. If you really think so, you'd better take a look at XOOPS, e107 or something else like that.

But we made it a deliberate choice for three simple reasons:
  1. We keep the code very clean, straight-forward and easy to understand.
  2. This way it beats other content management systems in performance.
  3. And this way it makes a difference on a crowded CMS market which is however all the same with all those «true OOP», «real Web 2.0» and other buzzwords which make noise but no sense when it comes to real everyday work.

On the other hand, it is not such so rudimentary and conservative as you might suppose. Although the code base is a procedural API, some exact functionality and peripherals can be provided with handy classes and class libraries. So, we don't hesitate taking the best from both of these famous programming concepts.

Model-View-Controller (MVC)


Cotonti follows Model-View-Controller design pattern which is very common for web application. It splits the entire infrastructure into 3 different parts:
  • Data Model. Represents all the site data on its own and is driven by a DBMS and connected via database client API. Cotonti currently supports MySQL DBMS only and there is no plan for supporting other database management systems soon because MySQL is quite good for website jobs. Though, it is possible to write your own database adapter easily if you need it.
  • View. Represents website layout or the way end-user is able to see it. In order to separate the layout from code, Cotonti makes use of such well a known resource as Template. It is very easy to use for web designers and HTML coders, contains minimal amount of logic and is flexible enough to design almost any website. As the template engine we use XTemplate which is very fast and yet easy to use.
  • Controller. Represents the logic or the code that makes it all work together.

Modular Architecture


In the heart of this CMS there is a solid code library which implements basic concepts required for other parts of the system to work. It is called the Core and you might call it CMF (Content Management Framework) as well. It is a set of files containing functions and classes which are clear, fast and easy to use in modules and plug-ins.

The exact areas of the site are provided by modules. A Module is a root-level script which includes the core libraries and most often consists of several parts united with the same goal: implement the exact kind of functionality such as Forums, Private Messages, Pages, Polls, Galleries and so on.

Modules are quite large and they would not be flexible enough if there was no such a thing as plug-ins. Plugins are smaller packages consisting of parts which can hook into exact parts of modules and extend them. And there are enough hooks to get almost any behavior you need without hacking the core or rewriting the modules themselves. Plugins also can have standalone, popup and ajax parts which are often needed too.

Be it a module or a plugin, the layout should be contained in template files which are combined in skins which in turn can be customized. Every skin may contain several themes.

Internationalization


Internationalization (often shortened as i18n) is an important feature for an application to be configured for use in different natural languages. It is also a major step forward to multilingual contents. In the XXI century many sites may contain messages in different languages at the same time and that is why more and more people choose Unicode as character encoding.

Cotonti supports Unicode out of the box and prefers UTF-8 as default character set. Interface of the system is internationalized using concept of language files. There are core language files, module language files, skin language files and language files that come with every single plugin. If for some reason there is no language file available for your language, you can easily make a translation yourself or with help by a translator or the community.

Stability and Security


Seditio was one of the most secure PHP CMS in the world (regarding to bugtracks) and made stability one of its major goals. We believe it is a good tradition to follow. The coders are aware of SQL injections, cross-site scripting (XSS), cross-site request forgery (CSRF) and common PHP pitfalls and they do their best to protect your site with both passive (neat coding, bug fixes) and active (special algorithms) defence.

There is also a powerful and clear permission distribution system based on Access Control Lists (ACL) and Access Modes. It is a matrix with user groups and site elements as columns. Felds and cells of the matrix contain exact permission for a group and an item.

There is also built-in anti-hammering and spam protection. But in spite of all these brilliant security systems, you should always remember that they can not protect the site from yourself.

One of the obvious definitions for Stability is the lack of bugs. There are two ways to achieve it. The first is careful coding as we have already mentioned above. The second is known as Quality Assurance (QA). It consists of user-submitted bug reports, testing, debugging and updates.

Performance and Scalability


When it comes to performance, the most important question is how many requests per minute (RPM) or requests per second (RPS) your site can handle. And in Cotonti we do our best to get high results. We avoid overhead when adding new features, use effective performance techniques such as pre-rendering and server-side cache. SQL queries and database is optimized and the code is designed to do its job well when your site gets larger and much more popular.

You can create multi-site installations if your host supports it, so that you can use the same engine to power several databases and site configurations. On the other hand, if the load gets high enough so that one server is not enough, Cotonti is easily scaled with MySQL clusters, web server clusters, load balancers and works in distributed mode without any problems.

SEO Friendly


There are some very good looking websites, with lots of graphics and Flash, which have perfect look and feel but are ranked by search engines so low that it is a miracle that you have found them at all. That is why optimizing your site for search is important.

Cotonti comes with powerful URL designer tool, customizable titles, metas and a lot of useful configuration options. Finally, there are great SEO opportunities with plugins: the number of them is growing and you can easily write what you want.

Web 2.0


Web 2.0 is just a buzzword people used to buzz when they talk about several modern trends in the world wide web. So if you wonder if Cotonti supports Web 2.0, let's see what it consists of.

AJAX


AJAX stands for Asynchronous JavaScript And XML but in fact is is a happy family of similar technologies. It provides client-server communication without need to refresh the page. This way web application works faster, consumes less bandwidth and looks smother for a user sight.

Cotonti has built-in support for popular JavaScript library jQuery which provides excellent AJAX support. You can easily write AJAX-enabled plugins and some basic modules can work both in refresh and non-refresh modes.

Syndication


Cotonti comes with standard RSS module which lets your visitors subscribe to various feeds on your site. Very soon it will be replaced with Feeds module which will provide feeds in both RSS and Atom formats, contain all the basic subscription sources (lists, pages, forums) and provide hooks for feed generators in third-party plugins and modules.

Can you create a feed aggregator on your site? With plugins it is very easy!

Tags


Life on some popular sites cannot be imagined without Tags and Cotonti brings you a flexible Tags subsystem. You can use tags in pages, forums, third-party modules and your own plugins. Let your users tag site entries and it will generate tag clouds and let people search items by tags.

Socialization


Cotonti is not a social network out of the box because it is a generic CMS/CMF with very basic core functionality. But you can create one if you make use of its basic features (pages, forums, private messages) together with some great plugins available on the net: blogs, friends, user walls, galleries, etc. If some brick is missing in the wall, it won't cost you much of effort to make it — this is the power of Cotonti.

Connection with other popular social networks can be established with free plugins and services as well. For example, there is a Ping.fm plugin which allows you to build lively socialization in more than 20 networks around your Cotonti website.

Web Services


A rare website can be used as a web service via XML-RPC, REST or SOAP. Neither has Cotonti implemented this way of communication. But the world is constantly on the move, so as you read the next chapter someone is probably working on this feature too.

See also:
 
No comments yet
Page created in 0.044 seconds SQL total time: 0.01 seconds - SQL queries: 23 - Average SQL time: 0.00045 seconds