Model refers to business logic part of the application. This consists of application classes and script includes. All files of Model are stored in
An Application Class refers to any PHP class that contains business logic of the application and is a part of Model. Application classes can be created and managed directly through the OSF IDE. However, you can also edit these classes in your favourite code editor. These classes are located in
.cls.php. There should be no white space in the class name or in corresponding filename.
A Script Include refers to any PHP file that contains business logic of the application and is a part of Model. This file is included in an event to execute respective business logic. Script Includes can be created and managed directly through the OSF IDE. However, you can also edit these files in your favourite code editor. These files are located in
/model/script directory. The file name of a Script Include should have file extension as
The other thing that you can manage about Model is the Configuration Variables of application. While developing an application, we tend to use a number of magic numbers. Ideally we store these in a separate file, and in turn, include it everytime within the application. With the OSF, we do not need to do any such effort; rather we create these as configuration variables on the OSF IDE, and then use them as a property (date type is associative array) of
$APP->CONFIG, within the application. You can add a Configuration Variable by filling Variable Name, Description and Value of Variable on the OSF IDE. You can arrange the display order of the created variables; however, this is just for display purpose on the OSF IDE (for readability of list of variables for developer), and do not have any other requirement during application development.
Updated on Aug 20, 2016
The techReview is an online magazine by Batoi and publishes articles on current trends in technologies across different industry verticals and areas of research. The objective of the online magazine to provide an insight into cutting-edge technologies in their evolution from labs to market.