PHP Classes

PHP Framework From Scratch: Run MVC application with a JSON configuration file

Recommend this page to a friend!
  Info   View files Example   View files View files (60)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2022-06-04 (3 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 69 This week: 1All time: 10,062 This week: 209Up
Version License PHP version Categories
ffs 1.0GNU General Publi...5PHP 5, Libraries, Configuration, Desi...
Description Author

This package can run an MVC application with a JSON configuration file.

It provides an application class that can look at the configured application directories for a configuration in JSON format that defines application details like database access credentials, URL routes, application name, develop or production environment.

The package can process the current request and forward the request handling to the respective controller class depending on the request parameters and the routes defined in the application configuration file.

Picture of Virgilio lino
  Performance   Level  
Name: Virgilio lino <contact>
Classes: 8 packages by
Country: Italy Italy
Age: 43
All time rank: 158564 in Italy Italy
Week rank: 197 Up7 in Italy Italy Up
Innovation award
Innovation award
Nominee: 5x

Winner: 2x

Details

ffs

Ffs - Framework From Scratch built for research purposes. Reinventing the wheel, every functionality without using the power of Open Source

Please consider some functionalities are a little bit raw, well, let's say, ugly. It's just done for research purposes to implement User Driven Development.

Helping

Your help is welcome. Think on a framework, what should have, what should not, and how. There you can help me, i'd like this to be for Frameworks what HURD is for Linux.

Todo's. There is on index.php, or somewhere a list of todo's...But: 1. If you think for example there is not enough separacion of concerns on MVC, and M V and C are not enough decoupled, just let's talk about it. This is the first think i'd like to do. 2. The next step, is to make every functionality independent and replaceble, just like the bundles in Symfony. I'm thinking on creating just services and configurations. Please not overingeneriazation, what i'm searching here, is maybe, overconceptualization. 3. After step 1 and 2, what i'm planning to do, is to implement UDD.

Instructions - Ffs 0.1 -

  1. create database
  2. import the file dbimport.sql
  3. configurate db settings in src/Ffs/Ffs/MyApp/application.conf
  4. point the browser to /Public/index.php

Please take a look at /Public/index.php comment for the list of todos in order of importance.

The code have been tested just with Linux/Chrome and Linux/Firefox. Many thanks, Virgilio Lino virgiliolino@gmail.com

  Files folder image Files  
File Role Description
Files folder imagePublic (1 file, 1 directory)
Files folder imagesrc (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file dbimport.sql Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  Public  
File Role Description
Files folder imageassets (2 directories)
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files  /  Public  /  assets  
File Role Description
Files folder imagecss (1 file)
Files folder imagejs (2 files)

  Files folder image Files  /  Public  /  assets  /  css  
File Role Description
  Accessible without login Plain text file yacs.css Data Auxiliary data

  Files folder image Files  /  Public  /  assets  /  js  
File Role Description
  Accessible without login Plain text file ajaxMaster.js Data Auxiliary data
  Accessible without login Plain text file posts.js Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imageFfs (1 file, 2 directories)

  Files folder image Files  /  src  /  Ffs  
File Role Description
Files folder imageFfs (1 file, 8 directories)
Files folder imageMyApp (1 file, 3 directories)
  Plain text file Autoloader.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  
File Role Description
Files folder imageApplication (4 files, 1 directory)
Files folder imageController (1 file)
Files folder imageException (3 directories)
Files folder imageLibs (1 file)
Files folder imageModel (3 files, 2 directories)
Files folder imageRequest (3 files)
Files folder imageResponse (2 files)
Files folder imageView (2 files)
  Plain text file FfsException.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  Application  
File Role Description
Files folder imageConfig (1 file)
  Plain text file AbstractApplication.php Class Class source
  Plain text file ApplicationFactory.php Class Class source
  Plain text file Config.php Class Class source
  Plain text file WebApplication.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  Application  /  Config  
File Role Description
  Plain text file WebConfig.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  Controller  
File Role Description
  Plain text file AbstractController.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  Exception  
File Role Description
Files folder imageApplication (4 files, 1 directory)
Files folder imageBag (3 files)
Files folder imageModel (2 files, 1 directory)

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  Exception  /  Application  
File Role Description
Files folder imageConfig (1 file)
  Plain text file ApplicationEnvironmentUnknown.php Class Class source
  Plain text file ApplicationNotFoundException.php Class Class source
  Plain text file FunctionalityNotImplementedException.php Class Class source
  Plain text file RequestIncompatibleException.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  Exception  /  Application  /  Config  
File Role Description
  Plain text file InvalidConfigException.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  Exception  /  Bag  
File Role Description
  Plain text file ElementNotFoundException.php Class Class source
  Plain text file InvalidKeyException.php Class Class source
  Plain text file PropertyNotFoundException.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  Exception  /  Model  
File Role Description
Files folder imageFieldType (1 file)
  Plain text file DBMSInconpatibleException.php Class Class source
  Plain text file InvalidModelDefinitionException.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  Exception  /  Model  /  FieldType  
File Role Description
  Plain text file ValidationException.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  Libs  
File Role Description
  Plain text file Bag.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  Model  
File Role Description
Files folder imageFieldType (3 files)
Files folder imagePersistence (3 files)
  Plain text file AbstractFieldType.php Class Class source
  Plain text file AbstractModel.php Class Class source
  Plain text file WebModel.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  Model  /  FieldType  
File Role Description
  Plain text file EmailFieldType.php Class Class source
  Plain text file IntegerFieldType.php Class Class source
  Plain text file StringFieldType.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  Model  /  Persistence  
File Role Description
  Plain text file MysqlAdapter.php Class Class source
  Plain text file PdoAdapter.php Class Class source
  Plain text file PersistenceInterface.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  Request  
File Role Description
  Plain text file AbstractRequest.php Class Class source
  Plain text file HttpRequest.php Class Class source
  Plain text file View.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  Response  
File Role Description
  Plain text file HttpResponse.php Class Class source
  Plain text file ViewModel.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  Ffs  /  View  
File Role Description
  Plain text file AbstractView.php Class Class source
  Plain text file AbstractWebView.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  MyApp  
File Role Description
Files folder imageController (2 files)
Files folder imageModel (2 files, 1 directory)
Files folder imageView (2 files, 1 directory)
  Accessible without login Plain text file application.conf Data Auxiliary data

  Files folder image Files  /  src  /  Ffs  /  MyApp  /  Controller  
File Role Description
  Plain text file CommentsController.php Class Class source
  Plain text file PostsController.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  MyApp  /  Model  
File Role Description
Files folder imageFieldType (2 files)
  Plain text file CommentsModel.php Class Class source
  Plain text file PostsModel.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  MyApp  /  Model  /  FieldType  
File Role Description
  Plain text file CommentFieldType.php Class Class source
  Plain text file NameFieldType.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  MyApp  /  View  
File Role Description
Files folder imageTemplates (7 files)
  Plain text file CommentsView.php Class Class source
  Plain text file PostsView.php Class Class source

  Files folder image Files  /  src  /  Ffs  /  MyApp  /  View  /  Templates  
File Role Description
  Accessible without login HTML file Posts.html Doc. Documentation
  Accessible without login HTML file _addComment.html Doc. Documentation
  Accessible without login HTML file _addPost.html Doc. Documentation
  Accessible without login HTML file _comment.html Doc. Documentation
  Accessible without login HTML file _comments.html Doc. Documentation
  Accessible without login HTML file _post.html Doc. Documentation
  Accessible without login HTML file _posts.html Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
 100%
Total:69
This week:1
All time:10,062
This week:209Up
For more information send a message to info at phpclasses dot org.