SharePoint Designer provides an easy interface for Web site designers to use standard Web technologies, such as ASP.NET 2.0, to connect to data sources and retrieve, format, and display data on Web pages. The functionality is driven by intuitive GUI (Graphical User Interface)-based wizards, and although you might need some understanding of ASP.NET, you most likely won't need to write a single line of code to be able to complete a standard data-driven Web site.
The basic steps involved in working with data are usually the same no matter what technology you choose. You do the following every time you work with a data source:
Use a data source control to connect to a source of data. The source of data is usually a database for an MS-Access database file, an SQL Server database instance, or an XML file. In more complicated scenarios, you might be connecting to a server-side script or a Web service. The data source control uses a connection string to connect to the source of data. A connection string is a string of text that specifies information about connecting to a specific data source.
Using a data display control, connect to the data source control you set up to display the data. You can modify, transform, or lay out (or any other term you like to use) data to make it look inviting. Usually, this is where you use your imagination and design skills to convert a row or table of data into what your end users would relish working with. Remember, developing a Web site is more art than science.
The data display control usually provides an interface to manipulate the data. However, it's mostly the job of the data source control to perform the manipulation of data on the actual data source.
One brilliant shift that SharePoint Designer now makes in contrast to its predecessors is that it doesn't use any proprietary approaches to provide database functionality to its users. The Database Results and Database Interface wizards (available in FrontPage), although powerful tools of their time, wrote a lot of proprietary code for working with databases. This code wasn't easily understood and added a layer of complexity for Web site designers. Who remembers deleting those files inside the _fpclass folder, thinking of them as nonessential, and thus causing havoc on Web sites?
NOTE
Although you can still edit your existing database results pages created in FrontPage 2003 by using SharePoint Designer, you can't directly add new database results pages to your Web sites. The entry point for the Database Results and Database Interface wizards isn't directly available in the SharePoint Designer user interface.
With SharePoint Designer, you can work directly with standard ASP.NET data controls to retrieve and display data on Web pages. The design surface provides a no-code interface to work with these controls to set up Web pages that display data. Behind the scenes, SharePoint Designer writes ASP.NET code to implement the functions for data retrieval. Advanced users can then switch to the Code view to modify or alter the code and further advance the functionality provided by the wizards.
Although SharePoint Designer is primarily focused on developing data-driven Web pages for SharePoint Web sites, it could very easily be used to work with data sources on non-SharePoint sites. This chapter discusses both SharePoint- and non-SharePoint-related data source options available in SharePoint Designer. I also help you understand how to use the Data Source Library task pane to create connections to data sources for later use by the available data source controls. The three main pieces of any data-driven Web site were mentioned earlier in this chapter. The following section covers them in more detail. Figure 15.1 shows the relationship between the sources of data, data source controls, and data display controls.
Depending on the Web site you're working with in SharePoint Designer, the list of available data sources might change. Here are the standard non-SharePoint data sources:
Database applications: These include most commonly deployed database technologies, such as SQL Server, Oracle, MS-Access, or other sources that support ODBC/OLEDB connections.
XML documents: You can make connections to the XML files that exist in the realms of the Web site in which you're working. SharePoint Designer allows you to import into your Web site any XML files that you want to use as data sources.
Besides these, SharePoint sites also expose the following data sources:
SharePoint lists
SharePoint libraries
Server-side scripts
XML Web services
Business data catalogs from SharePoint sites
Linked data sources
NOTE
SharePoint sites only support OLEDB connections to data sources. This means that you can't specify ODBC connection strings for connection to data sources.
Most of the non-SharePoint data source controls that you can use in SharePoint Designer are ASP.NET 2.0-based. .NET Framework 2.0 needs to be installed on the computer to make these controls available in SharePoint Designer. These include the following:
AccessDataSource
SQLDataSource
XMLDataSource
SiteMapDataSource
These controls are accessible from the Toolbox task pane in SharePoint Designer. Don't worry if you find these controls baffling. They're discussed in much more detail with examples and scenarios in later chapters.
SharePoint sites expose special data source controls (for example, SPDataSource, SoapDataSource, etc.) to connect to SharePoint or non-SharePoint-related data sources (although you can still use standard ASP.NET data source controls in SharePoint sites, too). As discussed in later chapters, these data source controls aren't directly available in the SharePoint Designer user interface but are inserted behind the scenes as the result of working with the available data sources.
Like the data source controls, SharePoint Designer allows for the use of standard ASP.NET 2.0 data display controls. Most of the ASP.NET 2.0 controls that SharePoint Designer makes available can be bound to a data source control to display and work with data that the data source control offers.
For SharePoint sites, SharePoint Designer exposes a more powerful and robust XSLT-based (Extensible Stylesheet Language Transformations) data display control called DataFormWebPart. Chapter 17 is devoted to discussing this versatile tool.
3.133.142.6