One of the great advances of the industrial age– division of labor– has only recently been gaining widespread adoption in the Internet world. This is in part due to the history of the web itself.
Early web pages consisted of static text and pictures, stored as HTML files on a server. Corporations put brochures online. Individuals shared travelogues, resumes and lots of silly lists. Research groups enlivened their collections of scientific papers with an occasional live camera pointed at a coffee pot.
Putting up a static web site was (and still is) quite simple. Create an HTML file using either a text editor or a graphical tool, and upload it to your server. Presto – you’re on the web! Amateur (and then professional) “Webmaster” roles sprung up in which one person had primary responsibility to create and maintain a web site.
Later, web sites became “dynamic web pages,” which allowed users to interact with a web site and view web pages dynamically generated in response to their inputs, often based on a database or simple set of responses to user inputs. These web sites ranged from sites that would search databases of DNA sequences to sending electronic greeting cards.
These early dynamic web sites were often still created by one person, who was more of a “web guru” or “web monkey” than a graphic designer. Many of these sites were built using CGI (Common Gateway Interface) scripts written in a language called Perl. Typically, each page would be created by a CGI script which would analyze the user input and return HTML. Perl is still used as part of many sites today, including Forio’s Forum. (One of the reason for Perl’s continuing popularity is that there are thousands of public domain CGI scripts available to solve simple web tasks). Here’s a small excerpt that generates a layout table listing a Forio article.
Note how easy the code is to understand– after you spend a month banging your head against the infamous Camel book.
The problem is that people who are good at creating Perl scripts to create dynamic web pages (or in using other technologies, such as Active Server Pages) are not necessarily that good at things like graphic design or usability. (or at least it is rare to find someone good at both). And the nature of Perl is that the HTML code that determines graphic design is woven incomprehensibly into the programming code that controls the logic.
The third phase of web applications involves sophisticated web sites in which the static and the dynamic web pages are largely indistinguishable. Millions of consumers regularly access the web sites of banks, brokerages, retail outlets, and e-learning companies, entering information and performing transactions without a second thought. To develop such elaborate and robust sites in a cost-effective manner, a more efficient way of developing the sites was needed.
The Wealth of Nations
The solution comes directly from the philosophical guru of the Industrial Age, Adam Smith. In the Wealth of Nations (1776) Adam Smith said:
|The greatest improvement in the productive powers of labor, and the greater part of the skill, dexterity, and judgment with which it is anywhere directed, or applied, seem to have been the effects of the division of labor…
This great increase of the quantity of work which, in consequence of the division of labor, the same number of people are capable of performing, is owing to three different circumstances; first, to the increase of dexterity in every particular workman; secondly, to the saving of the time which is commonly lost in passing from one species of work to another; and lastly, to the invention of a great number of machines which facilitate and abridge labor, and enable one man to do the work of many…
This basic principle created the fortune of many a nineteenth century robber baron. Samuel Colt invented the modern firearm industry in 1856 by building a plant in Hartford, Connecticut that used precisely machined interchangeable parts. A year after production, the plant was making an unprecedented 150 weapons a day (and making Colt one of the wealthiest businessmen in the country). Henry Ford was in a similar position in 1903, when he was running a small operation in which 2-3 men built cars from components that were made to order. After launching the famous Model T in 1908, Ford built a new plant that combined precision manufacturing, standardized and interchangeable parts, a division of labor, and, in 1913, a continuous moving assembly line. Ford’s production of Model T’s made his company the largest automobile manufacturer in the world.
It is only recently that web developers en-masse have realized that web applications must be created in a similar fashion (with division of labor and standardized architectures). The challenge (detailed in the next section) is to create a mechanism that allows each worker to combine together steps in the web development effort as efficiently as Samuel Colt manufactured his firearms and Henry Ford his cars.
To sum up…
|development method||Industrial Age||Internet Age|
|Hand-Crafted||Craftsman worked on all aspects of one product.||One web guru works on all aspects of web page development.|
|Mass Production||Assembly line allows workers to specialize on one part of process. Interchangeable components allow standardization of process and efficiency.||Different team members specialize in graphic design, database implementations, business modeling, HTML design. Standard architecture allows team to work together.|
Go to any web seminar these days and you may hear the commandment: “thou shalt separate the business logic from the presentation logic”. What does this mean and why is so important?
Typically, they are referring to the first two of the three primary components of a web application:
|Model||The set of business rules underlying the application. (a.k.a. “the business logic”)|
|View||The graphic design and layout of the web site (a.k.a. “the presentation layer”)|
|Controller||The rules governing the sequence of pages that are presented to the user.|
The term “Model-View-Controller” (MVC) comes out of Smalltalk but has been popularized by Sun Microsystems. Sun writes about this on its Java web site java.sun.com. (The term J2EE refers to Java 2 Enterprise Edition, Sun’s platform for enterprise development.)
|With all the flexibility built into the component-based J2EE platform, the question might be how to organize any application for streamlined application update and maintenance, and to protect application data from persons who do not understand program code. The answer is in using the Model, View, Control (MVC) architecture
By making the view completely independent of the controller and model, you can easily substitute front-end clients. Also, by keeping controller and model code out of the view, persons who do not understand this code cannot change things they should not change. Keeping the controller and model separate lets you change the controller without interfering with the model and change the model without interfering with the controller.
Not discussed in the Sun excerpt is the efficiency boost a development team gets from being able to staff a team with members who are highly skilled in one area of web design (such as graphic design) but not in others (such as programming). A key goal is to have the entire team efficiently working in parallel, able to update and revise each part of the site logic without requiring changes in any other part.
MVC Applied to Business Simulations
Although many early web-based simulations were hand-crafted, the MVC approach applies naturally to business simulations. As an example, a Forio business simulation such as the Pricing Simulation breaks down as follows.
|Model||An underlying model of cause and effect relationships, entered as mathematical equations and stored in a SLS (Simulation Logic Specification) file on the server.|
|View||A set of HTML pages with simple statements that insert simulation numbers and graphs.|
|Controller||The Forio Server, which performs the numerical calculations, serves the simulation pages, processes user decisions, and in general, handles the management of the simulation session.|
A typical business simulation development team includes a modeler and a web designer. The modeler builds the model using commercial business model software. Similarly, the web designer builds the web pages with a web design program or a text editor. All Controller functionality is included in the packaged product Forio Server– no programming expertise is required to build a custom business simulation with the Forio platform.
As a side note, a template approach is used to allow the web designer to create dynamic web pages. the designer creates the web page, and includes simple Forio Macro Language (FML) statements such as “$Variables.Price” to indicate where the value of the “Price” variable should be inserted. For example, including in the HTML file the line “The competitor price is $Variables.Price” causes the output to the end user to be “The competitor price is 23″ if the variable Price in the simulation has been set to 23. (For more information on FML, read the Support Section of Forio Broadcast).
A contrasting (and older) approach in the online simulation world is analogous to the “dynamic web page” scripted approach discussed above. Several commercial software vendors with legacy desktop software have implemented this approach by adding a Web API to their desktop products.
|Model||An underlying model of cause and effect relationships.|
|Interface Script||A script that generates the HTML but also processes user decisions (by communicating with the Model Engine) and handles the management of the simulation session. Often this is implemented with Microsoft Active Server Pages (ASP) and VBScript.|
|Model Engine||Performs the numerical calculations for the model.|
Similar to the MVC architecture, this approach abstracts the model equations away from the simulation (allowing for easy updating of model assumptions). However, creating and maintaining the interface requires script programming experience. Consequently, development requires programming expertise and typically takes longer to complete and revise.
Programming a web application (or simulation!) directly works great if you are the only person on your team, and you anticipate building a small application. But for any sizable application, taking a MVC approach (and in particular, separating the View from the rest of the application) can speed up development by a significant amount. End users and clients will almost always request changes to an application once it is developed. By separating the View from the Model and Controller up front, you can drastically reduce the effort and cost to make these changes and provide higher levels of satisfaction to your end users.
- How to create web simulations with Vensim using Forio Simulate
- 2010 Webinar Videos
- Reporting Totals in a Simulation
- Enhancements to Forio Broadcast
- The Pitfalls of Outsourcing Programmers