SharePoint 2013 Web Content Management for Developers HSPUG


Published on

As presented to the Hamilton SharePoint User Group on March 21, 2013. With powerful new content search capabilities, metadata driven navigation, and new features such as design manager and cross site publishing, this presents a paradigm shift for developers with a focus on WCM publishing sites (intranet, internet). These new features and capabilities will be presented at an introductory level during this talk. The session will then focus on your typical Visual Studio “Publishing Solution” in SharePoint 2010. How do you get this running on a SharePoint 2013 Farm “as is” (migration)? What is involved if I want to convert my existing visual studio solution to SP 2013 developer tools and then fully over to the SP 2013 publishing paradigm? We’re already in development of a SharePoint 2010 site - can we deploy SharePoint 2013 now or should we wait? This session will provide insight into how you should develop today, and be ready for the new world that awaits in SharePoint 2013!

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • 400 full-time employee consultants with offices in Toronto, Waterloo, New York, Boston, Houston, London UK and Dubai (Calgary expansion underway - planned Q4 2010)Specialists in the design, architecture and implementation of enterprise-scale solutions in Public Sector, Travel & Tourism, Financial Services, Oil & Gas, Retail, Education and HealthcareRecognized Experts on strategic Microsoft technologies: .NET, SharePoint, Dynamics CRM SQL Server, Performance Point, Bing Maps, CCF 2008, Silverlight, WPF, WCF, WW, BizTalk, Mobility and Microsoft SurfaceServices: Consulting & Strategy Enterprise Solution Design & Development User Experience Design & Information Architecture On-site technical mentoring & training Application hosting and support Technical writing
  • SharePoint 2013 Web Content Management for Developers HSPUG

    1. 1. { About.Me() }• Current SharePoint MVP• Author for two SP 2010 development books• SharePoint Architect for Infusion• Speaker at International Conferences on SharePoint, at user groups, and at SharePoint Saturdays• Certified Trainer for the industry leading SharePoint training from Critical Path Training• Telerik “Insider”• Holds all MS certifications for SharePoint 2010• Harley-Davidson ™ Enthusiast!
    2. 2. London Kraków Dubai New York Toronto Boston
    3. 3. And, yes, I do really have a Black Belt.  6
    4. 4. Published Books
    5. 5. Prize! Telerik DevCraft Ultimate Collection
    6. 6. Full Trust SolutionsWhat are Full Trust Solutions?• Solution Packages (WSPs) are installed to SharePoint Server• Typically, compiled .NET code is deployed to GAC• Files are pushed physically to the SharePoint Root directory• More limited cloud scenarios via « SandBox » solutions
    7. 7. Full Trust SolutionsWhen are they suitable?• If you have an on-premise deployment of SharePoint• You have lots of existing solutions in SP 2007 / 2010 – That is, solutions you may want to re-use / migrate• You are an ASP.NET web forms developer• Can SandBox for cloud solutions (but deprecated)• Cannot be app – such as timer job, admin page
    8. 8. Full Trust Solution DevelopmentHow are they developed?• « Traditional » development using Visual Studio / C#• Program against the SharePoint Server object model• Package using VS tools to SharePoint Solution Packages (WSPs)• Deploy to Farm, typically using PowerShell.• SandBox solutions would be uploaded / activated
    9. 9. Solution Packages• Solution Packages are sets of Web Parts functionality deployed to the farm or site collection (sandbox)• May contain one or more Features, assemblies, pages, controls, and other artifacts Assemblies WSP• SharePoint framework handles installation and configuration of solution items• Automated packaging and Mapped deployment in Visual Studio 2010 Folders
    10. 10. Features• A ‘Feature’ is a defined set of Solution functionality encapsulated within a specific format• Features may be comprised of any combination of Feature code, including web parts, workflows, and site definitions• Features may be deployed XML Project Item individually or as a part of the solution package Web Part Template Workflow Receiver Assembly
    11. 11. Lethbridge VS 2010 Solution
    12. 12. Sample App – Footer Links• Illustrates a very common development pattern 1. Define schema: Site Columns and Content Types 2. List Provisioned with attached content types 3. A Web Part that performs a content query against the content type / SP List
    13. 13. Solution Structure and Dependencies
    14. 14. Using Existing SP 2010 SolutionsPossible To:• Deploy Existing Solutions• Will deploy to « 14 » folder in SharePoint 2013• Add « 14 » property to manifest! SharePointProductVersion="14.0"
    15. 15. Convert VS Solutions from SP 2010Possible To:• Open Solution in VS 2012• Change to latest Framework Version• Change SharePoint References• Add « 15 » property to manifest SharePointProductVersion="15.0"
    16. 16. Convert VS Solutions from SP 2010My Strongest Recommendation!• Create New VS SP 2013 solution• Ensure Package Name is different (e.g. append 2013)• Bring in code / files from SP 2010• Ultimately package structure should be identical• Ensure feature names and IDs are the same – OR• Create with new feature IDs
    17. 17. SP 2013 Full Trust Solution• Deploy as a WSP file (i.e. solution package)• Deploy to the Farm• Suitable for an on-Premises deployment only• Absolutely a supported model for SP 2013!• Very similar to developing full trust solutions for SharePoint 2010
    18. 18. SP 2013 Footer Links Solution
    19. 19. Web Content Management in SP 2013 • Design Manager • Search Driven Publishing Model • Image Renditions • Content Search Web Part • Device Channels • Content Catalog • Image Renditions • Managed Navigation • Multilingual • Cross Site Publishing
    20. 20. Web Content Management in SP 2013 In short, the model we use today for publishing sites in SharePoint 2010 is still “valid”, as fundamentally publishing works the same way in SharePoint 2013 Deploy solutions to an on-premise farm Since SharePoint 2013 has a complete “14” folder – it should be possible to “migrate” SP 2010 sites “as is” to a SharePoint 2013 box and have it run in “legacy” mode. How we do branding in SharePoint 2013 has been completely changed with the introduction of the Design Manager, making it dramatically easier to create such as master pages and page layouts. No more custom “branding solutions” in Visual Studio! A very compelling Search driven publishing model has been added in SP 2013, making it possible to create a publishing site featuring content from multiple site collections. Information Architecture and Site Design become much more interesting!
    21. 21. Acknowledgement! The following slides on web content management in SP 2013 courtesy of Microsoft and the SP 2013 Conference Wanted to give credit where it is due!! 
    22. 22. 160 W3C HTML Markup Validator Errors140120 138100 80 60 40 20 19 13 0
    23. 23. Clean URLs Page Redirects NoneCountry code top-level (ccTLDs) Sitemaps Automatically generated and referenced in robots.txtSEO Properties Browser title, Meta description, Meta keywords Canonical URLsWebmaster Tools integration Assists with ownership verification
    24. 24. HTMLComps CSS, J S, etc. Dreamweaver / SharePoint Designer Photoshop / etc.
    25. 25. SharePoint HTMLComps Auto Snippet Upload Add controls Convert Gallery CSS, JS, etc. Dreamweaver / etc.
    26. 26. Global Mobile vs. Desktop Internet User Projection, 2007-2015E, by Morgan 2000 Stanley INTERNET USERS (MM) 1600Customized Design, 1200Fewer bytes over the wire 800… all while maintaining SearchEngine Optimization? 400 0 2006 Mobile 2008 2010 Desktop 2014 2012 2016
    27. 27. Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0;Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 920)
    28. 28. Examples of Search DrivenPublishing News “Why wouldn’t Commerce everything be search driven?” Support InternetKnowledge Base or in other words Intranet Extranet “Are there times Articles Mobile we might not use Pictures Search Driven Video Publishing model?”
    29. 29. Advantages of a Search Driven PublishingModelBreakdown site Eliminate large collection list thresholds boundaries Allows for Separate flexible & presentation dynamic from storage publishing
    30. 30. What makes it “Search Driven” “It’s not about searching what we have published, it aboutQ: “Don’t most publishing, republishingweb sites already and targeting contenthave Search?” that we have crawled…”A: Yes
    31. 31. External SharePoint Content Publishing IndexSearch
    32. 32. What goes into making the Search DrivenPublishing Model? Content DisplaySearch Web Query Builder Templates Parts Content ManagedQuery Rules Catalogs Navigation
    33. 33. Adaptive experiences empower web developers to create portals based on managed navigation and a few dynamic pagesFriendly URL STORENAVIGATIONTAXONOMY CONTENT SEARCH WEB PART Audio Audio Filter query by Cameras Cameras CATEGORY: Cameras Computers Computers Home appliances Home appliances Phones Phones TV and video TV and video Search Use page maincategory.aspx Microsoft Confidential
    34. 34. Adaptive experiences empower web developers to create portals based on managed navigation and a few dynamic pagesFriendly URL TERM STORE NAVIGATION CONTENT SEARCH WEB PART TAXONOMY Audio Filter query by Cameras CATEGORY: Computers Computers Home appliances Phones TV and video Search Use page maincategory.aspx Microsoft Confidential
    35. 35. ContentContent Search Web Part Search Web Parts
    36. 36. Make your ownMany ship Out- in HTML &of the-Box JavaScript Display Templates
    37. 37. ProvidesUI based IW focused Test & Preview Allows“advanced Add Refiners mode” Query Builder
    38. 38. Query Rules UI based IW focused ManipulateSearch Results
    39. 39. Adaptive experiences powers flexible consumption and re-use by separating content management and site experience workflows Combining static and dynamic content through Search ARTICLES ASSET LIBRARY PRODUCT CATALOG JOB OPENINGS NAVIGATION
    40. 40. Adaptive experiences empower business userswith editorial control to maximize business goals Microsoft Confidential
    41. 41. Product 1a. Enable 1b. NewIntegrated with Available Catalog Site Search across Farms Template A settings on a Content Catalogs List or Library 2. Index 3. Connect Define URL Select Nav Format structure
    42. 42. Catalog CatalogEnabling Connection
    43. 43. New Nav Terms can be Provider site structuresManaged Navigation ProductFriendly URLS Catalog integration1:1 binding ofSite Collection to Term Set
    44. 44. “Create content in an Authoring environment and use it in any one of your SharePoint URLmanipulation Multilingual publishing environments.” Things to know:Cross Site Publishing 1. This is not content deployment 2. Requires the Authoring and Publishing feature Flexibility inMulti-branding Production Page Content 3. Requires a Catalog tiers
    45. 45. Cross Site Publishing Why XSP?: 1. Need to Publish >1 location 2. Need a multilingual site 3. Need to separate authoring and publishing
    46. 46. SharePoint App ModelIs this not THE new way to develop for SP?• This was all that was talked about at the MS SharePoint Conference!• No code is deployed to the SharePoint servers• You may choose any technoloogy, you host it• Apps are published – coporate store or public marketplace• Suitable for on-premise or cloud (Office 365)
    47. 47. SharePoint App ModelWhen are Apps suitable?• If your primary purpose is to access data in SharePoint• Your custom solution is a new one• App is not ASP.NET – iOS, Win 8, Win Phone, MVC, LAMP (PhP)• Leverage pure web dev skills – HTML, CSS, JavaScript ( jQuery)• You want to be able to move from on-premise to Cloud
    48. 48. App Model Overview• For On Premise or Cloud Scenarios• App code never runs on the SharePoint box• App accesses SharePoint via web services• Can use a Client Side Object Model approach or a REST services approach• Apps deployed to catalog (could be MS Store or Corporate catalog)• Have a Site or Tenancy scope
    49. 49. App Hosting• SharePoint-Hosted Apps – App resources added to SharePoint host – Deployed to child site known as app web – App can have client side code only• Cloud-Hosted Apps – App resources deployed on remote server – Remote site known as remote web – App can have client and server side code
    50. 50. Client Side Object Model (CSOM)• Two main kinds: – Managed CSOM (.NET / C# code) – Javascript CSOM (aka JSOM)• Similar to the old-school OM (which it ultimately calls) but with extra considerations for – Serializing and downloading only what you need back from the server – Minimizing the number of HTTP requests – Async nature of JavaScript• Keywords: Object Model
    51. 51. CSOM Improvements• New APIs with SharePoint Server functionality – User Profiles – Search – Taxonomy – Feeds – Publishing – Sharing – Workflow – E-Discovery – IRM – Analytics – Business Data
    52. 52. Search Queries: CSOMClientContext clientContext = new ClientContext(siteUrl);var query = new KeywordQuery(clientContext);query.QueryText = "Search terms";SearchExecutor searchExecutor = new SearchExecutor(clientContext);var resultCollection = searchExecutor.ExecuteQuery(query);// process resultsclientContext.ExecuteQuery();
    53. 53. REST Api• REpresentational State Transfer• Language-independent (only requires HTTP) – I.E. JavaScript or C#• Formulate an HTTP request to get something back (GET) or get something done (POST or PUT)• SharePoint’s REST API obeys OData (Open Data) specification (well-known standard syntaxes for querying/filtering, machine-traversable entity relationships)
    54. 54. Search Queries: REST• Keywords: http://[..]/_api/search/query?querytext={KQL Query}• Selecting Properties: http://[..]/_api/search/query?querytext=test&selectpr operties=Title,Rank• Sorting: http://[..]/_api/search/query?querytext=test&sortlist =LastModifiedTime:descending http://[..]/_api/search/query?querytext=test&sortlist =LastModifiedTime:descending,Rank:ascending
    55. 55. CSOM or REST? CSOM REST APIJavaScript YES YESC# YES YESTranslation: 4 possibilities, all technically possible CSOM REST API JavaScript MAYBE BEST (Usually) C# BEST (Usually) MAYBETranslation: Focus on the 2 combinations that (usually) work best
    56. 56. Conclusion – Full Trust• Full Trust Solution Development is still cool!• Tradtional ASP.NET / C# web form development• Can “migrate” source code from 2010 Publishing solutions• Great option for On Premise installation
    57. 57. Conclusion - Apps• SharePoint Apps are the future direction for SharePoint development• Your first choice for new development• Can be SharePoint or Cloud Hosted• Suitable for On Premise or Online• REST is API of choice for SP interaction• Don’t need a local dev environment! – Develop against SharePoint Online
    58. 58. Other WCM Considerations• Migrating your brand to SP 2013 via Design Manager• Think Mobile! Responsive Design, Device Channels, Image Renditions• Search Driven Cross Site Publishing: Catalog site, Content by Search Web Part, Metadata Navigation
    59. 59. Prize! Telerik DevCraft Ultimate Collection
    60. 60. Questions? Discussion• Ed Musters•• @TechEdToronto