SharePoint on SSD, or should that be steroids?

I came across a blog post  today by Christophe Fiessinger, he outlines a performance comparison between running SharePoint VMs on a Seagate Momentus 7200.3 and a Samsung SSD SATA 3.0Gb/s (Solid State Drive). The warm up time for the web applications were between 2 and 10 times quicker, now that's a lot of wasted time cut out from a developer's day or waiting in a demo situation.

Then, I also spotted the following from Doug McCutcheon with a video clip on youtube and links to discounted Dell laptops for demoing. Looks good, hopefully they'll make the deals available in the UK too.

Be the first to rate this post

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

Visual Studio 2008 Source Safe Integration

This post is more an aide memoir to myself as I regularly re-apply an image to my laptop.

Often, in Visual Studio, we need to open projects from Source Safe, which can be done by chooing File > Open > Project, then clicking Source Safe in the favourite folders.

But on my laptop (Server 2008 64bit) when trying the above, I couldn't see the sourcesafe project list - the window was empty, similar to the screen shot below.

The resolution was to download a hotfix from Microsoft (see this http://support.microsoft.com/?kbid=939808 for detail) Once downloaded, install thehotfix, then I had to run the following:

regsvr32 "c:\Program Files (x86)\Microsoft Visual SourceSafe\tdnamespaceextension.dll"

For 32 bit systems, you may have to run

regsvr32 "c:\Program Files\Microsoft Visual SourceSafe\tdnamespaceextension.dll"

Once Visual Studio was re-started, eveything was better and we could browse the Source Safe databases

Be the first to rate this post

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

JQuery - Getting data from a SharePoint List

As part of the series of articles, we will look at retrieving some data from SharePoint.

For this example, we will look at getting data from a list, in this case a simple Announcements list, and put the data from that list into a web part on a page. (I appreciate that this could be done several other ways, but it will serve the purpose on this example)

Before doing any custom script, we will need to make a reference to the core JQuery script files. If you have access to the server, you can put the files into a convenient folder in the LAYOUTS directory, or you could upload into a document library.


To start, we will put a Content Editor Web Part onto a page. Once added, we will now add the following..

<script src=”/_layouts/examplescripts/jquery-1.3.2.js></script>
<script language = “javascript”>
</script>
<a href="#" onclick="GetAnnouncementData()">Test</a>
<ul id="AnnouncementData"></ul>



In the above, we have a reference to the jQuery library, a script container, a link to enable us to manually test and an empty ul. (Note – don’t try clicking the link yet – we haven’t defined any functions)


The jQuery library can be downloaded from here.


Our Announcements list will contain the default Title Body and Expires columns. We will use the lists.asmx web service to retrieve data from our list, that we can then display.


To start, we will add a new function into the Content Editor part, which we will call GetAnnouncementData. The first part of the function will define  the SOAP packet that gets passed to the lists.asmx service. (For full details of the options available, the details are available on MSDN
Our packet is as follows. We have defined the list name and the fields to retrieve

<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
   <soapenv:Body>
    <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>
     <listName>Announcements</listName>
     <viewFields>
      <ViewFields>
        <FieldRef Name='Title' />
        <FieldRef Name='Body' /> 
        <FieldRef Name='Expires' />
      </ViewFields>
     </viewFields>
    </GetListItems>
   </soapenv:Body>
  </soapenv:Envelope>

Note that the bold item above is where we are defining which method form lists.asmx to use

So now our script will look as per below.

Next, we will connect to the web service. JQuery has built in functions to provide this. We will add the following to our function...

jQuery.ajax({
  url: "http://mossgj/devsite/jquery/_vti_bin/lists.asmx",
  type: "POST",
  dataType: "xml",
  data: soapPacket,
  complete: processResult,
  contentType: "text/xml; charset=\"utf-8\""
 });

You can see from the above that we are referencing the lists.asmx web service. (you will need to change the URL to your server).

The  data: soapPacket is instructing the function to pass our packet to the web service.
The complete: processResult tells the function to call another javascript function and process the data returned.

Our script will now look as below


(Note that if you try to run the script at this point, it will fail as we haven’t yet defined the processResult function)

Now we can add the function to process the result. Above our closing script tag, we will add a new function...

function processResult(xData, status) {
  alert(xData.responseText);
}

This is going to read the data returned and show a message box with the complete package. If you save and close, then click you test link, you should get a message box with the complete returned data, similar to the following

Now we will read individual rows. Into the processResult function, add the following...

jQuery(xData.responseXML).find("z\\:row").each(function() {
alert($(this).attr("ows_Title"));
});

This will read each row returned and call a local function. The function will read the ows_Title attribute and get the data. After clicking our test link, we should now see a second message box with the announcement title.

Next, we are going to remove the alerts and ask jQuery to add heading to our empty ul for each announcement. Replace the alert($(this).attr("ows_Title")); for the following...

$("<li>" + $(this).attr("ows_Title") + "</li>").appendTo("#AnnouncementData");

This line is asking jQuery to append an <li> item for each row. The function is building the html and appending it to the item with an id of AnnouncementData.

The part of the function $(this) is referencing the current row returned. The .att(“ows_Title”) is reading the value of the Title field (note that the lists.asmx web service prefixes the field with ows_). Finally, the .appendTo is asking jQuery to append the html to an element with an id of AnnouncementData (see jquery selectors for detailed instructions on how to select items by title, class or id)

If you now click your test link, you should see the list item appear.

Finally, we are going to ask jQuery to do all of the above automatically, as soon as the page is ready. Just above our closing script tag we will add the following...

$(document).ready( function(){
GetAnnouncementData();
});

This jQuery function tell the page to run our GetAnnouncementData function as soon as the page is ready. After saving our content editor web part, we should now see a list of all of our announcement titles.

Obviously this is a relatively simple example. The next post will expand upon this and show how we can return a subset of data and make the things more dynamic.

Completed Content Editor Web Part source

<script src="/_layouts/novotronix/jquery/jquery-1.3.2.js"></script>
<script language = "javascript">
function GetAnnouncementData()
{
var soapPacket = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
   <soapenv:Body> \
    <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
     <listName>Announcements</listName> \
     <viewFields> \
      <ViewFields> \
 <FieldRef Name='Title' /> \
 <FieldRef Name='Body' /> \
 <FieldRef Name='Expires' /> \
      </ViewFields> \
     </viewFields> \
    </GetListItems> \
   </soapenv:Body> \
  </soapenv:Envelope>"
;
jQuery.ajax({
  url: "http://mossgj/devsite/jquery/_vti_bin/lists.asmx",
  type: "POST",
  dataType: "xml",
  data: soapPacket,
  complete: processResult,
  contentType: "text/xml; charset=\"utf-8\""
 });
}


function processResult(xData, status) {
 jQuery(xData.responseXML).find("z\\:row").each(function() {
$("<li>" + $(this).attr("ows_Title") + "</li>").appendTo("#AnnouncementData");
});
}


$(document).ready( function(){
GetAnnouncementData();
});


</script>
<a href="#" onclick="GetAnnouncementData()">Test</a>
<ul id="AnnouncementData"></ul>

Currently rated 4.0 by 3 people

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

Introducing Andrew

I'd like to introduce Andrew to you all and welcome him to our team. Andrew has joined us in a creative role, driving our design and content offerings. Hopefully you should see the start of Andrews posts here soon.

Welcome!

Be the first to rate this post

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

Infopath 2010 Part 2 (Cascading Dropdowns in Browser Based Forms)

One of my bug bears with Infopath 2007 was that in order to achieve cascading dropdowns of data within a browser based form this had to be achieved using code behind.Thankfully this is a new improved feature in 2010.As an example I have setup a Sharepoint list (see below) which contains a column called Customer and a column called Contact.  You will see that 3 contacts belong to customer A.

        

In my Infopath form (below) I have added a dropdown column which is bound to the customer column in the SharePoint list.  In this example I have selected Customer A.  The second dropdown for contacts pulls back the data from the contact field in the Sharepoint list but is filtered by the chosen company.Previously this wasn’t a supported feature in browser based forms.

Back to other Controls & Rule management next...

Currently rated 5.0 by 1 people

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

Infopath 2010 part 1 (Infopath 2010 designing a basic form)

As previously promised I'm starting a series of blogs relating to the use of Infopath 2010.  Since the introduction of browser based Infopath forms to compliment the client version this is an application that we're getting more and more requests for.  For those used to using Infopath 2003 or 2007 I will try to focus on the new additional features that the 2010 version delivers.

The first thing to note is that there are now 2 client applications in Infopath 2010.  There is Infopath Designer 2010 and Infopath Editor 2010.  The names are pretty self explanatory - one app is used to design forms and the other is for users to fill in forms (I'm yet to look into whether these apps are seperately licensed).  My focus initially will be around the Infopath Designer app.

As per Infopath 2007 when you first launch the designer you have a selection of form templates to select from (see below)

 

 

 

 

 

 

 

 

 

 

 

 

However, there is also a new feature which allows you to build the form using pre-defined Page Layouts and Section Layouts (see below).  This will certainly speed up the building at least of fairly standard forms.You will also notice the now standard Office ribbon menu has now been adopted for Infopath JPart 2 to follow shortly will explain more about the new controls that are available and the improved management of data rules. 

 

Currently rated 5.0 by 1 people

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

 

Dilbert of the day