Archive | Content Managemnet Framework RSS feed for this section

“Auto Load” Method and Singleton Pattern helps to manage resource in appRain

12 Oct

It’s really easy to load a class in appRain. We don’t need to include the class but it attach on demand. “On demand” means when we create first instance of the class then system automatically include the class in the system.


There are some common conversion to construct the class. Here is some guide line

1) The class name must be given with the combination of it’s directory path. Let say we have a class in:


Then class name must be


2. Class name must be in lower case.

Here each underscore ( _ ) is used as a directory separator so we must use it carefully.Once we have create the class the installation is done. It will be attached in the system when we will create it’s first instance. We can create the class object like

$object = new Development_Plugin_Paypal_Standard()

But appRain recommend in different way..

For plug-in it will be : $obj = App::Plugin(‘Paypal_Standard’);
For helper it will be : $obj = App::Helper(‘Paypal_Standard’);

But in some case if we need to create class object directly then we can use like
$obj = App::__Obj(‘Development_Plugin_Paypal_Standard’);

Because, in this way the system manage the resource in Singleton Pattern so that, It hepls not to over load resource any more.



Easy way to pass value by using Magic Methods in appRain?

12 Oct

In appRain we can avoid some unnecessary hassle to pass value using Magic Methods.

What is magic methods?
A magic method does not have a physical existence in Project code. We use this to pass value from one scope to another scope. Each magic method has a pair of two methods.
1) First method set value that always start with a keyword “set”. For example :


2) Second method retrieve value and it start with a keyword “get”. For example:


This method return value set by $this->setFirstName() and if value is not set then it return null value.

The “set” method always return reference it’s self class so that we can create a chain of call like bellow


What is the Problem of argument passing technique?
It’s really boring to pass lots of value in different scope by function parameters be cause it fixed developers in a frame. In some cases if parameters become optional then it’s taught to manage the sequence.
For example:

          "param 1" ,
           "param 2" ,
           "param n")

Let say in above example we like to skip param-1 but pass param-1 so you have to pass a default value in param-1 to maintain the sequence.

So, How does magic method help?
It’s really an amazing utility that we get form magic methods. Let say we have a function that we us to format product information, we can use magic method to set values like:


So we have create a chain of five magic methods to pass value and finally called formatData() method and in we will retrieve value like $this->getPrice() or $this->getUserId(). Now if we don’t like pass Invoice id simply you can comment it out or next time if we need to pass another value then simply we will add that another magic methods. And for the new change we don’t need to re-write function definition.

Show some Examples:
There are some good example when we save data in model like bellow:

See we can add/remove filed easily if needed. Let’s say we have create a plugin for payment process were we have to pass bunch of parameters. We can do that simple like bellow.

$payment = App::Helper('Authorizedotnet');

// Batch - 1
// Batch - 2

// Batch - 3		

In this example we have set data in different steps and inside class we can catch it like bellow:

$post_values = array(
        "x_login"                    => $this->getXLogin(),
        "x_tran_key"               => $this->getXTranKey(),
        "x_version"	                => $this->getXVersion(),
        "x_test_request"          => $this->getXTestRequest(),
        "x_delim_data"            => $this->getXDelimData(),
        "x_delim_char"            => $this->getXDelimChar(),
        "x_relay_response"      => $this->getXRelayResponse(),
        "x_type"                     => $this->getXType(),
        "x_method"                 => $this->getXMethod(),
        "x_card_num"              => $this->getXCardNum(),
        "x_exp_date"               => $this->getXExpDate(),
        "x_amount"	                 => $this->getXAmount(),
        "x_description"             => $this->getXDescription(),
        "x_first_name"             => $this->getXFirstName(),
        "x_last_name"              => $this->getXLastName(),
        "x_address"                 => $this->getXAddress(),
        "x_state"                     => $this->getXState(),
        "x_zip"                        => $this->getXZip());

So, It’s pretty helpful to pass data or push it for a certain period.

How to Install appRain(CMF)

8 Oct

Here is a video explained how to install appRain Content Management Framework.

Finally! appRain is released with it’s extensive features

5 Oct

Finally! appRain is released with it’s extensive features. It has discovered few new things in web development and officially it is called Content Management Framework with two basic parts Content Management System (CMS) and Framework.

Generally, we face this problem when one of our potential client  starts a new project. Which tool should we choose? CMS or Framework!!

If we choose a CMS then we can give a quick output, but there is a chance to be stuck if the client wants to move the site to a big portal later with new features where those are not supported by that CMS.  Well! Lets forget CMS and start with a Framework, then we have to develop the site from very basic but we don’t have much time to spend because budget is low.

So! What is the solution?
Why don’t we get a tool with both of these two supports. appRain is developed to solve this kind of problem. It has two parts, one is Content Management System that has  lots of visual/interface level development tools and part two is Rapid development Framework that contains lot of core programming tools to support your project development at any edge.

Official website :
Downlaod :
Demo Website   :
Here is some common features that we have in appRain

CMS Part Features

1. Custom Site Settings
Custom Site Settings are XML definitions  that creates interface in admin panel to process admin settings. Settings can be created in different tab or in a single page as per client need.

2. Interface Builder
It’s a XML definition to construct your admin panel. This definition file can be split Tab by Tab or in a single file. It helps to arrange(show/hide by ACL) admin tab and render page under admin panel in a user friendly way.
3. Page Manger
This tool helps to manage static pages that we need in the site. It has a very good contribution to manage page’s Meta Information. Simply create a static page as website section and give it to end user so that he can edit all meta information himself. 

4. Information Set
Information Sets are XML definition that creates a web interface in admin to process data and save in database. We can select various input types(event Calendar, Color Picker, Rich Text Editor, Category Set)  as a field. Each Information Set represents a virtual database table were we can execute SQL statement to access/modify data. Validation can be added in both Clients and Sever side. Call back function will helps for more extensive work.

5. Category Set
Category Set helps to process data in multi/single level category. It create Interface automatically for administrator to input data and save in database.

6. Member Management
It helps to manage members in all phase. A member can be an ordinary user just registration and login in site fronted that we call “appUser”. We have another type of user call ‘Profile User’ who can login as administrator and can process data. appRain tracks all of his data. With this feature multi-user website can be managed easily like wordpress, where each member  has an admin panel and website.

7. Email templates
This is a module to process email subject and body from admin panel and replace particular data with variables. Simply it makes a developer’s life easy to handle all emailing stuffs.

8. Admin Management
Super admin can create sub-administrator with proper access in different sections. Once a  admin updates the data system can track who/when data is updated. 

9. ACL
It’s an Access Control limit that we can define in Interface Builder definition to specify the privilege of Admin and profile user access.

10. pre-configured Blog
A pre-configure blog is available with the Demo site. So user can simply install and use that. 

11. pre-configured Store
A store is configured with Shopping cart and one page checkout system in demo site. Paypal and Credit Card ( payment process are implemented there. User can manage category and product update section and also Payment and Store setting in admin panel. There is an order manager section for administrator.

12. pre-configured Dynamic Gallery
In gallery, section 5 photo galleries( FlashGalleryASymbio, UvumiGallery, AinoGalleria, SmoothGallery, ElectricprismSlideShow)  are installed as example with lots of configuration. User can select any one gallery from admin section to be rendered and can change the Transition effect from admin settings.

13. pre-configured Forum
There is a Simple Forum installed in demo site to manage community input. User can manage category, Thread, Post, comments etc from admin panel.

14. Installer.
A built -in install is available to install the project in server and do the dependency check. appRain require at least PHP5 and mode_rewrite access to run in full phase.

15. Very Well Defined Cache Management
More caching more faster. Admin can manage different types of cache. User can clear/enable/disabled from admin panel. Also a developer can create cache for a particular Data Block or HTML for quick reference.

16. File Manager
There is a Multi file uploader available in admin Tool Bar so one can update file in system using those.

17. Rich Text Editor
Rich text editor can be configurable with Textarea as per need. Now appRain is using CKE editor but there is a plan to install more light text editor. This rich text editor can be enabled/disabled from admin setting.

18. Accordion:
Sometime user feels bored to see lots of setting options in one window then admin can enable accordingly to make those collapsible.

19. Database Backup tool
There is a tool to Backup/Export/Roll Back data base in admin panel 

20. Deleted data recovery
If any entry is  deleted then appRain creates a cache from 7days (Default time) to recover if needed. Data saved in a serialize format.

21. File Editor
There is a file manager to edit code from admin panel if needed. It’s an handy tool for quick support.

22. Language Module
appRain has a default language module to manage multilingual support. Administrator can manage language data from admin panel

23. Theme Manager
appRain can separate it’s design in separate theme.  Basically it’s an addition layer added in View section of MVC pattern. It’s helpful to change layout or multi domain site.

24. Multi-Store Management System
appRain can be configured in multiple domain with one installation. We can configure theme, starting point etc for each site.


1. MVC
It’s a popular pattern that most of the framework uses.  It separates the development in three different layers which are Model, View, Controller. But in appRain there is another one sub-layer added called “theme” inside View.

2. Model validation
Different type of validation rule can be added in model and this rule are checked when we try to save data in a table through model and raise exception if needed.

3. Model Installer
In apprain each model has a version that is saved in database. If we like to run a set of SQL statement automatically by system then we can create an installer and update the version from code and system execute the SQL one time and adjust model version. This method is really helpful when lots of developers work together and reduce pressure of Database administrator. And if SVN is used in project development then new SQL update are easily shared by Developer.

4. Factory Pattern
appRain manages all it’s Object through factory pattern to optimize resource. Factory add Single Tone pattern as per need to reduce the over initialization of object allocation.

5. Single Tone Pattern
appRain load most of the resource in Single Tone Pattern. So there will be no over initialization of one class instance.

6. EAV
appRain creates dynamic Data-process interface by InformationSet and each interface is initialize to database. All data save following EAV module where we dont need to create lots of database table physically but access data like a Relational data base Table. .

7. Search Module
Search module helps to create a result from over all project data by calling few simple functions. It reduce the hassle of writing lots of Queries by developer. 

8. Caching (11 types)
Several type of file caching is used to make the site faster and all these caching configurable. Developer can do manual cache by “Cache” module to quick data cache of a complex calculation to reduce system press.

9. URI Manager(Router)
It’s a fantastic tool to manage Website URL. We can re-write URL, Fix the project starting and even fix the total project in a particular point. Developer can pass hidden variable by URL which helps to use one Controller Action Method in different purpose.

10. Helper
appRain has lots of predefined helper. Developer can create new helper or overwrite core helper as per need.

11. Plug-in
Plug-in is a process to attach 3rd party class with appRain environment. Class can be either auto load or register.

12. Add-on (Attach 3rd Party Script based extensions)
Add-on helps to add JavaScript, CSS, Flash type resources. Each add-on has a XML definition to load it and we can configure it in different ways from definition XML or Controller Method.

13. Module (appRain Library)
All core library is called “Module”.  Generally module are abstract class to restrict resource share.

14. Magic Method in all module
appRain process some magic methods that really help to transfer data in different scope.  If you see a method like $this->setFirstName(‘Jhon’) then you may not get this method any where in coding but don’t worry it’s a simple function to set data and we can retrieve  value like $this->getFristName().  Each “set” method return Self Object that helps to create a chain of function call. Like $this->setFirstName(‘Jon’)->setLastName(‘Regan’);

These also helpful to save data in a model when developer feel boring to construct Array Format. Then we can use Magic method like bellow:
         ->setTitle(‘Need your help’)
         ->setSubject(‘Client Inquery’)
         ->setMessage(‘How can I install appRain’)
15. Auto load class by Path
appRain maintain a conversion in class name so it can be auto loaded. The class name create with combination of it’s location. Say for a example, if a class exists in “development/plugins/mailing/phpmailer.php” then class name should be “Development_plugins_Mailing_PHPMailer” so it will be load automatically by auto load feature.

16. EDP
EDP mean Even Driven Programming that help to attach an even on runtime. The pattern is implemented in Data Grid Helper.

17. Data Grid
This helper helps to create a HTML data output in Tabular(Two column) or Grid format.

18. PDO (Database layer)
PDO is used as a database layer that helps to integrate different type of Database System. 

19. Web Service (Using PHP reflection API)
Help to crate API using Web Service by WSDL. PHP reflection api is used to create WSDL but user can add custom data type as per need. 

20. Cron Job Setup(Using PHP reflection API)
This helper helps to run scheduler process. And all Schedule time read using Reflection API so user simple add the Time Duration as function comments.

21. Cryptography
This module helps to create different types of data encoding. Its really helpful to respond in AJAX helpers as in JSON format and Password encryption using Salt.

22. Export Resource outside
It’s really an interesting  feature. We can export most of appRain resource out side of it if we like to use/import any resource in to other environment. For example, if we like to do a Unit Test using “Simple Test” tool but finally we don’t want to release the project having the Unit Test module integrated with it. In this case, we can simply export appRain objects and pass it in unit test module and do necessary test out side of it.

23. Configure Multi-theme and Multi-User Site
There is a feature called Profile User mode that helps to crate profile base multiple site. Where each user will get an admin panel and a website.

24. Configure Multi-Domain site
We can configure multiple domain in a single installation of appRain. In this case administrator can access multiple sites from one admin panel.

25. Deleted Data Recovery
appRain can Log any deleted data for a certain period of time in  as serialize format. So that, it can be recovered as per need.

26. Core Configuration
appRain save all System variables in a XML definition file and there is a particular Helper to load those configuration if need in rare case.

These are some common features that are available in appRain.