MVC architecture, microservices, framework demo
The aim of this little web application is just to demonstrate that the KISS principle is still a very good one.
And using an MVC architecture based on a database (mariaDB), middleware(php) and UI (HTML5,CSS3,JavaScript) help very well to achieve that.
I wrote nearly nothing new to do that application. I use what I call my framework but it's just an assembly of JavaScript libraries and good practices that evolve through time and technologies.
I usually use it with Oracle and Coldfusion but at home PHP and MariaDB are more accessible. The base is simple microservice wrote in PHP that produce JSON. Easy to use and add security on it.
I get less constrain than using REST services or XML SOAP Web services.
I wrote my own controller on PHP. In oracle, I put all queries in packages (for security and performance) for this demo I don't do it with MariaDB even if I can use store proc too. But I'll try it soon.
I also prefer to do it to separate completely the controller of the data model.
For the view I use Jquery, Jquery UI, Boostrap and plugin. All open source. I love vanilla Javascript.
But I've to admit I cannot live anymore without jQuery and Bootstrap.
I also want to stress test my database so I import a Memory Translation database in XML to maria DB... more than 12 million records (I had to go down because the database size was more than 3Gb and my provider doesn't allow that. I cut it by 100, still good for testing). And the performance is still nice.
I also avoid to put any php or Coldfusion code in the HTML template. All is done in JavaScript.
I really want that the model, the view and controller stay independent to allow them to be moved easily to another technology. And the most important keep the code maintainable and be able to involved.