JQuery within SharePoint

We have started to do a lot of work with JQuery to simplify the development process. For those that have not come across JQuery before, it is  " a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript ". The ability to select multiple items on a page with a single line of script is great. For deployment, the library is simply a single  .js file that needs to be put onto the server and referenced on a page.

Aside from the core JQuery library, there are hundreds of plugins (additional script files) such as JQuery UI.

As a starting point, look at Jan Tielens article.

One of the exciting things for me about using this technology is the ability to use on hosted, or shared SharePoint servers (where as a developer you cannot add .dll files, features or solutions). To implement jQuery on a page in this scenario, we could upoad the library (jquery-1.3.2.js) into a document library, add a Content Editor Webpart onto a page then edit the webpart to reference the file and start using it. Imagine, with a Content Editor Web Part and a few script libraries, we could implement a tabbed style webpart, loading data from our lists :)

I'm planning on putting a short series of JQuery articles and links here over the coming weeks

Be the first to rate this post

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

Relational data in SharePoint with SLAM!

Often with the applications we build on sharepoint it would be much easier to analyse the data if we could do a straightforward SQL join between two lists, just as you would with two tables in SQL, but, alas, this is not catered for out of the box. I have managed to do it with a DVWP and data sources in SharePoint Designer but this was only really useful on simple and small amounts of data. So I was quite ecited by this project I have stumbled across on CodePlex yesterday - SLAM. It looks to take the list data in sharepoint and copy it out to SQL so that you can then run standard SQL queries against it. There seems to be some management built in as well, so very promising. I haven't had a chance to try it out yet, but will certainly give it a go next time we need to do some reporting on SharePoint list data.

Quote from their site:

Most developers who have used SharePoint as an application development framework have run into the realization that SharePoint is NOT a relational database. In fact, the accepted wisdom is if you need relational tables, use ASP.NET/SQL straight-up, not SharePoint.

Enter SharePoint List Association Manager (SLAM). In short it allows you to define relationships (one to one, one to many, many to many) between SharePoint lists (or Content Types) and then leverage those relationships in webparts or custom field types using familiar and straight forward SQL queries
.

Find it on Codeplex at http://www.codeplex.com/SLAM.

Currently rated 5.0 by 1 people

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

CTP of Visual Studio 2008 extensions for SharePoint v1.3

Over on the Microsoft SharePoint Team Blog they've just announced the CTP for the next version of Visual Studio extensions for SharePoint (VSeWSS). This will give us a updated set of toys, sorry tools, to play with and see how they stack up against what we are using.

[From their blog] The new features in VSeWSS 1.3 are:

· Can be installed on x64 Server OS machines running SharePoint x64. Previously only x86 Server OS could be used.

· Separate build commands for package, deploy and retract are added

· Command line build, package and retract commands are included enabling continuous integration and build servers. Previously command line build of SharePoint projects was very difficult

· Refactoring support for renaming of Web Parts. Previously renaming a web part required changes in several files in the project

· WSP View improvements for consistency of deleting feature elements, merging features and adding event receivers to features

· Solution Generator can now generate solutions from publishing sites. Previously only regular sites could be generated

· Allowing partial trust BIN deployments of web parts. CAS configuration must still be provided by the developer.

· New project item template for SharePoint RootFiles items

· Deployment will now optionally remove conflicting existing features on the development server prior to redeployment. Previously any feature name conflicts would result in an error

· Ancillary assemblies such as for business logic can now be added to the SharePoint Solution WSP

· Hidden features related to Site Definition projects are now shown in WSP View. They are no longer hidden

· For advanced users a fast deploy is included to update only the compiled assembly on the SharePoint development installation

· The User Guide is now installed with the extensions instead of being a separate download

The final release of VSeWSS 1.3 is planned for the North American Spring of 2009.

Be the first to rate this post

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

Best Practises....Or Not?

Adam has a good thought provoking article on Best Practises.  This is something I certainly agree with and have for a long time - whilst a 'best practise' may be the theoretical or purist approach, it is not always the most viable

Happy Holidays

Be the first to rate this post

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

Sharepoint and Cloud Computing - thoughts on development

A quick link to Joel who has posted a good article on thoughts for the future - how we should look at development.

Funnily, this sits well with some of things we are starting to do - using xsl, in-built (or sometimes custom) web services to provide the interfaces to provide functinality rather than dll based web parts

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

Sharepoint Podcasts

I travel by train  to the office regularly now. Although this sometimes takes longer than driving, it is more consistent and it gives a couple of hours a day where I can do some reading without interuption (plus I feel I'm doing my bit for the planet! :) )

This will seem geeky, but I get fed up listening to CD's or the radio (though Classic FM is a great soother) and have recently started getting the SharePoint podcasts. personally I find the podcasts easier than webcasts (perhaps because I don't have the distraction of the PC?). You can download the mp3's or find them via iTunes

These are hosted by our friends at Lightning and have some great content for developers and administrators.

Be the first to rate this post

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

Automating the staging server with Hyper-V

We have recently rebuilt our entire development envirnonment and put a lot of shiny new PC's and server. Essentially, we are now working in a complete virtual environment, where our personal development servers, desktops, staging servers etc are all Virtual. Our physical PC's now run Server 2008 and Hyper-V

For those that don't know, Hyper-V is the next generation of Virtual Server and in the development environment give us great control over the server - my favourite being able to take a snapshot of a server at a given point in time, have a tree of these snapshots and being able to merge parts of the tree, or indeed all back into a single virtual disk. These snapshots can be taken at any time - an example being, if I was to install software, snapshot just before the install. If the install fails, revert back to the snapshot.

I'm hoping that Iain will blog about this in more detail very soon (not to Iain - publish these soon! Wink )

As part of our development process, we need to ensure that the staging servers are clean each time we deploy our code and features. To ensure this, we look to get some scripts to automtically turn off the virtual staging servers, scrap the disks and revert to a known good point (those who know the daily build process will be familiar with this). Rather than start from scratch, Taylor from the MS Hyper-V team has some startpoint scripts

Be the first to rate this post

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

Developing for WSS outside of the server

One of the main complaints (?) of developers is that they have to undertake Sharepoint development inside of a virtual machine, or on a server. Personally, I don't find this a problem as long as you are not working against a live server!. Our new development environment (that I'm sure Iain will blog about) is almost entirely virtual, development, staging and test.

Although not supported by Microsoft, there are a few options to get around this....

a) Install WSS on Vista

Yes it can be done (although I haven't personally tried it yet) and the guys at Bamboo have posted an article on this

b) Install the various assemblies, XSD files onto the client PC as noted here (this is the route I've taken with the laptop so that I dont have to always work inside Virtual Machines)

The downside of both of these is that debugging gets more difficult - you will have to configure remote debugging on the server, plus some of the tools (such as WSS extensions) won't install or run correctly

 

Currently rated 2.0 by 1 people

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

Text Editors

I'm in the process of rebuilding my laptop (Lenovo T60) and our new development machines. As part of the build, I've been looking at a replacement editor for our old friend, notepad. We have historically used notepad as the lightweight text editor to modfy files such as xml, web.config, .webpart or even xsl in the past, but while notepad has its uses, it also has the huge limitations (e.g line numbering, tabs, colour formatting) etc.

I've chosen Notepad++ and have to say I'm pretty impressed. It is prett lightweight, has all of the above features, plus more. Some of the key highlights I'd point out...

Colour formatting - you can choose the language (e.g. development language not locale) and have colour formatting.

So if we are editing SQL we get...

[code:tsql]

SELECT CISF_CLINICAL_SERVICES.Clinical_System_Code, CISF_CLINICAL_SERVICES.ABC_ServicePlan_Code,CISF_CLINICAL_SYSTEM.Clinical_Name
FROM CISF_CLINICAL_SERVICES
INNER JOIN CISF_CLINICAL_SYSTEM
ON CISF_CLINICAL_SERVICES.Clinical_System_Code = CISF_CLINICAL_SYSTEM.Clinical_System_Code
WHERE CISF_CLINICAL_SERVICES.Team_Code = '1'

[/code]

If c# we get...

[code:c#]

 public DataSet GetWSSFilesFromFolder(string WebName, string FolderURL, string MetaData)
        {
            bool metaData = Convert.ToBoolean(MetaData);
            //assumes that the  SPSite URL is defined in web.config
            string spSiteUrl = ConfigurationManager.AppSettings["Novotronix.WSS.DocumentService.SPSiteUrl"];
  } 

[/code]

The application also has a number of add-ins available, a great one being able to compare two files. This is great when looking at differences in suorce code from Source Safe

For me, the syntax highlighting saves having to load Visual Studio to get legible code if you just want to view / copy etc.

An alternative could TextPad (which Dave would prefer :) )

 

Be the first to rate this post

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

 

Dilbert of the day