Giter Site home page Giter Site logo

kb-web-development / php7-mvc-framework Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 676 KB

PHP 7 MVC (Model-View-Controller) Framework Project

PHP 97.32% Hack 0.01% HTML 2.68%
php7-mvc-framework book-exercises php7 model-view-controller kami barut php

php7-mvc-framework's Introduction

php7-mvc-framework

PHP 7 MVC Framework Project

The purpose of the project was to study the inner workings of a self-built PHP MVC (Model-View-Controller) framework.

To do so, I studied the book "Pro PHP MVC" (2012) by Chris Pitt - Apress Media LLC (Springer Nature) .

The book can be read and downloaded here :

https://www.dropbox.com/s/nxq0keypo9r0rkd/Pro%20PHP%20MVC.pdf?dl=0

The objectives were :

(1) To do all the book exercises (contained in the "Book exercises" folder)

(2) Considering that the PHP version at the time of writing was PHP version 5.4, go over the entire framework code

and rewrite it following the features of PHP 7 wherever possible maintaining code readability.

For (1), the exercises are written using PHP version 5.4

For (2), the major features of PHP 7 include :

  • Scalar type hints

  • Return type hints

  • Anonymous classes

  • Generator delegation

  • Generator return expressions

  • The null coalesce operator

  • The spaceship operator

  • Constant array

  • Uniform variable syntax

  • Throwables

  • Group use declarations

  • Class constant visibility modifiers

  • Catching multiple exceptions types

  • Iterable pseudo-type

  • Nullable types

  • Void return types

Some detailed explanations of the new features of PHP version 7 (i.e; versions 7.1,7.2,7.3,7.4) :

https://www.php.net/manual/en/migration70.new-features.php

https://www.php.net/manual/en/migration71.new-features.php

https://www.php.net/manual/en/migration72.new-features.php

https://www.php.net/manual/en/migration73.new-features.php

https://www.php.net/manual/en/migration74.new-features.php

(Some of the major changes between the book code and the framework version here involve both the naming and use of namespaces as well as the use of composer.json to autoload the framework classes.)

php7-mvc-framework's People

Contributors

kb-web-development avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.