Everything SharePoint and XAML

My continuous learning of SharePoint, XAML, Silverlight, Windows Phone 7, Windows 8, Office, VSTO, C#…

Learning jQuery 1.3 Review

Posted by Steve Pietrek on June 1, 2009

I have been working with SharePoint for close to 3 years now. I am always looking for ways to improve what I can do with it. As a SharePoint developer, you need to understand that you do not live in Visual Studio 100% of the time. This is definitely disconcerting to developers who are making the transition to SharePoint. There are many reasons why you are not writing Visual Studio code 100% of the time.

  1. The functionality you are looking to deploy is already available out-of-the-box. Yes, it may not meet 100% of the business requirements but it is close enough.
  2. SharePoint Designer can be used to extend and add functionality.
  3. Your SharePoint Governance plan may restrict what type of custom code can be deployed.
  4. SharePoint Administrators limit what can be deployed.
  5. Companies may not currently have in place a way to deploy custom code.

In my case I have run into all of these scenarios. The client I am working with exclusively for the past year does not have a custom code model in place; therefore, Visual Studio applications are out. So what is a developer to do? On most projects, business users want functionality which is not easily available out-of-the-box or through SPD. Can’t very well say, sorry it can’t be done. There are many ways to add custom solutions to SharePoint in a non custom code model.

  1. SharePoint Designer
  2. Silverlight. I have been working with Silverlight a bit the past few months and can definitely see the power. I will definitely be writing more blog posts on integrating Silverlight and SharePoint. You use web services to communicate with SharePoint.
  3. Office Business Applications (OBAs). Instead of putting the custom logic in SharePoint, you put the logic in an Office tool. You use web services to communicate with SharePoint.
  4. Use JavaScript to create script to do advanced functionality, either by integrating within a Content Editor Web Part (CEWP) or linking in the .js file within your master page.

Although JavaScript is powerful and there are plenty of examples on how to do different things, the biggest obstacle you have is writing extra code to accommodate for different browsers. This is where jQuery comes in. jQuery is a JavaScript library which allows you to create web effects with little code.

From a SharePoint perspective, there are many examples out on the Web of very cool things people have done using jQuery. One notable example is Paul Grenier’s “jQuery for Everyone” series on EndUserSharePoint. Examples include Accordion Quick Launch, Calculated Columns, Resizing Web Parts, and Pre-Populating Form Fields. Jan Tielens has recently written many great posts on how to communicate back to SharePoint from jQuery code using web services. There are plenty of others who have done equally neat things.

So you have decided you want to learn jQuery. What resources are available? First off, there are many resources available on the Web. Open your browser and search for jQuery or SharePoint+jQuery and you will see plenty of links. Second, there are plenty of books. I love tech books – call it a disease – but there is nothing better than opening a box from Amazon and sitting down for a few hours to read. This gets me to the book “Learning jQuery 1.3” written by Jonathan Chaffer and Karl Swedberg which I want to spend some time covering.

I bought the first edition of the book from Amazon. Packt Publishing was kind enough to send me a review copy of their latest book which covers the new 1.3 version. So what are my impressions of the book?

Chapters 2-5 are a good introduction on jQuery. These chapters include Selectors, Events, Effects, and DOM Manipulation. These are the basic building blocks on how to get started with jQuery. Chapter 6 covers AJAX and how you can retrieve data in a seamless fashion. Chapter 7 covers Table Manipulation, Chapter 8 covers Forms Function, and Chapter 9 covers Shufflers and Rotators. Chapters 7-9 do a great job of showing real-world examples which you can use in your applications. The rest of the book covers Plug-ins, or allowing your to extend jQuery. Extensions can be done by you or the community. There are many powerful examples of plug-ins. The most popular would be the jQuery UI. The jQuery UI plug-in includes widgets such as the accordion, date-picker, and progress bar; interactions such as drag-and-drop; and effects for animation. One of the next books on my read list is the companion book jQuery UI 1.6: The User Interface Library for jQuery.

My favorite chapter in the book was Chapter 5 which covers DOM Manipulation. Being able to add, delete, and change HTML elements is very powerful and something which you use often on a SharePoint project. One section in the chapter covers creating “pull quotes” which was very timely because they were needed on a project I was currently working on. Each chapter starts small, a snippet here, snippet there, but by the end of the chapter, you are creating full, real-world examples. The chapters are structured in a way that you can go back to a chapter whenever you need a refresher on a particular subject.

As far as 1.3 features, it covers most new features, but there are a features which came out in 1.3.2 which are not covered in the book.

All in all, I really enjoyed this book. I would recommend it for those who want to quickly get up to speed on the jQuery. At just under 400 pages, it can be quickly read within a few days. With that in mind, if you are looking for an all encompassing jQuery reference, you may need other resources to learn all the jQuery nuisances.

Packt Publishing



Sorry, the comment form is closed at this time.

%d bloggers like this: