Title of Presentation

Download Report

Transcript Title of Presentation

Sascha P. Corti
Developer Evangelist
Microsoft Switzerland
[email protected]
http://blogs.msdn.com/swiss_dpe_team
ASP.NET 4.0 and Visual Studio 2010
Web Forms
AJAX
AJAX and jQuery
1Click Deployment
Visual Studio 2010 supports Multi-Targeting
Use Visual Studio 2010 Advances for
.NET FW 2.0 through .NET FW 4.0
.NET FW 4.0 maintains High Compatibility
with .NET FW 3.5
ASP.NET investments include rollup of ‘outof-band’ features
July
Dec
Mar
Started
’07
‘07
‘08
~Mar ’08
Interim
..
ASP.NET 3.5 Extensions Preview
drops on
On-going
codeplex
ASP.NET 3.5 SP1 Beta 1
Spring
‘09
ASP.NET MVC Preview
ASP.NET Server Controls for Silverlight Beta
www.codeplex.com/aspnet
www.asp.net
Formal
releases
on asp.net
ASP.NET MVC 1.0
Ajax, Dynamic Data, MVC, ..
VS10
FX4.0
ASP.NET MVC
(Model-View-Controller)
Separation of Concerns,
TDD, Full Control
Building up from ASP.NET
MVC 1.0
AJAX Support
Provides Full Control of
Markup
URL Routing, Tooling
Support
Benefits of ASP.NET:
Profile, Membership and
Roles, Localization
ASP.NET Dynamic Data
Make building DataDriven Web Apps easy
Building on from FX3.5 SP1
Dynamic-data and MVC:
Scaffolding, Templates and
Data Validation
Support for abstract DataLayer:
Removes need for specific
DL (SQL, Entities).
Support for Many-to-Many
Relationships
ASP.NET MVC
does not
replace
Web Forms!
Really!
Illustration adapted from speedbump.com
Client IDs
Manage Control IDs that affect rendered Client IDs
URL routing for Web Forms
Configuration Model for URL routing
Instead of: http://YourSite.com/Search.aspx?query=cats
You can use: http://YourSite.com/Search/cats
View-state
Disable on Page, enable on specific Controls
Disable on Control, enable on Child Controls
Control.ViewStateMode
Enabled / Disabled / Inherit (default)
Server AJAX versus "pure" AJAX
Server AJAX
Initial request: HTML
Form POST
HTML
“Pure” AJAX
HTML + JSON
JSON
JSON
Microsoft Confidential
“Pure AJAX” - much easier
Dynamic Client-Rendered UI the easy way
Server provides JSON Data, not HTML
Client Templates for rendering UI
Declarative instantiation of Client Controls
JavaScript Objects and Arrays as live
“observable” Data
Live bindings
DataView control renders data
Uses a Client Template
Repeater if Data is an Array
Details View if Data is an Object
Fetching Data from a Data Provider
DataSource component
integrates data sources
.asmx
WCF
ADO.NET Data Services
etc.
http://ajax.asp.net
http://codeplex.com/
aspnet
Simple rendering on the client
On the server:
<ItemTemplate runat="server">
<li><%# Eval("Name") %></li>
</ItemTemplate>
On the client:
<ul class="sys-template">
<li>{{ Name }}</li>
</ul>
From data to UI and back
WPF-like syntax
<span>{binding Name}</span>
<input value="{binding Name}" … />
Because it is on the client, it really is live
Live changes from data to UI
Live changes back from user input to data
Changes get instantly propagated
No round-trip to the server
JavaScript only as required
Convert and ConvertBack functions
Using standards-based markup
Instantiate controls and behaviors from markup
XHTML-compliant
No JavaScript Needed!
Registration:
xmlns:dataview="javascript:Sys.UI.DataView"
Instantiation:
<div sys:attach="dataview"></div>
Setting properties:
<div … dataview:serviceuri="myService.svc"…>
ASP.NET AJAX
jQuery
AJAX Requests
Selectors
Components
and Controls
Animations
Client Templates
AJAX Control Toolkit
Plugins
ASP.NET AJAX + jQuery = Microsoft AJAX Framework
Overview
http://jquery.com
Created by: John Resig
Open source: MIT and GPL license
Cross-browser: IE 6+, Firefox 2+, Opera 9+, Safari 2+
Small footprint: 15KB
Microsoft and jQuery
jQuery included as-is – Microsoft will contribute
7/24 Product support through PSS
Microsoft will integrate jQuery into future versions of
Visual Studio
Microsoft will add Intellisense for jQuery
http://jquery.com
Selectors
$(“#firstName”)
Selects Element with Id “firstName”
$(":text")
Selects all Text Boxes
$(“.required”)
Selects all Elements with “required” Class
$("#grd tr:even")
Select even Rows from an Element with
an Id of “grd”
Operators
$(“#x”).fadeIn()
Executes the fadeIn() method on all selected
elements
Daisychaining
$(“#x”).a().b()
Executes the a() and b() methods on all
selected elements
jQuery Plugin Repository
http://jquery.com
http://plugins.jquery.com/











Ajax (108)
Animation and Effects (135)
Browser Tweaks (45)
Data (69)
DOM (76)
Drag-and-Drop (17)
Events (73)
Forms (180)
Integration (38)
JavaScript (80)
jQuery Extensions (133)










Layout (98)
Media (64)
Menus (51)
Metaplugin (16)
Navigation (88)
Tables (45)
User Interface (342)
Utilities (163)
Widgets (136)
Windows and Overlays (52)
Copy Web
Publish Web
Manual
Copy
Web Application
Development System
Server
2010
MSDEPLOY
Web Application
Development System
Web
Package
XML
Transformation
Engine
(Staging Ready)
Outputted to
OBJ\staging folder
of your project
Web.Staging.Config
XML Transformation
Engine
Web.Staging.Config
(Staging Ready)
The Official Microsoft ASP.NET Site
http://www.ASP.net
http://www.ASP.net/Ajax
CodePlex Project for ASP.NET Projects
http://www.codeplex.com/aspnet
Stephen Walther on ASP.NET MVC
http://StephenWalther.com
Tales from the Evil Empire
http://weblogs.asp.net/Bleroy/
Scott Guthrie’s Blog
http://weblogs.asp.net/scottgu
check out these websites, blogs & more!
Presentations
TechDays: www.techdays.ch
MSDN Events: http://www.microsoft.com/switzerland/msdn/de/presentationfinder.mspx
MSDN Webcasts: http://www.microsoft.com/switzerland/msdn/de/finder/default.mspx
MSDN Events
MSDN Events: http://www.microsoft.com/switzerland/msdn/de/events/default.mspx
Save the date: Tech•Ed 2009 Europe, 9-13 November 2009, Berlin
MSDN Flash (our by weekly newsletter)
Subscribe: http://www.microsoft.com/switzerland/msdn/de/flash.mspx
MSDN Team Blog
RSS: http://blogs.msdn.com/swiss_dpe_team/Default.aspx
Developer User Groups & Communities
Mobile Devices: http://www.pocketpc.ch/
Microsoft Solutions User Group Switzerland: www.msugs.ch
.NET Managed User Group of Switzerland: www.dotmugs.ch
FoxPro User Group Switzerland: www.fugs.ch
check out these websites, blogs & more!
Presentations
TechDays: www.techdays.ch
TechNet Events
TechNet Events: http://technet.microsoft.com/de-ch/bb291010.aspx
Save the date: Tech•Ed 2009 Europe, 9-13 November 2009, Berlin
TechNet Flash (our by weekly newsletter)
Subscribe: http://technet.microsoft.com/de-ch/bb898852.aspx
Schweizer IT Professional und TechNet Blog
RSS: http://blogs.technet.com/chitpro-de/
IT Professional User Groups & Communities
SwissITPro User Group: www.swissitpro.ch
NT Anwendergruppe Schweiz: www.nt-ag.ch
PASS (Professional Association for SQL Server): www.sqlpass.ch
7. – 8. April 2010
Congress Center Basel
Premium Sponsoring Partners
Classic Sponsoring Partners
Media Partner