Why ASP.NET?

Why ASP.NET?

The compelling nature of ASP.NET will draw Web programmers toward its orbit for the following reasons:

  • Language independence. ASP.NET allows you to use compiled languages, providing better performance and cross-language compatibility.

  • Simplified development. ASP.NET makes even the richest pages straightforward and easy to write.

  • Separation of code and content. Each Web Form has a code module with the same name but with the extension .vb. This so-called code behind the page contains the program logic code, while the Web Form contains the visual components.

  • Improved scalability. New session-state features make it easy to create Web Forms that work on Web server farms (multiple servers).

  • Support for multiple clients. ASP.NET controls can automatically detect the client and optimize themselves for a consistent look and feel. You no longer have to write separate code for different browsers.

  • New Web Forms controls. The new controls can output HTML 3.2 for down-level browsers while taking advantage of the runtime libraries for enhanced interactivity on richer clients. Our programs can now output to a whole new range of platforms such as wireless phones, palm pilots, and handheld pagers and devices.

  • Server-side processing. ASP.NET changes each page into a server-side object. More properties, methods, and events can be used with your code to create content dynamically. The runat="server" attribute converts the HTML element into a server-side control that is visible and therefore programmable within ASP.NET on the server. Events raised by Web Form controls are detected, and the appropriate code is executed on the server in response to these events.

    note

    ASP.NET is written entirely in the new C# language. All ASP.NET pages have the .aspx file extension, which allows both .asp and .aspx files to be run on the same machine under the existing ASP runtime.

Getting from There to Here

In some ways, everything you've learned in this book up to now has poised us to write ASP.NET programs. You will soon see how similar that is to creating Windows Forms programs in .NET. You drag and drop controls and set properties in the same manner you do with Windows Forms. You use the technologies you've learned about so far—the .NET Framework; object-oriented programming; events, properties, and methods; ADO.NET; and XML—and put them together in Web Forms.

When I hire a new programmer, I'm amazed at how many applicants are proud to say they understand Visual Basic. The applicants describe how they know various esoteric uses of items such as control arrays or undocumented memory pointers. What they fail to realize is that I'm looking for someone that understands database design, n-tier architecture, ActiveX Data Objects (ADO), XML, HTML, Dynamic HTML (DHTML), object-oriented programming, Transmission Control Protocol/Internet Protocol (TCP/IP), the Open Systems Interconnection (OSI) protocol stack, custom ActiveX control construction, network security, firewalls, and so on. Many of these technologies and concepts are implemented in Visual Basic. Learning the language is only the first part—not the be-all and end-all, but rather a beginning.

While it's easy to find people who know Visual Basic, it's difficult to find people who understand the gestalt of how programs operate in a distributed environment. And if you look back at how much ground we've covered in this book to get to this point, you might be pleasantly surprised at how most of what you've learned will be directly applicable to writing ASP.NET programs.

Several years ago, when graphical tools such as Visual Basic came on the scene, many software developers were concerned that programming would become so easy that they would be out of a job. After all, even accountants could drag buttons to a form and set properties. However, quite the opposite has happened. Programming has become exponentially more abstract. It turns out that we need the graphical capabilities so that we can concentrate on application design and fitting the pieces together. A Visual Basic .NET program has many moving parts—especially programs running on the Internet. Luckily, Visual Basic .NET provides some very powerful graphical tools that help get Web sites up and running quickly.



Coding Techniques for Microsoft Visual Basic. NET
Coding Techniques for Microsoft Visual Basic .NET
ISBN: 0735612544
EAN: 2147483647
Year: 2002
Pages: 123
Authors: John Connell

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