View
215
Download
1
Embed Size (px)
Citation preview
Building a Complete Web Application Using ASP.NET 3.5 & Visual Studio 2008 (Part 1 of 2)Jeff KingProgram ManagerMicrosoft [email protected]
DEV312
Today’s GoalBuild a web application using:
ASP.NET 3.5Visual Studio 2008IIS 7.0
Primarily demo and code drivenPlease ask questions and make it interactive!
Provide you with a broad understanding of some of the great new features shipping later this year
Multi-Targeting Support in VS 2008
New HTML Designer and CSS Support
LINQ and Object Relational Mapping
New ASP.NET Data Controls
Features Covered (Part 1)
JavaScript IntelliSense and Debugging Support
ASP.NET AJAX and the AJAX Extenders
IIS 7.0 Administration and Security Integration
Features Covered (Part 2)
IIS 7.0 Extensibility Opportunities
VS 2008 Multi-Targeting Support
Visual Studio 2008 supports targeting multiple versions of the .NET FrameworkChoose which Framework version to target when opening or creating an application
.NET Framework 2.0
.NET Framework 3.0
.NET Framework 3.5
Visual Studio IDE only shows feature appropriate for your selected target version
Toolbox, Add New Item, Add Reference, IntelliSense
VS 2008 Multi-Targeting Support
demo
VS 2008 HTML DesignerMassively improved HTML designer
Same WYSIWYG designer engine as in Expression Web
New capabilities:Fast designer/source switchingSplit view designerNested master pagesRich CSS editing support
Enable better designer/developer workflow
Split View EditorCSS Design SupportNested Master Pages
demo
Free CSS Web Templates
www.opensourcetemplates.org
Working with Data
Querying and manipulating data has always been a fundamental part of our jobs as programmers
Data formats change, but core needs are the same
USE empl
REPLACE ALL salary WITH (salary * 1.1) FOR supervises > 0
LIST ALL fname, lname, salary FOR Supervises > 0
Data Access(DBASE circa 1980s)
• Data querying and manipulation a core part of the programming model experience
• Certainly had limitations, but it sure was useful
SqlCommand cmd = new SqlCommand( @"SELECT fname, lname, salary
FROM Empl WHERE supervises > @p0"
);
cmd.Parameters.AddWithValue("@po", 0);
SqlConnection c = new SqlConnection(…); c.Open(); DataReader people = c.Execute(cmd);
while (people.Read()) { string fname = (string) people[“fname”]; string lname = (string) people[“lname”]; double salary = (double) people[“salary”]; } dr.Close();
Data Access APIs(circa late 1990s/early 2000s)
Object / Relational Mapping(circa last few years)
public class Employee { public string FirstName; public string LastName; public double Salaray; } IList employees = session.CreateCriteria(typeof(Employee)) .Add(Expression.Gt(“supervises", 0) .List();
foreach(Employee employee in employees) { string fname = employee.FirstName; string lname = employee.LastName; double salary = employee.Salary; }
• Map relational data to/from objects• Cleaner integration of business rules and
validation
But Challenges Still Remain…
How to retrieve non-relational data?XML, RSS, Web Services, REST, AD, Files, etc.
How to interact with plain old objects?How do you interact and query custom domain models?
How to enable rich data shaping & transformations?
Support flexible query composition (that is fast!)
How to enable clean code in both a strongly typed and dynamic language world?
LINQQuery, Set and Transform Operations for .NET
Makes querying data a core programming concept
Works with all types and shapes of dataRelational databasesXMLPlain old Objects
Works with all .NET languagesNew VB and C# have integrated language support
New ASP.NET Data Controls
<asp:ListView>
<asp:LinqDataSource>
<asp:DataPager>
LINQLINQ to SQL <asp:ListView> <asp:LinqDataSource>
demo
IntermissionMore coming in Part 2:
AJAX:JavaScript IntelliSense and DebuggingASP.NET AJAXASP.NET AJAX Control Extenders
IIS7 and ASP.NET IntegrationSecurity integrationExtensibility Opportunities
Evaluation Forms
Questions?
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after
the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.