Deep Dive into Orchard Extensibility for CMS Developers Renaud Paquay Senior Developer Lead Orchard Team
DEMO Orchard CMS
What Is Orchard?
Target Audiences
Extensibility Deep Dive Audience for the rest of the presentation is developers Building a (very) basic “Products” module Goal is to give a glimpse of the CMS platform the core Orchard team is building
Orchard Architecture ASP.NET MVC Orchard CMS Orchard Modules Pages Blogs Users Comments Tags Roles Media Setup Themes XmlRpc Scheduling Navigation Homepage Feeds Settings
DEMO Writing a module
Orchard Themes Layout View Context <% Model.Zones.Add("head:before”); Html.Zone("head", ":metas :styles :scripts"); %> <% Model.Zones.Add("head:before”); Html.Zone("head", ":metas :styles :scripts"); %> <% Html.RegisterStyle("site.css“) Model.Zones.Add("header”); %> <% Html.Zone("header"); Html.Zone("menu"); %> <% Html.ZoneBody("content");%> <% Html.Zone("footer"); %> <% Html.RegisterStyle("site.css“) Model.Zones.Add("header”); %> <% Html.Zone("header"); Html.Zone("menu"); %> <% Html.ZoneBody("content");%> <% Html.Zone("footer"); %> (action specific view) Document.aspx Layout.ascx.ascx
DEMO Accessing the database
Composition
Data Composition Data Events Record …passes back parts attached to Product type…
Data Data Composition Product ProductHandler Tags Comments Common …passes back parts attached to Product type… Events Record
Data Composition ContentItemRecord IdContentTypeRecord_Id ContentTypeRecord IdName 1“page” BodyRecord IdText 5“ First post ” 7“ Second ” RoutableRecord IdSlug 5“first-post” 7“second-post”
Data Composition ProductRecord IdSkuDescriptionPrice 15“sku1”“shoes” “sku2”“t-shirt”19.99 ContentItemRecord IdContentTypeRecord_Id ContentTypeRecord IdName 1“page” 2“product” BodyRecord IdText 5“ demo ” 7“ about us ” RoutableRecord IdSlug 5“/home” 7“/about”
DEMO Defining a new content type
UI Composition
DEMO Defining a content driver
Conclusion What you’ve seen: Defining a simple module as MVC “Area” Working with data (ProductRecord) Defining a content type (Product) Data Composition – ProductHandler, wiring up “Parts” like Common, Comments, Tags UI Composition – ProductDriver, ViewModels – Editor templates on back-end/admin Complete sample code on
Conclusion Other works-in-progress (not shown today): Permissions, default roles RSS/Atom XmlRpc Background tasks Eventing Logging Localization Site settings Etc.
Opportunities for You Success of Orchard depends on community contribution We are seeking partners and early evaluators/adopters Reminder: this project is at a very early stage, so expect churn and breaking changes. A few partners have started building stuff on Orchard today, and we’re getting great input from them…
Mix Itelios/Magelia – commerce module Magelia Commerce is a complete e-commerce offering. Matt Lee (Redgate) – reviewer app Online book hosting and review Charlie Strout (SevenShadow) – troav app Troav is a social encyclopedia, where users can create "treasures" that they share with their friends. Scott Cate (EasySearchASP.net) – search module EasySearchASP.NET is a search engine component that is very easy to integrate to an ASP.NET web site.
Magelia
Magelia NetStore – Complete e-commerce offering – Targets mid-sized businesses – Open Source Edition H (CodePlex) – Commercial version in 2011 – Visit or Orchard & Magelia – Magelia benefits from Orchard extensibility – Orchard users can easily add commerce to sites
Reviewer
Why Reviewer? – Red Gate publishes technical books – Needed innovative way of publishing and getting user feedback Why Orchard? – Get “common things” for free – users / comments / admin system / persistence – Orchard users can add reviewer to other sites as a module
Troav
An Online Encyclopedia with a Social Twist Users Create “Treasures” to Share Friends Users Create Connections Between Treasures Custom Educational Tours of Historic Treasures Comments, Feeds, Linking, Blogs Geo-location and Mapping Location-aware Features
Troav Why Orchard ? –.NET MVC Framework – Out of the Box Modules Like Blogs and Pages – Easy Module and Theme Development – Ability to Use/Develop/Share Modules – Vibrant Developer Community
EasySearchASP.NET TODO: Screenshot of EasySearch
EasySearchASP.NET TODO: Talking Points for EasySearch
DEMO Orchard Mix
Call to Action Visit Opportunities to contribute to the system – Modules – Themes – Features – Design – Etc. Come find us in the lounge following this session – we will be there to answer questions!