Make Your Sitefinity Update Seamless (ProgressNEXT 2018)

Make Your Sitefinity Update Seamless (ProgressNEXT 2018)

7a3f4cf57e03f53e7b37c8ef84338460?s=128

Denis Kyashif

June 01, 2018
Tweet

Transcript

  1. Make Your Sitefinity Update Seamless Dev Guide & War Story

    Denis Kyashif Software Engineer & Consultant June 1, 2018
  2. 2 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. denis@newventuresoftware.com github.com/deniskyashif @deniskyashif
  3. 3 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved.
  4. 4 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved.
  5. © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.

    All rights reserved. Say NO to the slow and painful
  6. 6 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Agenda  Why bother updating?  Update using the Project Manager  Migrating to NuGet Packages  War Story - 3.7 to 9.1 Migration  Q&A
  7. 7 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved.
  8. 8 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. breaking the ice
  9. 9 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved.
  10. 10 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved.
  11. 11 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved.
  12. 12 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved.
  13. 13 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved.
  14. 14 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved.
  15. © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.

    All rights reserved.
  16. 16 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Why bother updating?
  17. © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.

    All rights reserved. Upgrading is important.
  18. 18 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. © 2018 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. The Web is evolving.
  19. 19 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved.
  20. 20 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. The Search Engines get more sophisticated
  21. © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.

    All rights reserved. Mobile Web usage is growing.
  22. 22 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved.
  23. 23 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. © 2018 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. Web Performance is User Experience. Web performance is user experience
  24. 24 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved.  53% of users abandon sites that take longer than 3 seconds to load  22% will never return to the slow site  Page load time is factored into search engine results  The average page size ~ 3MB Infographic
  25. 25 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved.
  26. 26 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. The Sitefinity Project Manager
  27. 27 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. With the Sitefinity Project Manager we can…  Create a New Project  Import a Project  Delete a Project  Update a Project  And many more…
  28. © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.

    All rights reserved. The Update Procedure
  29. 29 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. What happens during an update?  Update assemblies and the references to them.  Update the configuration files, templates and front-end assets  Merge settings from the new version’s web.config file to your existing web.config.  Execute the database migrations.
  30. 30 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Keep in mind  Before update - back up everything!  Clean all the error logs.  You must not manually change the Sitefinity version numbers stored in your configuration files.  Information about the Sitefinity version is stored both in the database and in the configuration files.  At any time, the configuration files must match your database scheme.
  31. 31 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Migrating to Nuget Packages
  32. 32 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. The Problem  By default Sitefinity assemblies are located in /bin  We need to include /bin into source control   Project -> Clean breaks our application
  33. 33 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. The Solution 1. Backup! 2. Edit the .csproj file to remove all the references to assemblies in bin\ 3. Delete the assemblies in bin\ 4. Add the Sitefinity Nuget Server as a package source 5. Install Telerik.Sitefinity.All – the version should match with the local Sitefinity version 6. When there’s a file conflict – Overwrite 7. Reload and Rebuild 8. Resolve the assembly binding errors (hope there won’t be any)
  34. 34 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. References  Documentation: https://docs.sitefinity.com/upgrade-a-project-that- has-nuget-packages  Migrate to NuGet Packages: https://www.newventuresoftware.com/blog/migrate-sitefinity- assembly-references-from-bin-to-nuget-packages  Resolve assembly binding errors: https://www.newventuresoftware.com/blog/resolving-sitefinity- assembly-binding-errors-after-upgrade
  35. 35 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Keep in mind  Reduce the risk of introducing breaking changes by updating often.  Do not customize existing widget templates. Create your own instead.  Upgrade with NuGet
  36. 36 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. War Story – Migrating Sitefinity from 3.7 to 9.1
  37. 37 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. © 2018 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.
  38. 38 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. The Problem  10+ year old website  Over 300 pages  Unusable on mobile devices  Lots of custom code using legacy APIs  No unit tests & documentation  Needs to be merged with another 3.7 website with 2500+ pages  The content of a Wordpress blog needs to be imported into the new site  Needs to be updated to the latest version (9.1 at the time)
  39. © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.

    All rights reserved.
  40. 40 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. The Foundations  Implement Front-End build system with Gulp  Create Bootstrap-based common page layout templates  Identify similar pages and represent them as content items  Use MVC only rendering mode  Integrate OpenGraph and TwitterCard
  41. 41 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved.
  42. 42 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Merge with another 3.7 website 3.7 9.0 JSON Import 9.1
  43. 43 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Migrate Wordpress Blog to the new site Blog post: https://www.newventuresoftware.com/blog/migrating-blog-content- from-wordpress-to-sitefinity Wordpress XML Sitefinity
  44. 44 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. URL Rewrites  The 3.7 websites’ page URLs were not semantic and didn’t follow the page structure.  Most of them were manually set thus impossible to map to the URLs in the new site.  The old URLs must lead to the same page on the new site.  ~3000 URLs in total
  45. 45 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. oldsite.com/pages/businessAccountPage1 <=> newsite.com/business/accounting/page
  46. 46 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Levenshtein Distance Algorithm
  47. 47 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Time & Space complexity: O(|a|*|b|)
  48. 48 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Removing the Noise <body> <h1>Bacon Ipsum</h1> <section class="content"> Cow kevin salami pork loin spare ribs meatloaf kielbasa strip steak. </section> <footer> Andouille porchetta drumstick capicola. </footer> </body>
  49. 49 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Removing the Noise <body> <h1>Bacon Ipsum</h1> <section class="content"> Cow kevin salami pork loin spare ribs meatloaf kielbasa strip steak. </section> <footer> Andouille porchetta drumstick capicola. </footer> </body>
  50. 50 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Removing the Noise BaconIpsumCowkevinsalamiporkloinspareribsmeatloafkielbasastrips teak.Andouilleporchettadrumstickcapicola.
  51. 51 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. The URL Mapping Procedure  Pick a page from the old website and scrape its HTML  Clean the data by removing HTML, CSS and JS code  Calculate Minimum Edit Distance with every page from the new site  Pick the one with the lowest score  Generate a rewrite rule
  52. © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.

    All rights reserved. Total Cost – 800 to 1000 dev hours
  53. 53 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved.
  54. 54 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Community and Roadmap  plus.google.com/communities/101682685148530961591  sitefinity.com/developer-network/knowledge-base  knowledgebase.progress.com  sitefinity.com/timeline  sitefinityinsider.com  github.com/Sitefinity  newventuresoftware.com/blog
  55. 55 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. © 2018 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. Questions?
  56. 56 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Denis Kyashif Thank You! denis@newventuresoftware.com @deniskyashif github.com/deniskyashif