Table of Contents

1. Migration
1. Old MVC application
2. New Logic implementation
Z. meta
Deviations
Model Errors
Unimplemented behaviours

List of Figures

1. Migration
2. Metamodel

1. Migration

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:

  • Transform to a maintainable non-legacy application.
  • Maximize development speed. The legacy application should be modified only where it is absolutely necessary.
  • Separation of duties. There are more teams working on the application. It should be clear that who is responsible for what.
  • Possibility to migrate to mobile app. All the new and overhauled functionalities are built with clear separation of the UI and the backend, with the backend having a REST interface.
  • Possibility to migrate to distributed data architecture. Some or all of the data is envisioned to reside in a personal device cloud, using technologies like blockchain and torrent.
There are two tasks done by different groups:
  • Overhaul the UI, to provide similar but slightly different functionality than the legacy. This is done by the legacy development team. They also provide data interface for new functionalities. (green)
  • Develop new functionalities. (blue)

Figure 1. Migration

Migration


1. Old MVC application

The legacy application.

Controller

Controller is a Component.

Appears in:

as the MVC model describes

connections:

Model

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

Legacy application is a Component.

Appears in: Migration.

The legacy application. Written in php.

connections:

View

View is a Component.

Appears in:

As the MVC model describes. It generates dynamic html. Ancient greek technology.

connections:

Web interface

Web interface is an Interface.

Appears in:

Legacy web interface for the legacy web UI.

connections:

  • Web interface provided by View
  • Web interface used by Web UI

Web UI

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

Business implementation is a Component.

Appears in:

The business logic and rules: everything what is model and not data access

connections:

  • Business implementation is contained by Model

Data access

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

Legacy database is a Component.

Appears in: Migration.

The database containing the legacy data model

connections:

  • Legacy database provides SQL

REST data interface

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

SQL is an Interface.

Appears in:

SQL interface of the legacy database

connections:

API exposure

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

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:

2. New Logic implementation

Business implementation

Business implementation is a Component.

Appears in:

Implementation of busness rules and logic

connections:

Controller

Controller is a Component.

Appears in:

Responsible for access control and orchestration of business logic.

connections:

data access

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

Greenfield database is a Component.

Appears in: Migration.

The database for the new functionalities.

connections:

  • Greenfield database provides SQL

new REST

New REST is an Interface.

Appears in:

REST/json interface for new features.

connections:

overhaul REST

Overhaul REST is an Interface.

Appears in:

REST/json interface for the UI overhaul logic

connections:

Logic for UI overhaul

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

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:

  • New features ajax Web UI uses new REST
  • New features ajax Web UI is contained by Web UI

REST backend

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

SQL is an Interface.

Appears in:

SQl interface of the database

connections:

Event interface

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:

<element> <value></value> <value></value> <value></value> <value></value> <documentation></documentation> </element><element> <value></value> <value></value> <documentation></documentation> </element>

Z. meta

Figure 2. Metamodel

Metamodel


Basic Object

Basic Object is an .

Appears in:

Basic Relation

Basic Relation is an .

<connection></connection><connection></connection><connection></connection><connection></connection><connection></connection><connection></connection>

Deviations

Model Errors

No deviations in this section.

Unimplemented behaviours

No deviations in this section.