dotCMS - Open Source Content Management System, Ondemand CMS, and Professional Support

Document Search

Article Information

Since Version: 1.7
Updated: 4/23/2009 4:56:59 PM
By: Jason Tesser
Doc id: 160637
Print Page: Export to PDF

Plugins


What are They Good For?

Plugins allow dotCMS custom development to happen without modifying dotCMS code.  This enables users  to run a stable release/version of dotCMS and still be able to add/modify custom logic without breaking the upgrade path. In the past this would have required modifying dotCMS code and configuration and would make upgrading very difficult at times. 

Plugins now provide a way of deploying new functionality on top of an existing dotCMS instance without touching the code base it is running which makes the new functionality more modular and portable to other dotCMS installs or just for maintenance purposes. 

Plugins can be used for everything from configuring the dotCMS to overriding functionality and even creating your own custom web applications/tooling.

Who Can Use Them?

Like most of dotCMS the plugins have appeal to people of varying skill sets. You do not have to be a full fledged developer to use them. For example a system admin might use plugins to simply configure the dotCMS. A dotCMS HTMLer might add some static files or create a set of macros to use. A programmer can create or even override dotCMS functionality.

The nice thing about plugins is that even as a programmer the entry level is not high. You do not have to understand the entire dotCMS stack or J2EE stack to write them. Typically the code written in plugins is specific and isolated. This provides a way for people who haven't even written Java code before to get in and start tinkering. Most things can be copy/pasted and edited. The plugins are designed to allow the Java, Ruby, PHP, or .NET programmer to write custom logic.

How do They Work?

The plugins allow config files to be manipulated, static files to be deployed, and custom code to be deployed. In the past to add a servlet to the dotCMS you would have to alter the dotCMS/WEB-INF/web.xml and then add your java class to the system. Not you can just place your web.xml fragment in side your plugin with your Java source. Typically plugins can override the dotCMS. For example when you set a property in a plugin the dotCMS will use your value for that property even if the value is set in the dotCMS core files. This is also true for Java code. Your plugin Java code will come first in the classloader which basically means that if your plugin provides the same classes as the dotCMS your classes will be picked up. This provides great power and flexibility. Remember though as it has been said "With great power comes great responsibility."



Post a Comment


Add Comments

   

 
Post