Pragmatic orchard
-
Upload
alexandre-marreiros -
Category
Technology
-
view
2.945 -
download
5
description
Transcript of Pragmatic orchard
PRAGMATIC ORCHARD CMS
A Quick Intro
Alexandre Marreiros, 2011
Agenda Introduction Build on Concepts Review Get and Setup Orchard Orchard Concepts Theme Widget Modules Advance Theme Concepts
Alexandre Marreiros, 2011
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
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
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
(*)
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
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
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 )
Demo ASP.NET MVC3 & Razor
Alexandre Marreiros, 2011
Demo
IntroductionHow I get Orchard?
With WebMatrix & WebPlataform With Codeplex
Download the releaseClone source code
First time I run Orchard Setup happens
Alexandre Marreiros, 2011
Get Orchard
Alexandre Marreiros, 2011
Demo
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
Orchard ConceptsOrchard define his own model of security based on users roles and premissions.
Alexandre Marreiros, 2011
User Role
Premission
Premission
….N
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
Orchard ConceptsThe user interface of Orchard uses a Themming aproach.
Alexandre Marreiros, 2011
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
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
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
Orchard concepts
Alexandre Marreiros, 2011
Demo
Orchard ConceptsIn review
Alexandre Marreiros, 2011
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
ThemeTheme Possible States
* An Active current doesn’t have necessary to be the current
Alexandre Marreiros, 2011
Install
Enabled
Disabled Current
Active
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
Orchard Theme
Alexandre Marreiros, 2011
Demo
ThemeAll Orchard Themes live in a Folder that makes part of Orchard IIS Directory Named:
Alexandre Marreiros, 2011
ThemeLet’s take a look at Theme Folder organization
Alexandre Marreiros, 2011
Orchard Theme
Alexandre Marreiros, 2011
Demo
WidgetAlexandre Marreiros, 2011
Widget
widget
WidgetAlexandre Marreiros, 2011
Theme.txt
Layouts.cshtml
WidgetAlexandre Marreiros, 2011
Layer’s
ModulesAre the basic building blocks of Orchard
Each module is a MVC application that lives in the Orchard ecosystem
Alexandre Marreiros, 2011
Orchard Modules
Alexandre Marreiros, 2011
Demo
ModulesAlexandre Marreiros, 2011
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)
ModulesAnd what kind of modules we have?
Where Modules Live?
Alexandre Marreiros, 2011
Orchard CMS Core Framework
Modules ModulesModulesModules
Orchard Modules anatomy
Alexandre Marreiros, 2011
Demo
Advance Theme Concepts
Alexandre Marreiros, 2011
Shape
Shape
Shape
Shape
Shape
Shape
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
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
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
Rules for alternates
For widget shapes:
Widget__[ZoneName]. (Example template: Widget-SideBar)
Widget__[ContentType]. (Example template: Widget-BlogArchive)
Advance Theme Concepts
Alexandre Marreiros, 2011
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
The placement of shapes can be defined by the Theme
Advance Theme Concepts
Alexandre Marreiros, 2011
Orchard UI composed “Shapes”
Alexandre Marreiros, 2011
Demo
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
Refrences http://www.orchardproject.net/ http://www.orchardproject.net/docs/ http://weblogs.asp.net/bleroy/ http://paper.li/jgaylord/1306335822 http://
weblogs.asp.net/scottgu/archive/2011/05/12/asp-net-mvc-3-and-the-helper-syntax-within-razor.aspx
http://Asp.net
Alexandre Marreiros, 2011