Archives
-
The Evil Empire Strikes Back
A little more than three years ago, I left Microsoft, and co-founded Nwazet, a hardware company that built cool products for makers. At the end of 2014, we sold our intellectual property to ModMyPi. Since then, I’ve been doing freelance consulting and development under the name Decent Consulting, and I’ve also been building a new CMS based on Node.js: DecentCMS… And today was my first day back at Microsoft as a Senior Program Manager.
-
Many ways to relate Orchard things, part 5: media
Today’s way of relating Orchard contents is less universal than any of the ones I’ve talked about so far in this series: it will only enable you to attach media, such as images, videos, and audio, to your content items. Still, media have been real content items for a few versions of Orchard, and the media library picker is a very efficient way to add single or multiple media, so this most definitely deserves a post…
-
Many ways to relate Orchard things, part 4: taxonomies
Taxonomies in Orchard can be seen as glorified tags, and in a way, that’s what they are: you can define multiple classifications for your content items, and assign any number of these classifications to your types. For example, a song could be tagged with a “genre” taxonomy, that defines terms such as “rock”, “blues”, “metal”, “progressive”, or “electro”. The same songs could be tagged with a “mood” taxonomy, with terms such as “epic”, “soft”, “spooky”, or “trashy”. Each song may be tagged with any number of terms from each taxonomy. In other words, there are n-n relationships between songs and taxonomy terms.
What makes Orchard taxonomies so much better than simple tags is that taxonomy terms are content items, and as such can be extended with additional parts and fields. Our genres and moods, for example, can be enriched with a body part, in order to give them a rich-text description.
-
Many ways to relate Orchard things, part 3: lists
The list feature, once deprecated, is back, entirely re-done, and now a great way to build parent-child relationships between content items. It’s so good we’ve even considered rebuilding the blogging feature entirely with it. The feature is actually admin UI around a single little thing that’s been in Orchard from the start: the Container property of the Common part. That’s right: all Orchard content items have the ability to point to another item to contain it. List is just exposing it, with some help from the Containable part, which adds the notion of order under the container.
-
Keeping a project’s public Git or Mercurial remote safe from your private stuff
So you’re a committer on an open-source project, and you also use the same project to build non-public projects for your customers. You set-up your customer’s repository so that it has remotes that point to the public project’s repo on one side, and the customer’s private repo on the other. You pull from the public remote, and only ever push to the private one. Everything works fine, until one day, you make one small mistake and push all of your customer’s proprietary code to the public repo for all to see. Oops.
Before you ask, no, I did not just do that. I did it once a long time ago with some proprietary code of my own, not customer code, thankfully. It was embarrassing enough however, and I had to ask for some help zapping the code before it was on too many people’s clones. This post is not about fixing the mess, it’s about preventing it from happening.
-
Many ways to relate Orchard things, part 2: content item picker field
In the first post in this series, we’ve looked at the most difficult way to create relationships in Orchard. In this post, we’ll look at the easiest: content item picker field.
-
Many ways to relate Orchard things, part 1: database relations
A long time ago, I wrote a documentation topic on how to implement 1-n and n-n relationships in Orchard using database relations. It was much needed at the time, as this was still a difficult topic. Between spotty mapping mechanisms for relationships, and specific Orchard conventions, it wasn’t something you could expect just anybody to figure out on their own. It is still the way to go under some conditions, but those conditions are arguably very uncommon, and there are now much better solutions for more common cases.
In this series of posts, I’ll show one technique per post, with pros and cons, and use cases for each. Today, we begin with database-bound relationships.
-
Node dependency injection library extracted from DecentCMS
There are quite a few DI libraries for Node, I know, and I evaluated many of them before building my own. It’s not that the others are bad, it’s just that I needed a few unique features that I couldn’t find together in a single library. My library, Decent Injection, is exactly what I needed for DecentCMS, because it was built as its foundation, with no other requirement than to be useful to me. My goal by extracting it as its own project is to help those users who have told me that they would like to use it in their own projects. Often, when building exactly the library you need, you end up with something that others will find useful too. It’s pretty cool when it happens.