Upload a brief
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

What's That Button Do? Dealing With Legacy Custom Code in Umbraco Migrations

July 23, 2024
|
Umbraco
|
by
Jonas dos Santos

Step 1: Plan

First, map any legacy custom components that might be hidden beneath the surface.

IMPORTANT: Be vigilant for old features or dependencies that may cause difficulties when migrating.

Step 2: Separate Into Library

Now it’s time to find a new location for your custom code.

Copy the relevant custom code files from your Umbraco project into the new library project. Be sure to include all necessary files, including controllers, models, services, and any supporting classes. By isolating it as a standalone library or module, you are not just cleaning up your Umbraco project but also establishing a distinct separation between core features and customizations.

Step 3: Document Dependencies

The next step will be to carefully outline its dependencies. This will facilitate the future upgrades and troubleshooting.

Step 4: Refactor if Needed

Take a look at your custom code and give it a refresh if it’s displaying signs of being outdated or inefficient.

Do not hesitate to get your hands dirty, you will appreciate it in the future.

Step 5: Test

Check the core features of the website and confirm everything works as intended.

It is important to check if the isolated code is still doing what it is supposed to do.

Run unit tests and integration tests, if any.

Step 6: Merge

Now it’s time to merge the library back into your Umbraco project.

Keep it clean. Ensure that you keep a distinct division between your custom code and the fundamental Umbraco elements. This will make maintenance easier.

All Set

Future upgrades can now be implemented smoothly without disrupting your custom functionalities. Make sure to repeat the process for all legacy custom code. But if you're having trouble with a particularly nasty bit of code, why not ask the experts at FreshConstruct - we'd be happy to take a look for you!

Like what you've read?

Then why not sign up for our newsletter! Keep up to date about the content your business needs to know.

Success! You are now subscribed to our newsletter!
Oops! Something went wrong while submitting the form.