Web Studyaspnet.blogspot.com Babyneed.blogspot.com

ASP.Net Web Developer Guide

Power By: eXTReMe Tracker Powered by Blogger  
 
 
 
 

 

 
Important Links
 
   
     
 
Sitemap
 
   
   
 
Reference
 
   

Tuesday, February 14, 2006

System.Web.Services Namespace Set(Chapter 2)

Web services are a new feature to ASP.NET.They enable anyone to access your application over the Internet, just as if it were on their local machine. For example, Microsoft could maintain one copy of Microsoft Office on their servers, and when you need to run Word, you could just connect to their servers and run it like normal.Web services promise a lot of benefits for both clients and developers.
Web services enable you to do this because they are based on existing, nonproprietary standards such as XML and Simple Object Access Protocol (SOAP). Using these protocols, a Web service client communicates with the Web service over the Internet, sending commands and data back and forth as plain XML.This means that such applications can work even across firewalls. Figure 2.10 illustrates this process; note that both Web service and client can be ASP.NET pages, as well as traditional applications.
When the Web service on the server receives a command, it processes it just as if it were a local application.The server can access databases, local files, user lists, or even other Web services.Any data that needs to be returned is then sent back to the client as XML.
You may be wondering how this is different than regular ASP.NET pages. First, ASP.NET pages usually require a UI—a Web service does not. It simply provides functionality that another application can take advantage of.The second difference
is that any application can use a Web service, from an ASP.NET page to a desktopbased calculator.ASP.NET pages have to be served up through a Web server. Don’t think, however, that Web services are a replacement for ASP.NET pages—each technology simply provides different functionality for different situations.
Figure 2.10 How a Web Service Works

Working with Data Sources Using the System.Data Namespace
The System.Data namespace contains most of the objects associated with ADO.NET, such as DataReaders and DataSets.These objects enable you to interface with all sorts of data sources, from text files to Microsoft SQL Server, to Oracle, or even with custom data sources you create yourself.You’ll be spending a large amount of time dealing with ADO.NET in Chapter 7 and in subsequent chapters.
Supplied Functionality
Any time you need to deal with an outside data source, you’ll likely use objects in the System.Data namespace. One of the most important classes in this namespace is the DataSet. It provides a complete, disconnected representation of any data source, whether a traditional database, an XML file, or even a file system. As you start building data-enabled ASP.NET pages, you’ll see just how powerful both this object and ADO.NET are.
The System.Data namespace also provides objects to interact with connected data sources, such as streams.These objects are usually more efficient than the disconnected data objects such as the DataSet, because they don’t have to represent a complete database with keys, constraints, and other objects. However, due to that limited representation, they are also limited in functionality.
There are a few Web controls that are often associated with ADO.NET: the Repeater, DataList, and DataGrid controls.Though these controls are not part of the System.Data namespace, they are often associated with ADO.NET because of the way they interact with data sources. See the “System.Web.UI Namespace Set” section earlier in the chapter for more information.
Finally, the System.Data object also provides limited functionality to interact with XML data sources.You can load XML data and write it to a database, and vice versa. However, if you want to examine XML data in more depth, you should use the objects in the System.Xml namespace, which we’ll discuss next.

0 Comments:

Post a Comment

<< Home