wiki/webdev_study_part_1

Part 1: Modern Structure of Web Applications

Over the years a common convention that arcs over languages and development frameworks is the concept of separating presentation, data-sets and transactions that modify the data into different components. This is currently being called MVC web development. MVC being an acronym for Model-View-Controller. The concept being that the "Model" represents the data components (table definitions, data types of fields, etc.), "View" represents the presentation of the data (rendered HTML and styling) and the "Controller" is the transactional glue that binds it all together. Keep in mind that MVC used today to explain web application architecture is actually a repurposed usage of a more nuanced usage of MVC from the GUI world of the 90's. The important part of the MVC buzzword usage is actually the separation of program logic and presentation.

History has shown that the separation between program logic and presentation has been a slow and arduous lesson learned from years of PHP and Perl programming. prints and echos of raw HTML fragments intermixed with if control structures were the norm of the first web boom. Chances are that most HTML design changes required a developer familiar with the code-base if they were to be made at all and the result was slow turn around in all aspects of web development because of the tight coupling between the logic and the rendered HTML. A change in the logic of the application could affect the design and vice versa.

The realization finally came about that the data to be presented in the rendered HTML could be queried and stored in natural programming data structures and then merged into pre-developed template form of the final HTML. The adoption of this type of code/output separation was slow because most of the earlier implementation of templates were made during the post 2000 heyday of XML evangelism. So early template engines used obfuscated, but "valid", XML documents as the template format which proved unnecessarily verbose for most designers and PHP/Perl/Python developers. It wasn't until the idea of using XML processing as a template format was dropped and template engines were being written with the user in mind that templates, as well as the concept of MVC, started to gain traction.

On the other side of web development, away from the human to computer interface and in the computer to computer side of things with relational databases a similar evolution was taking place. Like raw HTML being embedded in application logic, quirky SQL creation was nestled just as deeply. This lead not only to coupled logic and data queries but, even worse, to security problems as SQL injection exploits became feasible as form data was going directly to the relational database unfiltered.