Isolator for Sharepoint

For those interested in unit testing, and particularly unit testing for Sharepoint Typemock have released their Isolator product for Sharepoint.  You might even be able to get a free license if you are quick...

Quote from Typemock:

Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here.

The first 50 bloggers who blog this text in their blog and tell us about it, will get a Full Isolator license, Free. for rules and info click here.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Infopath Forms and the Changed Event

Firstly, huge kudos to Iain for reminding me of this today Embarassed

When you want to use teh 'Changed' event on a drop down list (or other control) in a browser based InfoPath form, you have to set the postback options to 'Always' = otherwise your event doesnt fire!

Thanks Iain

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Microsoft officially launches WESS in the UK

This week saw the official launch of WESS (Windows Essential Server Solutions) from Microsoft this week.

WESS consists of two products:

Small Business Server 2008
Essential Business Server 2008

Small Business Server 2008 essentially costs of the same components as the previous 2003 version (with a couple of security additions).  These include:

Windows Server 2008
Exchange Server 2007
Windows Sharepoint Services 3.0
Windows Server Update Services
Forefront Security for Exchange Server
Windows Live One Care

There is also a premium version.  However this requires a second server to be installed & the additional licences will include a second copy of Windows Server 2008 and a copy of SQL Server 2008 Standard.

The Essential Business Server product is aimed at slightly larger organisations (typically in excess of 25 users) and would be configued on multiple servers.

Server 1 (Management Server)
Windows Server 2008
System Centre Essentials 2007
Windows Sharepoint Service 3.0

Server 2 (Messaging)
Windows Server 2008
Exchange Server 2007
Forefront Security for Exchange

Server 3 (Security)
Windows Server 2008
Exchange Server 2007
Forefront Threat Management Gateway

Server 4 - Premium Version Only (Database)
Windows Server 2008
SQL Server Standard 2008
 

Novotronix are pleased to be deploying Small Business Server 2008 to our clients & we will be releasing more information relating to a client in Birmingham shortly.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

PHP vs ASP.NET

The ageless debate has finally caught up with me... which is better? ASP.NET or PHP? I am no expert at PHP buit I have used it a couple of times and familiar with its syntax and features. and honestly in my humble opinion, I think that neither should be pit against the other. They work better in different scenarios. For e.g. for a simple personal website, ASP.NET might be a bit of an overkill, that's not to say it cannot be used. PHP was built from the ground up to be a fast and dirty coding language. ASp.NET on the other hand is more streamlined. For an enterprise environment, I would suggest working with ASP.NET simply because of the robustness offered by IIS/MS SQL/ASP.NET combination over LAMP. Again, this is not to say LAMP cannot be used in these scenarios, but Microsoft provides a lot more support while open source software relies so heavily on the community to provide the support backbone. PHP is unique in the sense that though it does support object oriented programming, it does not force the user into OOP. ASP.NET using C# or VB.NET will force the user from the start to have object oriented design and implementation.  While this might seem like a very good idea, it is usually a hinderance in the simpler projects.  PHP requires no prior declaration of variables unlike C# or VB.NET. These simple ideas make programming in PHP a breeze though not always the most efficient way to code. ASP.NET on the other hand keeps the code clean by adhering to OOP. I personally choose to work with ASP.NET because I honestly am biased towards the .NET framework having been more familiar to it. Microsoft offers a range of products and services which integrate with the .NET framework or are built on top of the .NET framework. This makes it easy for adding functionality by using one of the products ... for e.g using Microsoft Dynamics I can integrate Point of Sale functionality directly into the Web application I am working on. With PHP, this would usually mean searching for a 3rd party product which may or may not be free along with the fact that support for it might be non existent.

So does this mean PHP will soon fade away? The answer is no!! I think PHP is a solid and reliable solution for small scale projects which are constrained by budget. ASP.NET might be a tad bit more complex for some projects but it will always get the job done in the end.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

OpenSource Sharepoint?

I was wondering the other day if it was possible to run Sharepoint on a Linux server. Many clients run Linux based servers just to reduce their initial costs. It would prove beneficial if there was a way to run sharepoint services on linux. I have always been intrigued with the Mono project which tries to implement the .NET framework for Linux. Originally an open source community initiative it was later taken over by Novell who still continue to support its development. Currently Mono supports most command line application API's and supports most of the C# syntax. Winforms however are dependant upon Windows 32 API and it has not been possible to replicate this on Mono. However , GTK# serves a limited replacement for now. I wondered if it was indeed possible to run Sharepoint Services on top of the Mono framework. Considering that ASP.NET is partially supported over Mono, I was half expecting to see sharepoint on Mono. However it turned out to be a dead end. Quite simply because of the same reason as to why Winforms dont work on Mono. Too many calls to Win 32 API.. I have never disliked PInovke more!!

 I further continued my research and realized that there are opensource alternatives to Sharepoint on Linux.

Openfire: Ignite Realtime: Downloads
Ospaces: O3Spaces - The way to extend OpenOffice.org (from sun)
Alfresco: Open Source Enterprise Content Management from Alfresco .

They certainly do not offer the features that MOSS does, but for lowend jobs, they should do the trick.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

A future amongst the clouds?

It is interesting to see how techology seems to evolve exponentially. The Wright brothers first flight in 1903 only lasted a mere 7 seconds and yet in just about 50 years we made our first manned flight into spac. When ENIAC came into existence in 1943 it was the size of two football fields and had the computational capacity which can easily be rivaled by the simplest of calculators today and yet in a little over 60 years, computers have become extremely powerful and extremely small in size. Software development has come a long way from simple structred programs on the 60s to complex n-tier service oriented enterprise level applications. I was musing the other day as to where our future lay... not just as end users but as developers. What is the major technological advancement that is currently making its way out of laboratories around the world? Ironically, I was sitting in my lawn looking at the clear sky (which in itself is an exception) and looking at the clouds drifting by... clouds.

Cloud computing is no longer some experimental concept which is being prototyped in a remote lab under a rock. Cloud computing is today's reality and it is here to stay. But interestingly enough, cloud computing is not a recent discovery as it might seem. The idea of cloud computing was first theorized by John Mcarthy in 1960, when he suggested that one day computing resources might be supplied to households by centralized distributors like other utilies like gas and electric. In more recent years, Amazon has been backing the cloud computing idea since the early 2000.

According to a 2008 paper published by IEEE Internet Computing "Cloud Computing is a paradigm in which information is permanently stored in servers on the Internet and cached temporarily on clients that include desktops, entertainment centers, table computers, notebooks, wall computers, handhelds, sensors, monitors, etc.

Cloud computing is a general concept that incorporates software as a service (SaaS), Web 2.0 and other recent, well-known technology trends, in which the common theme is reliance on the Internet for satisfying the computing needs of the users. For example, Google Apps provides common business applications online that are accessed from a web browser, while the software and data are stored on the servers. Google's Online office applications such as Google Docs and Google Spreadsheet are prime examples of this idea. Considering the ongoing was between Microsoft and Google one would assume Microsoft would not be left far behind in the battle for cloud computing. I did a little searching around and I found something rather interesting: Microsoft intends to make the next version of Office (Office 14) a web based application as well instead of the usual desktop application that its predecessors have been. No doubt google's online apps have helped to shape Microsoft's change in strategy.

I initially assumed that this would undoubtedly be some kind of extension to the existing MOSS. But considering the nature of the apps themselves, to be deployed over the internet will possibly millions of users, this would probably not be the best way to do it. Sharepoint has always been more about web content management than document management. I looked around further and found my answer - Azure

Microsoft's Azure is a cloud computing platform built on top of the .NET 3.5 Framework. The Azure Services Platform uses a specialized version of Windows Server, Windows Azure to run its "fabric layer" — a cluster hosted at Microsoft's datacenters that manages computing and storage resources of the computers and provisions the resources (or a subset of them) to applications running on top of Windows Azure. The platform also includes five services — Live Services, SQL Services, .NET Services, SharePoint Services and Dynamics CRM — which the developers can use to build the applications that will run in the cloud. A client library, in managed code, and associated tools are also provided for developing cloud applications in Visual Studio. Scaling and reliability are controlled by the Azure Fabric Controller so the services and environment don't crash if one of the servers crash within the Microsoft datacenter and provides the management of the user's web application like memory resources and load balancing.

The Azure Services Platform can currently run .NET Framework applications written in C#, while supporting the ASP.NET application framework and associated deployment methods to deploy the applications onto the cloud platform. Two SDKs have been made available for interoperability with the Azure Services Platform: The Java SDK for .NET Services and the Ruby SDK for .NET Services. These enable Java and Ruby developers to integrate with .NET Services.

The good news is that Sharepoint in its current form can be used to consume Azure's Services. This can be done by using out of the box SharePoint functionality like the Data View Web Part or in code using ASMX Web Services or WCF Web Services in a custom web part.

It is quite interesting to see how the future will turn out. Software as a Service is already making breakthroughs and major backers like Amazon, google, Microsoft, IBM , Sun etc are all getting ready to launch their Cloud computing based products in the near future. As sharepoint developers, We should get ourselves acquainted with Azure so that in the furture, we can learn to adapt to this ideology with ease.

 

More Information - http://www.microsoft.com/azure/default.mspx

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Powershell and Sharepoint

For those that haven't yet looked at Powershell, please do. Aside from being an extremely powerful means to interact with SharePoint and control items that are not available from the web UI, it is more than likely that as with Exchange, Powershell will be the means of interacting with SharePoint v.next (as opposed to stsadm)

Some links to interesting resources and example scripts....

http://www.u2u.info/Blogs/karine/Lists/Posts/Post.aspx?ID=9

http://darrinbishop.com/blog/archive/2007/04/08/54.aspx

http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,1665700b-e0de-4b8a-bb1c-014d6fbcf2db.aspx

Powershell download

http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx

Useful Powershell editor

http://www.powergui.org

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

stsadm import failed and some invisible files

I'm working on a migration from SPS 2003 to Moss and as part of the work we are restructuring the portal so that the content is split out into multiple Site Collections. The existing site has one site collection with 45GB of data in it.

Once the site collection is migrated I'm exporting and importing the subsites into new site collections to achieve this, but part way through the import of one site, the import failed and the log files showed: (NB I've shortened the folderpath)

[11/4/2008 7:31:45 AM]: Progress: Importing Folder /Corporate/IT/Document Library/.../foldername_files.
[11/4/2008 7:31:45 AM]: FatalError: Object reference not set to an instance of an object.
   at Microsoft.SharePoint.Deployment.FolderSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
   at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject)
   at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject, DeploymentObject envelope)
   at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream)
   at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream)
   at Microsoft.SharePoint.Deployment.ImportObjectManager.ProcessObject(XmlReader xmlReader)
   at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects()
   at Microsoft.SharePoint.Deployment.SPImport.Run()

Initially I took a look at the folder in the document library referenced on the last line before the error and found that there was nothing in it, which seemed a little odd. It transpired that the users have saved web pages in the folder above which creates a .htm file for the page and a subfolder with the ending _files, and also that although the folder showed no files when accessed via the browser, the web page saved in the folder above it was referencing images in the _files folder. I wondered if it was something to do with the length of the folder path or one of the characters in it, so I tried to rename it, but this gave me the following error message:

Server Error in '/' Application.


You cannot copy or move a thicket file.  To change the file name or create a copy of the file, open the file and save as to a new name.

Some googling led to the following post. It would appear that creating a folder with the ending _files causes SharePoint to think that the folder is a system folder. Some further playing around led to the discovery that if you open the folder in the browser where it shows no files and then select to open the folder with Windows Explorer the contents of the folder are visible. But if you navigate up within Windows Explorer you are then unable to see the folder at all.

Anyhow my solution - delete the folder and run the export and import again. Let's hope it works this time!

Currently rated 4.5 by 2 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

A ‘Whats New’ web part

A recent prototype involved creating a ‘Whats New’ web part. This was required to display a total of the new of recent new content and the latest 5 items.

We had a number of options when creating this, but we chose to build it quickly using SharePoint Designer and the Search web service.

Before we start, a note on the use of SharePoint designer.
There is a lot of debate about when (or even if) this tool should be used, but for me it is a great tool to write xslt and transform web services. It can do a heck of a lot even before you start jumping in and typing xslt. I use it on development servers only and export the created web part. If you want to use designer on your live servers then please research and understand the implications of ghosted / unghosted pages.

OK – our webpart. The key to this prototype is the SharePoint search webservice. In this case, I’m using search.asmx (the MOSS search) rather than spsearch.asmx.

Why use search.asmx?

Our prototype (and many client implementations) are comprised of multiple site collections. Becuse of this, out of the box tools like the Content Query Web Part or 3rd party tools like Jan Tielmans ‘Whats New’ part wouldn’t help us as they only work across the current site collection.
Another thing to note – using search.asmx means we are getting security trimmed results – you are only seeing new items that you have access to.
I’m assuming that readers of this will know and understand how to open pages, add data sources and the basic principles of XSLT
In designer, our first task is to hook onto the search service. It’s accessed via the URL ‘http://<portal>/_vti_bin/search.asmx. For details on the service, look at http://msdn.microsoft.com/en-us/library/ms470518.aspx. We are adding a WebService datasource. Check out http://office.microsoft.com/en-us/sharepointdesigner/HA101171541033.aspx  for details on doing this

Once accessed, we are going to use the QueryEx method. There is a similar Query method that will return an XML formatted result packet, but QueryEx will allow us to work with the resulting dataset inside Designer.

After connecting, we have to pass our search query (the QueryXML property). We can pass a complex SQL (http://msdn.microsoft.com/en-us/library/bb219479.aspx ). In our case, we are going to ask for all content created within the last 7 days.

The query we used was...

<QueryPacket xmlns="urn:Microsoft.Search.Query" Revision ="1000">
<Query domain="QDomain">
<SupportedFormats>
<Format>urn:Microsoft.Search.Response.Document.Document</Format>
</SupportedFormats>
<Context>
<QueryText language ="en-US" type ="MSSQLFT">SELECT Rank, Title, Path, Author, Write, WorkId, Size, Description, SiteName, CollapsingStatus, ContentClass, IsDocument, HitHighlightedSummary, HitHighlightedProperties FROM Scope() WHERE Write > DATEADD(DAY, -7, GETGMTDATE())</QueryText>
</Context>
</Query>
</QueryPacket>

An important note – the QueryXML property is a complete XML string, we can’t just pass the query itself. The string above has been split across multiple lines to adi readability but when entering we have to enter as a single row

Once input, click on the DataView and choose Show Data.


 
If all is well, we should see a dataset result, similar to the screen below. Note – if there is no new content, no results!

Now we have the data, we can quickly build our webpart.
Firstly, click in a webpart zone on the page and add a basic DataView using the fields TITLE, WRITE and DESCRIPTION.
I now changed some properties. I changed the layout to the second option (rather than the default row/column view).

We also changed the sort options to sore by WRITE (so we are showing the latest content in date descending order)

Parameters

I added some parameters to make adding to other servers slightly easier. These were for More Details link, images path, maximum number of items etc as seen below

Showing the number of new items...
In the <xsl:template name="dvt_1"> template, I added a new row and inside the row put the following....

<tr>
<td valign="middle">
<div class="wpTitleZone" style="width:236px; height:35px;   background-color:#ccc; background-image: url({$ImagePath}/blueTitle1.gif); background-repeat: repeat-x">
<a class="TitleZone" href="{$MoreDetailsLink}">
<div class="TitleZone" style="width:236px; height:35px;   text-align: center; line-height:35px;  cursor: hand; background-image: url({$ImagePath}/iconBlue1News.gif); background-repeat: no-repeat; background-position: left center;">
<xsl:value-of select="$TitleText"/>
</div>
</a>
</div>
 </td>
</tr>

Showing Icons

The next change was to include the icons to represent the type of content. These icons are those used in standard search results.
Inside the <xsl:template name="dvt_1.rowview"> template, we added the following....(extract only)

<xsl:choose>
<xsl:when test="CONTENTCLASS = 'STS_Site'">
 <img>
   <xsl:attribute name="src">
   _layouts/images/<xsl:value-of select="CONTENTCLASS"/>16.gif
  </xsl:attribute>
  </img>
 </xsl:when>
<xsl:when test="CONTENTCLASS = 'STS_Web'">
<img>
<xsl:attribute name="src">
_layouts/images/<xsl:value-of select="CONTENTCLASS"/>16.gif
</xsl:attribute>
</img>
</xsl:when>
<xsl:when test="CONTENTCLASS = 'STS_Document'">
<img src="_layouts/images/html16.gif"></img>
</xsl:when>
<xsl:when test="contains(CONTENTCLASS,'ListItem')">
<img>
<xsl:attribute name="src">
_layouts/images/<xsl:value-of select="substring(CONTENTCLASS,1,12)"/>16.gif
</xsl:attribute>
</img>
</xsl:when>
<xsl:when test="contains(CONTENTCLASS,'_List_')">
<img>
<xsl:attribute name="src">
_layouts/images/<xsl:value-of select="CONTENTCLASS"/>16.gif
</xsl:attribute>
</img>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="displayTitle" select="substring-after(CONTENTCLASS,'_')"/>
<img>
<xsl:attribute name="src">
_layouts/images/<xsl:value-of select="CONTENTCLASS"/>16.gif
</xsl:attribute>
</img>
</xsl:otherwise>
</xsl:choose>


From this you should see that we are interrogating the CONTENTCLASS property and mapping an image to it. Again, this is similar to search and fortunately, there are a lot of icons that map direct to the CONTENTCLASS

Formatting the title and update date

We format the title as a link. This is a simple xslt in the format of

<a href="{$MoreDetailsLink }"><xsl:value-of select="TITLE" /></a>

 we are using the $MoreDetailsLink parameter for the URL and the Title for the display text.
For the date, we are applying the DD-MMM-YY hh:mm format using

<xsl:value-of select="ddwrt:FormatDateTime(string(WRITE) ,1033 ,'dd-MMM-yy hh:mm tt')"/>

For both of the above, you can get Designer to do this for you. Right click the text you want to format and then you can choose the format options –e.g. hyperlink, datetime etc.

We set the properties of the DataView web part to set the maximum number of items to 5, then in the opening of the XSLT we set

<xsl:variable name="RowLimit" select="$NumberOfItems" />

you can see we are setting the maximum number of items to a parameter value. We do this so that we only need to modify parameters in the Web UI rather than asking administrators to open the XSLT in future.

Finally, in the template, we added another row to link to a more details page.

<tr>
<td class="ms-vb">
<a href={$MoreDetailsLink}>See All New Items...</a>
</td>
</tr>

This is our prototype linked to a page that contained as similar web part, but was showing all results and had pagination etc.

You can download a version of the prototype web part here. As always, be aware that this is a prototype and the normal disclaimers apply (e.g. make sure this web part goes through a code review before putting onto a production server).

 

Whats_New.zip (3.65 kb)

Currently rated 4.0 by 3 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

 

Dilbert of the day