Server-Side Scripting
Explains what server-side scripting is
A server-side script is executed on the web server instead of the browser. When a page is requested by the user, the web server processes the code, converts it into HTML and then sends the resulting HTML page back to the browser. This approach ensures that the user cannot view the code, as the browser receives only the HTML page and not the code.
Apart from this security benefit, server-side scripts can access the files and databases stored on the web server easily. This makes it possible to create personalized pages for different users. However, server-side scripts run a little slower compared to client-side scripts.
One of the popular server-side scripting technologies is Microsoft's ASP (Active Server Pages). ASP allows the developer to create powerful interactive web applications. It uses VBScript as the scripting language. Soon after its release, thousands of web developers were already using ASP.
However, as web applications became more complex, the shortcomings of ASP soon became evident.
- ASP uses VBScript as the scripting language. Scripting languages are not full-fledged programming languages and hence, they have several limitations in terms of features and performance.
- Since ASP code is mixed with the HTML code in the same web page, the modification and maintenance of such pages become very difficult. Such code is often referred to as `spaghetti code'.
- If modification on the code need to be done, the web server should be stopped first and then restarted. This is not an ideal situation for sites running live for 24 hours.
Many such problems make ASP a difficult technology to implement. To counter these problems and make the task of web development a lot easier, Microsoft introduced ASP.NET. We will see how ASP.NET deals with these problems but before that, we will learn about the .NET Framework because ASP.NET is a part of this Framework.