66020 members! Sign up to stay informed.

Sponsored Links


Resources

.NET Research Library
Get .NET related white papers, case studies and webcasts

News News News Messages: 10 Messages: 10 Messages: 10 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

New Introduction to ASP.NET 2.0 Web Parts Framework

Posted by: Paul Ballard on October 15, 2004 DIGG
MSDN has released a new paper that highlights the features of the ASP.NET 2.0 Web Parts Framework. Formerly restricted to SharePoint sites, Web Parts are the building blocks for an easily customizable web interface and are becoming fully supported features of ASP.NET 2.0. The new Web Part Framework includes features for personalization, communication between Web Parts, and creating custom menus.

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.

One of those features is personalization. Personalization allows a user to make modifications to a part’s properties that are then stored in the database. When the user returns to the site, the changes are applied. This feature is enabled with a simple [Personalizable()] attribute.

Communication between parts is also an important feature of the Web Parts Framework. Previously, this was a rather complicated process but now it’s considerably easier.
There are four steps that you must complete to create a static connection between two Web Parts:
  1. You must define an interface specifying the methods and properties that are shared between the connected Web Parts.
  2. You must add the ConnectionProvider attribute to the Web Part used to provide the shared information.
  3. You must add the ConnectionConsumer attribute to the Web Part used to consume the shared information.
  4. You must declare the connections within the StaticConnections sub tag of the WebPartManager class.
Modifying Web Part properties is easier for users by adding custom menu options to your Web Part. This is done by overriding the Verbs property and adding new WebPartVerbs.

To read more about the new Web Parts Framework in ASP.NET 2.0, click here.

Threaded replies

·  New Introduction to ASP.NET 2.0 Web Parts Framework by Paul Ballard on Fri Oct 15 02:37:01 EDT 2004
  ·  Why are this things called WebParts? by Jan Tielens on Fri Oct 15 14:56:45 EDT 2004
    ·  Why are this things called WebParts? by Bertrand Le Roy on Fri Oct 15 21:47:29 EDT 2004
      ·  Why are this things called WebParts? by Jan Tielens on Sat Oct 16 04:38:37 EDT 2004
        ·  Why are this things called WebParts? by Bertrand Le Roy on Mon Oct 18 20:10:41 EDT 2004
    ·  Why are this things called WebParts? by Jason Alexander on Tue Oct 19 11:22:39 EDT 2004
      ·  Why are this things called WebParts? by Patrick Tisseghem on Wed Oct 20 10:15:19 EDT 2004
        ·  SharePoint Roadmap by nick katsivelos on Fri Oct 22 14:44:44 EDT 2004
  ·  New Introduction to ASP.NET 2.0 Web Parts Framework by Andrew Clifford on Sat Oct 16 10:48:38 EDT 2004
    ·  WSRP is not ignored by Microsoft by mads nissen on Wed Oct 20 10:12:18 EDT 2004
    ·  New Introduction to ASP.NET 2.0 Web Parts Framework by Shaun Walker on Sun Oct 02 03:46:42 EDT 2005
  Message #142752 Post reply Post reply Post reply Go to top Go to top Go to top

Why are this things called WebParts?

Posted by: Jan Tielens on October 15, 2004 in response to Message #142670
You can't use the WebParts of ASP.NET 2.0 in the current version of SharePoint and I doubt you will be able to use them in any future versions of SharePoint (please correct me if I'm wrong). So why are they called WebParts?? They look the same as SharePoint WebParts, the share some functionality, but that's it...

It would be great if Microsoft could clarify what they are trying to do with those 2 technologies. Will they merge, so you CAN exchange WebParts or will ASP.NET WebParts always be different than the SharePoint WebParts?

  Message #142778 Post reply Post reply Post reply Go to top Go to top Go to top

Why are this things called WebParts?

Posted by: Bertrand Le Roy on October 15, 2004 in response to Message #142752
The next version of SharePoint WILL be built on ASP.NET WebParts.

  Message #142791 Post reply Post reply Post reply Go to top Go to top Go to top

Why are this things called WebParts?

Posted by: Jan Tielens on October 16, 2004 in response to Message #142778
That's great! Is this "official", or do you have any links that confirm this?

  Message #142804 Post reply Post reply Post reply Go to top Go to top Go to top

New Introduction to ASP.NET 2.0 Web Parts Framework

Posted by: Andrew Clifford on October 16, 2004 in response to Message #142670
This is great but I think at some point Microsoft will need to address the interop issues between web parts and the Java Community Process JSR-168 Portlet specification and/or the Oasis WSRP remote portlet specification just like they have to do with WS-*. The maturity and preliferation of the portlet container spec may just be to overwhelming.

Projects like Dot NetNuke, as far as I can tell, will maintain their branch of ASP1.1 and not merge back into the ASP 2.0 web parts model. I suspect the Rainbow portal project will reconcile differences. Both opensource projects offer a web parts alternative today.

I do see a trend to implement Java-centric specifications on top of ASP just like NetUnity is doing with its WSRP implementation. Microsoft's lull in releasing new product has to be driving this.

  Message #142956 Post reply Post reply Post reply Go to top Go to top Go to top

Why are this things called WebParts?

Posted by: Bertrand Le Roy on October 18, 2004 in response to Message #142791
That's great! Is this "official", or do you have any links that confirm this?
I do not have the authority to make it official, but the information has already been given by other MS employees in other forums some time ago.

  Message #143041 Post reply Post reply Post reply Go to top Go to top Go to top

Why are this things called WebParts?

Posted by: Jason Alexander on October 19, 2004 in response to Message #142752
My understanding is that the SPS WebParts are actually born from an early backport of the ASP.NET 2.0 WebParts so as to make the transition to the framework supported WebParts easier in the future.

I certainly don't work for Microsoft, though. So, take that for what it's worth. :)

  Message #143195 Post reply Post reply Post reply Go to top Go to top Go to top

WSRP is not ignored by Microsoft

Posted by: mads nissen on October 20, 2004 in response to Message #142804
Beeing a part of the OASIS board, Microsoft has been participating in the development of the spec.

http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsrp

They have released a WSRP toolkit on GotDotNet which provides a standard consumer WebPart (for sharepoint) and a toolkit to create providers.

http://www.gotdotnet.com/workspaces/workspace.aspx?id=2e3d8a57-ec9f-4d16-9a81-a395679d6392

The roadmap for Sharepoint is still not made public by microsoft, and all evolutions to the product is pure speculation. I would, however, put a lot of money on ASP.NET 2.0 WebParts working in Sharepoint, and I would assume (hopingly) that if the next version of SPS is far ahead there will be some kind of patch or intermediate solution.

Microsoft needs to consider the growing base of Sharepoint installations that will continue to live after a new version is released, and would have great need for the use of asp.net 2.0 webparts.

  Message #143198 Post reply Post reply Post reply Go to top Go to top Go to top

Why are this things called WebParts?

Posted by: Patrick Tisseghem on October 20, 2004 in response to Message #143041
Good news to hear that Web parts will be relying on the ASP.NET 2.0 framework. But I hear my customers already asking questions like: Are my Web parts SharePoint v2 still going to work in v3? If we look for example at the way connections are implemented, it is again different in this type of Web parts. Can we assume that our investments today will be usable tomorrow?

  Message #143559 Post reply Post reply Post reply Go to top Go to top Go to top

SharePoint Roadmap

Posted by: nick katsivelos on October 22, 2004 in response to Message #143198
I just started searching for this stuff yesterday and stumbled onto this thread - any additions or more current info would be appreciated.

says basically that SPS 2.0 (current version) will run asp.net 2.0 WebParts when an upgrade is released for it - and it seemed to imply that the patch would be forthcoming.

here is the presentation and some old chatter

October 2003 PDC presentation:
http://www.gotdotnet.com/team/PDC/4086/WSV322.ppt
http://timheuer.com/blog/archive/2003/11/03/245.aspx



N

  Message #186732 Post reply Post reply Post reply Go to top Go to top Go to top

New Introduction to ASP.NET 2.0 Web Parts Framework

Posted by: Shaun Walker on October 02, 2005 in response to Message #142804
DotNetNuke also has a number of team members who are knowledgeable in the JSR-168 specification. When reviewing the WebPart Framework in the context of JSR-168, it is obvious that the WebPart Framework is not intended to be a comprehensive specification at this point in time. Specifically it lacks the features required to make a WebPart portable from one ASP.NET 2.0 application to another.

What I mean, is there is no method for assembling a WebPart, with all of its related resources and configuration, into a package which can be sent to someone else and installed into their ASP.NET 2.0 application. SharePoint has a mechanism accomplish this, but it is proprietary and is not included as part of the general WebPart Framework. DotNetNuke also has a mechanism to accomplish this - configuration is specified in a *.dnn file and all WebPart resources are packaged into a single ZIP file which can be sent to other DotNetNuke portal administrators who can install the package directly into their run-time environment. Although DotNetNuke's implementation is specific to its own environment, it is open, mature, and evolving based on community feedback. Since there is no comparable feature in the ASP.NET 2.0 WebPart Framework, DotNetNuke will certainly need to maintain its own portability mechanism.

In addition, in order for a Webpart to be truly portable between ASP.NET 2.0 applications, all proprietary dependencies to a particular application would need to be abstracted. Basically, there are a number of fundamental services which need to be consistent across all implementations. These need to be public APIs which every ASP.NET 2.0 portal application can implement in order to achieve true WebPart portability. For example, in Application A, a WebPart may need to access a user's FirstName and LastName for display purposes. In today's environment, the developer would need to make a call to a User class library in Application A in order to get this information. So when the WebPart is moved to Application B ( which has its own User class library ), the WebPart will not function as expected ( unless the class library from Application A is installed with it ).

In order to establish an ASP.NET equivalent to JSR-168, I believe a consortium of ASP.NET portal stakeholders would need to be established... with Microsoft taking an official seat at the table.

DotNetNuke is planning to migrate to ASP.NET 2.0 on an aggressive schedule and will have a number of options for building Modules ( our equivalent of WebParts ). his release will likely be called DotNetNuke 4.0. Developers will be able to build Modules in either ASP.NET 1.1 or 2.0 - and deploy them directly into their DotNetNuke 4.0 run-time environment.

 
New content on TheServerSide.NETNew content on TheServerSide.NETNew content on TheServerSide.NET

DSLs and language interop

Language "mashups" will become more prominent, and developers will become polyglots, one programmer suggests.

VS 2008 Resources

SearchWinDevelopment.com offers an introduction to the language, performance, testing and data management improvements in VS 2008.

VB code downloads home

VBCode.com code snippets cover all aspects of application development, from data binding to security to the user interface.

XAML Learning Guide

Get up to date on XAML best practices with a variety of articles, tutorials and webcasts. [SearchWinDevelopment.com]

Company uses VSTS DB edition to tame workflow

One team's experience with the VSTS DB edition suggests that it can improve workflow for dev teams. It also enhanced Agile efforts. (June 24, Article)

Book: Intro to DSL Tools

Microsoft has begun to include DSL tools in the VSTS kit. A new book by Steve Cook and other VSTS team members helps set the stage. (June 24, Article)

I See the Silverlight Shining!

Cartoon: Be it ever so humble there is no place like your home after you get a Microsoft Home Server . (June 18, Cartoon)

A look at .NET 3.5

Microsoft's Thom Robbins says new technology to highlight in NET 3.5 includes AJAX, LINQ for both C# and VB, as well as tooling enhancements intended to ease the task of building WPF, WF and WCF apps. (June 29, Podcast)

Venkat Subramaniam on AJAX

Venkat Subramaniam discusses AJAX bottlenecks, the tenets of Agile development and more. He spoke at the Ajax Experience. (June 25, Tech Talk)

Building a Claims-Based Security Model in WCF - Part 2

In the second of a two-part series, Michele Leroux Bustamente discusses design decisions related to the claims-based security model. Read the story and walk through the process for creating a set of claims-based utilities to encapsulate claims authorization at the service tier. (May 24, Article)

Introducing the Entity Framework

Understanding why the Entity Framework exists and learning where it can fit into your projects can get you prepared for the eventual release early next year. (May 10, Article)

WCF Security Learning Guide

Resource: This learning guide gives you quick access to useful links on Windows Communication Foundation security information. (April 24, Article)

Brad Abrams: Patterns for successful ASP.NET AJAX development

TSS.NET's Jack Vaughan spoke recently spoke with Microsoft's Brad Abrams to find out what he is seeing in the field and what the chefs in Redmond are cooking. Along the way he discusses patterns of AJAX frameworks. (April 11, Article)

Building a Claims-Based Security Model in WCF

In a two-part series, Michele Leroux Bustamente explains how claims-based security is supported by WCF, and how you can implement a claims-based security model for your services. (March 29, Article)

Authoring workflow using XAML

Windows Workflow Foundation is a new technology that many developers will need to get their heads around. In a brief excerpt adapted from Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C#, K.Scott Allen considers aspects of workflow definition. (March 22, Chapter Excerpt)

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
All Content Copyright ©2007 TheServerSide Privacy Policy
Site Map