Ken Casada Developer Evangelist Microsoft Switzerland Develop and maintain CMS solutions using WebMatrix and Orchard
Customize Publish Create What is WebMatrix?
Web ServerDatabase Web Framework WebMatrix includes
Students, New developers for quickly building websites with ASP.NET Professional Developers for your non daily-job for a “quick&dirty” solution Task Oriented: “I just need something done!” Developers who build small/medium sites for others Acquire an App, customize and deploy Who is WebMatrix for?
IIS Express ASP.NET Web Pages & Razor syntax SQL Server Compact Edition 4 Anatomy of WebMatrix
Based on the latest version of IIS server Installs in \program files, side-by-side IIS server Runs as interactive process, not as service Does not require Administrator privileges Fully supports all IIS7+ modules, ASP.NET, PHP You can run it from the command-line Open command prompt Navigate to: C:\Program Files (x86)\IIS Express\ iisexpress.exe /port:35896 /path:C:\BasicWebSite Open a browser and type: IIS Express
2MB package File-based database, Xcopy deployment with app Full support for Dynamic Data, ASP.NET MVC High fidelity API support: ADO.NET, EF, LINQ… Seamless migration path to SQL Server Support tables, indexes, foreign key, primary key Does not support SP, views, UDF, geo location types SQL Server Compact 4
Minimize concepts No need to understand OOP and classes Simple ASPIs & Helpers (for all common web tasks) Smooth on-ramp to ASP.NET MVC and Visual Studio SEO friendly by default No special tools required – works with notepad or any editor
Run a page in your site In the browser’s URL box, replace the name of the page with _Admin (first time you are required to create a pw) Installing ASP.NET Helpers
Security: WebSite membership Recaptcha support preventing automated programs from registering with your website Video support (Silverlight, Flash, MediaPlayer) Image elaboration (thumbnail image, uploading image,…) Bing: embed bing search box into your website Chart: renders more than 30 types of charts Social Networking Linking your Website on Social Networking Sites Adding a Twitter Feed Rendering a Gravatar Image Displaying a Facebook “Like” Button PayPal And more…. Some available Helpers…
In the root folder of the web site, create a folder named App_Code In the App_Code folder create a new.cshtml file called MyHelpers.cshtml. Replace the content with Use the MakeNote("My test note content") Creating a custom MakeNote(string content) { }
Windows 7 Windows Server 2008 Windows Server 2008 R2 Windows Vista SP1 or later Windows XP SP3 Windows Server 2003 SP2 WebMatrix supported platform
A CMS platform based on ASP.NET MVC 3 A quick and easy way to build small-medium sized sites Focused on modular extensibility Free, open source (new BSD license) Core MS team is 7 developers, 2 designers, 2 PMs Accepts community contributions Patches to core, modules, themes, translations, docs, etc What is Orchard?
How to create and publish a Page How to create a blog Basic concepts: Widget: piece of HTML content (with code and logic) which can be mapped / assigned to pages within a website Layer: defines a set of rules for rendering the widgets Zone: defines the position of the widget within a page (available zones depends on selected Theme) Demo Summary
Everything in Orchard is built as a module. Orchard comes with a bunch of pre-installed modules (additional modules are available within a module gallery) A module exposes 1 or more features which need to be activated in order to be used Modules
How to activate features using the Admin Panel (Remote Blog Publishing | XmlRpc) How to fix navigation Demo Summary
2 Types of localization: Application localization (admin panel) Content localization (content items in the db) Localization Support
Localization How to install additional modules from the online gallery How to activate features using the Command Line Utility How to create your own Theme Demo Summary
Shared Environment (medium-trust supported) Deploy on Windows Azure using Windows Azure Tools for VS Support multi-tenancy Deployment
WebMatrix Download WebMatrix (available in 9 languages) WebMatrix tutorial available Orchard Download Orchard Discussion, Forum, Public Mailing list: 1 Year Free* Hosting for students *special terms of use apply Resources
Content type: parts & fields
Creating a map content part Creating a module (Maps module) exposing the map content part How do you create a module? orchard>codegen module Maps Module.txt Creating a map content part
Module.txt
Modules\Maps\Model\Map.cs
How do I create Migrations.cs? orchard>codegen datamigration maps Modules\Maps\Migrations.cs
Modules\Maps\Handlers\MapHandler.cs
Modules\Maps\Drivers\MapDriver.cs
Display View Editor View Modules\Maps\Views\.....\Map.cshtml
Where should Map.cshtml views be rendered? Modules\Maps\placement.info
© 2011 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.