If you have done some Web programming in the past, you may have had to link together HTML pages, client-side scripts, and CGI scripts. Writing Web applications can be difficult, because you are often constrained in what you can do.
With HTML, you may have to resort to intricate coding and text and symbol positioning to get the look you want.
Client-side scripts can be limited in their abilities to protect a user from intrusive script operations.
The bottom line is that you may often wind up dealing with multiple levels of complexity in order to write a Web application.
ASP has features and functionality that can cut down some of this complexity.
By the end of this module, you will be able to:
- Describe the setup and operation of a Web application through ASP
- Specify application start and end procedures in the Global.asa file
- Describe uses for application variables with multiple users
- Explain how application variables may be incorrectly updated
- Read and Write text files with ASP
- Create a file with ASP that can be read by a user application
The next lesson describes how you set up and run a Web application through ASP.
Model-View-Controller (MVC) has been an important architectural pattern
in computer science for many years.
MVC was later simplified to Model-View-Controller and is a powerful and elegant means of separating concerns within an application (for example, separating data access logic from display logic)
and applies itself extremely well to web applications.
Its explicit separation of concerns does add a small amount of complexity to the design of an application, but the extraordinary benefits outweigh the complexity. It has been used in dozens of frameworks since its introduction.
You will find MVC in Java and C++, on Mac and on Windows, and inside literally dozens of frameworks.
The MVC separates the user interface (UI) of an application into three main aspects:
- Model: A set of classes that describes the data you are working with as well as the business rules for how the data can be changed and manipulated
- View: Defines how the UI of the application will be displayed
- Controller: A set of classes that handles communication from the user, overall application flow, and application-specific logic