Monday, June 22, 2009

SPSource: Reverse engineering tool for SharePoint

SPSource is a tool for SharePoint developers to assist in the creation of WSS Solution Packages (WSPs) allowing for the use SharePoint Designer and the SharePoint web UI to make quick changes to items, then push those items into Visual Studio for later compilation into a WSP.

Some examples of what can be done using SPSource:
  • Completely define a custom Publishing Feature using SPD and the SharePoint UI, creating the master pages, page layouts, content types, style sheets, and images directly in the content database. Once at a point where it's ready for deployment, run SPSource against the project and pull everything into a pre-existing WSP. If changes are needed in the markup, make them using SPD, and re-run SPSource. The files in the WSP will be updated and ready for a solution upgrade.
  • Implement a class on an ASPX page (code behind) in SPD, and code that class in Visual Studio, or add custom server controls to the markup in SPD. Push your assembly directly to the GAC or bin as part of the build process, and the code-to-test time is much faster, as the markup files are already in the content database. Once everything is set, run SPSource again the project, and pull everything together into the WSP.
  • Add a custom Content Query Web Part (CQWP) .webpart file to the web part gallery, and change the properties and settings for the new CQWP via the UI and SPD to use custom XSL files that you add to the Style Library/XSL Style Sheets folder. Create new ItemStyles, change the Headers, or add new parameters to the Main XSL. The XSL files can be updated quickly using SPD, and changes can be seen right away. When all is ready for integration into the WSP, execute SPSource against the new files and create a new Feature for the new web part in minutes.
  • Create a complex List instance with Content Types and related Site Columns and reverse the whole lot out to a Feature to deployed to another environment as a Solution Package (wsp) using your favourite tool: VSeWSS, WSPBuilder or STSDev.
You can download it from here.

To use it you can make the following steps:

1. Create the following folder structure to mirror the 12 Hive folder structure:


2. Then create a folder for your Feature (which will deploy the List Template, Site Column and Content Type). For example at C:\temp\SPSource Demo\12\TEMPLATES\FEATURES\SPSourceDemoFeature.


3. Create a Feature.xml file

Create a Feature file at C:\temp\SPSource Demo\12\TEMPLATES\FEATURES\SPSourceDemoFeature\feature.xml file and place the default feature XML content in the file:

<Feature

Id="863BBC74-939E-4296-A538-931369C04433"

Title="SPSource Demo Feature"

Description=""

Version="1.0.0.0"

Scope="Site"

Hidden="False"

xmlns="http://schemas.microsoft.com/sharepoint/">

<ElementManifests>

</ElementManifests>

</Feature>


4. Create the .spsource file

Create a new .spsource file e.g. ‘C:\temp\SPSource Demo\12\TEMPLATES\FEATURES\SPSourceDemoFeature\lists.spsource’. The content of this file reflects the base schema for the Elements Manifest. So start with:


<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

</Elements>

Because we want to reverse engineer the Site Column, Content Type and List you will need two elements in here. One to point to the List and one to point to the Content Type.

NOTE: Any associated Site Columns on the Content Type will automatically be reverse engineered.


<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

<ListTemplate Name="Documents" />

<ContentType Name="Demo Document" />

</Elements>



5. Run SPSource

Now that you have set up the folder for SPSource to run, you now need to execute SPSource.

Open up a command prompt window and type:

Cd C:\temp\SPSource Demo

This will take you to the folder where you’ve created your files (if you chose a different name please adjust this).

Then simply type:

"C:\Program Files\SPSource \SPSource.exe" -designsite http://win-0xqbnqw37uf:41508/sites/DevDemo

NOTE: If you chose a different location for SPSource when you installed it you will have to modify this.

Friday, June 12, 2009

SharePoint 2007 Test Data Population Tool

Microsoft Office SharePoint Server Test Data Load Tool (MOSSDW.exe) is a tool that helps data population for MOSS deployments. It provides an XML based mechanism to populate multiple objects and associate XML tags to classes. It is available as a command line executable which accepts an XML file that specifies the objects to be populated.

The basic XML format for Microsoft Office SharePoint Server Test Data Load Tool is as follows:

<mossdwlib>
<object parameter="”value”">
<childobject parameter="value"></childobject>
</object>
</mossdwlib>

For example:


<mossdwlib>
<testportal>
<testarea num="5" urlname="PublishingWeb$num$"></testarea>
</testportal>
</mossdwlib>

This sample would create 5 web sites named PublishingWeb1 through PublishingWeb5 under the current portal site.

You can use a lot of nice features and options for this purpose. For a complete list you have to download the help for this tool.

You can download this tool from here.

BDC Meta Man - a time saver for integration

I've found a nice tool for generation of Application Definition files for BDC for SharePoint: BDC Meta Man. It is very easy to use and very efficient as you could see in the next video:



It knows to connect to SQL Server, Oracle, DB2, MySQL, InforMix, Web Services, Access or any ODBC connection. It knows even to get data from SAP (with the use of Sitrion).
For a deep dive into the BDC I recommend to you this book:

SharePoint 2007 Developer's Guide to Business Data Catalog.You can find a review for this book here.

Tuesday, June 2, 2009

Free Virtual Expo on SharePoint – June 10

Quest Software's Virtual Expo 2009 for SharePoint
Registration Information…

Wednesday June 10

"During this free online event, you can interact with our SharePoint experts and partners to learn how best to migrate to -- and manage -- this essential collaboration platform.  Join us for live webcasts on topics such as governance and recovery, and visit the booths to download white papers, gather product information or chat with a technology specialist. This event is accessible via any web-connected computer."

8 a.m. to 4 p.m. EDT

7am – 3pm CDT

6am – 2pm MDT

5am – 1pm PDT

Very decent times across Europe

1PM London, England

3PM Bucharest, Romania

Live webcasts:
  • SharePoint Governance: 10 Steps to Successful Deployments
  • Leveraging SharePoint and Performance Point as a Business Intelligence Platform
  • Ask the Experts: Live SharePoint Q&A
  • A Simple Game Plan to Master SharePoint Recovery

Plus, by attending you can:

· Enter to win prizes given away throughout the day including SharePoint books, gift cards and more!

· Interactive"Networking Lounge" with SharePoint experts

View on-demand webcasts
  • Migration tools and best practices
  • Administration and auditing
  • Recovery from your existing backups
  • Developing robust applications on SharePoint with no coding
  • Managing SQL Server

Register Now…