Making simple Orchard development tasks simple with Abstractions

Release, Orchard, Open source

Orchard, the beloved content management framework we built Lombiq on admittedly has a steep learning curve. Well, with great investment into learning Orchard comes great power or something, but still, how can we make some simple, everyday development tasks in Orchard easier? Can we also give beginner developers a tool to quickly flush out some simpler modules with only understanding the basics, leaving some more time to learn the whole system?

We created the Orchard Abstractions module as a proof of concept. The module enables you to write content parts extremely easily.

You remember (or if you're beginning with Orchard: you'll soon learn) that to write a custom content part you have to think about not just the part itself, but also about data storage (either with records or through the InfosetPart), migrations, drivers, handlers, you have to understand shapes (with intricate but awesome details like shape factories) and placement. With Abstractions we made this easier: as the bare minimum you only have to write a content part class (basically a simple POCO with virtual properties) and a display and/or editor template for it. That's it. If you want to be more advanced and display something through the part that should be calculated somehow you can attach such logic by implementing a simple interface. All this is what we called Quick Parts.

On top of that Abstractions also contains Quick Widgets: by deriving your content part from a specific class you'll get your part set up as a widget for free. How about that? :-)

Also everything you write using Quick Parts or Quick Widgets uses standard mechanisms in the background. So if you decide to go hardcore and customize everything you can do that by gradually enhancing what you've written to the point where you have the whole module done in the standard way. Your parts' data won't get lost, there is no data migration needed. Most of your code will remain intact and the remainder should just be copy-pasted elsewhere.

If you feel adventurous take a look at the separate samples project and begin to write your parts - quickly.

No Comments

Add a Comment