Tuesday, February 7, 2012

Build your own CMS



Unobtrusive CMS - that integrate with your web application seamlessly.

Yet Another CMS (YACMS)

Why build your own CMS?
  1. CMS can’t be integrated within application, the application needs to be written in CMS. Drupal is written in PHP and it is full stack end2end. To develop application which is half & half, we need developer who can code in PHP Drupal way. 
  2. Some CMS are bound to frameworks - Radiant is written in RAILS and it ties down to specific version of rails and on top of that it changes rails default behavior so now I have to code according to radiant standard and not rails way. 
  3. Its quite difficult o migrate data from one env to another (test -> stage -> prod), take dumps from production to test/dev env, migration on version upgrade . One of the reason for this problem is use of RDBMS, which doesn’t suite the kind of data. 
  4. Editors friendly - users need to learn CMS way to create content. And its quick difficult for business users to create content in CMS due to its complexity. Should be able to see preview of the page before publish. Easy versioning and restore feature. 
  5. CMS doesn’t provide effective asset management within CMS. Integrating with other systems makes it really difficult for such tasks.
Goals:
  1. Unobtrusive & Light Weight- I should be able to use CMS anyway I want to. Means I already have an application, I want to add CMS to it and not other way round.
  2. Easy migration - be it from one env to another or upgrades.
  3. Platform & Framework agnostic - I should be able to integrate & deploy on any platform.
  4. Easy to extend - easy to create, integrate & extend features by means of plugins.
  5. Integrated Asset Management - with base feature such as upload, resize, crop images within CMS.

Architecture:

CMS build as 3 independent components,
core (yacms-core) - engine that builds pages using modules (goal: Unobstrusive, Platform & Framework agnostic). this is the component this can be plugged into existing application unobtrusively.
admin web app (yacms-admin) - cool drag & drop UI for new page creation. allows editor to edit pages inline on actual site. (goal: Editor friendly), draft preview of the page.
web (yacms-web) - web app provides front end for end users to view pages. Allows different front ends such as for Sinatra, Spring MVC based Java, Mobile App.







plug-in architecture for modules (goal: easy to extend and add new features to CMS): page is made of modules. allows user to create their own module and integrate easily.
type of modules

  1. page modules - page modules define page data e.g. paragraph, video, commenting etc.
  2. application modules - modules that apply across pages such as navigation, tagging, google analytics etc.


modules/plugins has directory structure similar to rails applications, (this is just the draft to understand modules)

….
   modules
       <namespace>
           <modulename>
               views
               static
               controllers
               ...


dream goal is to make modules to be added/removed/upgraded using rake task and we need to provide module market place which will allow user to easily find modules.

Technologies stack

Ruby as development language for most of the components. This allows to run core on any platform e.g. using JRuby to run in container with Java web app and also planning to expose RESTful services if this needs to be out of container. Rails for admin web app component and Sinatra, Rails as sample web front end for CMS.
NoSQL - to store all page data as one record with page content, other data like tagging, comments, etc. also store all the customization such as layouts, snippets etc (goal: easy migration, versioning)
Domain Specific Language - to define page with layout, areas, block & modules (goal: Easy migration, Easy to extend, Framework agnostic)
Markup Language - to create page content
RMagick or ImageScience - for image processing

No comments:

Post a Comment