Overview of Batoi Code Framework Architecture
Batoi Code Framework Objects, Arrays And Libraries
Batoi Code Framework Application File Structure
Batoi Code Framework Application Database Structure
Controller in Batoi Code Framework
Event in Batoi Code Framework
Model in Batoi Code Framework
View in Batoi Code Framework
Users and Roles in Batoi Code Framework
Overview of Batoi Code Framework IDE
Batoi Code Framework Coding Standards and Conventions
Get Started with the Batoi Code Framework
Glossary of Terms Used in Batoi Code Framework
Installation and Upgrades of Batoi Code Framework
Glossary of Terms Used in Batoi Code Framework
Please find the list of terms that are used in Batoi Code Framework and their description below:
Admin
The usernameadmin
(case-sensitive) is the super user which can access Batoi Code Framework IDE and can develop, manage and access entire application. This user gets such a right through a default role assigned to it – Administrator
. Neither this username nor its association with the role Administrator can be modified.
Administrator Role
When you install the framework, the default role isAdministrator
, and it is assigned automatically to the user admin
. Neither this role nor its association with the user admin
can be modified.
Application Class
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 IDE. However, you can also edit these classes in your favourite code editor too. These classes are located in/model/class
directory. For more details on Application Class, please go to https://www.batoi.com/support/docs/code-framework-concepts/model-batoi-code-framework-6318894416c6a
Application Settings
Application settings refer to setup information that are used while installing the framework, thus setting up the application with Batoi Code Framework framework. This includes application name, description, author name, email address of admin user, URL of application and database settings. Database settings include DSN, Database Name, DB user and Password, and Table Prefix (the string that will be preppended to each table of the application including Batoi Code Framework Database Tables). For more details on Application Settings, please go to https://www.batoi.com/support/docs/code-framework-concepts/overview-batoi-code-framework-ide-6319ed95058c4Configuration Variables
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 Batoi Code Framework, we do not need to do any such effort; rather we create these as configuration variables on IDE, and then use them as a property (date type is associative array) of$APP
object, $APP->CONFIG
, within the application. For more details on Configuration Variables and how to manage these, please go to https://www.batoi.com/support/docs/code-framework-concepts/model-batoi-code-framework-6318894416c6a
Controller
A Controller is a PHP file that takes the HTTP request, and manages the control of the execution path of the application (instance of application) at server-side. For more details on Controller and how to use them, please go to https://www.batoi.com/support/docs/code-framework-concepts/controller-batoi-code-framework-631886b5c7a31Event
Event happens when an HTTP request is sent to the server-side, and thus an instance of application is created. In Batoi Code Framework framework, an Event is identified by Event ID, and this is available as$APP->ID
within the application. For more details on Event, please go to https://www.batoi.com/support/docs/code-framework-concepts/event-batoi-code-framework-631887a6311d4
Event ID
An Event is uniquely identified by Event ID and this is the same as$APP->ID
. For more details on Event ID, please go to https://www.batoi.com/support/docs/code-framework-concepts/event-batoi-code-framework-631887a6311d4
IDE
Batoi Code Framework comes with a tool that developers can use to create, modify and manage their application. This provides an Integrated Development Environment for the developer. IDE is in an early stage currently, and future development will bring in object modeling and remote application deployment into its purview. For more details on IDE, please go to https://www.batoi.com/support/docs/code-framework-concepts/overview-batoi-code-framework-ide-6319ed95058c4Lifestream
Batoi Code Framework has an inbuilt capability to track the access to the application created through it. This is enabled by default during installation of the framework. You can see the access log of the application in the section meant for Lifestream on Batoi Code Framework IDE. For more details, please go to https://www.batoi.com/support/docs/code-framework-concepts/overview-batoi-code-framework-ide-6319ed95058c4Model
Model refers to business logic part of the application. This consists of application classes and script includes. All files of Model are stored in/model
directory. For more details, please go to https://www.batoi.com/support/docs/code-framework-concepts/model-batoi-code-framework-6318894416c6a
Batoi Code Framework Array
Batoi Code Framework Array,$_DELIGHT
, is defined by the application instance, and will not be used visually by the developer anywhere. This is an array the framework uses internally. For more details, please go to https://www.batoi.com/support/docs/code-framework-concepts/batoi-code-framework-objects-arrays-libraries-62ed1c7bb2839
Batoi Code Framework Database Tables
There are seven database tables created during the installation of Batoi Code Framework framework. These tables start with*od_
, where * is the table prefix string defined during the installation of framework. For more details on Batoi Code Framework Database Tables, please go to
https://www.batoi.com/support/docs/code-framework-concepts/batoi-code-framework-application-database-structure-631711e1f1804
Batoi Code Framework Libraries
Batoi Code Framework Library consists of a set of classes that additional capabilities to develop your application. Batoi Code Framework Library Classes are located in/lib
directory. For more details, please go to https://www.batoi.com/support/docs/code-framework-concepts/batoi-code-framework-objects-arrays-libraries-62ed1c7bb2839
Batoi Code Framework Objects
The framework provides three core objects to be used during application development -$DB, $APP and $USER
. These objects are automatically instantiated and are available in the application. The $DB
object is responsible for database access and data manipulation. The second object $APP
is the instance of application when an HTTP request is made, and carries all related data. The $USER
object carries data of the user accessing the system (uses Row Gateway Data Pattern), and is only instantiated if the controller is private. For more details on Delight Objects, please go to https://www.batoi.com/support/docs/code-framework-concepts/batoi-code-framework-objects-arrays-libraries-62ed1c7bb2839
Profile
Batoi Code Framework provides an in-built mechanism to manage user’s primary details like username, password, email, name and roles as they are critical to handle security aspect of the application. However, a developer can create more attributes and functionalities to manage user accounts as the application scope demands. This can be achieved by creating aProfile
class (an Application Class) and a corresponding database table. More details can be found at https://www.batoi.com/support/docs/code-framework-concepts/users-roles-batoi-code-framework-6319ebce32cad
Roles
Each user must be assigned a role as it determines the access privilege and the homepage (after signin) of the concerned user. For learning how to manage roles, please go to https://www.batoi.com/support/docs/code-framework-concepts/users-roles-batoi-code-framework-6319ebce32cadScript Includes
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 within the code for an event to execute respective business logic. Script Includes can be created and managed directly through IDE. However, you can also edit these files in your favourite code editor. These files are located in/model/script
directory. For more details on Script Includes, please go to
https://www.batoi.com/support/docs/code-framework-concepts/model-batoi-code-framework-6318894416c6a
Users
Users are entities who will access the application after it is created. Batoi Code Framework creates theadmin
user (with access privilege to all aspects of the application and to IDE too) automatically after the framework is installed. Other users can be created through IDE or you can develop your own functionality for this purpose through custom class called Profile
. For learning how to manage users, please go to
https://www.batoi.com/support/docs/code-framework-concepts/users-roles-batoi-code-framework-6319ebce32cad
View
View refers to part of the application that is responsible for UI. This consists of View Page Parts, CSS files, JS files, and also graphics and multimedia assets of the application. Code for View Page Parts, CSS files and JS files can be created and managed directly through IDE. However, you can also edit these files in your favourite code editor. For more details, please go to https://www.batoi.com/support/docs/code-framework-concepts/model-batoi-code-framework-6318894416c6aView Page Parts (VPP)
View Page Parts (VPP) are files which contain UI content consisting of HTML and PHP print statements or simple loops and conditions. They are called Page parts as one or more such files together will create a complete UI that goes to client-side for rendering. These are defined on IDE while creating or editing events, and are available as$APP->VIEWPARTS
within the application. The content of VPP can be created and managed directly through IDE. However, you can also edit these files in your favourite code editor too. For more details, please go to https://www.batoi.com/support/docs/code-framework-concepts/model-batoi-code-framework-6318894416c6a
View Page Variables (VPV)
View Page Variables (VPV) are required to define UI pages. This includes page title($APP->PAGEVARS[TITLE]
), page h1 texts ($APP->PAGEVARS[HEADERTEXT])
, page breadcrumb ($APP->PAGEVARS[BREADCRUMB])
, etc. While the specified three are automatically created when you install Batoi Code Framework framework, any other (as required in the scope of your application) can be created on IDE and be used within the application. For more details, please go to https://www.batoi.com/support/docs/code-framework-concepts/model-batoi-code-framework-6318894416c6a