SlideShare uma empresa Scribd logo
1 de 27
Intro to MVC 3
                                      Frank La Vigne
                US Public Sector Developer Evangelist
                                Microsoft Corporation

FrankLa@Microsoft.com / @tableteer / franksworld.com
Not just downloads
 Documentation
 Articles
 Sample Code
 Specialty sites
    ◦ ASP.NET
    ◦ Silverlight.net
    ◦ WindowsClient.net
   And much more!


A Quick Word About MSDN
   ASP.NET MVC 3
    ◦   The Microsoft Web Stack
    ◦   What is ASP.NET MVC 3?
    ◦   What ASP.NET MVC 3 Means for Public Sector
    ◦   Introducing the Razor syntax




Agenda
Ajax Control Toolkit & jQuery




        Web Platform
                                 ASP.NET



          Installer
                       ADO.NET Entity Framework

                               SQL Server

                                   IIS


 The Microsoft Web Platform combines a rich and
 powerful web application framework with a supporting
 cast of tools, servers, technologies and applications for
 creating, designing, developing and delivering web
 solutions.
The Microsoft Web Platform
I’m a professional       I <3 Web Apps.         I want to build
  software developer    I just need a tool that   web sites myself
                        makes them easier to      with an easy to
       and I build                                 learn tool and
                         configure, customize
     complex, large        and publish them          framework
     scale web sites
     with a team of
       developers


Today’s Web Developers
Visual Studio 2010             WebMatrix

                   ASP.NET Core
       Caching         Modules         Globalization
   Web Forms View Engine          Razor View Engine
        Pages          Controls        Master Pages

        Profile         Roles          Membership
     ASP.NET          ASP.NET             ASP.NET
    Web Forms
      Intrinsics        MVC
                      Handlers           Web Pages
                                          Etc.



ASP.NET: A Framework For All
What is MVC?
Controller
                    (Input)




       View                     Model
  (Presentation)                (Data)



ASP.NET MVC 101
   What does MVC look like?
                               Controller
     Request    Controller     Retrieves Model
                               “Performs Work”




                               View
     Response     View         Visually represents
                               the model




How MVC Works
Why Should
We Care About
ASP.NET MVC
in
Public Sector?
   Users disdain “Ugly” URLs
    ◦ http://answers.usa.gov/system/selfservice.cont
      roller?CONFIGURATION=1000&PARTITION_ID=
      1&CMD=VIEW_ARTICLE&ARTICLE_ID=11951&
      USERTYPE=1&LANGUAGE=en&COUNTRY=US
      vs
      http://www.whitehouse.gov/briefing-
      room/speeches-and-remarks
   Search Engine Optimization (SEO)
    ◦ Discoverability



More Web Savvy Citizens
 Powerful, patterns-based way to build
  dynamic websites
 Enables a clean separation of concerns
 Gives you full control over markup for
  enjoyable, agile development.




Developer Productivity
 Enable fast, TDD-friendly development for
  creating sophisticated applications
 Separation of concerns makes for easier
  testing




Testing
 Uses the latest web standards.
 Full control over markup makes creating
  compliant sites easier




Accessibility
   No ViewState
    ◦ Smaller HTML payload
    ◦ Faster downloads
   HTML5
    ◦ Easy to implement eye catching graphics that
      leverage GPU acceleration with IE9 and IE10




Performance
Demo
Creating an ASP.NET MVC 3 Project
Razor
@if (You.Understand(Razor)) {
     <div>Hooray!</div>
}
• New, Simplified View Engine
• Write fewer lines of code
• More natural mix code and markup
• Helpers save you time
• Compatible with ASP.NET Web Pages in
  WebMatrix
 • http://bit.ly/WhatIsWebMatrix



Razor Syntax
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>



Razor is a cut above the rest
@{
                                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          }




Easier Code to Markup Transitions
@*
                  <div>
    Option 1:       Hello World
     Markup       </div>
                *@


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


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




Code Comments in Razor
Deeper Dive into MVC 3
 Don’t repeat yourself!
    Define one layout and use it across
     your website
                        Page
                         1

                               Page
       Layout.cshtml            2

                        Page
                         3


Layouts make organizing
your pages easier
1. Define your Layout
2. Reference it in your pages

/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>




Layout Syntax
   Sections allow you to define areas of
    content that change between pages but
    need to be included in a layout MyPage.cshtml
                                 @{
    /Shared/_Layout.cshtml            Layout = "/Shared/_Layout.cshtml";
    <html>                       }
        <head>
                                 @section Menu {
          <title>Simple Layout</title>
        </head>                     <ul id="pageMenu">
        <body>                            <li>Option 1</li>
            @RenderSection("Menu")        <li>Option 2</li>
            @RenderBody()           </ul>
        </body>                  }
    </html>                      <p>
                                    My content goes here
                                 </p>


Use Sections to organize your
pages
   RenderPage() helps you reuse
            markup and code that doesn’t
            change
/Shared/_Layout.cshtml
                                                 /Shared/_Footer.cshtml
<html>
    <head>                                 <div class="footer">
      <title>Simple Layout</title>            © 2010 Contoso
    </head>                                </div>
    <body>
        @RenderSection("Menu")
        @RenderBody()
        @RenderPage("/Shared/_Footer.cshtml")
    </body>
</html>




Use RenderPage to organize pages
that don’t change
   Azure SDK Download:
    ◦ http://bit.ly/DownloadAzureSDK
   Free 90 Day Windows Azure Trial:
    ◦ http://bit.ly/FreeAzure90DayTrial
   Phone SDK Download:
    ◦ http://bit.ly/WinPhoneSDKDownload
   WebMatrix Download:
    ◦ http://bit.ly/WhatIsWebMatrix
   Microsoft Public Sector Developer Site
    ◦ http://frnk.us/GovDev

Resources

Mais conteúdo relacionado

Mais procurados

Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Jeado Ko
 
Opening up the Social Web - Standards that are bridging the Islands
Opening up the Social Web - Standards that are bridging the IslandsOpening up the Social Web - Standards that are bridging the Islands
Opening up the Social Web - Standards that are bridging the IslandsBastian Hofmann
 
Whirlwind Tour of SVG (plus RaphaelJS)
Whirlwind Tour of SVG (plus RaphaelJS)Whirlwind Tour of SVG (plus RaphaelJS)
Whirlwind Tour of SVG (plus RaphaelJS)Marc Grabanski
 
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
 
[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법Jeado Ko
 
Building an HTML5 Video Player
Building an HTML5 Video PlayerBuilding an HTML5 Video Player
Building an HTML5 Video PlayerJim Jeffers
 
Mobile HTML, CSS, and JavaScript
Mobile HTML, CSS, and JavaScriptMobile HTML, CSS, and JavaScript
Mobile HTML, CSS, and JavaScriptfranksvalli
 
User Interface Patterns and Nuxeo
User Interface Patterns and NuxeoUser Interface Patterns and Nuxeo
User Interface Patterns and Nuxeoanicewick
 
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
Iasi code camp 12 october 2013   shadow dom - mihai bîrsanIasi code camp 12 october 2013   shadow dom - mihai bîrsan
Iasi code camp 12 october 2013 shadow dom - mihai bîrsanCodecamp Romania
 
Learn html and css from scratch
Learn html and css from scratchLearn html and css from scratch
Learn html and css from scratchMohd Manzoor Ahmed
 
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...Ayes Chinmay
 
Internet and Web Technology (CLASS-6) [BOM]
Internet and Web Technology (CLASS-6) [BOM] Internet and Web Technology (CLASS-6) [BOM]
Internet and Web Technology (CLASS-6) [BOM] Ayes Chinmay
 
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)Clément Wehrung
 
Using Node.js to make HTML5 work for everyone
Using Node.js to make HTML5 work for everyone Using Node.js to make HTML5 work for everyone
Using Node.js to make HTML5 work for everyone Tom Croucher
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1James Pearce
 
BP210 XPages: Enter The Dojo
BP210 XPages: Enter The DojoBP210 XPages: Enter The Dojo
BP210 XPages: Enter The DojoPaul Withers
 
Introducing the JotSpot Data Model and API
Introducing the JotSpot Data Model and APIIntroducing the JotSpot Data Model and API
Introducing the JotSpot Data Model and APIScott McMullan
 

Mais procurados (20)

Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
 
Opening up the Social Web - Standards that are bridging the Islands
Opening up the Social Web - Standards that are bridging the IslandsOpening up the Social Web - Standards that are bridging the Islands
Opening up the Social Web - Standards that are bridging the Islands
 
Whirlwind Tour of SVG (plus RaphaelJS)
Whirlwind Tour of SVG (plus RaphaelJS)Whirlwind Tour of SVG (plus RaphaelJS)
Whirlwind Tour of SVG (plus RaphaelJS)
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government Developers
 
[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법
 
Building an HTML5 Video Player
Building an HTML5 Video PlayerBuilding an HTML5 Video Player
Building an HTML5 Video Player
 
Dojo toolkit
Dojo toolkitDojo toolkit
Dojo toolkit
 
Mobile HTML, CSS, and JavaScript
Mobile HTML, CSS, and JavaScriptMobile HTML, CSS, and JavaScript
Mobile HTML, CSS, and JavaScript
 
User Interface Patterns and Nuxeo
User Interface Patterns and NuxeoUser Interface Patterns and Nuxeo
User Interface Patterns and Nuxeo
 
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
Iasi code camp 12 october 2013   shadow dom - mihai bîrsanIasi code camp 12 october 2013   shadow dom - mihai bîrsan
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
 
Learn html and css from scratch
Learn html and css from scratchLearn html and css from scratch
Learn html and css from scratch
 
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
 
Internet and Web Technology (CLASS-6) [BOM]
Internet and Web Technology (CLASS-6) [BOM] Internet and Web Technology (CLASS-6) [BOM]
Internet and Web Technology (CLASS-6) [BOM]
 
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
 
Using Node.js to make HTML5 work for everyone
Using Node.js to make HTML5 work for everyone Using Node.js to make HTML5 work for everyone
Using Node.js to make HTML5 work for everyone
 
Basic API Creation with Node.JS
Basic API Creation with Node.JSBasic API Creation with Node.JS
Basic API Creation with Node.JS
 
Wicket 2010
Wicket 2010Wicket 2010
Wicket 2010
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1
 
BP210 XPages: Enter The Dojo
BP210 XPages: Enter The DojoBP210 XPages: Enter The Dojo
BP210 XPages: Enter The Dojo
 
Introducing the JotSpot Data Model and API
Introducing the JotSpot Data Model and APIIntroducing the JotSpot Data Model and API
Introducing the JotSpot Data Model and API
 

Semelhante a Intro to MVC 3 for Government Developers

WebMatrix 100-level presentation
WebMatrix 100-level presentationWebMatrix 100-level presentation
WebMatrix 100-level presentationAlice Pang
 
Microsoft Web Matrix
Microsoft Web MatrixMicrosoft Web Matrix
Microsoft Web MatrixSaurabh Moody
 
Web matrix part 2
Web matrix part 2Web matrix part 2
Web matrix part 2yuvaraj72
 
Super billing asp.net
Super billing   asp.netSuper billing   asp.net
Super billing asp.netsuperb11b
 
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
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083Divyam Pateriya
 
Programming languages asp.net
Programming languages asp.netProgramming languages asp.net
Programming languages asp.netVasilios Kuznos
 
Introduction towebmatrix
Introduction towebmatrixIntroduction towebmatrix
Introduction towebmatrixPranav Ainavolu
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code IgniterAmzad Hossain
 
J day la 2011 webmatrix
J day la 2011 webmatrixJ day la 2011 webmatrix
J day la 2011 webmatrixAlice Pang
 
Joomla! Day Los Angeles 2011 WebMatrix
Joomla! Day Los Angeles 2011 WebMatrixJoomla! Day Los Angeles 2011 WebMatrix
Joomla! Day Los Angeles 2011 WebMatrixAlice Pang
 
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
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizationsChris Love
 
Nuxt.JS Introdruction
Nuxt.JS IntrodructionNuxt.JS Introdruction
Nuxt.JS IntrodructionDavid Ličen
 
Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022NAVER D2
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX DesignersAshlimarie
 
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
 

Semelhante a Intro to MVC 3 for Government Developers (20)

WebMatrix 100-level presentation
WebMatrix 100-level presentationWebMatrix 100-level presentation
WebMatrix 100-level presentation
 
Microsoft Web Matrix
Microsoft Web MatrixMicrosoft Web Matrix
Microsoft Web Matrix
 
Web matrix part 2
Web matrix part 2Web matrix part 2
Web matrix part 2
 
Super billing asp.net
Super billing   asp.netSuper billing   asp.net
Super billing asp.net
 
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!!
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083
 
Programming languages asp.net
Programming languages asp.netProgramming languages asp.net
Programming languages asp.net
 
Introduction towebmatrix
Introduction towebmatrixIntroduction towebmatrix
Introduction towebmatrix
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code Igniter
 
J day la 2011 webmatrix
J day la 2011 webmatrixJ day la 2011 webmatrix
J day la 2011 webmatrix
 
Web 2.0
Web 2.0Web 2.0
Web 2.0
 
Joomla! Day Los Angeles 2011 WebMatrix
Joomla! Day Los Angeles 2011 WebMatrixJoomla! Day Los Angeles 2011 WebMatrix
Joomla! Day Los Angeles 2011 WebMatrix
 
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...
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
 
Nuxt.JS Introdruction
Nuxt.JS IntrodructionNuxt.JS Introdruction
Nuxt.JS Introdruction
 
CG_CS25010_Lecture
CG_CS25010_LectureCG_CS25010_Lecture
CG_CS25010_Lecture
 
Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 
Web technologies part-2
Web technologies part-2Web technologies part-2
Web technologies part-2
 
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!!
 

Mais de Frank La Vigne

Binary Classification on Azure ML: Is this Red Wine Good or Bad?
Binary Classification on Azure ML: Is this Red Wine Good or Bad?Binary Classification on Azure ML: Is this Red Wine Good or Bad?
Binary Classification on Azure ML: Is this Red Wine Good or Bad?Frank La Vigne
 
Neural Networks from the Ground Up
Neural Networks from the Ground UpNeural Networks from the Ground Up
Neural Networks from the Ground UpFrank La Vigne
 
Machine Learning Melee: AWS ML vs. Azure ML
Machine Learning Melee: AWS ML vs. Azure MLMachine Learning Melee: AWS ML vs. Azure ML
Machine Learning Melee: AWS ML vs. Azure MLFrank La Vigne
 
Tips on Starting a Compelling Vlog
Tips on Starting a Compelling VlogTips on Starting a Compelling Vlog
Tips on Starting a Compelling VlogFrank La Vigne
 
Create a Windows 8 App in minutes
Create a Windows 8 App in minutesCreate a Windows 8 App in minutes
Create a Windows 8 App in minutesFrank La Vigne
 
Windows 8 Developer Workshop
Windows 8 Developer WorkshopWindows 8 Developer Workshop
Windows 8 Developer WorkshopFrank La Vigne
 
HTML5, Silverlight & Kinect
HTML5, Silverlight & KinectHTML5, Silverlight & Kinect
HTML5, Silverlight & KinectFrank La Vigne
 
A Lap Around Silverlight 5
A Lap Around Silverlight 5A Lap Around Silverlight 5
A Lap Around Silverlight 5Frank La Vigne
 
Windows Phone Public Sector
Windows Phone Public SectorWindows Phone Public Sector
Windows Phone Public SectorFrank La Vigne
 
IE9: Power, Peformance and Standards
IE9: Power, Peformance and StandardsIE9: Power, Peformance and Standards
IE9: Power, Peformance and StandardsFrank La Vigne
 
Dr ScriptLove or How I Learned to Stop Worrying and Love JavaScript
Dr ScriptLove or How I Learned to Stop Worrying and Love JavaScriptDr ScriptLove or How I Learned to Stop Worrying and Love JavaScript
Dr ScriptLove or How I Learned to Stop Worrying and Love JavaScriptFrank La Vigne
 
Bing & Silverlight: Perfect Together
Bing & Silverlight: Perfect TogetherBing & Silverlight: Perfect Together
Bing & Silverlight: Perfect TogetherFrank La Vigne
 
Poor Man's Project Natal
Poor Man's Project NatalPoor Man's Project Natal
Poor Man's Project NatalFrank La Vigne
 
Silverlight FireStarter DC Keynote
Silverlight FireStarter DC KeynoteSilverlight FireStarter DC Keynote
Silverlight FireStarter DC KeynoteFrank La Vigne
 
XAML: One Language to Rule Them All
XAML: One Language to Rule Them AllXAML: One Language to Rule Them All
XAML: One Language to Rule Them AllFrank La Vigne
 
Tablet PC as Pretty Cool Smart Client Platform
Tablet PC as Pretty Cool Smart Client PlatformTablet PC as Pretty Cool Smart Client Platform
Tablet PC as Pretty Cool Smart Client PlatformFrank La Vigne
 

Mais de Frank La Vigne (20)

Binary Classification on Azure ML: Is this Red Wine Good or Bad?
Binary Classification on Azure ML: Is this Red Wine Good or Bad?Binary Classification on Azure ML: Is this Red Wine Good or Bad?
Binary Classification on Azure ML: Is this Red Wine Good or Bad?
 
Neural Networks from the Ground Up
Neural Networks from the Ground UpNeural Networks from the Ground Up
Neural Networks from the Ground Up
 
Machine Learning Melee: AWS ML vs. Azure ML
Machine Learning Melee: AWS ML vs. Azure MLMachine Learning Melee: AWS ML vs. Azure ML
Machine Learning Melee: AWS ML vs. Azure ML
 
Tips on Starting a Compelling Vlog
Tips on Starting a Compelling VlogTips on Starting a Compelling Vlog
Tips on Starting a Compelling Vlog
 
Create a Windows 8 App in minutes
Create a Windows 8 App in minutesCreate a Windows 8 App in minutes
Create a Windows 8 App in minutes
 
Windows 8 Developer Workshop
Windows 8 Developer WorkshopWindows 8 Developer Workshop
Windows 8 Developer Workshop
 
HTML5, Silverlight & Kinect
HTML5, Silverlight & KinectHTML5, Silverlight & Kinect
HTML5, Silverlight & Kinect
 
A Lap Around Silverlight 5
A Lap Around Silverlight 5A Lap Around Silverlight 5
A Lap Around Silverlight 5
 
Windows Phone Public Sector
Windows Phone Public SectorWindows Phone Public Sector
Windows Phone Public Sector
 
IE9: Power, Peformance and Standards
IE9: Power, Peformance and StandardsIE9: Power, Peformance and Standards
IE9: Power, Peformance and Standards
 
Dr ScriptLove or How I Learned to Stop Worrying and Love JavaScript
Dr ScriptLove or How I Learned to Stop Worrying and Love JavaScriptDr ScriptLove or How I Learned to Stop Worrying and Love JavaScript
Dr ScriptLove or How I Learned to Stop Worrying and Love JavaScript
 
Mix11 Recap DevDinner
Mix11 Recap DevDinnerMix11 Recap DevDinner
Mix11 Recap DevDinner
 
Bing & Silverlight: Perfect Together
Bing & Silverlight: Perfect TogetherBing & Silverlight: Perfect Together
Bing & Silverlight: Perfect Together
 
Pimp My Website
Pimp My WebsitePimp My Website
Pimp My Website
 
Exploring Sketch Flow
Exploring Sketch FlowExploring Sketch Flow
Exploring Sketch Flow
 
Poor Man's Project Natal
Poor Man's Project NatalPoor Man's Project Natal
Poor Man's Project Natal
 
Using Blend
Using BlendUsing Blend
Using Blend
 
Silverlight FireStarter DC Keynote
Silverlight FireStarter DC KeynoteSilverlight FireStarter DC Keynote
Silverlight FireStarter DC Keynote
 
XAML: One Language to Rule Them All
XAML: One Language to Rule Them AllXAML: One Language to Rule Them All
XAML: One Language to Rule Them All
 
Tablet PC as Pretty Cool Smart Client Platform
Tablet PC as Pretty Cool Smart Client PlatformTablet PC as Pretty Cool Smart Client Platform
Tablet PC as Pretty Cool Smart Client Platform
 

Último

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

Intro to MVC 3 for Government Developers

  • 1. Intro to MVC 3 Frank La Vigne US Public Sector Developer Evangelist Microsoft Corporation FrankLa@Microsoft.com / @tableteer / franksworld.com
  • 2. Not just downloads  Documentation  Articles  Sample Code  Specialty sites ◦ ASP.NET ◦ Silverlight.net ◦ WindowsClient.net  And much more! A Quick Word About MSDN
  • 3. ASP.NET MVC 3 ◦ The Microsoft Web Stack ◦ What is ASP.NET MVC 3? ◦ What ASP.NET MVC 3 Means for Public Sector ◦ Introducing the Razor syntax Agenda
  • 4. Ajax Control Toolkit & jQuery Web Platform ASP.NET Installer ADO.NET Entity Framework SQL Server IIS The Microsoft Web Platform combines a rich and powerful web application framework with a supporting cast of tools, servers, technologies and applications for creating, designing, developing and delivering web solutions. The Microsoft Web Platform
  • 5. I’m a professional I <3 Web Apps. I want to build software developer I just need a tool that web sites myself makes them easier to with an easy to and I build learn tool and configure, customize complex, large and publish them framework scale web sites with a team of developers Today’s Web Developers
  • 6. Visual Studio 2010 WebMatrix ASP.NET Core Caching Modules Globalization Web Forms View Engine Razor View Engine Pages Controls Master Pages Profile Roles Membership ASP.NET ASP.NET ASP.NET Web Forms Intrinsics MVC Handlers Web Pages Etc. ASP.NET: A Framework For All
  • 8. Controller (Input) View Model (Presentation) (Data) ASP.NET MVC 101
  • 9. What does MVC look like? Controller Request Controller Retrieves Model “Performs Work” View Response View Visually represents the model How MVC Works
  • 10. Why Should We Care About ASP.NET MVC in Public Sector?
  • 11. Users disdain “Ugly” URLs ◦ http://answers.usa.gov/system/selfservice.cont roller?CONFIGURATION=1000&PARTITION_ID= 1&CMD=VIEW_ARTICLE&ARTICLE_ID=11951& USERTYPE=1&LANGUAGE=en&COUNTRY=US vs http://www.whitehouse.gov/briefing- room/speeches-and-remarks  Search Engine Optimization (SEO) ◦ Discoverability More Web Savvy Citizens
  • 12.  Powerful, patterns-based way to build dynamic websites  Enables a clean separation of concerns  Gives you full control over markup for enjoyable, agile development. Developer Productivity
  • 13.  Enable fast, TDD-friendly development for creating sophisticated applications  Separation of concerns makes for easier testing Testing
  • 14.  Uses the latest web standards.  Full control over markup makes creating compliant sites easier Accessibility
  • 15. No ViewState ◦ Smaller HTML payload ◦ Faster downloads  HTML5 ◦ Easy to implement eye catching graphics that leverage GPU acceleration with IE9 and IE10 Performance
  • 16. Demo Creating an ASP.NET MVC 3 Project
  • 17. Razor
  • 18. @if (You.Understand(Razor)) { <div>Hooray!</div> } • New, Simplified View Engine • Write fewer lines of code • More natural mix code and markup • Helpers save you time • Compatible with ASP.NET Web Pages in WebMatrix • http://bit.ly/WhatIsWebMatrix Razor Syntax
  • 19. 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> Razor is a cut above the rest
  • 20. @{ 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 } Easier Code to Markup Transitions
  • 21. @* <div> Option 1: Hello World Markup </div> *@ @{ //var name = "John Doe”; Option 2: //@name Code } @* Option 3: @{ var name = "John Doe"; Both @name } *@ Code Comments in Razor
  • 23.  Don’t repeat yourself!  Define one layout and use it across your website Page 1 Page Layout.cshtml 2 Page 3 Layouts make organizing your pages easier
  • 24. 1. Define your Layout 2. Reference it in your pages /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> Layout Syntax
  • 25. Sections allow you to define areas of content that change between pages but need to be included in a layout MyPage.cshtml @{ /Shared/_Layout.cshtml Layout = "/Shared/_Layout.cshtml"; <html> } <head> @section Menu { <title>Simple Layout</title> </head> <ul id="pageMenu"> <body> <li>Option 1</li> @RenderSection("Menu") <li>Option 2</li> @RenderBody() </ul> </body> } </html> <p> My content goes here </p> Use Sections to organize your pages
  • 26. RenderPage() helps you reuse markup and code that doesn’t change /Shared/_Layout.cshtml /Shared/_Footer.cshtml <html> <head> <div class="footer"> <title>Simple Layout</title> © 2010 Contoso </head> </div> <body> @RenderSection("Menu") @RenderBody() @RenderPage("/Shared/_Footer.cshtml") </body> </html> Use RenderPage to organize pages that don’t change
  • 27. Azure SDK Download: ◦ http://bit.ly/DownloadAzureSDK  Free 90 Day Windows Azure Trial: ◦ http://bit.ly/FreeAzure90DayTrial  Phone SDK Download: ◦ http://bit.ly/WinPhoneSDKDownload  WebMatrix Download: ◦ http://bit.ly/WhatIsWebMatrix  Microsoft Public Sector Developer Site ◦ http://frnk.us/GovDev Resources