Web Parts without SharePoint, ASP.NET 2.0
I've been watching the classes in ASP.NET 2.0 for quite some time and working with the betas to see how we might build applications today so we're positioned for the changes next year (check out the Visual Studio 2005 Beta Documentation site here for all the gory details on the new classes). Something that intrigued me was the WebPart classes they introduced.
Living in the SharePoint space, web parts are the staple at to how to get information out to the presentation layer. In SharePoint they're a little ugly to write, but none the less are effective because the end consumer of the web part can choose how to display it (based on preferences through SharePoint for that particular instance of the web part). This includes appearance, what options they want to display, where they want it on the web page, etc. All of this fits into a nice framework and even allows you to have multiple copies of the web part with them pointing at different views or data sources. One persons way of using a web part may be different then someone else, either by design or organization. For SharePoint, this was the innovation that allows us to build applications on that platform with little effort and target content to specific audiences.
When I saw the WebPart classes introduced in the 2.0
framework I started salivating. Bringing the capabilities of
web parts to regular ASP.NET apps meant that I could
introduce things like personalization and customization to
apps without having to have to do a lot of work. Web Parts
are similar to web user controls but provide the
functionality to allow users to customize the website by
adding, deleting, and moving controls around the page based
on WebPartZones. Any ASP.NET server control can act as a Web
Part but by creating a custom control derived from the
WebPart class you gain access to advanced features.
You
can check out the new MSDN paper on Web Parts
here. Something to look forward to with your apps and something
to keep in mind on how to design your apps today as these
new capabilties roll into the framework and enable you to
start leveraging more features with less code.