SlideShare uma empresa Scribd logo
1 de 22
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

Mais conteúdo relacionado

Mais procurados

Introduction to the jQuery mobile framework
Introduction to the jQuery mobile frameworkIntroduction to the jQuery mobile framework
Introduction to the jQuery mobile frameworkRishabh Rao
 
Introduction to jquery mobile with Phonegap
Introduction to jquery mobile with PhonegapIntroduction to jquery mobile with Phonegap
Introduction to jquery mobile with PhonegapRakesh Jha
 
jQuery Mobile with HTML5
jQuery Mobile with HTML5jQuery Mobile with HTML5
jQuery Mobile with HTML5madhurpgarg
 
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 ExtensionRobert Nyman
 
Architecture of Drupal - Drupal Camp
Architecture of Drupal - Drupal CampArchitecture of Drupal - Drupal Camp
Architecture of Drupal - Drupal CampDipen Chaudhary
 
jQuery Mobile: Progressive Enhancement with HTML5
jQuery Mobile: Progressive Enhancement with HTML5jQuery Mobile: Progressive Enhancement with HTML5
jQuery Mobile: Progressive Enhancement with HTML5Todd 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 DoomGrzegorz Wilczynski
 
Drupal Development
Drupal DevelopmentDrupal Development
Drupal DevelopmentJeff Eaton
 
Bootstrap webtech presentation - new
Bootstrap   webtech presentation - newBootstrap   webtech presentation - new
Bootstrap webtech presentation - newWebtech Learning
 
Firefox extension Development
Firefox extension DevelopmentFirefox extension Development
Firefox extension DevelopmentAbhinav Chittora
 
WordPress Theme Development
 WordPress Theme Development WordPress Theme Development
WordPress Theme DevelopmentBijay Oli
 
Bootstrap Workout 2015
Bootstrap Workout 2015Bootstrap Workout 2015
Bootstrap Workout 2015Rob Davarnia
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks TriviaCognizant
 
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 blogigorgentry
 
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 VijayanDeepu 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 NepalChandra Prakash Thapa
 

Mais procurados (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
 

Destaque (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
 

Semelhante a 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 Presentationalledia
 
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 TemplateSean Burgess
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introductioncherukumilli2
 
Web design and Development
Web design and DevelopmentWeb design and Development
Web design and DevelopmentShagor 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 WordPressNile Flores
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1Yoav Farhi
 
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 CodeMichael Sturgeon
 
3 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp023 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp02Aditya Varma
 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentSitdhibong 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 shortcodeRakesh 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 #seoplus2018Esteve Castells
 

Semelhante a 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
 

Último

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Último (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

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

Notas do Editor

  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