SlideShare a Scribd company logo
1 of 18
Welcome to

MUGH TechMeet – October
         2011
Introduction to WebMatrix


                              Pranav Ainavolu
                                 Thomson Reuters
     Twitter: @a_pranav | Blog: http://pranavon.net
Agenda
 What is WebMatrix?
 Razor Syntax
 Database Access
 WebGrid
Introducing WebMatrix




   Create   Customize   Publish
Introducing WebMatrix




 Web Server   Database   Development Tool
Who is WebMatrix for?




    I <3 Web Apps.        I want to build web     I’m a professional
I just need a tool that     sites myself with    software developer
makes them easier to        an easy to learn     and I build complex,
configure, customize              tool and      large scale web sites
   and publish them             framework           with a team of
                                                     developers
A lap around WebMatrix


Demo
Introducing Razor
 The easiest way to code websites
 Easy to mix HTML and Code
 Lots of useful Helpers
Razor is a cut above the rest
                           <ul>
                             <% for (int i = 0; i < 10; i++) { %>
     Web Forms
                               <li><% =i %></li>
 (6 markup transitions):     <% } %>
                           </ul>

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

                           <ul>
        Razor                @for (int i = 0; i < 10; i++) {
                               <li>@i</li>
 (2 markup transitions):     }
                           </ul>
Move from code to markup easily with Razor

                             @{
                                  var name = “John Doe”;
           Option 1:              <div>
          HTML Block                Your name: @name
                                  </div>
                             }

                             @{
                                  var name = “John Doe”;
          Option 2:               <text>
          Text Block                Your name: @name
                                  </text>
                             }

           Option 3:         @{
                                  var name = “John Doe”;
     Single line of output        @: Your name: @name
          in markup          }
Commenting in Razor
                @*
                  <div>
    Option 1:
                    Hello World
    Markup        </div>
                *@


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


                @*
    Option 3:     @{
                    var name = "John Doe";
     Both           @name
                  }
                *@
Razor syntax



Demo
Database
     SQL Compact Edition
       File-based, so it’s portable. Runs without a server.
     Easy to design, easy to code against

Designing


                                                         Coding
            @{
              var db = Database.Open("ArtGallery");
              var product = db.Query("SELECT * FROM PRODUCTS);
            }
Database Access


Demo
Display your data easily with WebGrid
 Displays your data quickly and easily
 Lots of options to customize layout,
 appearance, paging etc.

@{
  var db = Database.Open("ArtGallery");
  var data = db.Query("SELECT * FROM PRODUCTS);
   <div id="grid">
  var@grid.GetHtml(
       grid @{ new WebGrid(data);
            =
}       columns: grid.Columns(
              var db = Database.Open("ArtGallery");
          grid.Column("Name", "Product", style: "product"),
              var data = db.Query("SELECT * FROM PRODUCTS);
<div id="grid"> grid = new WebGrid( format:@<i>@item.Description</i>),
          grid.Column("Description",
              var
  @grid.GetHtml();
          grid.Column("Price", format:@<text>$@item.Price</text>)
                                  source: data,
</div> )                          defaultSort: "Name",
     )                            rowsPerPage: 3);
   </div> }
WebGrid


Demo
Summary
 What is WebMatrix?
 Razor Syntax
 Database Access
 WebGrid
Q&A


Thank You!

More Related Content

What's hot

Using Mongoid with Ruby on Rails
Using Mongoid with Ruby on RailsUsing Mongoid with Ruby on Rails
Using Mongoid with Ruby on RailsNicholas Altobelli
 
Building Your First App with MongoDB
Building Your First App with MongoDBBuilding Your First App with MongoDB
Building Your First App with MongoDBMongoDB
 
Schema design short
Schema design shortSchema design short
Schema design shortMongoDB
 
Mastering the MongoDB Shell
Mastering the MongoDB ShellMastering the MongoDB Shell
Mastering the MongoDB ShellMongoDB
 
Mongophilly shell-2011-04-26
Mongophilly shell-2011-04-26Mongophilly shell-2011-04-26
Mongophilly shell-2011-04-26kreuter
 
Protecting Your Clients' Privacy
Protecting Your Clients' PrivacyProtecting Your Clients' Privacy
Protecting Your Clients' PrivacyAijaz Ansari
 
JSON-(JavaScript Object Notation)
JSON-(JavaScript Object Notation)JSON-(JavaScript Object Notation)
JSON-(JavaScript Object Notation)Skillwise Group
 
Knockout vs. angular
Knockout vs. angularKnockout vs. angular
Knockout vs. angularMaslowB
 
Building Your First App: An Introduction to MongoDB
Building Your First App: An Introduction to MongoDBBuilding Your First App: An Introduction to MongoDB
Building Your First App: An Introduction to MongoDBGreat Wide Open
 
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and MingRapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and MingRick Copeland
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Railsrfischer20
 
GQL cheat sheet latest
GQL cheat sheet latestGQL cheat sheet latest
GQL cheat sheet latestsones GmbH
 
MongoDB & Mongomapper 4 real
MongoDB & Mongomapper 4 realMongoDB & Mongomapper 4 real
MongoDB & Mongomapper 4 realjan_mindmatters
 
Building a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and JavaBuilding a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and Javaantoinegirbal
 
MongoDB and PHP ZendCon 2011
MongoDB and PHP ZendCon 2011MongoDB and PHP ZendCon 2011
MongoDB and PHP ZendCon 2011Steven Francia
 
Mongo db勉強会20110730
Mongo db勉強会20110730Mongo db勉強会20110730
Mongo db勉強会20110730Akihiro Okuno
 

What's hot (20)

Using Mongoid with Ruby on Rails
Using Mongoid with Ruby on RailsUsing Mongoid with Ruby on Rails
Using Mongoid with Ruby on Rails
 
ActiveRecord vs Mongoid
ActiveRecord vs MongoidActiveRecord vs Mongoid
ActiveRecord vs Mongoid
 
Building Your First App with MongoDB
Building Your First App with MongoDBBuilding Your First App with MongoDB
Building Your First App with MongoDB
 
MongoDB & Drupal
MongoDB & DrupalMongoDB & Drupal
MongoDB & Drupal
 
Schema design short
Schema design shortSchema design short
Schema design short
 
Mastering the MongoDB Shell
Mastering the MongoDB ShellMastering the MongoDB Shell
Mastering the MongoDB Shell
 
Mongophilly shell-2011-04-26
Mongophilly shell-2011-04-26Mongophilly shell-2011-04-26
Mongophilly shell-2011-04-26
 
Media wiki
Media wikiMedia wiki
Media wiki
 
Protecting Your Clients' Privacy
Protecting Your Clients' PrivacyProtecting Your Clients' Privacy
Protecting Your Clients' Privacy
 
JSON-(JavaScript Object Notation)
JSON-(JavaScript Object Notation)JSON-(JavaScript Object Notation)
JSON-(JavaScript Object Notation)
 
Knockout vs. angular
Knockout vs. angularKnockout vs. angular
Knockout vs. angular
 
Building Your First App: An Introduction to MongoDB
Building Your First App: An Introduction to MongoDBBuilding Your First App: An Introduction to MongoDB
Building Your First App: An Introduction to MongoDB
 
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and MingRapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Rails
 
GQL cheat sheet latest
GQL cheat sheet latestGQL cheat sheet latest
GQL cheat sheet latest
 
MongoDB & Mongomapper 4 real
MongoDB & Mongomapper 4 realMongoDB & Mongomapper 4 real
MongoDB & Mongomapper 4 real
 
Building a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and JavaBuilding a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and Java
 
MongoDB and PHP ZendCon 2011
MongoDB and PHP ZendCon 2011MongoDB and PHP ZendCon 2011
MongoDB and PHP ZendCon 2011
 
Mongo db勉強会20110730
Mongo db勉強会20110730Mongo db勉強会20110730
Mongo db勉強会20110730
 
jQuery
jQueryjQuery
jQuery
 

Viewers also liked

Windows8 and Windows Azure Mobile Services
Windows8 and Windows Azure Mobile ServicesWindows8 and Windows Azure Mobile Services
Windows8 and Windows Azure Mobile ServicesPranav Ainavolu
 
Building Apps for Office 2013
Building Apps for Office 2013Building Apps for Office 2013
Building Apps for Office 2013Pranav Ainavolu
 
Social Engineering with Fibonacci's Numbers
Social Engineering with Fibonacci's NumbersSocial Engineering with Fibonacci's Numbers
Social Engineering with Fibonacci's NumbersDrew James
 
Parroquia San blas
Parroquia San blasParroquia San blas
Parroquia San blashebert
 
Building Windows Store apps with HTML & Javascript
Building Windows Store apps with HTML & JavascriptBuilding Windows Store apps with HTML & Javascript
Building Windows Store apps with HTML & JavascriptPranav Ainavolu
 
Enrique lomeli field lab part one!!
Enrique lomeli field lab part one!!Enrique lomeli field lab part one!!
Enrique lomeli field lab part one!!kikechivas08
 
Native iOS, Android apps using Xamarin.Forms dotnetConf2016 Hyderabad
Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 HyderabadNative iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad
Native iOS, Android apps using Xamarin.Forms dotnetConf2016 HyderabadPranav Ainavolu
 

Viewers also liked (9)

Windows8 and Windows Azure Mobile Services
Windows8 and Windows Azure Mobile ServicesWindows8 and Windows Azure Mobile Services
Windows8 and Windows Azure Mobile Services
 
Building Apps for Office 2013
Building Apps for Office 2013Building Apps for Office 2013
Building Apps for Office 2013
 
Social Engineering with Fibonacci's Numbers
Social Engineering with Fibonacci's NumbersSocial Engineering with Fibonacci's Numbers
Social Engineering with Fibonacci's Numbers
 
Parroquia San blas
Parroquia San blasParroquia San blas
Parroquia San blas
 
Building Windows Store apps with HTML & Javascript
Building Windows Store apps with HTML & JavascriptBuilding Windows Store apps with HTML & Javascript
Building Windows Store apps with HTML & Javascript
 
Enrique lomeli field lab part one!!
Enrique lomeli field lab part one!!Enrique lomeli field lab part one!!
Enrique lomeli field lab part one!!
 
Native iOS, Android apps using Xamarin.Forms dotnetConf2016 Hyderabad
Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 HyderabadNative iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad
Native iOS, Android apps using Xamarin.Forms dotnetConf2016 Hyderabad
 
Bring Me A Beer
Bring Me A  BeerBring Me A  Beer
Bring Me A Beer
 
Field lab part2!!
Field lab part2!!Field lab part2!!
Field lab part2!!
 

Similar to Introduction towebmatrix

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
 
Microsoft Web Matrix
Microsoft Web MatrixMicrosoft Web Matrix
Microsoft Web MatrixSaurabh Moody
 
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
 
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
 
WebMatrix, see what the matrix can do for you!!
WebMatrix, see what the matrix can do for you!!WebMatrix, see what the matrix can do for you!!
WebMatrix, see what the matrix can do for you!!Frédéric Harper
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government DevelopersFrank La Vigne
 
Jquery dojo slides
Jquery dojo slidesJquery dojo slides
Jquery dojo slideshelenmga
 
20131108 cs query by howard
20131108 cs query by howard20131108 cs query by howard
20131108 cs query by howardLearningTech
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Sadaaki HIRAI
 
Html5 and web technology update
Html5 and web technology updateHtml5 and web technology update
Html5 and web technology updateDoug Domeny
 
Dom selecting & jQuery
Dom selecting & jQueryDom selecting & jQuery
Dom selecting & jQueryKim Hunmin
 
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)lennartkats
 
GDG Almaty Meetup: Reactive full-stack .NET web applications with WebSharper
GDG Almaty Meetup: Reactive full-stack .NET web applications with WebSharperGDG Almaty Meetup: Reactive full-stack .NET web applications with WebSharper
GDG Almaty Meetup: Reactive full-stack .NET web applications with WebSharpergranicz
 
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるIt is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるSadaaki HIRAI
 

Similar to Introduction towebmatrix (20)

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...
 
Microsoft Web Matrix
Microsoft Web MatrixMicrosoft Web Matrix
Microsoft Web Matrix
 
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
 
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!!
 
WebMatrix, see what the matrix can do for you!!
WebMatrix, see what the matrix can do for you!!WebMatrix, see what the matrix can do for you!!
WebMatrix, see what the matrix can do for you!!
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government Developers
 
Jquery dojo slides
Jquery dojo slidesJquery dojo slides
Jquery dojo slides
 
Jquery fundamentals
Jquery fundamentalsJquery fundamentals
Jquery fundamentals
 
20131108 cs query by howard
20131108 cs query by howard20131108 cs query by howard
20131108 cs query by howard
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
 
Html5 101
Html5 101Html5 101
Html5 101
 
Html5 and web technology update
Html5 and web technology updateHtml5 and web technology update
Html5 and web technology update
 
Dom selecting & jQuery
Dom selecting & jQueryDom selecting & jQuery
Dom selecting & jQuery
 
Edge of the Web
Edge of the WebEdge of the Web
Edge of the Web
 
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
 
GDG Almaty Meetup: Reactive full-stack .NET web applications with WebSharper
GDG Almaty Meetup: Reactive full-stack .NET web applications with WebSharperGDG Almaty Meetup: Reactive full-stack .NET web applications with WebSharper
GDG Almaty Meetup: Reactive full-stack .NET web applications with WebSharper
 
Introduccion a HTML5
Introduccion a HTML5Introduccion a HTML5
Introduccion a HTML5
 
html5
html5html5
html5
 
HTML5 - Pedro Rosa
HTML5 - Pedro RosaHTML5 - Pedro Rosa
HTML5 - Pedro Rosa
 
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるIt is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
 

More from Pranav Ainavolu

Containerization with Azure
Containerization with AzureContainerization with Azure
Containerization with AzurePranav Ainavolu
 
Microsoft Azure - Introduction
Microsoft Azure - IntroductionMicrosoft Azure - Introduction
Microsoft Azure - IntroductionPranav Ainavolu
 
Cross platform mobile app development with Xamarin
Cross platform mobile app development with XamarinCross platform mobile app development with Xamarin
Cross platform mobile app development with XamarinPranav Ainavolu
 
Understanding Basics of Machine Learning
Understanding Basics of Machine LearningUnderstanding Basics of Machine Learning
Understanding Basics of Machine LearningPranav Ainavolu
 
Starting Mobile Development
Starting Mobile DevelopmentStarting Mobile Development
Starting Mobile DevelopmentPranav Ainavolu
 
Connected & Disconnected Apps with Azure Mobile Apps
Connected & Disconnected Apps with Azure Mobile AppsConnected & Disconnected Apps with Azure Mobile Apps
Connected & Disconnected Apps with Azure Mobile AppsPranav Ainavolu
 
Xamarin Dev Days - Xamarin.Forms
Xamarin Dev Days - Xamarin.FormsXamarin Dev Days - Xamarin.Forms
Xamarin Dev Days - Xamarin.FormsPranav Ainavolu
 
Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...
Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...
Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...Pranav Ainavolu
 
Building A Conversational Bot Using Bot Framework and Microsoft
Building A Conversational Bot Using Bot Framework and MicrosoftBuilding A Conversational Bot Using Bot Framework and Microsoft
Building A Conversational Bot Using Bot Framework and MicrosoftPranav Ainavolu
 
The Internet of Things with Azure Service Bus
The Internet of Things with Azure Service BusThe Internet of Things with Azure Service Bus
The Internet of Things with Azure Service BusPranav Ainavolu
 
Dev/Test Scenarios in the DevOps World
Dev/Test Scenarios in the DevOps WorldDev/Test Scenarios in the DevOps World
Dev/Test Scenarios in the DevOps WorldPranav Ainavolu
 
Using Visual Studio to build XAML Universal Apps
Using Visual Studio to build XAML Universal AppsUsing Visual Studio to build XAML Universal Apps
Using Visual Studio to build XAML Universal AppsPranav Ainavolu
 
Designing cross-platform User Interface with native performance using Xamarin...
Designing cross-platform User Interface with native performance using Xamarin...Designing cross-platform User Interface with native performance using Xamarin...
Designing cross-platform User Interface with native performance using Xamarin...Pranav Ainavolu
 
Building Android, iOS and Windows 8 Apps with Windows Azure Mobile Services
Building Android, iOS and Windows 8 Apps with Windows Azure Mobile ServicesBuilding Android, iOS and Windows 8 Apps with Windows Azure Mobile Services
Building Android, iOS and Windows 8 Apps with Windows Azure Mobile ServicesPranav Ainavolu
 
Whats New in the Visual Studio 2013 IDE
Whats New in the Visual Studio 2013 IDEWhats New in the Visual Studio 2013 IDE
Whats New in the Visual Studio 2013 IDEPranav Ainavolu
 

More from Pranav Ainavolu (18)

Containerization with Azure
Containerization with AzureContainerization with Azure
Containerization with Azure
 
ASP.NET Core Overview
ASP.NET Core OverviewASP.NET Core Overview
ASP.NET Core Overview
 
Microsoft Azure - Introduction
Microsoft Azure - IntroductionMicrosoft Azure - Introduction
Microsoft Azure - Introduction
 
Cross platform mobile app development with Xamarin
Cross platform mobile app development with XamarinCross platform mobile app development with Xamarin
Cross platform mobile app development with Xamarin
 
Understanding Basics of Machine Learning
Understanding Basics of Machine LearningUnderstanding Basics of Machine Learning
Understanding Basics of Machine Learning
 
Starting Mobile Development
Starting Mobile DevelopmentStarting Mobile Development
Starting Mobile Development
 
Connected & Disconnected Apps with Azure Mobile Apps
Connected & Disconnected Apps with Azure Mobile AppsConnected & Disconnected Apps with Azure Mobile Apps
Connected & Disconnected Apps with Azure Mobile Apps
 
Xamarin Dev Days - Xamarin.Forms
Xamarin Dev Days - Xamarin.FormsXamarin Dev Days - Xamarin.Forms
Xamarin Dev Days - Xamarin.Forms
 
Xamarin Forms
Xamarin FormsXamarin Forms
Xamarin Forms
 
Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...
Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...
Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...
 
Building A Conversational Bot Using Bot Framework and Microsoft
Building A Conversational Bot Using Bot Framework and MicrosoftBuilding A Conversational Bot Using Bot Framework and Microsoft
Building A Conversational Bot Using Bot Framework and Microsoft
 
The Internet of Things with Azure Service Bus
The Internet of Things with Azure Service BusThe Internet of Things with Azure Service Bus
The Internet of Things with Azure Service Bus
 
Dev/Test Scenarios in the DevOps World
Dev/Test Scenarios in the DevOps WorldDev/Test Scenarios in the DevOps World
Dev/Test Scenarios in the DevOps World
 
Using Visual Studio to build XAML Universal Apps
Using Visual Studio to build XAML Universal AppsUsing Visual Studio to build XAML Universal Apps
Using Visual Studio to build XAML Universal Apps
 
Designing cross-platform User Interface with native performance using Xamarin...
Designing cross-platform User Interface with native performance using Xamarin...Designing cross-platform User Interface with native performance using Xamarin...
Designing cross-platform User Interface with native performance using Xamarin...
 
Building Android, iOS and Windows 8 Apps with Windows Azure Mobile Services
Building Android, iOS and Windows 8 Apps with Windows Azure Mobile ServicesBuilding Android, iOS and Windows 8 Apps with Windows Azure Mobile Services
Building Android, iOS and Windows 8 Apps with Windows Azure Mobile Services
 
Whats New in the Visual Studio 2013 IDE
Whats New in the Visual Studio 2013 IDEWhats New in the Visual Studio 2013 IDE
Whats New in the Visual Studio 2013 IDE
 
Whats New in Excel 2013
Whats New in Excel 2013Whats New in Excel 2013
Whats New in Excel 2013
 

Recently uploaded

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
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
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Recently uploaded (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
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
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Introduction towebmatrix

  • 1. Welcome to MUGH TechMeet – October 2011
  • 2. Introduction to WebMatrix Pranav Ainavolu Thomson Reuters Twitter: @a_pranav | Blog: http://pranavon.net
  • 3. Agenda  What is WebMatrix?  Razor Syntax  Database Access  WebGrid
  • 4. Introducing WebMatrix Create Customize Publish
  • 5. Introducing WebMatrix Web Server Database Development Tool
  • 6. Who is WebMatrix for? I <3 Web Apps. I want to build web I’m a professional I just need a tool that sites myself with software developer makes them easier to an easy to learn and I build complex, configure, customize tool and large scale web sites and publish them framework with a team of developers
  • 7. A lap around WebMatrix Demo
  • 8. Introducing Razor  The easiest way to code websites  Easy to mix HTML and Code  Lots of useful Helpers
  • 9. Razor is a cut above the rest <ul> <% for (int i = 0; i < 10; i++) { %> Web Forms <li><% =i %></li> (6 markup transitions): <% } %> </ul> <ul> <?php PHP for ($i = 0; $i < 10; $i++) { (2 markup transitions echo("<li>$i</li>"); } & an echo): ?> </ul> <ul> Razor @for (int i = 0; i < 10; i++) { <li>@i</li> (2 markup transitions): } </ul>
  • 10. Move from code to markup easily with Razor @{ var name = “John Doe”; Option 1: <div> HTML Block Your name: @name </div> } @{ var name = “John Doe”; Option 2: <text> Text Block Your name: @name </text> } Option 3: @{ var name = “John Doe”; Single line of output @: Your name: @name in markup }
  • 11. Commenting in Razor @* <div> Option 1: Hello World Markup </div> *@ @{ Option 2: //var name = "John Doe”; //@name Code } @* Option 3: @{ var name = "John Doe"; Both @name } *@
  • 13. Database  SQL Compact Edition  File-based, so it’s portable. Runs without a server.  Easy to design, easy to code against Designing Coding @{ var db = Database.Open("ArtGallery"); var product = db.Query("SELECT * FROM PRODUCTS); }
  • 15. Display your data easily with WebGrid  Displays your data quickly and easily  Lots of options to customize layout, appearance, paging etc. @{ var db = Database.Open("ArtGallery"); var data = db.Query("SELECT * FROM PRODUCTS); <div id="grid"> var@grid.GetHtml( grid @{ new WebGrid(data); = } columns: grid.Columns( var db = Database.Open("ArtGallery"); grid.Column("Name", "Product", style: "product"), var data = db.Query("SELECT * FROM PRODUCTS); <div id="grid"> grid = new WebGrid( format:@<i>@item.Description</i>), grid.Column("Description", var @grid.GetHtml(); grid.Column("Price", format:@<text>$@item.Price</text>) source: data, </div> ) defaultSort: "Name", ) rowsPerPage: 3); </div> }
  • 17. Summary  What is WebMatrix?  Razor Syntax  Database Access  WebGrid

Editor's Notes

  1. 1 minuteWelcome, in the next few hours we are going to learn about WebMatrix.[Introduce yourself]
  2. 1 minuteThis session is broken down into three parts, each of approximately 50-60 minutes. At the end of this training you will have a good base understanding of WebMatrix and how to build websites and web applications using the tool and framework.In Part 1 you will learn what WebMatrix is, who the intended users are for WebMatrix and what the Razor Syntax is. You will also learn how to access a database and how to use a WebGrid control to present its data in table format.In Part 2 you will learn how to use Layouts to maintain a consistent look and feel across all of the pages within your website. You will also be introduced to the use of helpers to manage different themes in your site, connecting to Facebook and more. Then you will learn about security and websites membership. Finally you will explore how the URL routing works in WebMatrix.In Part 3 you will discover how to create your own helpers to reuse your components in WebMatrix and we will discuss about WebMatrix and Open Source Software Web Applications integration. You will then learn how to publish your web applications. We will also discuss about when and how to move to Visual Studio and ASP.NET MVC application development.
  3. 1 minuteWebMatrix is a free tool that makes it really easy to create, configure and publish your web sites and web applications. It’s built on Microsoft’s in depth knowledge of web platforms, tools and frameworks and surfaced in a more approachable and straightforward way. As we go through the training you should keep these three main focus areas in your mind; create, customize and publish – we’ll be touching on them as we cover the different areas of WebMatrix.
  4. 1 minuteWebMatrix comes with everything you need to get started building websites and web applications:A complete and integrated development environment, with a small download and a simple install. You get a database engine (SQL Server Compact Edition) to handle your data. All the structures you create in this database engine will be compatible with professional versions of SQL Server.WebMatrix supports a Web Server (IIS Express) to serve all your web pages. This web server is compatible with the professional versions of IIS as well.WebMatrix also comes with a new, simple programming framework that allows for rapid development of web sites and web applications. It supports Razor, the latest and simplifiedway to code web sites. It also provides a gallery of free open source applications to complement your development.It comes with an integrated installer that manages the heavy lifting of downloading and installing each component.
  5. 3 minutesWhen we look at all the different profiles of people creating websites we see certain patterns emerge.First, there’s a group of people that like to use the large number of rich web applications out there as a starting point, and then add some specific functionality. They need a quick and easy way to customize and publish their solutions. Many of these web applications are tailored for specific tasks like Content Management Systems or eCommerce websites. These developers will often repeat this process many times for each customer, their goal is to make the process of acquiring the application, customization and publishing it as quick as possible.A second group need to create web apps from scratch. These developers are hobbyists, beginners and people who need a tool that is easy to learn and that allows them to focus on the application functionality instead of developers’ details.Finally, the group of professional developers. They need a powerful tool, full of features and able to work in team, perhaps distributed ones. They will use a source and version control and will need a testing framework to write their own unit tests. This tool needs to support the addition of 3rd party powerful extensions.WebMatrix is built for those developers that like to start from scratch or by building from a 3rd party web applications.
  6. 10 minutesSee demo script for overview
  7. 1 minuteWhen you create a new website from scratch in WebMatrix, you will be using the new Razor syntax. It’s very compact and easy to read and write, and allows you to flow between code and markup seamlessly. You can write your code in languages such as C# or VB, and it’s extensible via Helpers (we’ll talk about Helpers in Part 3)
  8. 2 minutesWe’ve designed Razor to be concise and easy to use. When we think about the way developers use a language we take into account the context switching they have to do and also the number of keystrokes. The way that Razor allows you to transition seamlessly between markup and code makes for a much more natural and fluent style and also helps to reduce the number of keystrokes and context switching that a developer has to do, thinking about markup and code separately. With Razor, markup and code are really the same thing.We think it’s the easiest way to code websites and when you compare it to the other languages out there, it’s easy to see why.
  9. 1 minuteThe transition from code to markup is one of the most elegant things about Razor but there a few rules that are worth knowing about. Option 1:Code is the primary citizen in a code block, not HTML. This means the parser will always expect code unless it finds valid opening (and closing) tags. In the first option block you see that after the @{ a name variable is defined. No additional tag is necessary. A &lt;div&gt; section tells Razor that what follows should be taken as literal. Then the @name indicates a variable that needs to be replaced with its value.Option 2:Similarly, to explicitly call out text in a code block as HTML, wrap it in a &lt;text&gt; tagOption 3:Single line of output within markup can be denoted by @:This option is useful when you don’t want to render an HTML element as part of the output. Extra Knowledge (Advanced):The Parser that understands Razor is itself a standalone assembly (System.Web.Razor.dll) which has no dependencies on ASP.NET which means you can use it to parse CSHTML/VBHTML files and produce C#/VB code in any .NET application.
  10. 1 minuteIt’s always good practice to comment your code. In Razor we have the following options for commenting: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.
  11. 5 minutesSyntax moving from code to markupObjectInfo()ServerInfo()
  12. 2 minutesThe database that comes with WebMatrix is SQL Compact Edition, or SQL CE for short.It’s free, lightweight and doesn’t require a separate server to run – which makes it much easier to get setup and running than traditional versions of SQL Server like SQL Server Express.SQL Compact Edition includes tools to manage your tables and data and because it’s file-based, you simply need to copy the database files to transport your database to another machine. This is really useful if you are sharing a database with another developer.This sample code shows how to connect to an ArtGallery Database and then perform a query with SQL to retrieve the ArtGallery products.
  13. 5 minutesCreating DBDesigning DBAccessing DB using Razor(introduce URLData)
  14. 2 minutesAs we’ve seen, the database design and access from Razor code in WebMatrix is easy. Often when we’re building websites, we’ll want to render data in some form of table. The WebGrid can help to make this easy to do. Build 1In it’s simplest form, just give the WebGrid data and it will render it out in a valid HTML table. WebMatrix will make all the magic for you. But this has a few drawbacks: You’re not choosing the columns you want to show and they will be named as the field names in the database.Build 2 In the second sample, you explicitly state which columns to include in the WebGrid, their title (e.g.: «Product» instead of «Name») and how they will be formatted: Product column will use a CSS style, Description will appear in italic font, and so on.Build 3In the last sample, you can see that we order the data by the «Name» column and by simply defining one parameter, we state that we want 3 rows per page. WebMatrix will do the rest for you.
  15. 5 minutesBuild on previous data demo and place data in the WebGrid and render it.Add columns and paging.Perhaps show ajax if we have time.
  16. 1 minuteWe have learnt what is WebMatrix and who is it for.We had an overview Razor, a new way to code websites.We learned how to consume a database and how to display its data with a WebGrid HelperFinally, we have learned how to customize the data displayed in WebGrids.