Sites, collections, webs, and web applications

At its core, SharePoint is a software layer on top of ASP.NET and SQL Server. Although there is a lot more to it, this book isn't designed to be a full intensive developer's guide to SharePoint. Learning SharePoint for Windows Phone 7 will be very easy if we keep in mind that we are actually developing ASP.NET 3.5 SP1 sites and have access to a very rich and easy to understand API for SharePoint.

Sites, collections, webs, and web applications

With IIS 7 and ASP.NET sites, you can have multiple application pools. An application pool consists of a worker process that runs one or more websites. The worker process also has the credentials under which the websites run on the computer. Having multiple application pools in a system allows us to separate applications so that one application won't crash another in the event of a failure.

As stated earlier, each application pool can have multiple websites. Each website is mapped to one or more URLs and is the root for where the development begins for most web applications. The website is the container for all content, both static and dynamic. Within each of these websites, you can have folders as well as virtual directories. Virtual directories are a path name mapped to a physical folder either on the local computer or a remote server. The path name then becomes part of the URL when loading pages from the virtual directory. The path doesn't need to have the same name as the physical directory.

Sites, collections, webs, and web applications

When a person views the website, the pages they see are most likely comprised of many parts like master pages, ASP.NET web forms, and ASP.NET server controls. These parts come together and form the view. These are very powerful tools in a web developer's belt, but when they are not managed properly, they can be difficult to maintain. SharePoint builds on the ASP.NET parts and introduces ideas to help structure sites, so that they are more maintainable.

In SharePoint, we have web applications which can be thought of as the equivalent of IIS Application Pools. Inside each web application, we can have one or more SharePoint site collections. You can think of a SharePoint site collection as an IIS website. Inside each SharePoint site collection is one or more SharePoint sites. These SharePoint sites can be thought of as a virtual directory.

Note

For an introduction to working with IIS, please visit the following website:

http://learn.iis.net/

This is where it may get confusing, if you are thinking of site collections as a website. Each site collection has a default SharePoint site named the root. We cannot have a useful site collection without the root site. An empty site collection is as useful as an empty IIS website. Every website in IIS has a single root virtual directory. SharePoint has that same layout. Every site collection has a root site.

In ASP.NET, a website has one root virtual directory. That root virtual directory can have folders and additional virtual directories. In SharePoint, a site collection has one root site. The site collection's root site can contain SharePoint webs and SharePoint sites. In this way, a SharePoint web can be thought of as a plain folder from ASP.NET. A SharePoint web is a container for SharePoint lists and libraries, which we will discuss in greater detail in Chapter 4, Building SharePoint Pages for Windows Phone 7.

That leads us to the top of the SharePoint stack. In ASP.NET Web Forms the thing that the browser requests from IIS is a page. In SharePoint the thing that the browser gets from SharePoint is a view of data. This data is contained within an ASP.NET page that lives within the SharePoint context.

Sites, collections, webs, and web applications

The easiest way to think of SharePoint data is in terms of lists and libraries, and what we display to the user is some combination of this data. We combine the lists and library data into ASP.NET web pages and that is what we show to our users.

Content hierarchy

As was mentioned earlier in this chapter, content in SharePoint can be thought of as either lists of data or libraries of documents. In this section, we'll look at the content hierarchy which comprises the lists of data.

Up to now what we have looked at is how IIS is configured to handle SharePoint sites. The previous section took us to the level of SharePoint webs. The content within a SharePoint web is contained in lists. Think of lists in the same way you'd look at a spreadsheet. Spreadsheets have columns and rows. In SharePoint Lists, the columns are called list items and the rows in the column are called fields.

One of the many things that you can do with SharePoint is to open lists in different applications. Microsoft Office has different hooks for opening data for editing in applications, such as Word and Excel. This imagining of the SharePoint list data as an Excel spreadsheet is clearer when you can click on a button on a list and open it in Excel to edit the data.

The hierarchy of the content programming classes is as follows:

Content hierarchy

We will cover lists and their contents in greater detail in the next chapter.

Physical objects hierarchy

The other content type in SharePoint is libraries. Libraries are easiest to think of as folders and files on a disk. Although this works conceptually, in reality the objects are still stored in the SharePoint database. In the previous section, we imagined lists as an Excel spreadsheet, but you can store a real Excel spreadsheet document as a SharePoint file. It will be stored in a cell of the SharePoint database and appear in the document library.

The hierarchy of physical objects programming classes is as follows:

  • SPFarm
    • SPServer
      • SPFolder
        • SPFile

As with lists, we will dive deeper into physical objects in the next chapter.

Services hierarchy

There is one last hierarchy that will be discussed in Chapter 6 and it is the services hierarchy. This hierarchy includes classes that represent various services available for use in SharePoint. This hierarchy includes classes that represent the various web and Windows OS services available for use in SharePoint.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.117.212