$30 off During Our Annual Pro Sale. View Details »

Make Your Sitefinity Update Seamless (ProgressNEXT 2018)

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

    View Slide

  2. 2 © 2018 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.
    [email protected]
    github.com/deniskyashif
    @deniskyashif

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  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.

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  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

    View Slide

  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

    View Slide

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

    View Slide

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

    View Slide

  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…

    View Slide

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

    View Slide

  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.

    View Slide

  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.

    View Slide

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

    View Slide

  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

    View Slide

  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)

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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.

    View Slide

  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)

    View Slide

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

    View Slide

  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

    View Slide

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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  48. 48 © 2018 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.
    Removing the Noise

    Bacon Ipsum

    Cow kevin salami pork loin spare ribs meatloaf kielbasa strip steak.


    Andouille porchetta drumstick capicola.


    View Slide

  49. 49 © 2018 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.
    Removing the Noise

    Bacon Ipsum

    Cow kevin salami pork loin spare ribs meatloaf kielbasa strip steak.


    Andouille porchetta drumstick capicola.


    View Slide

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

    View Slide

  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

    View Slide

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

    View Slide

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

    View Slide

  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

    View Slide

  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?

    View Slide

  56. 56 © 2018 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.
    Denis Kyashif
    Thank You!
    [email protected]
    @deniskyashif
    github.com/deniskyashif

    View Slide