Chapter 8. Building Web Applications with VB .NET and ASP.NET

IN THIS CHAPTER

Most developers today are building Web applications in one form or another. For the past three and a half years or so, Microsoft developers have been building Web applications using Active Server Pages, or ASP. ASP is a technology in which the pages are a mix of HTML and a scripting language, such as VBScript or JavaScript. The HTML was basically static, and was rendered on the client just as you typed it in the page. The script was interpreted on-the-fly, and generated additional HTML. This generated HTML was mixed in with the static HTML, and the page was sent to the browser.

Web applications, including Active Server Pages applications, follow a simple request/response metaphor because that is all that is allowed by HTTP. The user requests a page, and the page is sent to the browser to be rendered. The person can fill out data fields, and when he clicks a button, he is making a new request to the server, and the response is generated on the server and returned.

ASP.NET has to use request/response, of course, because you're still using HTTP. However, ASP.NET seeks to simplify the coding model, by making it appear as an event-driven programming model. ASP.NET has the following advantages over ASP:

  • Spaghetti code can be virtually eliminated. Script does not need to be intermixed with HTML any more. This makes the user interface code much smaller, cleaner, and easier to maintain. This is made possible by the event-driven page processing.

  • New controls have been introduced that promote user interface encapsulation. These controls give browser-independent rendering, which means that you write code only once for multiple clients.

  • Page services have been introduced that reduce the grunt work involved in creating form pages that post back to themselves: ViewState and PostBack data processing.

  • New application services make applications faster and more scalable. These include caching, farmable session state, and security, to name a few.

Before going into the full details of how ASP.NET works, and how it differs from ASP, it might be helpful to build a quick ASP.NET application and examine the resultant code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.184.189