In reality, the home page of any Web site or Web application is a "portal" to that site or application. In general, the home page carries things like news, information, and of course links to the other pages that make up the content of the site or application. However, the term "portal" has increasingly become associated with pages that offer a modularized view of information. This is one of the main aims of Microsoft SharePoint and other similar content management systems. The ASP.NET 2.0 WebParts technology is designed to make this kind of page and application easy to build, often without requiring the developer to write any code. The Goals of the Portal FrameworkWebParts is not a brand-new technology, and in some ways it combines existing development efforts in an attempt to provide a general solution. The goals for the technology are to:
Integration with SharePoint and Office WebPartsOne important aim of the new ASP.NET WebParts technology is to allow it to be extended within SharePoint and other Microsoft applications, as well as to provide support for existing WebParts. WebParts have been around for a few years, in products like the Digital Dashboard and Content Management Server, and in the future, the ASP.NET 2.0 WebPart Framework will become the foundation of the next version of SharePoint, providing a great opportunity for WebParts to be shared among applications. Customization and PersonalizationThe WebParts technology provides built-in capabilities for customizing the display. This is integrated with the ASP.NET personalization features so that the settings are persisted on a per-user or shared basis and automatically retrieved the next time that user logs in again. Whether personalization is stored on a per-user basis, or shared among all users, is termed the scope. As an example of the customization features, the screenshot in Figure 13.1 shows how a rich client (Internet Explorer 6) allows the user to enter design mode and change the layout of the modules on the page by simply dragging them from one place to another. Figure 13.1. Changing the layout in Internet Explorer 6WebParts technology implements all the customization processes automatically and many other features as well. You can minimize or "roll up" a WebPart so that only the title bar is visible. And, as you'll see in the example page shown in this chapter, you can easily expose features that allow the user to edit the appearance and behavior of individual WebParts, open dedicated Help windows for each one, close or hide individual WebParts, and add new WebParts to the page. It all looks like a complex process, and it certainly does produce a page containing features that would take considerable developer effort to achieve from scratch. Yet the example in Figure 13.1, which we'll discuss in more depth shortly, contains only declarative content (ASP.NET server controls) and requires almost no server-side code to be written. About the WebParts FrameworkThe WebParts technology is exposed through a series of ASP.NET server controls. In combination, they work together to generate the kind of output and feature set you saw in the previous screenshot. Underneath, the source for the page builds up a structured hierarchy of objects from the server control declarations. Figure 13.2 shows that structure. Figure 13.2. The object structure for a WebParts portal page
We'll be looking at each of these objects in detail as we progress through the chapter, seeing how they fit into the overall design of portals. |