orchard cms: architettura
DESCRIPTION
Dopo una panoramica sul funzionamento di base di Orchard diamo uno sguardo al suo codice, scoprendo dietro le quinte un motore basato su tecnologie allo stato dell’arte, rinunciando in qualche caso anche alla produzione propria come per la persistenza dei dati in cui NHibernate è stato preferito a Entity Framework. Daremo insieme uno sguardo al codice sorgente disponibile liberamente su Codeplex gettando le basi necessarie a capire come sviluppare un modulo aggiuntivo per questo ottimo CMS.TRANSCRIPT
![Page 1: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/1.jpg)
Architettura di Orcharduno sguardo dietro le quinte…
Michele AponteMicrosoft MVP ASP.NET / IISMCT – MCP – MCTS – [email protected]
http://dotnetcampania.org/blogs/[email protected]
Associazione Culturale DotNetCampania
![Page 2: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/2.jpg)
Architettura
![Page 3: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/3.jpg)
Architettura
![Page 4: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/4.jpg)
Architettura
![Page 5: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/5.jpg)
Architettura
View
Controller
Model
![Page 6: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/6.jpg)
Architettura
Request
UrlRouting
Controller
Action Action Result
View Result
http://www.miaapplicazione.it/{controller}/{action}/{param}
![Page 7: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/7.jpg)
Architettura
www.miaapplicazione.it/
News/Show/10
UrlRouting
NewsController
Show(10)Action Result
Show Result
http://www.miaapplicazione.it/News/Show/10
![Page 8: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/8.jpg)
Architettura
![Page 9: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/9.jpg)
Architettura NHibernate
![Page 10: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/10.jpg)
Architettura NHibernate
DB
Class
ORM
Relazionale
Oggetti
Class
Class Class
![Page 11: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/11.jpg)
Architettura NHibernate
DB
Class
ORM
Relazionale
Oggetti
Class
Class Class
![Page 12: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/12.jpg)
Architettura
NHibernate
![Page 15: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/15.jpg)
Architettura
Autofac
Castle
NHibernate
Class1 Class 2
Dynamic Proxy Generator
![Page 16: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/16.jpg)
Architettura
Autofac
Castle
NHibernate
Class1 Class 2ProxyClass 2
Dynamic Proxy Generator
![Page 17: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/17.jpg)
Architettura
Autofac Castle NHibernate
![Page 18: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/18.jpg)
Architettura
Autofac Castle NHibernate
Orchard Framework
![Page 19: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/19.jpg)
Architettura
Autofac Castle NHibernate
Orchard Framework
Core
![Page 20: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/20.jpg)
Architettura
Autofac Castle NHibernate
Orchard Framework
Core
Moduli
![Page 21: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/21.jpg)
Architettura
Autofac Castle NHibernate
Orchard Framework
Core
Moduli
![Page 22: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/22.jpg)
Funzionamento di un modulo
Orchard Framework
ContentManager• Query• CRUD• BuildDisplay
Localization
Events
Messaging
Indexing
Logging Reports
Services Tasks
SettingsCommand
s
Security Caching
Moduli
Model Controller View
ViewDriver
s
Handlers
Controller
Placement
DB
Records
Migrations
Definitions:
Types, Parts, & Fields
Data:Content Items
ORM
Relational Domain
Shapes
Events
Request Response
![Page 23: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/23.jpg)
Data Composition
ContentManager(CRUD)
ContentItem
ContentHandler 1
ContentHandler 2
ContentHandler N
(…)ContentPart 1
ContentPart 2
(…)
ContentPart N
![Page 24: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/24.jpg)
Funzionamento di un modulo
ContentManager(BuildXxxModel)
ContentItemViewModel
ContentDriverPart 1
ContentDriverPart 2
ContentDriverPart n
(…)
View
Controller
![Page 25: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/25.jpg)
DemoAnalisi del codice sorgente di Orchard
![Page 26: Orchard CMS: architettura](https://reader033.vdocuments.site/reader033/viewer/2022061301/54d6fbf84a795979598b4811/html5/thumbnails/26.jpg)
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after
the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.