SlideShare a Scribd company logo
Build a WordPress Blog and
Photo Gallery Site in 60 Minutes!
          With WebMatrix




                                             Alice Pang
                           Developer Evangelist, Microsoft
                            http://blogs.msdn.com/alicerp
                                  http://twitter.com/alicerp
How WebMatrix Came About




 Web Server   Database   Development Tool
WebMatrix Users
     Peter                  Eric




                        I want to build a
 I need a blog, so I     web site for my
   need a tool that    photos with an easy
 makes it easier to     to learn tool and
configure, customize        framework
    and publish it.
Peter, the food blogger
Peter’s to-do’s
• set up a WordPress blog
• customize some settings
• Publish the blog
DEMO
    E   M

D
            O
Eric, the photographer
Eric’s to-do’s
•   set up a photo gallery site
•   customize with Razor syntax
•   Set up admin
•   Add Facebook helper
•   Publish the photo gallery site
Razor Syntax is Easy!
     Web Forms            <ul>
(6 markup transitions):     <% for (int i = 0; i < 10; i++) { %>
                              <li><% =i %></li>
                            <% } %>
                          </ul>


        PHP               <ul>
                            <?php
(2 markup transitions          for ($i = 0; $i < 10; $i++) {
     & an echo):                  echo("<li>$i</li>");
                               }
                            ?>
                          </ul>


       Razor              <ul>
                            @for (int i = 0; i < 10; i++) {
(2 markup transitions):       <li>@i</li>
                            }
                          </ul>
Commenting in Razor
            @*
              <div>
Option 1:       Hello World
Markup        </div>
            *@


            @{
              //var name = "John Doe”;
Option 2:     //@name
 Code       }


            @*
Option 3:     @{
                var name = "John Doe";
 Both           //@name
              }
            *@
Layouts make organizing your
        pages easier
 Don’t repeat yourself!
 Define one layout and use it across your website


                          Page 1


                                   Page 2
 Layout.cshtml


                          Page 3
Layout Syntax



/Shared/_Layout.cshtml
<html>
    <head>
      <title>Simple Layout</title>                        MyPage.cshtml
    </head>
                                @{
    <body>
                                   Layout = "/Shared/_Layout.cshtml";
        @RenderBody()
                                }
    </body>
</html>
                                <p>
                                   My content goes here
                                </p>
Use Sections to organize your
               pages
          Sections allow you to define areas of content that change
          between pages but need to be included in a layout

/Shared/_Layout.cshtml
                                                          MyPage.cshtml
<html>
    <head>                      @{
      <title>Simple Layout</title> Layout = "/Shared/_Layout.cshtml";
    </head>                     }
    <body>
        @RenderSection("Menu") @section Menu {
        @RenderBody()              <ul id="pageMenu">
    </body>                              <li>Option 1</li>
</html>                                  <li>Option 2</li>
                                   </ul>
                                }
                                <p>
                                   My content goes here
                                </p>
DEMO
    E   M

D
            O
What is Membership?
• Provides registration for users
• Organize users into roles
• Restrict access to pages on your website
  based on user or role

Some templates include Admin folder with all the pages
required for membership
Setting up Membership
• Set up membership in one line of code

 /_AppStart.cshtml
  @{
     WebSecurity.InitializeDatabaseConnection("StarterSite", "UserProfile", "UserId", "Email",
  true);
  }

  StarterSite database
DEMO
    E   M

D
            O
What are Helpers?
• Helpers make it easy to quickly add commonly used
  functionality into your websites
• Helpers are designed to make your life easier
• Some examples:
   –   Facebook
   –   Twitter
   –   PayPal
   –   UserVoice
   –   OData
   –   Windows Azure Storage
   –   And many more…
Two categories of Helpers
You can think of Helpers like this:
                Make is faster and easier to render
                commonly used markup to the page.
 HTML Helpers
                Examples: Facebook, Twitter




                Make is faster and easier to call
                complex APIs from your website.
  API Helpers   Examples: PayPal, OData, Windows
                Azure Storage
Make your website social
• Add social capabilities to your website with the
  WebMatrix Helper for Facebook
• There are many more helpers available for WebMatrix

   @FacebookSocialPlugins.Comments()
DEMO
    E   M

D
            O
Next Steps

Download it here:
   http://bit.ly/MSwebmatrix



• http://blogs.msdn.com/alicerp

More Related Content

What's hot

Introduction to the jQuery mobile framework
Introduction to the jQuery mobile frameworkIntroduction to the jQuery mobile framework
Introduction to the jQuery mobile framework
Rishabh Rao
 
Introduction to jquery mobile with Phonegap
Introduction to jquery mobile with PhonegapIntroduction to jquery mobile with Phonegap
Introduction to jquery mobile with Phonegap
Rakesh Jha
 
jQuery Mobile with HTML5
jQuery Mobile with HTML5jQuery Mobile with HTML5
jQuery Mobile with HTML5
madhurpgarg
 
Introduction to ZendX jQuery
Introduction to ZendX jQueryIntroduction to ZendX jQuery
Introduction to ZendX jQuerydennisdc
 
How To Write Your First Firefox Extension
How To Write Your First Firefox ExtensionHow To Write Your First Firefox Extension
How To Write Your First Firefox Extension
Robert Nyman
 
Architecture of Drupal - Drupal Camp
Architecture of Drupal - Drupal CampArchitecture of Drupal - Drupal Camp
Architecture of Drupal - Drupal Camp
Dipen Chaudhary
 
jQuery Mobile: Progressive Enhancement with HTML5
jQuery Mobile: Progressive Enhancement with HTML5jQuery Mobile: Progressive Enhancement with HTML5
jQuery Mobile: Progressive Enhancement with HTML5
Todd Anderson
 
Firefox Extension Development
Firefox Extension DevelopmentFirefox Extension Development
Firefox Extension Developmentphamvanvung
 
WebComponents or shadow side of the Doom
WebComponents or shadow side of the DoomWebComponents or shadow side of the Doom
WebComponents or shadow side of the Doom
Grzegorz Wilczynski
 
Drupal Development
Drupal DevelopmentDrupal Development
Drupal Development
Jeff Eaton
 
Bootstrap webtech presentation - new
Bootstrap   webtech presentation - newBootstrap   webtech presentation - new
Bootstrap webtech presentation - new
Webtech Learning
 
Firefox extension Development
Firefox extension DevelopmentFirefox extension Development
Firefox extension Development
Abhinav Chittora
 
WordPress Theme Development
 WordPress Theme Development WordPress Theme Development
WordPress Theme Development
Bijay Oli
 
Bootstrap Workout 2015
Bootstrap Workout 2015Bootstrap Workout 2015
Bootstrap Workout 2015
Rob Davarnia
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks Trivia
Cognizant
 
Installing And Configuration for your Wordpress blog
Installing And Configuration for your Wordpress blogInstalling And Configuration for your Wordpress blog
Installing And Configuration for your Wordpress blog
igorgentry
 
Front end workflow Presentation at Coffee@DBG by Praveen Vijayan
Front end workflow Presentation at Coffee@DBG by Praveen VijayanFront end workflow Presentation at Coffee@DBG by Praveen Vijayan
Front end workflow Presentation at Coffee@DBG by Praveen Vijayan
Deepu S Nath
 
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 NepalWordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
Chandra Prakash Thapa
 

What's hot (20)

Introduction to the jQuery mobile framework
Introduction to the jQuery mobile frameworkIntroduction to the jQuery mobile framework
Introduction to the jQuery mobile framework
 
Introduction to jquery mobile with Phonegap
Introduction to jquery mobile with PhonegapIntroduction to jquery mobile with Phonegap
Introduction to jquery mobile with Phonegap
 
An Introduction to Drupal
An Introduction to DrupalAn Introduction to Drupal
An Introduction to Drupal
 
jQuery Mobile with HTML5
jQuery Mobile with HTML5jQuery Mobile with HTML5
jQuery Mobile with HTML5
 
Introduction to ZendX jQuery
Introduction to ZendX jQueryIntroduction to ZendX jQuery
Introduction to ZendX jQuery
 
How To Write Your First Firefox Extension
How To Write Your First Firefox ExtensionHow To Write Your First Firefox Extension
How To Write Your First Firefox Extension
 
Firefox addons
Firefox addonsFirefox addons
Firefox addons
 
Architecture of Drupal - Drupal Camp
Architecture of Drupal - Drupal CampArchitecture of Drupal - Drupal Camp
Architecture of Drupal - Drupal Camp
 
jQuery Mobile: Progressive Enhancement with HTML5
jQuery Mobile: Progressive Enhancement with HTML5jQuery Mobile: Progressive Enhancement with HTML5
jQuery Mobile: Progressive Enhancement with HTML5
 
Firefox Extension Development
Firefox Extension DevelopmentFirefox Extension Development
Firefox Extension Development
 
WebComponents or shadow side of the Doom
WebComponents or shadow side of the DoomWebComponents or shadow side of the Doom
WebComponents or shadow side of the Doom
 
Drupal Development
Drupal DevelopmentDrupal Development
Drupal Development
 
Bootstrap webtech presentation - new
Bootstrap   webtech presentation - newBootstrap   webtech presentation - new
Bootstrap webtech presentation - new
 
Firefox extension Development
Firefox extension DevelopmentFirefox extension Development
Firefox extension Development
 
WordPress Theme Development
 WordPress Theme Development WordPress Theme Development
WordPress Theme Development
 
Bootstrap Workout 2015
Bootstrap Workout 2015Bootstrap Workout 2015
Bootstrap Workout 2015
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks Trivia
 
Installing And Configuration for your Wordpress blog
Installing And Configuration for your Wordpress blogInstalling And Configuration for your Wordpress blog
Installing And Configuration for your Wordpress blog
 
Front end workflow Presentation at Coffee@DBG by Praveen Vijayan
Front end workflow Presentation at Coffee@DBG by Praveen VijayanFront end workflow Presentation at Coffee@DBG by Praveen Vijayan
Front end workflow Presentation at Coffee@DBG by Praveen Vijayan
 
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 NepalWordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
 

Viewers also liked

Ten principles
Ten principlesTen principles
Ten principles
tekerirem
 
David Deschaine Roofing Presentation
David Deschaine Roofing PresentationDavid Deschaine Roofing Presentation
David Deschaine Roofing Presentation
David J. Deschaine Roofing
 
Brief Intro Statistics
Brief Intro StatisticsBrief Intro Statistics
Brief Intro Statistics
Lord Fairfax Community College
 
Dados morfológicos do catálago Frei (1996)
Dados morfológicos do catálago Frei (1996) Dados morfológicos do catálago Frei (1996)
Dados morfológicos do catálago Frei (1996)
Universidade Federal de Santa Maria
 
Migliaccio unit5 powerpoint
Migliaccio unit5 powerpointMigliaccio unit5 powerpoint
Migliaccio unit5 powerpoint
Lord Fairfax Community College
 
Noi
NoiNoi
Noi
abimh
 
Ke pala surat ( black metal )
Ke pala surat ( black metal )Ke pala surat ( black metal )
Ke pala surat ( black metal )fatihahdani
 
8 things you should stop doing
8 things you should stop doing8 things you should stop doing
8 things you should stop doing
Febiyan Rachman
 
Reinforcement learning
Reinforcement learningReinforcement learning
Reinforcement learning
Hirotoka Sakatani
 

Viewers also liked (12)

Ten principles
Ten principlesTen principles
Ten principles
 
David Deschaine Roofing Presentation
David Deschaine Roofing PresentationDavid Deschaine Roofing Presentation
David Deschaine Roofing Presentation
 
Brief Intro Statistics
Brief Intro StatisticsBrief Intro Statistics
Brief Intro Statistics
 
Pkn klpk 1,
Pkn klpk 1,Pkn klpk 1,
Pkn klpk 1,
 
Dados morfológicos do catálago Frei (1996)
Dados morfológicos do catálago Frei (1996) Dados morfológicos do catálago Frei (1996)
Dados morfológicos do catálago Frei (1996)
 
Reinforcement learning
Reinforcement learningReinforcement learning
Reinforcement learning
 
Migliaccio unit5 powerpoint
Migliaccio unit5 powerpointMigliaccio unit5 powerpoint
Migliaccio unit5 powerpoint
 
Fotografia
FotografiaFotografia
Fotografia
 
Noi
NoiNoi
Noi
 
Ke pala surat ( black metal )
Ke pala surat ( black metal )Ke pala surat ( black metal )
Ke pala surat ( black metal )
 
8 things you should stop doing
8 things you should stop doing8 things you should stop doing
8 things you should stop doing
 
Reinforcement learning
Reinforcement learningReinforcement learning
Reinforcement learning
 

Similar to WebMatrix 100-level presentation

J day la 2011 webmatrix
J day la 2011 webmatrixJ day la 2011 webmatrix
J day la 2011 webmatrixAlice Pang
 
Intro to MVC 3 for Government Developers
Intro to MVC 3 for Government DevelopersIntro to MVC 3 for Government Developers
Intro to MVC 3 for Government DevelopersFrank La Vigne
 
Joomla Beginner Template Presentation
Joomla Beginner Template PresentationJoomla Beginner Template Presentation
Joomla Beginner Template Presentation
alledia
 
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBlog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Sean Burgess
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introduction
cherukumilli2
 
Agile Wordpress
Agile WordpressAgile Wordpress
Agile Wordpress
Filippo Dino
 
Web design and Development
Web design and DevelopmentWeb design and Development
Web design and Development
Shagor Ahmed
 
PHP FUNCTIONS
PHP FUNCTIONSPHP FUNCTIONS
PHP FUNCTIONS
Zeeshan Ahmed
 
Prairie Dev Con West - 2012-03-14 - Webmatrix, see what the matrix can do fo...
Prairie Dev Con West -  2012-03-14 - Webmatrix, see what the matrix can do fo...Prairie Dev Con West -  2012-03-14 - Webmatrix, see what the matrix can do fo...
Prairie Dev Con West - 2012-03-14 - Webmatrix, see what the matrix can do fo...Frédéric Harper
 
PSD to WordPress
PSD to WordPressPSD to WordPress
PSD to WordPress
Nile Flores
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1Yoav Farhi
 
Wordpress
WordpressWordpress
Wordpress
samirlakhanistb
 
HTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the CodeHTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the Code
Michael Sturgeon
 
3 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp023 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp02
Aditya Varma
 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme Development
Sitdhibong Laokok
 
WordPress basic fundamental of plugin development and creating shortcode
WordPress basic fundamental of plugin development and creating shortcodeWordPress basic fundamental of plugin development and creating shortcode
WordPress basic fundamental of plugin development and creating shortcode
Rakesh Kushwaha
 
DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!
DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!
DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!Frédéric Harper
 
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Esteve Castells
 

Similar to WebMatrix 100-level presentation (20)

J day la 2011 webmatrix
J day la 2011 webmatrixJ day la 2011 webmatrix
J day la 2011 webmatrix
 
Intro to MVC 3 for Government Developers
Intro to MVC 3 for Government DevelopersIntro to MVC 3 for Government Developers
Intro to MVC 3 for Government Developers
 
Joomla Beginner Template Presentation
Joomla Beginner Template PresentationJoomla Beginner Template Presentation
Joomla Beginner Template Presentation
 
Creating a basic joomla
Creating a basic joomlaCreating a basic joomla
Creating a basic joomla
 
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBlog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introduction
 
Agile Wordpress
Agile WordpressAgile Wordpress
Agile Wordpress
 
Web design and Development
Web design and DevelopmentWeb design and Development
Web design and Development
 
PHP FUNCTIONS
PHP FUNCTIONSPHP FUNCTIONS
PHP FUNCTIONS
 
Prairie Dev Con West - 2012-03-14 - Webmatrix, see what the matrix can do fo...
Prairie Dev Con West -  2012-03-14 - Webmatrix, see what the matrix can do fo...Prairie Dev Con West -  2012-03-14 - Webmatrix, see what the matrix can do fo...
Prairie Dev Con West - 2012-03-14 - Webmatrix, see what the matrix can do fo...
 
PSD to WordPress
PSD to WordPressPSD to WordPress
PSD to WordPress
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1
 
Wordpress
WordpressWordpress
Wordpress
 
HTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the CodeHTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the Code
 
HTML Fundamentals
HTML FundamentalsHTML Fundamentals
HTML Fundamentals
 
3 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp023 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp02
 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme Development
 
WordPress basic fundamental of plugin development and creating shortcode
WordPress basic fundamental of plugin development and creating shortcodeWordPress basic fundamental of plugin development and creating shortcode
WordPress basic fundamental of plugin development and creating shortcode
 
DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!
DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!
DevTeach Ottawa - Webmatrix, see what the matrix can do for you!!
 
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
 

Recently uploaded

Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 

Recently uploaded (20)

Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 

WebMatrix 100-level presentation

  • 1. Build a WordPress Blog and Photo Gallery Site in 60 Minutes! With WebMatrix Alice Pang Developer Evangelist, Microsoft http://blogs.msdn.com/alicerp http://twitter.com/alicerp
  • 2. How WebMatrix Came About Web Server Database Development Tool
  • 3. WebMatrix Users Peter Eric I want to build a I need a blog, so I web site for my need a tool that photos with an easy makes it easier to to learn tool and configure, customize framework and publish it.
  • 4. Peter, the food blogger
  • 5. Peter’s to-do’s • set up a WordPress blog • customize some settings • Publish the blog
  • 6. DEMO E M D O
  • 8. Eric’s to-do’s • set up a photo gallery site • customize with Razor syntax • Set up admin • Add Facebook helper • Publish the photo gallery site
  • 9. Razor Syntax is Easy! Web Forms <ul> (6 markup transitions): <% for (int i = 0; i < 10; i++) { %> <li><% =i %></li> <% } %> </ul> PHP <ul> <?php (2 markup transitions for ($i = 0; $i < 10; $i++) { & an echo): echo("<li>$i</li>"); } ?> </ul> Razor <ul> @for (int i = 0; i < 10; i++) { (2 markup transitions): <li>@i</li> } </ul>
  • 10. Commenting in Razor @* <div> Option 1: Hello World Markup </div> *@ @{ //var name = "John Doe”; Option 2: //@name Code } @* Option 3: @{ var name = "John Doe"; Both //@name } *@
  • 11. Layouts make organizing your pages easier Don’t repeat yourself! Define one layout and use it across your website Page 1 Page 2 Layout.cshtml Page 3
  • 12. Layout Syntax /Shared/_Layout.cshtml <html> <head> <title>Simple Layout</title> MyPage.cshtml </head> @{ <body> Layout = "/Shared/_Layout.cshtml"; @RenderBody() } </body> </html> <p> My content goes here </p>
  • 13. Use Sections to organize your pages Sections allow you to define areas of content that change between pages but need to be included in a layout /Shared/_Layout.cshtml MyPage.cshtml <html> <head> @{ <title>Simple Layout</title> Layout = "/Shared/_Layout.cshtml"; </head> } <body> @RenderSection("Menu") @section Menu { @RenderBody() <ul id="pageMenu"> </body> <li>Option 1</li> </html> <li>Option 2</li> </ul> } <p> My content goes here </p>
  • 14. DEMO E M D O
  • 15. What is Membership? • Provides registration for users • Organize users into roles • Restrict access to pages on your website based on user or role Some templates include Admin folder with all the pages required for membership
  • 16. Setting up Membership • Set up membership in one line of code /_AppStart.cshtml @{ WebSecurity.InitializeDatabaseConnection("StarterSite", "UserProfile", "UserId", "Email", true); } StarterSite database
  • 17. DEMO E M D O
  • 18. What are Helpers? • Helpers make it easy to quickly add commonly used functionality into your websites • Helpers are designed to make your life easier • Some examples: – Facebook – Twitter – PayPal – UserVoice – OData – Windows Azure Storage – And many more…
  • 19. Two categories of Helpers You can think of Helpers like this: Make is faster and easier to render commonly used markup to the page. HTML Helpers Examples: Facebook, Twitter Make is faster and easier to call complex APIs from your website. API Helpers Examples: PayPal, OData, Windows Azure Storage
  • 20. Make your website social • Add social capabilities to your website with the WebMatrix Helper for Facebook • There are many more helpers available for WebMatrix @FacebookSocialPlugins.Comments()
  • 21. DEMO E M D O
  • 22. Next Steps Download it here: http://bit.ly/MSwebmatrix • http://blogs.msdn.com/alicerp

Editor's Notes

  1. WebMatrix evolved from a number of things that Microsoft was working on, including IIS Developer Express, SQL Server CE, and ASP.NET Razor syntax. Razor syntax is an easy way to mix HTML and code like C# and VB, but it’s also used on other platforms such as MVC. File extensions are .cshtml and .vbhtml
  2. Introduce two users: (1) the foodie who wants to get a food recipes and food adventures blog up quickly and easily by using the app gallery and (2) the photographer who wants to be more hands-on with customizing his site
  3. We’re going to help Peter do these three things. We will show him how to customize in WordPress and with PHP code in WebMatrix. We’ll also show off some cool PHP IntelliSense in the process.
  4. Set up WordPress blog, change theme, PHP customization, publish: http://blogs.msdn.com/b/alicerp/archive/2011/09/30/get-your-wordpress-blog-up-and-running-and-customize-it-in-25-minutes.aspx
  5. Moving on to the photographer
  6. We will set up a photo gallery site from the template, introduce ASP.NET Razor syntax and add a Page Footer with Razor syntax, set up administrator role and use Razor to restrict access to a page, add a Facebook (or Twitter) helper through both the NuGet gallery and ASP.NET Web Pages administration, publish
  7. Reduces the number of keystrokes and is intuitive for programmers.
  8. Option 1:You can comment a block by using @* … *@Please note that this method could not be recursive (you could not have a @* inside another @*)Option 2:You can comment lines by using // (in C#) the same way you do in your code files.Option 3:If you need to comment a whole razor block, you should add a @* before the beginning of the code block and a *@ after it’s finish.
  9. Inject code, like ASP.NET Master Pages
  10. Create photo gallery, show off reports, UI in WebMatrix, add photo/comment/user account to show off databases, create new file for PageFooterhttp://blogs.msdn.com/b/alicerp/archive/2011/10/13/create-a-consistent-look-to-your-website-and-get-started-with-asp-net-razor-syntax-by-adding-a-page-footer.aspx
  11. The StarterSite Template comes with membership configured, and with a Database ready to be filled with users as well as their roles in the website.First, you have to uncomment the WebSecurity.InitializeDatabaseConnection and fill the parameters with a userProfile and userId to be defined in the database.
  12. Show off reCaptcha.net code that is added but commented out by default in this template, add administrator role, assign user to this role, and create an AdminOnly and AdminError page to restrict access.http://blogs.msdn.com/b/alicerp/archive/2011/10/30/membership-roles-made-easy-with-razor-syntax-in-webmatrix.aspx
  13. WebMatrix Helpers help you add common functionality to your Web site. They can be used to solve a specific web site tasks. You can think of them as bricks that are used/reused and interconnected to build a site. Nothing stops you from creating a helper and reusing it on different pages of your site, or even in different sites. And you can use helpers created by others. Here is a sample of existing helpers.
  14. HTML Helpers focus in look &amp; feel and simple connection with other sites, like Facebook and Twitter.API Helpers are more complex helpers, conceived to interact with external services. Their focus is not based on the user interface, but the service integrity, for instance how to secure a transaction in PayPal or registering an order to update your storage in a Windows Azure Account.
  15. If people like something on your site, they often want to share it with friends. For instance, to comment on Facebook, you can download the FacebookSocialHelper and then add the @FacebookSocialPlugins.Comments() in your page to show the Facebook comments’ controls.
  16. Show adding helper from both NuGet gallery and ASP.NET web pages administration. Add Facebook, Twitter, or your favorite helper and demonstrate how easy it is to use Razor and IntelliSense to add a helper and show that the packages is automatically populated when you add a helper. http://blogs.msdn.com/b/alicerp/archive/2011/10/13/make-your-website-more-social-with-helpers.aspx