webfiori/framework

WebFiori framework. Made to make the web bloom.


README

68747470733a2f2f77656266696f72692e636f6d2f6173736574732f696d616765732f66617669636f6e2e706e67

badge.svg?branch=master 68747470733a2f2f636f6465636f762e696f2f67682f57656246696f72692f6672616d65776f726b2f6272616e63682f6d61737465722f67726170682f62616467652e737667 68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d57656246696f72695f6672616d65776f726b266d65747269633d616c6572745f737461747573 68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f57656246696f72692f6672616d65776f726b2e7376673f6c6162656c3d6c6174657374 68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77656266696f72692f6672616d65776f726b3f636f6c6f723d6c696768742d677265656e

Note: This repo contains the core of the framework. Application template can be found in the repo webfiori/app

What is WebFiori Framework?

WebFiori Framework is a mini web development framework which is built using PHP language. The framework is fully object-oriented (OOP). It uses semi-MVC model, but it does not force it. The framework comes with many features which can help in making your website or web application up and running in no time.

Supported PHP Versions

Build Status
badge.svg?branch=master
badge.svg?branch=master
badge.svg?branch=master
badge.svg?branch=master
badge.svg?branch=master
badge.svg?branch=master
badge.svg?branch=master
badge.svg?branch=master
badge.svg?branch=master

Key Features

  • Provide minimum utilities to setup a small/medium web application.
  • Theming and the ability to create multiple UIs for the same web app using any CSS or JavaScript framework.
  • Building and manipulating the DOM of a web page inside PHP.
  • Basic template engine.
  • Fast and simple routing engine.
  • Creation of web services (or APIs) that supports JSON with data filtering and validation.
  • Middleware support for HTTP requests filtering before reaching application level.
  • Basic support for MySQL and MSSQL schema and query building.
  • Lightweight. The total size of framework core files is less than 3 megabytes.
  • Access management by assigning system user a set of privileges.
  • Customized sessions manager.
  • Support for creating and sending nice-looking HTML emails.
  • Autoload of user defined classes (loading composer packages also supported).
  • Ability to create background tasks and let them run in specific time using CRON.
  • Well-defined file upload and file handling sub-system.
  • Basic support for creating CLI Applications.

Standard Libraries

Following table shows build status of the standard libraries that the framework is composed of. The build is based on the latest stable PHP release.

Library Build Latest
HTTP badge.svg?branch=master 68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f57656246696f72692f687474702e737667
File badge.svg?branch=main 68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f57656246696f72692f66696c652e737667
Json badge.svg?branch=master 68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f57656246696f72692f6a736f6e2e737667
UI badge.svg?branch=master 68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f57656246696f72692f75692e737667
Collections badge.svg?branch=master 68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f57656246696f72692f636f6c6c656374696f6e732e737667
Database badge.svg?branch=main 68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f57656246696f72692f64617461626173652e737667
CLI badge.svg?branch=main 68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f57656246696f72692f636c692e737667
Mailer badge.svg?branch=main 68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f57656246696f72692f6d61696c2e737667
Errors and Exceptions Handler badge.svg?branch=main 68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f57656246696f72692f6572722e737667

Problems Solved

One of the things that any developer cares about any software project is the problem or problems it solves. As for WebFiori framework, It can help in solving the following problems:

  • The ability to create a customized links to web pages as needed by using Routing.
  • No need for touching HTML to play with the DOM by using UI Library of the framework.
  • Run PHP code as a CRON task through HTTP protocol or through terminal as a Background Job.
  • Changing whole user interface by changing one line of code through Theming.
  • Ability to move the source code of the web application without having to do a lot of re-configuration.
  • Sending HTML email messages with attachments without having to write a lot of code.
  • Solved the issues which are found in default PHP session management implementation by implementing a custom Sessions Management System.
  • Reduce the number of dependencies at which a developer need to set up a web application.

Getting Started

To learn the basics of how to use the framework, please head on to https://webfiori.com/learn. You can also read same docs which can be found in docs repo. In addition to that, you can read the API docs of the framework at the official website.

Setup

Local Development Environment

If you plan to test the framework on your local machine, the recommended way is to have AMP stack (Apache, MySQL and PHP). There are many available online. We suggest to use the ones that are offered by Bitnami. You can go to https://bitnami.com/stacks/infrastructure to check the available options.

After installing AMP stack, you can either use composer to install the framework or install it manually by download it through https://webfiori.com/download. If you plan to use composer, then you must first download composer from their website: https://getcomposer.org/download/. Once downloaded, place the .phar file in the folder htdocs or your server root. Once you do that, run the terminal in htdocs and run the following command:

php composer.phar create-project --prefer-dist webfiori/app my-site

This command will create new folder with the name my-site and install the framework inside it.

For more information about how to set up the framework, check here.

Contribution

For information on how to contribute to the project, check here.

Notes

  • If you think that there is a better way of doing things or wants new feature, feel free to drop an issue.
  • To report security vulnerabilities, please email ibrahim@webfiori.com.

License

The project is licensed under MIT license.