pragmatic orchard

47
PRAGMATIC ORCHARD CMS A Quick Intro Alexandre Marreiros, 2011

Upload: alexandre-marreiros

Post on 05-Dec-2014

2.945 views

Category:

Technology


5 download

DESCRIPTION

The first Module of a workshop about orchard CMS, with the goal to form a new Orchard development team

TRANSCRIPT

Page 1: Pragmatic orchard

PRAGMATIC ORCHARD CMS

A Quick Intro

Alexandre Marreiros, 2011

Page 2: Pragmatic orchard

Agenda Introduction Build on Concepts Review Get and Setup Orchard Orchard Concepts Theme Widget Modules Advance Theme Concepts

Alexandre Marreiros, 2011

Page 3: Pragmatic orchard

Introduction

“Orchard is a Web CMS, which essentially aims at helping you build web sites from existing pieces. Those pieces come in a few different sizes and shapes that need to be well understood if you're going to be productive with them. This article will go through those pieces and explain their names and behavior.”

Orchard Team

Alexandre Marreiros, 2011

Page 4: Pragmatic orchard

IntroductionWhat is Orchard CMS ?

Is a CMS User Centric Open Source Suported by Outercurve

Foundation A framework based on an architecture of

Plugins and Provider’s

Is built on top of .NET

Alexandre Marreiros, 2011

Page 5: Pragmatic orchard

Built On

OR

*sql server > 2000 any version in house and SQL Azure

Alexandre Marreiros, 2011

Orchard CMS

Razor Views

ASP.NET MVC 3

.NET 4.5

Database Engine

SQL CESql Server

(*)

Page 6: Pragmatic orchard

Concepts ReviewAlexandre Marreiros, 2011

Controller

Model

View

ASP.NET MVC 3Built on Top off ASP.NET with the main intent of implement MVC pattern with Microsoft Web Technologies

Page 7: Pragmatic orchard

Concepts ReviewAlexandre Marreiros, 2011

GeneratedOutput

Template Data

RazorIs a general propose template engine used to generate HTML from data. Is avaiable in ASP.NET MVC 3 Views.Razor provides a easy to read and wirte sintaxe that allow us to use ritch code in the midle of Markup code.@ - Marks the begining of a razor sentence in ASP.MVC 3

Page 8: Pragmatic orchard

Concepts ReviewAlexandre Marreiros, 2011

Razor Glossary@ - Marks the begining of a razor sentence in ASP.MVC 3@{ } – Code Block@i - Implicit code(@i) – explicit code<text> </text> - Razor tag that allows to define a plain text part @HTML – Use html util helper functions

Example of razor to display a partial view

@HTML.Partial( “_partialview “, Model )

Page 9: Pragmatic orchard

Demo ASP.NET MVC3 & Razor

Alexandre Marreiros, 2011

Demo

Page 10: Pragmatic orchard

IntroductionHow I get Orchard?

With WebMatrix & WebPlataform With Codeplex

Download the releaseClone source code

First time I run Orchard Setup happens

Alexandre Marreiros, 2011

Page 11: Pragmatic orchard

Get Orchard

Alexandre Marreiros, 2011

Demo

Page 12: Pragmatic orchard

Orchard ConceptsAlexandre Marreiros, 2011

Content Item

Content Field

Content Part

Content Type

Typed single Information

Buch of information and reusable behaviour

Classes of Data, Abstration of concepts

Instance of content type, Single piece of content

Page 13: Pragmatic orchard

Orchard ConceptsOrchard define his own model of security based on users roles and premissions.

Alexandre Marreiros, 2011

User Role

Premission

Premission

….N

Page 14: Pragmatic orchard

Orchard ConceptsCustomizable built in Orchard CMS roles

Alexandre Marreiros, 2011

Administrator

Editor

Moderator

Author

Contributor

Anonymous

Authenticated

Full control over site and settings

Is not allowed to creat content only edit

Validate user created contents, only frontend content for now

Writes and plublishes

Write content can be or not allowed to publish

Unknown user not login in CMS engine

Any user with a role in the CMS

Page 15: Pragmatic orchard

Orchard ConceptsThe user interface of Orchard uses a Themming aproach.

Alexandre Marreiros, 2011

Page 16: Pragmatic orchard

Orchard ConceptsOrchards offers a plug an play cross content engine that enable us to use widgets and define zones for that in our theme

Alexandre Marreiros, 2011

Page 17: Pragmatic orchard

The most basic building Block of Orchard are Modules.

Each Module is a MVC Block that extends Orchard Architecture

Orchard ConceptsAlexandre Marreiros, 2011

Orchard CMS Core Framework

Modules ModulesModulesModulesModules

Page 18: Pragmatic orchard

Orchard ConceptsEach Module we install in the Platform give us a group of functionalities, that can be or not enabled to this concept as the name of feature.

Alexandre Marreiros, 2011

Page 19: Pragmatic orchard

Orchard concepts

Alexandre Marreiros, 2011

Demo

Page 20: Pragmatic orchard

Orchard ConceptsIn review

Alexandre Marreiros, 2011

Page 21: Pragmatic orchard

ThemeMechanism for specified the look and feel of a Orchard solution.

In Orchard when you define a Module you define the way he render, that is the look and Feel of the module unless the theme say is differente

The same is true for Parts, Widgets and Fields (that are also modules).

Alexandre Marreiros, 2011

Page 22: Pragmatic orchard

ThemeTheme Possible States

* An Active current doesn’t have necessary to be the current

Alexandre Marreiros, 2011

Install

Enabled

Disabled Current

Active

Page 23: Pragmatic orchard

ThemeTheme rendering engine

• When a theme does not define the look and feel of a module that comes from the active team and if no active team from the module itself

• The Active Theme can become the cureent theme if a theme selector elevate is priority

Alexandre Marreiros, 2011

Current Theme

ActiveTheme

Module

Page 24: Pragmatic orchard

Orchard Theme

Alexandre Marreiros, 2011

Demo

Page 25: Pragmatic orchard

ThemeAll Orchard Themes live in a Folder that makes part of Orchard IIS Directory Named:

Alexandre Marreiros, 2011

Page 26: Pragmatic orchard

ThemeLet’s take a look at Theme Folder organization

Alexandre Marreiros, 2011

Page 27: Pragmatic orchard

Orchard Theme

Alexandre Marreiros, 2011

Demo

Page 28: Pragmatic orchard

WidgetAlexandre Marreiros, 2011

Widget

widget

Page 29: Pragmatic orchard

WidgetAlexandre Marreiros, 2011

Theme.txt

Layouts.cshtml

Page 30: Pragmatic orchard

WidgetAlexandre Marreiros, 2011

Layer’s

Page 31: Pragmatic orchard

ModulesAre the basic building blocks of Orchard

Each module is a MVC application that lives in the Orchard ecosystem

Alexandre Marreiros, 2011

Page 32: Pragmatic orchard

Orchard Modules

Alexandre Marreiros, 2011

Demo

Page 33: Pragmatic orchard

ModulesAlexandre Marreiros, 2011

Page 34: Pragmatic orchard

ModulesAlexandre Marreiros, 2011

Modules

Features

Modules are Costum Extensions

Grouped in a package.

. Features are a logical grouping of

functionality. (can be enabled or disable)

Page 35: Pragmatic orchard

ModulesAnd what kind of modules we have?

Where Modules Live?

Alexandre Marreiros, 2011

Orchard CMS Core Framework

Modules ModulesModulesModules

Page 36: Pragmatic orchard

Orchard Modules anatomy

Alexandre Marreiros, 2011

Demo

Page 37: Pragmatic orchard

Advance Theme Concepts

Alexandre Marreiros, 2011

Shape

Shape

Shape

Shape

Shape

Shape

Page 38: Pragmatic orchard

Advance Theme ConceptsRender Engine

The UI of Orchard are a compound UI once that all the UI is divided in to different small blocks of UI

Shapes are dynamic UI models of data

We can define just as a Shape as simple a Razor template

Alexandre Marreiros, 2011

Layout UI

Header

Content

Widget Shape

Content Shape

ThemeRender

Page 39: Pragmatic orchard

You can define alternates to specific UI elements.

Imagine if i want to override the Shape that renders the Content but just when the url of the item is homepage i can create the shape

Advance Theme Concepts

Content-url-homepage.cshtml

Alexandre Marreiros, 2011

Page 40: Pragmatic orchard

Rules for alternates

For content parts:

[ShapeType]__[Id]. (Example template: Parts\Common.Metadata-42)

[ShapeType]__[ContentType]. (Example template: Parts\Common.Metadata-BlogPost)

Advance Theme Concepts

Alexandre Marreiros, 2011

Page 41: Pragmatic orchard

Rules for alternates

For widget shapes:

Widget__[ZoneName]. (Example template: Widget-SideBar)

Widget__[ContentType]. (Example template: Widget-BlogArchive)

Advance Theme Concepts

Alexandre Marreiros, 2011

Page 42: Pragmatic orchard

Rules for alternates

For Content shapes:

Content__[DisplayType]. (Example template: Content.Summary) Content__[ContentType]. (Example template: Content-BlogPost) Content__[Id]. (Example template: Content-42) Content_[DisplayType]__[ContentType]. (Example template: Content-

BlogPost.Summary) Content_[DisplayType]__[Id]. (Example template: Content-

42.Summary)

Advance Theme Concepts

Alexandre Marreiros, 2011

Page 43: Pragmatic orchard

The placement of shapes can be defined by the Theme

Advance Theme Concepts

Alexandre Marreiros, 2011

Page 44: Pragmatic orchard

Orchard UI composed “Shapes”

Alexandre Marreiros, 2011

Demo

Page 45: Pragmatic orchard

More Thoughts

We had made a long dive in to Orchard Concepts, now we are able to understand all the orchard picture and start working.

Next session is Development dive in to the plataform.

For you start playing start working start using Orchard, collaborate with the community

Alexandre Marreiros, 2011

Page 47: Pragmatic orchard

Contacts

Alexandre Marreiros, 2011

Email: [email protected]: @alexmarreiros

Feel free to ask