Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Make Your Sitefinity Update Seamless (ProgressN...

Make Your Sitefinity Update Seamless (ProgressNEXT 2018)

Denis Kyashif

June 01, 2018
Tweet

More Decks by Denis Kyashif

Other Decks in Programming

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. [email protected] github.com/deniskyashif @deniskyashif
  3. © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.

    All rights reserved. Say NO to the slow and painful
  4. 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
  5. 8 © 2018 Progress Software Corporation and/or its subsidiaries or

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

    affiliates. All rights reserved. Why bother updating?
  7. 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.
  8. 20 © 2018 Progress Software Corporation and/or its subsidiaries or

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

    All rights reserved. Mobile Web usage is growing.
  10. 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
  11. 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
  12. 26 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. The Sitefinity Project Manager
  13. 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…
  14. 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.
  15. 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.
  16. 31 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Migrating to Nuget Packages
  17. 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
  18. 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)
  19. 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
  20. 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
  21. 36 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. War Story – Migrating Sitefinity from 3.7 to 9.1
  22. 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.
  23. 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)
  24. 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
  25. 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
  26. 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
  27. 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
  28. 45 © 2018 Progress Software Corporation and/or its subsidiaries or

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

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

    affiliates. All rights reserved. Time & Space complexity: O(|a|*|b|)
  31. 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>
  32. 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>
  33. 50 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Removing the Noise BaconIpsumCowkevinsalamiporkloinspareribsmeatloafkielbasastrips teak.Andouilleporchettadrumstickcapicola.
  34. 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
  35. © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.

    All rights reserved. Total Cost – 800 to 1000 dev hours
  36. 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
  37. 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?
  38. 56 © 2018 Progress Software Corporation and/or its subsidiaries or

    affiliates. All rights reserved. Denis Kyashif Thank You! [email protected] @deniskyashif github.com/deniskyashif