Everything SharePoint and XAML

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

Archive for the ‘SPBookReview’ Category

Book Review: Microsoft Silverlight 4 and SharePoint 2010 Integration

Posted by Steve Pietrek on October 18, 2010

If you don’t already know, I am passionate about Silverlight. I love working in it. I love talking about it. Where Silverlight really shines is when it is integrated with SharePoint. When calling SharePoint 2007 web services (assuming you have the cross domain files defined) allow you to create rich applications that can be integrated in (or outside) of SharePoint very quickly. The biggest issue working with SharePoint 2007 is if the web service doesn’t have the necessary API’s. If the web service doesn’t have the required API’s, you had to write custom web services or remove the feature. I was quite excited to hear that Microsoft was going to support a new way to access SharePoint content from a Silverlight application in SharePoint 2010. The feature is known as the Client Object Model. The book Microsoft Silverlight 4 and SharePoint 2010 Integration by Gastón C. Hillar covers the new Client Object Model functionality along with WCF Services.

Chapter 1 is an introduction chapter. The first thing it covers is the benefits of Silverlight with SharePoint. The next section discusses setting up a development environment. I like how it goes through each application and gives a description of the application. Developers need to understand how to manually install the application rather than relying on Web Platform Installer. The 3rd section walks through creating a Silverlight application. Finally, once the application is built, the steps to deploy the Silverlight application to SharePoint is covered.

In Chapter 2, you begin learning how to interacting with SharePoint data and services. When working with SharePoint content, you need to have a full understanding of the fields you are working with. One great tip is using the Server Explorer to view the InternalName and FieldValueType properties of a field. The book then goes through some examples of using the Client Object Model to interact with SharePoint content. It does so by listing out the code up front and then diving into each method. Many times you see the detail of how something is done and then see the full source listing. It did take a bit of switching back and forth between pages to understand what was going on. When working with Silverlight, all requests are asynchronous; however, unlike SharePoint 2007, the request is on a different thread. In order to update the UI, you must use Dispatcher.BeginInvoke. The book does a good job of covering this. The next area is hooking up your Silverlight application with SharePoint and how to debug it. Finally, the book covers tips on 32-bit vs. 64-bit, Visual Studio 2010 multi-monitor support, scalability, and multiple browsers.

Chapter 3 expands on the previous chapter by adding error handling and more CRUD operations (outside of READ). The first CRUD operation is Create. It walks through inserting items using the Client Object Model. The chapter demonstrates how to handle asynchronous calls when the request is successful and unsuccessful. One nice piece is it shows using the Server Explorer to work with more complex field types (Priority and Status). Too many times you see examples where only simple field types (string, number, and date) are used. The next section in the chapter is creating multiple Silverlight applications that communicate with each other – a huge plus IMO. Finally, the chapter finishes the CRUD operations by cover delete and update using the Client Object Model.

Chapter 4 covers more complex topics to create dynamic business solutions. The first section in the chapter (quite a bit of content) is creating Silverlight application that leverages external content types (BCS) in order to integrate with external databases. The next section discusses the process of creating an out-of-the-browser application. The final section walks through interacting with SharePoint workflows.

Chapter 5 discusses a new feature in SharePoint 2010 and that is the WCF Data Services. Instead of interacting with SharePoint 2010 data using the Client Object Model, your Silverlight application can consume data exposed by WCF Data Services. WCF Data Services supports the Open Data Protocol (OData) which has become quite popular recently. WCD Data Services allows you to call URL (i.e. ListData.svc) to retrieve content – similar but not as feature rich as RPC that could be used by Silverlight to call SharePoint 2007 content. The chapter starts off discussing using ListData.svc to retrieve list information. The next section walks through displaying SharePoint list content consuming a SharePoint 2010 WCF Data Service. The next section covers using SharePoint 2010 WCF Data Services to perform CRUD operations. Finally, the chapter covers advanced debugging techniques such as using Fiddler to debug HTTP requests and using the SharePoint Developer Dashboard.

Chapter 6 covers interacting with rich media and animations. These are two areas where Silverlight really shines and is very complex to do in standard SharePoint web parts.

I enjoyed reading Microsoft Silverlight 4 and SharePoint 2010 Integration. I truly believe Silverlight is a game changer when it comes to SharePoint. Being able to create applications that integrate with SharePoint either in the browser, out-of-the-browser, in a Windows Gadget, or on a Windows 7 Phone is very powerful. I am amazed how much more productive I am creating Silverlight applications compared to traditional SharePoint web parts. The only area missing from the book is a chapter on MVVM. I would recommend this book to developers who have some basic knowledge in Silverlight and SharePoint – not for beginners.

Posted in SLBookReview, SPBookReview | Comments Off on Book Review: Microsoft Silverlight 4 and SharePoint 2010 Integration

Microsoft Silverlight 4 and SharePoint 2010 Integration

Posted by Steve Pietrek on August 19, 2010

As most of you know, I am a HUGE fan of both SharePoint and Silverlight. The two of them go together like peanut butter and vanilla ice cream. I am always amazed how quickly I can build out Silverlight applications that can be integrated with SharePoint. I have successfully integrated over 60 Silverlight applications over the past 18 months. SharePoint 2010’s Client Object Model opens a very large opportunity to build some really cool Silverlight applications.

I am quite happy to see a new Silverlight/SharePoint book that covers the latest versions of the respective products. The book is Microsoft Silverlight 4 and SharePoint 2010 Integration by Gaston Hillar.

Table of Contents can be found below:

  1. Integrating Silverlight 4 with SharePoint 2010 – can be downloaded here
  2. Deploying and Debugging Techniques for Silverlight and SharePoint
  3. Interacting with Data on the SharePoint Server
  4. Creating Dynamic Business Solutions
  5. Working with WCF Data Services
  6. Interacting with Rich Media and Animations

PACKT sent me a review copy of the book and it was delivered yesterday. Expect a full review soon!

Posted in SLBookReview, SPBookReview | 2 Comments »

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


Posted in SPBookReview | Comments Off on Learning jQuery 1.3 Review