Posts Tagged ‘Development’
Wednesday, November 12th, 2008



At long last Microsoft have announced publically the excellent SPDisposeCheck tool.   This tool will examine your IL level components and report any possible areas where you may have the potential for a leak due to objects not being disposed of correctly.   The output from the tool does require a deep understanding of the way objects are disposed of as there is the potential for false positives.

For more information check out the SharePoint Team Blog even if you can’t get the tool just yet, its coming soon, the referenced posts are a must read for all SharePoint developers.

Wednesday, July 16th, 2008



Adam Buenz is a scarily clever guy;  if your into improving your development approach and work with SharePoint you have to spare a few minutes to read and digest this.

Quote:

The point I am trying to drive home is implementing an SDLC is not a nice-to-have thing on any SharePoint project, it is required. And while this may be the case, it does not discount the tried and true project metric harvesting methods that have been around since the dawn of man. While producing of client deliverables is always the focus, generating valid project metrics can both help to manage your project better, as well as make sure that iteration problems that you have in one project, don’t get repeated on another.

The Degradation of Empirical Software Development Management Techniques

Friday, December 7th, 2007



This is the first of two posts covering how you can provide Federated Search to web sites that do not support the OpenSearch requirements of Search Server 2008.

Part 1. How to federate to a site that does not support a url based search?

This one is simple,  just make use of a search provider that does and use it as an intermediary to your required source.  In this example I will use Live.com to provide federated search to my web site www.21apps.com.

Step 1.  Export the Live.com FLD

MSSX comes with a FLD for Live.com out of the box,  we are going to use this as the basis for our FLD file.   From the Federated Locations page select Export from the Live.com item and save the file to your local drive.

Export FLD

Step 2.  Edit the FLD file to change the Internal name

Open the FLD file in notepad or other XML editor and change the Internal Name from Live to the domain you are federating to, in my case 21apps.com.  You could also make the other changes directly in the XML.

Edit FLD

Step 3. Upload the FLD and Edit the Location setting

From the Federated Locations page choose Import Location and select the file you edited in step 2.  After uploading click Edit Locations and change the following fields

Field Value
Display Name <your domain> i.e. 21apps.comEdit Display Name
Query Template Expand the Location Information section and change the Query Template
 
http://search.live.com/results.aspx?q={searchTerms}&format=rss&count={itemsPerPage}&first={startItem}&FORM=SHAREF

tohttp://search.live.com/results.aspx?q=site%3Awww.21apps.com+{searchTerms}&format=rss&count={itemsPerPage}&first={startItem}&FORM=SHAREF

where www.21apps.com is your domain

“More Results” Link Template Make a similar change to the More Results Link Templatehttp://search.live.com/results.aspx?q={searchTerms}&first=
{startItem}&FORM=SHAREM

to

http://search.live.com/results.aspx?q=site%3Awww.21apps.com+{searchTerms}&first={startItem}&FORM=SHAREM

 

 

Edit links

Click OK and the new Location should be listed and available to use.

Step 4.  Test it!

Navigate to your Search Centre and search for something to take you to the Results page.

Edit the page and select your new Location.

Set FLD

And that’s it,  Federated Search to www.21apps.com.   :)

21apps.com federated

In part 2 I will look at Federated search to a well known search engine that does not return it’s results in a nice friendly XML format.

Tuesday, June 19th, 2007



I posted recently on how Soapbox was reporting my uploaded videos as “Copyright Violation”.   Well someone was listening or they have improved things as it’s now available for all to enjoy,  if you didn’t watch the YouTube one that is :) or want to view with more clarity (Soapbox beats YouTube on this front hands down.


Video: InfoPath form in a WebPart

Saturday, June 16th, 2007



This demo shows how to enable the InfoPath Form Viewer WebPart and configure it to show your InfoPath forms.

This is the second part of my presentation at the SharePoint User Group UK meeting in Telford.

The presentation covers

  • Adding InfoPath form view as a safe control
  • Enabling the web part in the site collection gallery
  • Adding the web part
  • Useful tip when it errors with a ‘Form Closed’ display
  • Setting the web part properties, and an easy way to find the information

The safe control information referred to in the presentation.

<!– Info Path Demo –>
<SafeControl Assembly=”Microsoft.Office.InfoPath.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.Office.InfoPath.Server.Controls” TypeName=”XmlFormView” Safe=”True”/>

Monday, May 28th, 2007



Many of you WSS V2 developers will have come across the “1#;Some text” value that lookup fields return. Some of you will have added code to you own utility classes to parse them to give the ID and Field values. In WSS V3 it gets much easier out of the box with the introduction of the SPFieldLookupValue object which will provide the LookupId and LookupValue fields for you.

SPListItem task = SPContext.Current.ListItem;
SPFieldLookupValue lookup = new SPFieldLookupValue((string)task["FIELD NAME"]);
int id = lookup.LookupId;
string value = lookup.LookupValue;

This class SPFieldUserValue is also provided making it easy to get to the User information from User fields liked Created or Modified.

Saturday, May 26th, 2007



It is always good to read little tips and tricks that help make things easier. Today I read two

Configuring IntelliSense with CAML Files When Developing for Windows SharePoint Services 3.0 - by Ted Pattison on MSDN, IntelliSense is so cool!

When developing for Windows SharePoint Services 3.0, you are often required
to create and modify XML files that contain Collaborative Application Markup
Language (CAML). It is recommended that you configure Microsoft Visual Studio on
your development workstation to reference a XML schema file named WSS.XSD so
that IntelliSense works properly when working with CAML-based files.

and Spencer Harbar posted about the new SnagIt addin for Visual Studio Team Edition

Use this new SnagIt output to quickly create images to describe and show
tasks, bugs or design ideas. It’s a quick way to add screenshots to bug reports
with the click of a button. And, it eliminates the hassle of attaching an
image.
http://www.techsmith.com/community/blogcomments.asp?thread=356

Saturday, April 14th, 2007



Spender Harber posted a recent article “Test Driven” SharePoint Development

…a first stab at providing some guidance for those looking to implement SDL approaches to SharePoint, and a call to action for the developer community to adopt “Test Driven” SharePoint development.

I’m in, anyone else?

Tuesday, April 10th, 2007



I am really excited to be working with some recent but very deserving Microsoft MVPs in the form of Ishai Sagi and Liam Cleary on the SharePoint Nested Tasks project.

Ishai has confirmed that Lawrence Liu has asked that the solution is merged with the SharePoint Community Kit, which will help to spread the good work being planned.

This will also be the first project I have worked on with true round the clock coding oppotunities with Ishai in Australia, Liam and I in the UK and others around the globe (sorry project just starting so haven’t had chance to talk to the other team members yet). Hope to meet up with Liam in person as he is presenting at the SUGUK meeting tomorrow night in Manchester.

Sunday, December 10th, 2006



..continued from part 3

Section 9 Playtime – Page 139

The last task is to add a link to each item and remove it from the cart. It is suggested that you do this in a non-Ajax way first and then add the Ajax and the example on http://wiki.pragprog.com/cgi-bin/wiki.cgi/PT-D-4 covers this in detail however I found the following problems.

Not working in JavaScript disabled browser

<td>

<%= link_to_remote “remove”, :url => { :action => :remove_from_cart , :id => cart_item.product} %>

</td>

This line renders the link as an onclick event which will not work if javascript is disabled. This may be a bug in my version of Ruby on Rails where the href=”#” should render the link if javascript is disabled.

<a href=”#” onclick=”new Ajax.Request(’/store/remove_from_cart/2′, {asynchronous:true, evalScripts:true}); return false;”>remove</a>

To resolve this issue I replaced this with

<% form_remote_tag :url => {:action => :remove_from_cart, :id => cart_item.product } do %>

    <%= submit_tag “remove” %>

<% end %>

This produces a form similar to the ones used for the Index.rhtml

If using JavaScript the redirect_to_index will not work, this is because the form_remote_tag (or link_remote_tag) enable XHR request which will not force a redirect of the main browser. This should be written as form_tag (or link_tag) to work without Ajax and updated to use remote once the remove_from_cart.rjs has been created. Generally you will tend to write this in the finished format now that you know how the remote calls work.