Fabriq works by building content on top of the core files of the framework and making used of methods exposed by the framework.
The core files of the framework that should never be edited include:
- index.php
- core/
- BaseMapping.class.php
- Controller.class.php
- Database.interface.php
- DatabaseMySQL.class.php
- DatabasepgSQL.class.php
- Fabriq.class.php
- FabriqLibs.class.php
- fabriq.js
- Messaging.class.php
- Model.class.php
The core files should never be edited because of the way that Fabriq can be upgraded between versions. Fabriq is built to be upgraded by dropping the updated core files into an existing Fabriq based application. The method of dropping the core files in will allow you to upgrade with having to rewrite very little to no existing code. After the upgrade, new features that are added in the update can be taken advantage of. When upgrading, be sure to read the UPDATE.txt file included in the Fabriq bundles before replacing any existing core code with new versions.
NOTE: If you are using a version of Fabriq prior to 1.1, please see the documentation for DatabaseMySQL.class.php for reference to the old Database.class.php core file.
The required supporting files (provided at installation) that may be modified but must exist include:
- app/PathMap.class.php
- app/controllers/
- application.controller.php
- app/helpers
- application.helper.php
- app/views/layouts
- application.view.php
- public/stylesheets/fabriq.base.css
NOTE: while code inside of app/views/layouts/application.view.php can be edited, you should not remove any of the existing PHP code that is contained in the file to generate the display of the page.
If you are planning to use multiple layouts for your Fabriq based website or application, you should keep a clean copy of app/views/layouts/application.view.php outside of the project structure to use as a base for other layouts. Layouts can be switched from the default by creating a new layout file inside of app/views/layouts based on application.view.php and calling the Fabriq::layout() method inside of the appropriate action methods of controllers.
The app/controllers/application.controller.php file contains a few lines of code that must not be removed. Removing the code may cause the application to break. NOTE: Fabriq is built to make use of the jQuery JavaScript framework. The jQuery JavaScript framework helps developers to easily use Fabriq to create cross browser websites and applications.
The public/stylesheets/fabriq.base.css file contains a few CSS declarations to help developers get started faster. The file contains the base styles for the messaging class that can be extended in your own stylesheets. As the framework matures, the fabriq.base.css file will also grow to include important updates.
Other important files:
