1 / 67

Using REST to Create a No Code Web Part!

November 11, 2011. Using REST to Create a No Code Web Part!. An introduction to REST connections Patrick Curran, MCT. Patrick Curran. MCT, MCITP , MCTS , MCP SharePoint Architect for Planet Technologies. Working with SharePoint since 2003. Administrator / Developer

erik
Télécharger la présentation

Using REST to Create a No Code Web Part!

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. November 11, 2011 Using REST to Create a No Code Web Part! An introduction to REST connections Patrick Curran, MCT

  2. Patrick Curran • MCT, MCITP, MCTS, MCP • SharePoint Architect for Planet Technologies. • Working with SharePoint since 2003. • Administrator / Developer • Architect / Implementer • Troubleshooter / Brander PCfromDC.blogspot.com @PCfromDC

  3. Today’s Game Plan • SharePoint familiarity discussion. • Introduction to REST Connections. • Create an Address List from a predefined content type. • Tweak and modify the list to meet out needs (Demo). • Use SharePoint Designer 2010 to add a Data View Web Part to display our Address on a new Web Part page (Demo). • Use SharePoint Designer 2010 to create a REST connection to display the current weather in Beverly Hills, CA (Demo). • Create a data connection to display the weather of the zip code from our Address List (Demo).

  4. What is REST? • Really Expensive SharePoint Technology? • Stands for Representational State Transfer. • REST is not a protocol. • At its most basic element, REST is a way for a client to retrieve data from a server over http. • SharePoint has a RESTful web service which will allow us to grab data from lists and libraries.

  5. Objective • To display the weather at a location that is stored in a SharePoint list.

  6. Let’s Get Started… • The first thing that we will need to accomplish is to create a list to store our address. Click on Lists

  7. Creating “The List” Click on Create

  8. Creating “The List” 1- Select Lists. 2- Click on the list type. 3- Add a name (No spaces, We’ll fix this in a bit). Click on Lists 4- Click on Create when ready!

  9. Tweaking “The List” • Now that our list has been created, let’s tweak it for our requirements. Click List Settings

  10. Tweaking “The List” 1- Adjust the Title(add the spaces back). 2- Set the content type. Not part of this demo…

  11. Tweaking “The Title” 1- Adjust the Title(add the spaces back).

  12. Tweaking “The Title” 1- Adjust the Title(add the spaces back).

  13. Tweaking “The Title” No “%20” in the URL User friendly name.

  14. Add Content Type… Default content type. We want to add an existing content type.

  15. Add Content Type… 1- Select List Type from Drop Down. 2- Add Contact

  16. Add Content Type… 1- Select List Type from Drop Down. 2- Add Contact

  17. Add Content Type… OTB Content Type Columns.

  18. Tweak The Content Type… Our Available Content Types. Change the Default Content Type.

  19. Tweak The Content Type… Settings Before

  20. Tweak The Content Type… Settings After

  21. Tweak The Content Type… Change Last Name to Location

  22. Tweak The Content Type… Change Last Name to Location

  23. Tweak The Content Type… Click OK to finish

  24. Tweak The Content Type… What Columns do we really need?

  25. Tweak The Content Type… What Columns do we really need? Let’s hide the one’s we do not!

  26. Tweak The View… Let’s edit the View

  27. Tweak The View… Let’s edit the View

  28. Add An Address… Finally, let’s go ahead and Add a new item! Click Add new Item

  29. Add An Address…

  30. Add An Address…

  31. Add An Address…

  32. Let’s Create Our List! Demo Time!

  33. It’s Time To Design! Let’s open up Designer and create a page to hold our information. 1- Open your site. 2- Select Master Pages. 3- Select the v4.master 4- Right click and select New from Master Page.

  34. Create A Page… 1- Save Page. 2- Ignore warning and click Yes

  35. Create A Page… 1- Within the PlaceHolderMain, select the Common Content Tasks. 2- Click Create Custom Content

  36. Create A Page… 1- Click inside of the PlaceHolderMain. 2- Insert a 4x4 Table.

  37. Insert Data View Web Part… 1- Click inside the Upper Left table cell. 2- Insert an Empty Data View.

  38. Insert Data View Web Part…

  39. Insert Data View Web Part… 1- Ctrl + Click in order. 2- Insert as a Single Item View from the pull-down menu.

  40. Insert Data View Web Part… • Our list data is finally inserted!

  41. Tweak The Web Part… Remove Paging Paging

  42. Tweak The Web Part… Remove the first column

  43. Tweak The Web Part… Format Address

  44. Let’s See Some Data! Demo Time!

  45. Add The Weather… Click in the 3rd table row.

  46. Add The Weather… Add New REST Connection 1- Select Data Sources. 2- Click REST Service Connection.

  47. Add The Weather… 1- Name your connection. 2- Add URL. 3- Modify Parameters.

  48. Add The Weather… 1- Modify Parameter. Our updated Properties.

  49. Add The Weather… Insert REST Feed Data View into 3rd table row.

  50. Tweak The Weather… With the Weather Web Part selected, click Add/Remove Columns.

More Related