Chapter 12. Web Services and Middle-Tier Technologies

IN THIS CHAPTER

  • Using the Middle Tier to Provide Presentation Logic

  • Using Data in the Middle Tier

  • Exposing Objects Through Web Services

  • Putting It All Together

Perhaps you haven't yet had a chance to work in the true middle tier or have worked primarily with applications that had a configuration such as a Web server and a database server. In that case, most of the application logic was actually written in the ASP pages, and the database only held data. To most of us, this area is simply referred to as plumbing. The application logic, be it the middle tier or spread across tiers, makes the application happen. It may dictate what a user sees, but the user never sees it.

For years this type of plumbing was implemented as Visual Basic (or C++) .dll files known as COM objects. The premise is simple: Create your code in a compiled object that can be shared, reused, or accessed remotely. A common example is the frequently used lines of code that declare an ADODB.Connection and an ADODB.Recordset object, which take a connection string and a query and return a recordset. This logic could very easily be put into a function that returns a recordset object and takes the connection string and/or query as parameters. In theory, this method was wonderful; however, in reality there were problems with version control, remote access, and general lack of understanding in the developer community.

Microsoft has made incredible progress with the way that middle-tier development can take place within .NET. To start with, Microsoft opened low-level libraries to all the languages in Visual Studio.NET. As a result, Visual Basic developers now have much easier access to items such as threads and marshalling in order to control performance better. The next great stride was side-by-side versioning. It allows production and development versions of code on the same machine without them bumping into each other. Side-by-side versioning is made available by .NET's use of folder structures for locations as opposed to registry settings for everything. Of course, these capabilities factor into the use of Web Services. Although not a new technology in terms of Internet time, Web Services are perhaps the most exciting thing to happen to distributed computing in quite some time. In this chapter we take you through the process of determining what goes in the middle tier and show different ways of implementing it.



Database Access with Visual Basic. NET
Database Access with Visual Basic .NET (3rd Edition)
ISBN: 0672323435
EAN: 2147483647
Year: 2003
Pages: 97

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