The ASP.NET 2.0 Portal Framework


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 Framework

WebParts 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:

  • Provide a robust framework for Web pages and applications that support modular content and can be customized by end users.

  • Expose a programming model that is easy to understand and use, that requires no code to be written for most types of pages, and that is capable of providing support for more complex scenarios as well.

  • Provide a rich user experience where this is supported by the client's software, plus safe fallback support for other clients.

  • Be easy to configure for individual users and groups of users, and easy to tie in with the underlying personalization features of ASP.NET 2.0.

  • Support the growth in WebParts technology that is happening outside ASP.NET, for example, in SharePoint, Content Management Server, and Office 2003, by establishing a foundation of a single portal technology for use across all Microsoft applications.

  • Provide full support and integration for third-party WebParts and assemblies to be used, expose backward compatibility as far as possible, and offer a migration path for other existing technologies.

  • Meet the performance demands of portal applications, which often experience bursts of high usage (such as when a group of users all start work at the same time).

Integration with SharePoint and Office WebParts

One 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 Personalization

The 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 6


WebParts 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 Framework

The 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.



ASP. NET 2.0 Illustrated
ASP.NET 2.0 Illustrated
ISBN: 0321418344
EAN: 2147483647
Year: 2006
Pages: 147

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