November 2004 - Posts

If you want to upgrade your SharePoint sites to the new version of the SmartPart for SharePoint you should check out Michael Christensen comments on my SmartPart release post. Michael has described how you can avoid having to update each SharePoint site that uses the SmartPart, so the new version is used. Instead you can use assembly redirection (details below). Thanks Michael, btw do you really have thousands of instances spanning hundreds of users? That's cool!

Apparently no documentation exists for upgrading SmartParts which are already in use (without removing and re-adding them to the pages where they are used, which is quite impractical if you have thousands of instances spanning hundreds of users :-)

So I thought I would share what I did (as it is a bit tricky): 

  • remove old SmartPart.dll from GAC
  • install new SmartPart.dll to GAC 
  • ensure the presence of SafeControl entries for both versions in Sharepoint web.config, like this:
    <SafeControl Assembly="SmartPart, Version=0.2.0.1, Culture=neutral, PublicKeyToken=dd064a5b12b5277a" Namespace="SmartPart" TypeName="*" Safe="True" />
    <SafeControl Assembly="SmartPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=dd064a5b12b5277a" Namespace="SmartPart" TypeName="*" Safe="True" />
  • set up Assembly Redirection from old versions to 1.0.0.0, as seen here http://totalannihilation.dk/temp/smartpart_upgrade.png

Finally I’ve managed to finish a new release for the SmartPart for SharePoint; version 1.0.0.0. This release has some really cool new features, but I'm really excited about the first one: connectable web parts with ASP.NET user controls!

  • Create connectable web parts
    In SharePoint you can connect web parts, so they can exchange data. For example you could create a web part that displays a list of invoices, and another web part that displays the details of the selected invoice (master/detail view). Normally you’d have to create your Invoice and InvoiceDetails web parts by hand, implementing the ICellProvider and ICellConsumer interfaces (see Patrick’s excellent article about this topic). With the new version of the SmartPart you can do the same, but instead of coding everything by hand, you can create ASP.NET user controls! Just implement the ICellProviderUserControl or ICellConsumerUserControl on your user control, and you’re done.
  • CAS Optimization
    Maxim Karpov did a great job on fine-tuning the Code Access Security for the SmartPart. For running the previous versions of the SmartPart, you’d had to increase the trust level in the web.config to WSS_Medium. In this version this is not required anymore. Of course if your user controls require a higher trust level, you can raise the trust level as usual.
  • Hiding the user control selection
    Once you’re finished building your user controls, maybe you’d want to ship the finished web parts/user controls to a customer for example. In that case you don’t want the user to select the user controls from the dropdown listbox of the SmartPart, or filling out the user control name by hand. With the new version of the SmartPart you can create a DWP file which contains all the settings for an instance of the SmartPart showing a specific user control. The nice part is that you can hide the dropdown listbox or textbox for selecting the user control by adding the following node in the DWP after you’ve exported an instance of the SmarPart: <ShowUserControlList xmlns="SmartPart">false</ShowUserControlList>.

You can download the latest version from the Releases section on the GotDotNet Workspace. In the coming days I’ll create an example for each of the new features. Additionally keep an eye on Maxim’s blog, he has promised a post about the CAS issues. Also make sure you’ve read Readme file before deploying the SmartPart, since you now have two deployment scenarios (in the GAC or not). Of course if you have any comments, problems, questions, … let me know!

On December 14th the Belgian ISV Community Days are scheduled in Brussels; this event targets technical decision makers within our BeLux ISV community. Seats are limited to the first 100 subscribers so don't hesitate to sign-up over here!

Attend HP and Microsoft ISV Community Days to learn how your software — when built to leverage Microsoft Windows Server 2003 features like Windows Sharepoint Services, Active Directory  (ADAM), security services and 64-bit computing — will deliver solutions your customers need today. In addition, find out how to grow your software business by taking advantage of ISV-oriented offerings from the Microsoft Partner Program, like Empower and the ISV Royalty Agreement.

10:30 – 11:00     Registration 

11:00 – 11:15     Introduction By Chris Volckerick, Microsoft

11:15 – 12:30     Keynote: Building software on Microsoft Windows Server 2003, today and tomorrow by Rudi Larno, Microsoft.

Microsoft® Windows Server™ 2003 helps ISVs deliver new functionality that solves customers’ latest business needs, become twice as productive, and reach the broadest customer base with a single platform. It helps you better support your customers’ existing systems and standards, deliver greater performance, scalability, reliability and security, and provide your customers the lowest total cost of ownership. This session describes the roadmap for Windows Server and through customer and partner success stories shows how ISVs can be successful in taking full advantage of the enhanced features of Windows.

12:30 – 13:15     lunch

13:15 – 14:15     Developing Identity & Access-aware Applications (Securing your Application with Windows Server 2003 and the Roadmap to Federated Identity) by Peter Himschoot, U2U.

Today customers are looking for guidance on how to avoid introducing new directories and authentication schemes that increase complexity and undermine the goals of a successful identity and access management strategy. This presentation provides guidelines for developing applications that use the active directory and security services of the Microsoft® Windows Server™ 2003.

13:15 – 14:15     Windows Server 2003 on 64-bit Platforms by Dominique Dierick & Daniel Boom, HP

Within a year most if not all server class hardware will be 64-bit capable. There is a massive potential to improve the performance and scalability of existing applications by taking advantage of the 64-bit capabilities within Microsoft® Windows Server™ 2003. This session will provide technical guidance on how to optimize applications to support the 64-bit Windows platforms. The session will also cover how to ensure that your existing 32-bit applications will still function correctly in a Windows 64-bit environment to create maximum sales opportunities.

15:15 – 15-45    Break

15:45 – 16:45     Developing your software for collaboration by Patrick Tisseghem, U2U.

Information access and collaborative document sharing are becoming key aspects of today’s applications. Today with Microsoft® Windows Server™ 2003 you can build rich collaboration interfaces into your applications to provide consolidated views of information through Windows Sharepoint Server technologies, provide rich workflow scenarios between different applications and extend the presence information brought to the client to provide rich interaction and collaboration between users which was never thought possible.

16:45 - 18:00 Drinks

Woehoe! I'll be doing a presentation together with Patrick on the Belgian Dev & IT-Pro Days (register here). The session is named Hardcore Development For SharePoint Products & Technologies, so of course we will show a lot of code for the Number One product of Microsoft!

Btw, having your bio on the same page as Bill's bio, how cool is that!?

Take a look at the new Smart Client Developer Center at the MSDN site: http://msdn.microsoft.com/smartclient/. Over there you can find the new definition for a smart client. Notice that "smart client" is written without using capital letters!

Smart client (n) Definition: Smart clients are easily deployed and managed client applications that provide an adaptive, responsive and rich interactive experience by leveraging local resources and intelligently connecting to distributed data sources.

[Via Patrick] This is great news! Open a XML file in Word, apply some formatting, save it as a WordML file (XML), and run this tool. The result is a nice XSLT that will transform your original XML into a nice Word document. This is great for generating Word documents whithout having to rely on Word (e.g. on a server). I've mentioned this tool a couple of times during my Office Development course, so everybody who was waiting for it, get it here.

Overview
This command line tool, the XSLT Inference tool, helps you easily create XSL Transformations (XSLT) that quickly transform XML files into WordprocessingML documents with complex and rich formatting.

The process begins with a raw XML file that is representative of the XML files you wish to transform. This XML file is opened in Microsoft© Office Word 2003 and each of the XML elements can then be formatted to represent how similar XML files should be formatted when opened in Word, in effect creating a WordprocessingML formatting template. The saved WordprocessingML version of this file is called a “seed document”, and is used as the input to the XSLT Inference Tool.

For more information about how to use this tool, see the Microsoft Office Word 2003 XML Software Development Kit (SDK) on MSDN.

Today the site for the Belgian Developer & IT-Pro days went live, nice work MS Belux! The topic of this edition is "The Human Spirit". Of course U2U will be there, delivering some cool presentations (including "Hardcore Development For SharePoint Products & Technologies"!!!). And Bill Gates will be there as well!

 

More Posts