Umbraco Code Library - Version Non-specific

Introduce yourself to the crowd...
Post Reply
Noah Willson
Posts: 1
Joined: Wed Jan 15, 2020 2:26 pm

Umbraco Code Library - Version Non-specific

Post by Noah Willson » Wed Jan 15, 2020 2:51 pm

I've created a code library for use with Umbraco, as you'd expect it does all of the common tasks that I use over and over. I work for a digital agency and we support sites that are built from Umbraco versions (4.5.x onwards).

To date we've always complied the library against the same dlls as we're using for the current project, but this isn't great and we've ended up with lots of different branches, one for each version. Having this many branches is a nightmare and I'm trying to find a solution that has one project that can be used to all versions.

I'm just wondering if anyone can think of or knows a way of having doing this or has any experience in this?



Jake Schey
Posts: 1
Joined: Fri Jan 17, 2020 8:46 am

Re: Umbraco Code Library - Version Non-specific

Post by Jake Schey » Fri Jan 17, 2020 9:00 am

This all depends on what requirements your library has. If it references the Umbraco libraries specifically then they change so often that this is wise. If the code is all general stuff and is (or can be) 'detached', i.e. not dependent on, the Umbraco types, then the version becomes largely irrelevant.

Cameron Moses
Posts: 1
Joined: Sat Jan 18, 2020 8:14 am

Re: Umbraco Code Library - Version Non-specific

Post by Cameron Moses » Sat Jan 18, 2020 10:03 am

Most of the stuff in the library are things like Node extension methods. Having had a look through the digital marketing agency malaysia code again it looks like the Interfaces have stayed the same for many versions. If you code purely to the INode interface then you should be able to create your library independent of the version. DynamicNode and DynamicMedia both implement INode.

Joseph Reginald
Posts: 1
Joined: Sat Jan 18, 2020 12:12 pm

Re: Umbraco Code Library - Version Non-specific

Post by Joseph Reginald » Sat Jan 18, 2020 1:17 pm

If you code purely to the INode interface then you should be able to create your library independent of the version. DynamicNode and DynamicMedia both implement INode.

Post Reply