Stickers

Packages Question Time

The newest virtual meetup for the Umbraco Community, created by Lotte Pitcher


At Umbraco Spark in March, I gave a talk about package development. I discussed the important role that packages play in the Umbraco ecosystem, and shared my own story of how I became a package developer.

That story is one of community inspiration and collaboration: 

  • The need for the package arose from helping Chriztian Steinmeier upgrade the 24 Days in Umbraco website to v10
  • The approach I decided to take resulted from discussions with Lee Kelleher and Matt Brailsford at CODECABIN 
  • The development of the ‘Admin Only Property Editor’ package was completed before the Community Teams visit to HQ in Denmark, with Lee Kelleher as a mentor and collaborator

 

Umbraco U Package Ribbon


Whilst preparing slides that acknowledged all the help I'd been given, I realised that giving the talk wasn't enough: I really wanted to "pay forward" all the help that people - especially Lee - had given me in a way that was accessible to the wider community. So I came up with these two ideas:

  • An "opinionated" package starter template that can be used to get a head start when creating, releasing and maintaining a new Umbraco package
  • A new virtual "Packages Question Time" meetup for people to get help with their own packages

This virtual meetup was my way of scaling up the discussions that I had at CODECABIN. As I explained with this slide in my Spark talk: 

Spark 2023 Lotte Sofa

At CODECABIN I found myself sitting on a sofa chatting with Lee and Matt who together have released 62(!) Umbraco packages since 2009/10 (the maths is right: they also released 4 packages together under the ‘Umco’ brand). I think it took all of ten minutes for me to explain what I wanted to achieve and for them to recommend the approach to take. Without that discussion I would have spent hours (days?) researching what to do or, far more likely, built an inferior solution.

So what do you do if you have an idea for an Umbraco package but don’t really know where to start? Perhaps you started building one but gave up after hitting a dead-end. Would talking things through with experienced package developers help you to move forward? If so, this new virtual meetup is for you. The meetups won’t be recorded and remember, there’s no such thing as a stupid question…

 

The Inaugural Meetup

A couple of weeks after Spark, we had the first meetup. Lee Kelleher and Kevin Jump had kindly agreed to be on the panel so I could put the questions to them first before opening up to anyone else.

We had quite a turnout with 25 people showing up! People's reasons for attending were:

  • Wanting to get into package development
  • Had questions to ask
  • Had package experience to share
  • Were just curious!

And all of those are completely valid reasons for attending! Here is the traditional 'waving on Zoom’ screenshot:

Pqts Attendees

Those of you with eagle eyes will notice quite a few HQ folk joined in: an unexpected treat!

 

What Was Discussed

The meetup was only scheduled for an hour but lots of ground was covered, including answers to the following questions:

If my package needs to store configuration settings, what’s the best approach?

Simple settings can be saved to the database using Umbraco’s IKeyValueService, noting that the values are limited to 255 characters*. More complex settings could be stored in a custom table, but that requires extra work to set up. You could save to disk, or provide the user with appSettings.json snippets. There are pros and cons of all these approaches. If you want to find out more then check out this Good Practice Guide currently in a draft PR to the Docs repository.

What’s the status of the CLI tool UmbPack?

UmbPack was a CLI tool built by the Package Team to allow developers to upload to the Our package repository as part of their CI/CD process. From version 9, Umbraco packages can only be installed via NuGet, so there is no need to upload to Our meaning UmbPack is no longer being developed. There are now ‘dotnet new’ templates available for creating packages, and standard approaches for publishing to NuGet.

When does it make sense to start looking at the new (v13) backoffice?

There is a beta version planned for the end of June that is meant to be for package developers to get started with. We discussed that the technologies in the new backoffice, TypeScript, Lit, Web Components, are not familiar to many of us so anything that HQ can provide to help get us familiarised would be incredibly useful.

What considerations are there for creating a Starter Kit for others to use?

A starter kit package is usually one that creates Umbraco schema (doc types, templates etc), as well as actual content and media items in the backoffice. Starter kits can easily be shared by putting the source code repository online with a database to download. However if you want the starter kit to be discoverable in the Umbraco Marketplace then it would need to be released as a NuGet package. Umbraco Docs contains an article on creating a package which includes a section on creating a custom package migration for importing the Umbraco content. 

We also discussed the benefits of using a Razor Class Library (RCL) for a package, as that removes the need for the NuGet install process to be configured to copy App_Plugins files into the correct location. This RCL approach should work for starter kit packages too.

* A note re IKeyValueService: after the meetup a GitHub discussion was started about increasing the size of the value field. HQ have now added the “up-for-grabs” label to the discussion as they agree it’s a good idea.

 

Thank You!

A big thank you to everyone who joined the event, but specifically to:

  • Lee Kelleher and Kevin Jump for being our excellent panelists
  • Anyone who asked a question
  • Anyone else who chipped in with thoughts and opinions

 

And Finally

If you have some package related questions you'd like to talk through, please let me know. Find me on Twitter, Mastodon, or on Umbraco's Discord server (check the "wordle" channel as I post there most days... yes...still!)

If you'd like to be notified about future meetups then please join the Umbraco Virtual meetup group.

If you are looking for ideas for a package, or have ideas but don't have the time to build them yourself, please check out this Umbraco Package Ideas resource for finding and sharing ideas.

 

Lotte Pitcher


 Written by:
Lotte Pitcher

 Published: March 27, 2023