Table of Contents
A migration scenario from a legacy MVC php web application towards a modern RESTful web application with AJAX UI. The goals of the design of the migration path and the underlying architecture:
The legacy application.
Controller is a Component.
Appears in:
as the MVC model describes
connections:
Model is a Component.
Appears in:
As the MVC model says. It is conceptually broken down to data access (just access to the data, no business rules, no provisions for data consistency), and business implementation (business rules and logic).
connections:
Legacy application is a Component.
Appears in: Migration.
The legacy application. Written in php.
connections:
View is a Component.
Appears in:
As the MVC model describes. It generates dynamic html. Ancient greek technology.
connections:
Web interface is an Interface.
Appears in:
Legacy web interface for the legacy web UI.
connections:
Web UI is a Component.
Appears in: Migration.
The legacy web ui uses server generated html pages, and static content. The new web UI components are placed as static content in this.
connections:
Business implementation is a Component.
Appears in:
The business logic and rules: everything what is model and not data access
connections:
Data access is a Component.
Appears in:
A thin layer between the SQL api and the REST data interface. Its purpose is to provide a stable data model abstracting out SQL implementation details. No business logic or rules here. The responsibility for data consistency lies to the consumer. Governing design principle is development speed: expose on the REST API only whatever is asked. Do as few things with the data as possible.
connections:
Legacy database is a Component.
Appears in: Migration.
The database containing the legacy data model
connections:
REST data interface is an Interface.
Appears in:
REST/json interface providing access to data for the new logic implementation. Can alsobe used by the UI overhaul logic.
connections:
SQL is an Interface.
Appears in:
SQL interface of the legacy database
connections:
API exposure is an Interface.
Appears in:
A REST interface exposing internal APIs of the legacy application. The governing design principle is development speed: Whatever is already implemented in the legacy application can be exposed here.
connections:
UI overhaul is a Component.
Appears in:
Those parts of the UI which are rewritten. Ajax based. It contains static HTML pages (no server generated HTML) with JavaScript logic. Uses the REST API of the Logic for the overhaul, and can use the REST API for the new features.
connections:
Business implementation is a Component.
Appears in:
Implementation of busness rules and logic
connections:
Controller is a Component.
Appears in:
Responsible for access control and orchestration of business logic.
connections:
Data access is a Component.
Appears in:
Abstracts out the physical data model. Its programmatic API is designed in a way which makes it possible to easily change the data access layer and database to an implementation employing distributed technologies (blockchain, tor, torrent).
connections:
Greenfield database is a Component.
Appears in: Migration.
The database for the new functionalities.
connections:
New REST is an Interface.
Appears in:
REST/json interface for new features.
connections:
Overhaul REST is an Interface.
Appears in:
REST/json interface for the UI overhaul logic
connections:
Logic for UI overhaul is a Component.
Appears in:
The implementation of NEW business logic needed for the UI overhaul. This provides a rest API for the overhauled UI. Responsible for access control, orchestration of calls to the API exposure/REST data interfaces, and implementation of that business logic which changes due to overhaul of the UI.
connections:
New features ajax Web UI is a Component.
Appears in:
Static html+javascript web ui for the new features. Calls the new REST api.
connections:
REST backend is a Component.
Appears in: Migration.
New backend for greenfield components. Written in node.js All code have extensive unit test coverage (use TDD!)
connections:
SQL is an Interface.
Appears in:
SQl interface of the database
connections:
Event interface is an Interface.
Appears in:
The interface where new business logic implementation can notify the legacy application about events, so it can consistently integrate them in the UI. An example is: "new vote is available"
connections: