Today I presented this topic at the Ottawa Dot Net Community. Good turn-out with about 20 people. This was a one-hour lunch-time presentation.
The agenda covered:
- Web Parts Overview
- Admin Panel mini-spec
- Admin Panel Code Demo
The overview is a series of slides in the PowerPoint presentation providing a quick summary of Web Parts from Personalization tables to Zones for browsing, editing and catalogs.
The mini-spec is a one page summary of the key points for the Admin Panel (see slide 14).
Let’s Code
Finally the last 35 minutes looked at the key design issues and how to solve them in code:
- Instantiation vs Reflection
- Only display the active Web Part
- Initializing the Panel
In designing an Admin Panel, I am adamant that labels on the user interface be totally customizable. This means that the labels not only map to the Web Part properties, such as Title, but also track personalization changes that a customer makes to a Web Part.
Instantiation creates objects where the properties have default values. Reflection tries to find the Web Part on the page and use the values saved in the Personalization database.
When there over three Web Parts on an Admin Page, it is important to hide the Web Parts that are not in use. I call this a “Point, click, Use” interface. Point the mouse at the link for the web part that you want to use. Click the link. Use the Web Part that appears on the screen. There should only be one Admin Web Part visible on the page.
Finally the panel is initialized when we use reflection to create Web Parts. This means that the first time that the page is displayed, all Web Parts are automatically added to the page. We are ready to customize them.
Slides and sample Demo Admin Panel Web Part code are included.
Contents include:
- PowerPoint slides
- DemoAdminPanelWebPart.cs
- L.cs (a collection of useful statics for manipulating Web Parts)
0 comments:
Post a Comment