Oct
29
SharePoint Site Template for jQuery and Scripting Resources – v01
Original Publication Date: Thursday, October 29, 2009
SharePoint User Level: Power User
I’m finishing my first draft for creating a SharePoint site template for jQuery and various supporting scripting resources. I’m looking for input from those of you developing jQuery solutions embedded in Content Editor Web Parts in SharePoint. Take a look at the diagram and let me know if anything essential is missing.
Please keep in mind this is the first draft and I’m looking for essential chunks that MOST jQuery solutions are using. It’s not supposed to be comprehensive… yet.
Thanks in advance. — Mark

You might want to store the .js files with a version-free name; something like jquery.SPServices-latest.min.js and then have a TXT file or something which keeps track of what the versions actually are.
I find that even I am having a problem managing the versions where I reference them, and by referencing the library rather than the version of the library, I think I’m better off. I’m not fully enamored with this approach I’m suggesting, either, but I think it’s better.
Wondering how you can fit this in with Jan Tielen’s SmartPart stuff.
M.
Marc – Completely in agreement on the versioning issue. Will change the name so that any scripts pointing to the resource will find the latest version. Thanks. — Mark
jscharts would be another popular addition, http://www.jscharts.com/. I echo the naming thing, I always strip the versions off and just keep it jquery.js. I’d lean towards a metadata column for the version number. You could even turn on versioning so you could roll back if needed.
Rounded corners is another popular jQuery extension. Don’t know how deep you are looking to go. But as a shell, this is looking nice.
Just to throw it out there, I’ve recently been doing some testing with Visifire and am very impressed with their Silverlight charting capability. May want to check it out.
http://visifire.com/
I used in a “just for concept” site jqzoom but what I really want is an “accordion” or “slide down”. Often need to have info on the home page but need to be able to use less space. So a slide down or expand would be great. And it’s not THAT far to Christmas so could I post multiples … And expand that when you click on the next one, the previous one would go back to the original few lines.
Many thanks for your work!
Mark, How about adding in some stock KPI images into the Images library. The folk currently running WSS won’t have access to the traffic light images which ship with MOSS.
Eric – I’ll take a quick look at jcharts for inclusion. At first glance, they want to charge $149.00 for me to include it in the template.
idosp – Those are specific solutions being asked for. The purpose of the template is to provide you with all the resources needed in order to implement your own solutions. I will be providing solutions in other templates.
Dave – Nice idea. I’ll do that. By the way, Peter Allen has a comprehensive list of all the default SharePoint icons (WSS and MOSS) on his site. Very useful.
http://www.bitsofsharepoint.com/ExamplePoint/Site/SharePointLayoutImages.aspx
Marc and Mark – one needs to be careful with the versioning issue (and btw I wonder how SharePoint 2010 is going to address this).
Lots of useful plugins are developed by individuals for a specific version of jQuery, and may break in the next version – I have experienced this several times. I think the right approach would be to keep both versioned and version-free names (just like Google does).
Someone pointed out to me that we can use the metadata in the Document Library to maintain version information. (Now why didn’t I think of that???) That way, we can store multiple versions in the Document Library, but just use the chosen one. Maybe Jan Tielens’ SmartTools jQueryLoader will be able to help with this at some point, but right now it doesn’t look like it manages versions.
All in all, this as the likelihood of creating an unholy mess due to dependencies, etc.
M.
Mark,
Here are a few suggestions:
- Compliment jquery-ui with a nice .css file (jquery-ui-1.7.1.redmond.css) for modal dialog etc.
- Include jquery.debugger.js and firebug-lite.js to aid developing.
- And my latest favorite, jPointLoader.js. This will load jPoint-[version]-[compression].js where the user can change the variables in the file from their default of var version=”latest”, var compression=”expanded”. You can grab this write less, share more script from http://jPoint.codeplex.com.
Thanks for your great effort.
Are you creating a site template? Or a site definition?
STP vs ONET?
or 2010: WSP vs ONET?
I hear these terms used interchangably. I just want to be clear on the message.
Thanks
Brian,
Neither. I am creating a desktop app that will let you point at your SharePoint environement and build the jQuery resources site where ever you want it. Planning on rolling it out at the end of this week.
Mark
Hi Mark….thought I would check and see what the latest status is on this.
Cheers
Lee – Coming along well. I’m going to move it into my public MOSS site at fpWeb and make it “Read only” so people can examine it and possibly even point to the resources if they need it.
The goal is to fire test it, then make it available for people building jQuery solutions in SharePoint.
Mark
Mark,
Great presentation at SharePoint Saturday.
Being a not full time coder. I can understand the reason behind a version free naming covnention.
I would however keep the version names for coding in CEWP.
Lets say you create a CEWP and have the version JS of js.1.2-min.js. You do several upgrades and can still reference js.1.2-min.js.
If you shorten the names and during an upgrade things break, how do you know what the last version the js worked with?
Also if you have some cool older js scripts that are deprecated for an upgrade, you could always reference the oler version
Harold – Glad you enjoyed the SPS Philly presentation. I’m re-working those based upon the response received. I didn’t realize people would be so excited about the solutions.
Yes, I am going to keep the various versions available in the resources center. That makes sense when trying to be backwards compatible.
Regards,
Mark