SlideShare a Scribd company logo
Developing with
.NET
   Frank La Vigne
   Developer Evangelist
   Microsoft
   @tableteer | FrankLa@Microsoft.com
   www.FranksWorld.com/blog
Not just downloads
• Documentation
• Articles
• Sample Code
• Specialty sites
  • ASP.NET
  • Silverlight.net
  • WindowsClient.net
• And much more!




A Quick Word About MSDN
The Future
Soon, Very Soon.
• Visual Studio 2010
  • Multiple versions with multiple price points
• Expression Blend
Nice to have tools
• F12 Dev Tools
• Fiddler
• Silverlight Spy


Tools of the Trade
Intro to .NET for Government Developers
Web    Windows      Cloud      Phone     Games       Data



      Write .NET Code in All of These Environments




.NET Everywhere
Win                                          And
WPF               DLR     ASP.NET   WCF     LINQ
         Forms                                        more!




             Base Class Libraries

.NET Framework
  Common Language Runtime

Architecture
 JIT &     Garbage      Security    Exception      Loader &
 NGEN      Collector     Model      Handling        Binder




.NET Architecture
BASE CLASS LIBRARIES
(BCL) IMPROVEMENTS IN .NET
4.X
   Set of public types and APIs
   System.Threading
   System.Threading.Tasks

// Sequential
foreach (var item in sourceCollection)
{
    Process(item);
}

// Parallel
Parallel.ForEach
(sourceCollection, item =>
Process(item));

    Task Parallel Library (TPL)
   Implements the full set of LINQ standard query operators
   Extension methods for the IParallelEnumerable interface
   Additional operators for parallel operations

from n in
names.AsParallel().WithDegreeOfParallelism(ProcessorsT
oUse.Value)
where
      n.Name.Equals(queryInfo.Name,
      StringComparison.InvariantCultureIgnoreCase) &&
      n.State == queryInfo.State &&
      n.Year >= yearStart &&
      n.Year <= yearEnd
        orderby n.Year ascending
        select n;



    Parallel LINQ (PLINQ)
• System.Diagnostics.Contracts
• Code Contracts introduce a way to specify contractual
  information that is not represented by a method or type’s
  signature alone
• Scenarios for using contracts include:
  • Perform static bug finding, which enables some bugs to be found
    without executing the code
  • Create guidance for automated testing tools to enhance test
    coverage
  • Create a standard notation for code behavior, which provides
    more information for documentation



  Design By Contract
• BigInteger
  • Immutable type that represents an arbitrarily large integer whose
    value in theory has no upper or lower bounds
• SortedSet<T>
  • Provides a self-balancing tree that maintains data in sorted order
    after insertions, deletions, and searches




  Data Types
• Memory-Mapped File
  • Used to edit very large files and to create shared memory
    for inter-process communication


• Stream.CopyTo
  • Allows you to copy the contents of one stream into another




I/O
EHANCEMENTS TO
PROGRAMMING LANGUAGES
IN .NET 4.X
• Auto-Implemented Properties
  • Shortened syntax that enables you to quickly specify a property of
    a class without having to write code

• Collection Initializer
  • Shortened syntax that enables you to create a collection and
    populate it with an initial set of values

• Implicit Line Continuation
  • Enables you to continue a statement on the next consecutive line
    without using the underscore character




Visual Basic
• Dynamic Type
  • Operations that contain expressions of type dynamic are not
    resolved or type ch`ecked by the compiler. The compiler packages
    together information about the operation, and that information is
    later used to evaluate the operation at run time
• Optional and Named Parameters
  • Named arguments enable you to specify an argument for a
    particular parameter by associating the argument with the
    parameter's name rather than with the parameter's position in the
    parameter list.
  • Optional arguments enable you to omit arguments for some
    parameters. Both techniques can be used with methods, indexers,
    constructors, and delegates.

  C#
• You can configure restart manager to autosave documents
  and restart your application after it exits unexpectedly
• Lambda expressions are available in C++
• The new CTaskDialog replaces the standard Windows
  message box and adds functionality to display and gather
  more information




C++
•   IDE support for F#
•   Interactive F# for prototyping code
•   Asynchronous constructs
•   Parallel constructs
•   Immutable data types




F#
Web Client Development
But What About?
I <3 Silverlight!
• Blue Angels Web Site
  • http://blueangels.navy.mil



You Can Use Them Both
Looking Forward
http://buildmypinnedsite.com/




Site Pinning
Web Platform Installer
                                  Ajax Control Toolkit & jQuery

                                           ASP.NET

                                  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 web
 software developer and    I just need a tool that   sites myself with an
  I build complex, large   makes them easier to        easy to learn tool
  scale web sites with a   configure, customize         and framework
    team of developers        and publish them




Today’s Web Developers
A Free Web Dev Tool
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
• Ability to set meta tags
• More control over view state
• Added and Updated browser definition files
• ASP.NET Routing
• The ability to persist selected rows in data controls
• More control over rendered HTML in the FormView and
  ListView controls
• Filtering support for data source controls



    ASP.NET 4 Webforms
Intro to .NET for Government Developers
WHAT IS MVC?
•   Huge investment from Microsoft
•   Alternative to WebForms
•   Modular Architecture
•   MVC 3.0 now available
    • MVC 4 in Developer Preview stage
• Razor Syntax
• MVC 3.0 Tooling Updated
  April 2011


Model-View-Controller
(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.controller?CONFI
    GURATION=1000&PARTITION_ID=1&CMD=VIEW_A
    RTICLE&ARTICLE_ID=11951&USERTYPE=1&LANGU
    AGE=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: 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
SILVERLIGHT & WPF
DEVELOPMENT
Two Platforms
WPF




              Silverlight




Similar But Different
Two Core      One Common
    Technologies    Language




2 Platforms Powered By XAML
• Markup language derived from XML
• XML serialization of CLR objects
• Markup files have code-behind files
  • Could be C# or VB.NET
• Conceptually similar to ASP.NET
• X stands for Extensible
  • Data Binding
  • Styles
  • Templates


Intro to XAML
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
  <Grid>
    <Button>Click Me!</Button>
  </Grid>
</Window>



     What Does XAML Look Like?
Results
Most Devs Reaction to Blend
Demo
Mobile
For the purposes of this talk, we’ll focus on Silverlight.




1 Platform. 2 Choices.
What is Metro?
Intro to .NET for Government Developers
METRO IS OUR DESIGN
  ETRO
LANGUAGE. WE CALL IT
METRO BECAUSE IT’S
MODERN AND CLEAN. IT’S
FAST AND IN MOTION. IT’S
ABOUT CONTENT AND
TYPOGRAPHY. AND IT’S
ENTIRELY AUTHENTIC.
Desktop?
• http://frnk.us/8GreatTraitsOfMetroApps
• http://frnk.us/MetroTutorial




Metro Resources
DEMO
Creating a Windows Phone App
Marketplace Sample
•   Creates Entity Model from Database
•   Helpful in creating RESTful Services
•   Exposes Database as Classes/Methods
•   Works with any Database
•   Useful in MVC, Dynamic Data Models




What is the Entity Framework?
Database                 Generated
 First       Existing     Entity Data
            Database        Model




 Model
 First
            Entity Data   Generated
               Model
                          Database



Code-First in EF 4.1
DEMO
 Phone SDK Download
  http://bit.ly/WinPhoneSDKDownload
 Web Matrix
  http://bit.ly/WhatIsWebMatrix
 Azure
  http://bit.ly/FreeAzure90DayTrial
  http://bit.ly/DownloadAzureSDK

 Useful Resources

More Related Content

PPT
Asp.net
PDF
[2015/2016] JavaScript
PDF
[2015/2016] Require JS and Handlebars JS
PDF
Carlos Amador .Net Portfolio
PDF
HTML5 and CSS3 refresher
KEY
Wicket 2010
PPT
Developing Java Web Applications
PDF
C# Advanced L09-HTML5+ASP
Asp.net
[2015/2016] JavaScript
[2015/2016] Require JS and Handlebars JS
Carlos Amador .Net Portfolio
HTML5 and CSS3 refresher
Wicket 2010
Developing Java Web Applications
C# Advanced L09-HTML5+ASP

What's hot (19)

PPTX
Java script session 3
PPTX
Beginners' guide to Ruby on Rails
PDF
Local storage in Web apps
PDF
Angular - Chapter 3 - Components
PPTX
Web API with ASP.NET MVC by Software development company in india
PPT
Ruby on Rails: Building Web Applications Is Fun Again!
PPTX
Introduction to Spring Framework
 
PPTX
Angular jS Introduction by Google
 
PDF
[2015/2016] Backbone JS
PPTX
Java script
KEY
Appengine Nljug
PPTX
Web-Dev Portfolio
PPT
Xml Publisher And Reporting To Excel
PPTX
Cartegraph Live HTML, CSS, JavaScript and jQuery Training
PPT
ILUG 2007 - Notes and Office Integration
ODP
Web 2.0
PDF
Up to Speed on HTML 5 and CSS 3
PDF
Joe Staner Zend Con 2008
PPT
Wicket Introduction
Java script session 3
Beginners' guide to Ruby on Rails
Local storage in Web apps
Angular - Chapter 3 - Components
Web API with ASP.NET MVC by Software development company in india
Ruby on Rails: Building Web Applications Is Fun Again!
Introduction to Spring Framework
 
Angular jS Introduction by Google
 
[2015/2016] Backbone JS
Java script
Appengine Nljug
Web-Dev Portfolio
Xml Publisher And Reporting To Excel
Cartegraph Live HTML, CSS, JavaScript and jQuery Training
ILUG 2007 - Notes and Office Integration
Web 2.0
Up to Speed on HTML 5 and CSS 3
Joe Staner Zend Con 2008
Wicket Introduction
Ad

Viewers also liked (6)

PPT
Exploring Ink Analysis
PPTX
Tips on Starting a Compelling Vlog
PPTX
Create a Windows 8 App in minutes
PPTX
Windows 8 Developer Workshop
PPTX
Ppt for presentation on google inc.
PPTX
Presentation on-google
Exploring Ink Analysis
Tips on Starting a Compelling Vlog
Create a Windows 8 App in minutes
Windows 8 Developer Workshop
Ppt for presentation on google inc.
Presentation on-google
Ad

Similar to Intro to .NET for Government Developers (20)

PPTX
Intro to MVC 3 for Government Developers
PPTX
Asp.net With mvc handson
PPTX
Server-side Web development via Ruby on Rails
PPTX
What's New in .Net 4.5
PPTX
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
PPTX
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
PPTX
Web matrix part 2
PPTX
2011 NetUG HH: ASP.NET MVC & HTML 5
PPTX
Web Techdfasvfsvgsfgnolofgdfggy Unit I.pptx
PPSX
Web development concepts using microsoft technologies
PDF
CG_CS25010_Lecture
PPTX
Introduction to asp
PPTX
The web as it should be
PPTX
Vb essentials
PPTX
Real-Time Web Applications with ASP.NET WebAPI and SignalR
PPT
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
PPT
Super billing asp.net
PPTX
ASP.NET - Ivan Marković
PPTX
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
PPTX
Silicon Valley JUG - How to generate customized java 8 code from your database
Intro to MVC 3 for Government Developers
Asp.net With mvc handson
Server-side Web development via Ruby on Rails
What's New in .Net 4.5
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
Web matrix part 2
2011 NetUG HH: ASP.NET MVC & HTML 5
Web Techdfasvfsvgsfgnolofgdfggy Unit I.pptx
Web development concepts using microsoft technologies
CG_CS25010_Lecture
Introduction to asp
The web as it should be
Vb essentials
Real-Time Web Applications with ASP.NET WebAPI and SignalR
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Super billing asp.net
ASP.NET - Ivan Marković
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
Silicon Valley JUG - How to generate customized java 8 code from your database

More from Frank La Vigne (20)

PPTX
Binary Classification on Azure ML: Is this Red Wine Good or Bad?
PPTX
Neural Networks from the Ground Up
PPTX
Machine Learning Melee: AWS ML vs. Azure ML
PPTX
HTML5, Silverlight & Kinect
PPTX
A Lap Around Silverlight 5
PPTX
Windows Phone Public Sector
PPTX
IE9: Power, Peformance and Standards
PPTX
Dr ScriptLove or How I Learned to Stop Worrying and Love JavaScript
PPTX
Mix11 Recap DevDinner
PPTX
Bing & Silverlight: Perfect Together
PPTX
Pimp My Website
PPTX
Exploring Sketch Flow
PPTX
Poor Man's Project Natal
PPTX
Using Blend
PPTX
Silverlight FireStarter DC Keynote
PPTX
XAML: One Language to Rule Them All
PPT
Tablet PC as Pretty Cool Smart Client Platform
PPT
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
PPT
Building Data Centric Apps in WPF
PPT
Graphic Design For Developers Richmond Code Camp
Binary Classification on Azure ML: Is this Red Wine Good or Bad?
Neural Networks from the Ground Up
Machine Learning Melee: AWS ML vs. Azure ML
HTML5, Silverlight & Kinect
A Lap Around Silverlight 5
Windows Phone Public Sector
IE9: Power, Peformance and Standards
Dr ScriptLove or How I Learned to Stop Worrying and Love JavaScript
Mix11 Recap DevDinner
Bing & Silverlight: Perfect Together
Pimp My Website
Exploring Sketch Flow
Poor Man's Project Natal
Using Blend
Silverlight FireStarter DC Keynote
XAML: One Language to Rule Them All
Tablet PC as Pretty Cool Smart Client Platform
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Building Data Centric Apps in WPF
Graphic Design For Developers Richmond Code Camp

Recently uploaded (20)

PPTX
Tartificialntelligence_presentation.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
MYSQL Presentation for SQL database connectivity
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
cuic standard and advanced reporting.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPT
Teaching material agriculture food technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Tartificialntelligence_presentation.pptx
Encapsulation_ Review paper, used for researhc scholars
SOPHOS-XG Firewall Administrator PPT.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
MYSQL Presentation for SQL database connectivity
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
NewMind AI Weekly Chronicles - August'25-Week II
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
cuic standard and advanced reporting.pdf
A Presentation on Artificial Intelligence
Network Security Unit 5.pdf for BCA BBA.
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Spectroscopy.pptx food analysis technology
Building Integrated photovoltaic BIPV_UPV.pdf
Empathic Computing: Creating Shared Understanding
Teaching material agriculture food technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf

Intro to .NET for Government Developers

  • 1. Developing with .NET Frank La Vigne Developer Evangelist Microsoft @tableteer | [email protected] www.FranksWorld.com/blog
  • 2. Not just downloads • Documentation • Articles • Sample Code • Specialty sites • ASP.NET • Silverlight.net • WindowsClient.net • And much more! A Quick Word About MSDN
  • 5. • Visual Studio 2010 • Multiple versions with multiple price points • Expression Blend Nice to have tools • F12 Dev Tools • Fiddler • Silverlight Spy Tools of the Trade
  • 7. Web Windows Cloud Phone Games Data Write .NET Code in All of These Environments .NET Everywhere
  • 8. Win And WPF DLR ASP.NET WCF LINQ Forms more! Base Class Libraries .NET Framework Common Language Runtime Architecture JIT & Garbage Security Exception Loader & NGEN Collector Model Handling Binder .NET Architecture
  • 9. BASE CLASS LIBRARIES (BCL) IMPROVEMENTS IN .NET 4.X
  • 10. Set of public types and APIs  System.Threading  System.Threading.Tasks // Sequential foreach (var item in sourceCollection) { Process(item); } // Parallel Parallel.ForEach (sourceCollection, item => Process(item)); Task Parallel Library (TPL)
  • 11. Implements the full set of LINQ standard query operators  Extension methods for the IParallelEnumerable interface  Additional operators for parallel operations from n in names.AsParallel().WithDegreeOfParallelism(ProcessorsT oUse.Value) where n.Name.Equals(queryInfo.Name, StringComparison.InvariantCultureIgnoreCase) && n.State == queryInfo.State && n.Year >= yearStart && n.Year <= yearEnd orderby n.Year ascending select n; Parallel LINQ (PLINQ)
  • 12. • System.Diagnostics.Contracts • Code Contracts introduce a way to specify contractual information that is not represented by a method or type’s signature alone • Scenarios for using contracts include: • Perform static bug finding, which enables some bugs to be found without executing the code • Create guidance for automated testing tools to enhance test coverage • Create a standard notation for code behavior, which provides more information for documentation Design By Contract
  • 13. • BigInteger • Immutable type that represents an arbitrarily large integer whose value in theory has no upper or lower bounds • SortedSet<T> • Provides a self-balancing tree that maintains data in sorted order after insertions, deletions, and searches Data Types
  • 14. • Memory-Mapped File • Used to edit very large files and to create shared memory for inter-process communication • Stream.CopyTo • Allows you to copy the contents of one stream into another I/O
  • 16. • Auto-Implemented Properties • Shortened syntax that enables you to quickly specify a property of a class without having to write code • Collection Initializer • Shortened syntax that enables you to create a collection and populate it with an initial set of values • Implicit Line Continuation • Enables you to continue a statement on the next consecutive line without using the underscore character Visual Basic
  • 17. • Dynamic Type • Operations that contain expressions of type dynamic are not resolved or type ch`ecked by the compiler. The compiler packages together information about the operation, and that information is later used to evaluate the operation at run time • Optional and Named Parameters • Named arguments enable you to specify an argument for a particular parameter by associating the argument with the parameter's name rather than with the parameter's position in the parameter list. • Optional arguments enable you to omit arguments for some parameters. Both techniques can be used with methods, indexers, constructors, and delegates. C#
  • 18. • You can configure restart manager to autosave documents and restart your application after it exits unexpectedly • Lambda expressions are available in C++ • The new CTaskDialog replaces the standard Windows message box and adds functionality to display and gather more information C++
  • 19. IDE support for F# • Interactive F# for prototyping code • Asynchronous constructs • Parallel constructs • Immutable data types F#
  • 23. • Blue Angels Web Site • http://blueangels.navy.mil You Can Use Them Both
  • 26. Web Platform Installer Ajax Control Toolkit & jQuery ASP.NET 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
  • 27. I’m a professional I <3 Web Apps. I want to build web software developer and I just need a tool that sites myself with an I build complex, large makes them easier to easy to learn tool scale web sites with a configure, customize and framework team of developers and publish them Today’s Web Developers
  • 28. A Free Web Dev Tool
  • 29. 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
  • 30. • Ability to set meta tags • More control over view state • Added and Updated browser definition files • ASP.NET Routing • The ability to persist selected rows in data controls • More control over rendered HTML in the FormView and ListView controls • Filtering support for data source controls ASP.NET 4 Webforms
  • 33. Huge investment from Microsoft • Alternative to WebForms • Modular Architecture • MVC 3.0 now available • MVC 4 in Developer Preview stage • Razor Syntax • MVC 3.0 Tooling Updated April 2011 Model-View-Controller (MVC)
  • 34. Controller (Input) View Model (Presentation) (Data) ASP.NET MVC 101
  • 35. • What does MVC look like? Controller Request Controller Retrieves Model “Performs Work” View Response View Visually represents the model How MVC Works
  • 36. WHY SHOULD WE CARE ABOUT ASP.NET MVC IN PUBLIC SECTOR?
  • 37. • Users disdain “Ugly” URLs • http://answers.usa.gov/system/selfservice.controller?CONFI GURATION=1000&PARTITION_ID=1&CMD=VIEW_A RTICLE&ARTICLE_ID=11951&USERTYPE=1&LANGU AGE=en&COUNTRY=US vs http://www.whitehouse.gov/briefing-room/speeches-and- remarks • Search Engine Optimization (SEO) • Discoverability More Web Savvy Citizens
  • 38. • 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
  • 39. • Enable fast, TDD-friendly development for creating sophisticated applications • Separation of concerns makes for easier testing Testing
  • 40. • Uses the latest web standards. • Full control over markup makes creating compliant sites easier Accessibility
  • 41. • No ViewState • Smaller HTML payload • Faster downloads • HTML5 • Easy to implement eye catching graphics that leverage GPU acceleration with IE9 and IE10 Performance
  • 42. DEMO Creating an ASP.NET MVC 3 Project
  • 43. Razor
  • 44. @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
  • 45. 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: a Cut Above the Rest
  • 46. @{ 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
  • 47. @* <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
  • 50. WPF Silverlight Similar But Different
  • 51. Two Core One Common Technologies Language 2 Platforms Powered By XAML
  • 52. • Markup language derived from XML • XML serialization of CLR objects • Markup files have code-behind files • Could be C# or VB.NET • Conceptually similar to ASP.NET • X stands for Extensible • Data Binding • Styles • Templates Intro to XAML
  • 55. Most Devs Reaction to Blend
  • 56. Demo
  • 58. For the purposes of this talk, we’ll focus on Silverlight. 1 Platform. 2 Choices.
  • 61. METRO IS OUR DESIGN ETRO LANGUAGE. WE CALL IT METRO BECAUSE IT’S MODERN AND CLEAN. IT’S FAST AND IN MOTION. IT’S ABOUT CONTENT AND TYPOGRAPHY. AND IT’S ENTIRELY AUTHENTIC.
  • 66. Creates Entity Model from Database • Helpful in creating RESTful Services • Exposes Database as Classes/Methods • Works with any Database • Useful in MVC, Dynamic Data Models What is the Entity Framework?
  • 67. Database Generated First Existing Entity Data Database Model Model First Entity Data Generated Model Database Code-First in EF 4.1
  • 68. DEMO
  • 69.  Phone SDK Download http://bit.ly/WinPhoneSDKDownload  Web Matrix http://bit.ly/WhatIsWebMatrix  Azure http://bit.ly/FreeAzure90DayTrial http://bit.ly/DownloadAzureSDK Useful Resources