In the previous post i have mentioned about “What are the two base classes a Web Part you are going to use within SharePoint 2007 can inherit from?” . In this post i am going to discuss about the below “Differences between the two base classs and what are the inherit benefits of using one over another?”
For Previous post use the below link
Here we go…
As we know in share point [wss 3.0] is implemented on top of ASP.NET 2.0.
SharePoint Web Applications are nothing more than ASP.NET 2.0 sites with some modifications .
In addition, the new SharePoint web part framework extends the ASP.NET 2.0 web part framework.
That offers great flexibility since ASP.NET developers are now even closer to the SharePoint development platform. A large number of posts recommend the use of the ASP.NET WebPart class instead of the WSS WebPart class. Some of them actually suggest that the web part framework in WSS is there just for backwards-compatibility and should be avoided.
Please find below the diffrences…
- SharePoint webpart base class provides the backward compatibility and can be used with ASP.NET application also and other applications that include the functionality to execute the code. Whereas, ASP.NET 2.0 Web Parts base class: doesn’t include backward compatibility and allow easy to use user interface.
- SharePoint webpart base class is designed to build over the Microsoft ASP.NET web part infrastructure. Whereas, ASP.NET 2.0 WebParts base class provide the integrated set of controls to create a website. This enable the user to modify the content and behavior of the webpage using the user interface and directly from the browser.
SharePoint webpart base class provides some features such as:
- Cross page connections: this is used to include the pages that are connected with each other but not as a part of the website
- Connections between Web Parts: these are the connections that are outside the Web Part
- Client-side connections: includes the webpart service components that include all the services that are required to be shown.
- Data caching infrastructure: consists of the data structure that is used to keep all the data in the cache for future use.
Whereas, ASP.NET web parts base class consists of controls that can be saved and some session that can be personalized using the web part capabilities.
Stay tuned for the answer for the below Questions in next post.
- What is strong naming or signing a WebPart assembly mean?
- What are safe controls.
- what type of information safe controls contains in SharePoint web.config file.
- What is the Create ChildControls() method?
- What does the RenderContents method ?
- What is a SPSite and SPWeb object, and what is the difference between them?
- Write the code for the same?
Stay tuned for the answer for the above Questions in next post.