Lesson 1: Types of Applications

Lesson 1: Types of Applications

Web applications are one of four types of Internet applications that you can create using Visual Studio .NET. In this lesson, you will learn a little about the different types of Internet applications and get an overview of how an ASP.NET Web application works.

After this lesson, you will be able to

  • Describe four different types of Internet applications and know where to look for training on developing each type of application

  • Explain how a Web application executes over the Internet and how that differs from a traditional, static Web site

  • Understand the role that ASP.NET plays in creating Web applications

  • List the parts that make up ASP.NET and describe some of its advantages over other Web application technologies, such as the Common Gateway Interface (CGI)

Estimated lesson time: 5 minutes

What Can You Create?

Strictly speaking, an Internet application is any application that uses the Internet in any way. That means applications that request that users register over the Internet or that provide Help through the Internet are, to some degree, Internet applications.

That definition is too broad for the subject of a single book. To narrow the focus a bit, let s identify four types of Internet applications:

  • Web applications

    These applications provide content from a server to client machines over the Internet. Users view the Web application through a Web browser.

  • Web services

    These components provide processing services from a server to other applications over the Internet.

  • Internet-enabled applications

    These are stand-alone applications that incorporate aspects of the Internet to provide online registration, Help, updates, or other services to the user over the Internet.

  • Peer-to-peer applications

    These are stand-alone applications that use the Internet to communicate with other users running their own instances of the application.

You can use Visual Studio .NET to create each of these types of applications. The first type, Web applications, is the subject of this book. Table 1-1 shows the Visual Studio .NET Help topics and the books in this series that deal with each type of Internet application.

Table 1-1. Sources of Information About Internet Applications

Application type

Use these topics in online Help

Prepare for the MCSD test using

Web applications

ASP.NET, Web forms, System.Web namespace

This book

Web services

ASP.NET, XML Web Services, System.Web.Services namespace

MCAD/MCSD Self-Paced Training Kit: Developing XML Web Services and Server Components with Microsoft Visual Basic .NET and Microsoft Visual C# .NET

Internet-enabled applications

Microsoft Windows forms, HTML Help, WebBrowser control, System.Net namespace

MCAD/MCSD Self-Paced Training Kit: Developing Windows-Based Applications with Microsoft Visual Basic .NET and Microsoft Visual C# .NET

Peer-to-peer applications

Accessing the Internet, pluggable protocols, System.Net and System.Net.Sockets namespaces

Online Help topics for these namespaces and MSDN articles on peer-to-peer and client/server applications with the .NET Framework

How Web Applications Work

Web applications use a client/server architecture. The Web application resides on a server and responds to requests from multiple clients over the Internet, as shown in Figure 1-1.

figure 1-1 asp.net web application architecture

Figure 1-1. ASP.NET Web application architecture

On the client side, the Web application is hosted by a browser. The application s user interface takes the form of Hypertext Markup Language (HTML) pages that are interpreted and displayed by the client s browser.

On the server side, the Web application runs under Microsoft Internet Information Services (IIS). IIS manages the application, passes requests from clients to the application, and returns the application s responses to the client. These requests and responses are passed across the Internet using Hypertext Transport Protocol (HTTP). A protocol is a set of rules that describe how two or more items communicate over a medium, such as the Internet. Figure 1-2 shows how the client and server interact over the Internet.

figure 1-2 client/server interaction in a web application

Figure 1-2. Client/server interaction in a Web application

The Web application composes responses to requests from resources found on the server. These resources include the executable code running on the server (what we traditionally think of as the application in Microsoft Windows programming), Web forms, HTML pages, image files, and other media that make up the content of the application.

Web applications are much like traditional Web sites, except that the content presented to the user is actually composed dynamically by executable, rather than being served from a static page stored on the server. Figure 1-3 shows how a Web application composes the HTML returned to a user.

figure 1-3 an asp.net web application response from server resources

Figure 1-3. An ASP.NET Web application response from server resources

The executable portion of the Web application enables you to do many things that you can t do with a static Web site, such as:

  • Collect information from the user and store that information on the server

  • Perform tasks for the user such as placing an order for a product, performing complex calculations, or retrieving information from a database

  • Identify a specific user and present an interface that is customized for that user

  • Present content that is highly volatile, such as inventory, pending order, and shipment information

This is only a partial list. Basically, you can do anything with a Web application that you can imagine doing with any client/server application. What makes a Web application special is that the client/server interaction takes place over the Internet.

What ASP.NET Provides

ASP.NET is the platform that you use to create Web applications and Web services that run under IIS. ASP.NET is not the only way to create a Web application. Other technologies, notably the CGI, also enable you to create Web applications. What makes ASP.NET special is how tightly it is integrated with the Microsoft server, programming, data access, and security tools.

ASP.NET provides a high level of consistency across Web application development. In a way, this consistency is similar to the level of consistency that Microsoft Office brought to desktop applications. ASP.NET is part of the .NET Framework and is made up of several components.

  • Visual Studio .NET Web development tools.

    These include visual tools for designing Web pages and application templates, project management, and deployment tools for Web applications.

  • The System.Web namespaces.

    These are part of the .NET Framework and include the programming classes that deal with Web-specific items such as HTTP requests and responses, browsers, and e-mail.

  • Server and HTML controls.

    These are the user-interface components that you use to gather information from and provide responses to users.

In addition to the preceding components, ASP.NET also uses the following, more general programming components and Windows tools. These items aren t part of ASP.NET. However, they are key to ASP.NET programming.

  • Microsoft Internet Information Services (IIS).

    As mentioned in the previous section, IIS hosts Web applications on the Windows server.

  • The Microsoft Visual Basic .NET, Microsoft Visual C#, and Microsoft Visual J# programming languages.

    These three languages have integrated support in Visual Studio .NET for creating Web applications.

  • The .NET Framework.

    This is the complete set of Windows programming classes, including the ASP.NET classes as well as classes for other programming tasks such as file access, data type conversion, array and string manipulation, and so on.

  • Microsoft ADO.NET database classes and tools.

    These components provide access to Microsoft SQL Server and ODBC databases. Data access is often a key component of Web applications.

  • Microsoft Application Center Test (ACT).

    This Visual Studio .NET component provides an automated way to stress-test Web applications.

ASP.NET is the most complete platform for developing Web applications that run under IIS. However, it is important to remember that ASP.NET is not platform-independent. Because it is hosted under IIS, ASP.NET must run on Windows servers. To create Web applications that run on non-Windows/IIS servers, such as Linux/Apache, you must use other tools generally CGI.

Advantages of ASP.NET

ASP.NET has many advantages over other platforms when it comes to creating Web applications. Probably the most significant advantage is its integration with the Windows server and programming tools. Web applications created with ASP.NET are easier to create, debug, and deploy because those tasks can all be performed within a single development environment Visual Studio .NET.

ASP.NET delivers the following other advantages to Web application developers:

  • Executable portions of a Web application compiled so they execute more quickly than interpreted scripts

  • On-the-fly updates of deployed Web applications without restarting the server

  • Access to the .NET Framework, which simplifies many aspects of Windows programming

  • Use of the widely known Visual Basic programming language, which has been enhanced to fully support object-oriented programming

  • Introduction of the new Visual C# programming language, which provides a type-safe, object-oriented version of the C programming language

  • Automatic state management for controls on a Web page (called server controls) so that they behave much more like Windows controls

  • The ability to create new, customized server controls from existing controls

  • Built-in security through the Windows server or through other authentication/authorization methods

  • Integration with ADO.NET to provide database access and database design tools from within Visual Studio .NET

  • Full support for Extensible Markup Language (XML), cascading style sheets (CSS), and other new and established Web standards

  • Built-in features for caching frequently requested Web pages on the server, localizing content for specific languages and cultures, and detecting browser capabilities



MCAD(s)MCSD Self-Paced Training Kit(c) Developing Web Applications With Microsoft Visual Basic. Net and Microsoft V[.  .. ]0-315
MCAD(s)MCSD Self-Paced Training Kit(c) Developing Web Applications With Microsoft Visual Basic. Net and Microsoft V[. .. ]0-315
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 118

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net