Tag Archives: CPT

Questions from my CPT Webinar

I delivered my installment in the Critical Path Training 2012 Webinar Series last week covering JavaScript for SharePoint developers.  Overall I think the session went pretty well.  If you missed it, the recording is available here: Watch the recording.  The only real problem was that, as usual, I had WAY too much material to cover in the 45 or minutes allotted.  As a result, I didn’t get the chance to answer any of the questions that the attendees asked during the session, so here are the questions and answers:

Q: Do you recommend minimizing your js files?

A: Absolutely!  Minimizing and compressing your JavaScript files is an easy way to improve the performance of your site.  In addition, wherever possible, try to  minimize the number of individual script files that need to be downloaded.  Less HTTP requests means better performance.

Q: Is this a sandbox solution?

A: (I’m assuming the question is about the CKS:ScriptLibrary solution I demonstrated).  Yes.  The CKS:Script Library is fully sandbox-compatible.

Q: Is SOD (Script On-Demand) available in sandbox solution?

A: Yes.  The only related thing that is not is the ScriptLink control.

Q: Does the usage of javascript extend to jquery?

A: JQuery IS JavaScript, so yes.  As I said in the session – there is technically no such thing as “writing JQuery.”  You use the JQuery library to make it easier to write JavaScript.

Q: SP in the first line…SP.ExceptionHandlingScope that is in what library?

A: SP.Runtime.JS

Q: What other method of loading JS files is there besides Visual Studio solutions if you don’t want to use CEWP…?

A: A VS Solution is really the best method of getting the .js files placed on the server.  My (distant) second choice would be manually loading them into the script library manually via the browser.  The (evil) CEWP comes into play when you’re talking about referencing script files on a given page.  At that point, I would recommend a Custom Action, editing your Master Page, adding it via a web part, or just about any means except using the CEWP.

Q: Where would you recommend for us to learn & deep dive into these advanced javascript language & concepts you are talking about – learning resource? approach? so we can pickup these professional js skills easier?

A: There is a wealth of JavaScript information available on the Internet.  A simple search will turn up quite a lot of good resources.  My somewhat self-serving answer would also be to keep an eye on this blog.  I’ll be covering a lot more material over the next couple of weeks.

For those of you who caught the release of the SharePoint “15” Preview earlier today, this JavaScript stuff only gets more important in the next version of SharePoint, so it would behoove us all to come up to speed on it as quickly as we can.  I hope I can help with that…



PS: If you’re looking for SharePoint 2010 developer training, I’ll be teaching the CPT 2010 developer course as a webcast on September 10th.  More information is available here: WC-SPT2010 – Developing Solutions with SharePoint 2010 Webcast