Starting point, evolution and roadmap - laanito/tuqan GitHub Wiki
Starting point, evolution and roadmap
Foreword
This app was originally developed in 2005 and 2006, the company who developed it no longer exists. I am using this code as an experiment, I want to see how this old code can be evolutioned to these days, and also, I think this can be very useful for other people.
Original arquitecture
This was a really advanced code for its time (why are talking about a full-featured ajax app back on 2005, when Firefox was on 1.5, there was no Chrome and internet explorer was on its version 6). Main idea was, we load a page and instead of loading the whole page on each change we define a series of regions and request their content from a javascript for the different actions on the app.
- On load user had to login into his company (multi-tenant) and into his user.
- After Login user was redirected to main page and browser data was sent on the request, since there were no media queries at this point page was adapted on creation (size of all elements was created dynamically with the page object)
- Once javascript was loaded, all requests were done through the ajax handler and page was never again reloaded.
- Requests and responses were serialized with custom methods
- All data was dynamically created from database depending on which sections user had permission, no form or listing were hardcoded.
This is how the app looked when it was working:
This is how it looks on the starting point:
This is still outdated, but responsive and adapted to actual standards, it's just an starting point.
Starting point
When I rescued the source code it was not even running on current PHP, all first changes are not included on the repository since I did not upload until I was able to log into the app and navigate through it. So first actions taken out of this repository:
- Move all available libraries to composer
- Fix deprecated methods and syntas from PHP 5.2
- Follow PSR-4 autoloader specifications
- Fix login procedure
- Recover old database backup (since app is fully managed from database - forms/listing/etc...- it's useless without a database)
- Migrate custom-made localization to gettext
- Re-arrange files into classes
- Use twig on login forms
- Use a modern routing like Phroute instead of custom-made router (only first steps, lots of work to be done)
Already done work
This has been already done:
- First Washup
- Create Logger with Monolog for development
- Use twig for main page
- Handle login and permission with Jasny
- Turn old config include file into an static class
- Get operative
- Use new router and filters to pass all Ajax requests to a single point (it was 3 before)
- Wash it up!
- Move page into a bootstrap structure
Unordered roadmap
There is a lot of work to be done, but some of the most important things to be done include:
- Short term:
- Fix how forms are handled
- Migrate all forms to Former
- Create installation profile for a clear install app
- re-arrange translations (it's done with labels not with original EN sentence)
- migrate first level routing (app had 4 levels of routing) into Phroute
- migrate custom serialization into json
- migrate custom javascript into jquery (this is a must for forms and middle step for react)
- Middle Term:
- Migrate client-side to React
- Use react-tables
- Use react-forms
- Migrate charts to a modern framework
- Adapt to ISO:2015 standards
- Long term:
- Turn the old management interface into a modern dashboard
- Turn monolythic into modular architecture (this means re-arranging all other routing levels)
- Add GDPR management
- Add ISO27001
- Turn into full DMS (the DMS function is currently limited)