47

Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity
Page 2: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Harry Ng, Microsoft Certified TrainerSenior Systems Consultant, [email protected] Code: WUX201

Page 3: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Overview of Talk

ASP.NET supports several very different types of web applications

Page 4: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET Web Forms

Page 5: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET Web Forms

ASP.NET Web Forms 4.0 enables you to build websites with more compelling front-end user experiences.

Page 6: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET Web Forms

With ASP.NET 4.0, you are in control:

Control Rendering

Control IDs

View State

Website URLs

XHTML and Accessibility

Page 7: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Code Snippets

Ctrl-K, XCtrl-K, S

Page 8: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity
Page 9: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Types of Code Snippets

HTMLdiv, table, img …

ASP.NET

scriptmanager, sqldatasource, formview …

ASP.NET AJAX

behavior, control …

JScript

function, forin …

Page 10: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

FormView Improvements

<asp:FormViewID="Formview1" RenderTable="false"runat="server">

Page 11: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ListView Improvements

<asp:ListView ID="Listview1" runat="server"><LayoutTemplate>

<div id="itemContainer" runat="server" /></LayoutTemplate><ItemTemplate>

<%# Eval("Title") %></ItemTemplate>

</asp:ListView>

Page 12: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Control Your View State

Control.ViewStateModeEnabled

Disabled

Inherit (default)

Page 13: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Control Your Client IDs

Control.ClientIdModeLegacy

Static

Predictable

Inherit (default)

Page 14: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Control Your Client IDs

<system.web>

<pages clientIdMode="Predictable">

</pages>

</system.web>

Page 15: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET Routing for Search Engine OptimizationInstead of:

http://YourSite.com/Search.aspx?query=cats

You can use:

http://YourSite.com/Search/cats

Page 16: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET Core Enhancements

Cache ExtensibilityCreate custom cache providers

Browser Capabilities ExtensibilityCreate custom browser capability providers

Session State CompressionCompress out-of-process session state

Page 17: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET AJAX

Page 18: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET AJAX

Page 19: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET AJAX

Client-Side Templates

Client-Side Controls

Client-Side Data Binding

Read/Write Database Data from the Browser

Cross-Browser Compatible

Not tied to ASP.NET

Page 20: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET AJAXRefactored Microsoft AJAX Library

MicrosoftAjaxCore.js

MicrosoftAjaxComponentModel.js

MicrosoftAjaxSerialization.js

MicrosoftAjaxGlobalization.js

MicrosoftAjaxHistory.js

MicrosoftAjaxNetwork.js

MicrosoftAjaxWebServices.js

MicrosoftAjaxApplicationServices.js

MicrosoftAjaxTemplates.js (New )

MicrosoftAjaxAdoNet.js (New)

Page 21: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET AJAXCreated by John Resig

Open Source

Microsoft Product support

Included with Visual StudioShipping right now with ASP.NET MVC

jQuery IntellisenseSupported in Visual Studio 2008

Supported in Visual Studio 2010

Page 22: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET AJAX

Accordion

AlwaysVisibleControl

Animation

AutoComplete

Calendar

CascadingDropDown

CollapsiblePanel

ConfirmButton

Page 23: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET AJAX

AjaxControlToolkit-ScriptFilesOnly.zip

Page 24: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET MVC

Page 25: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET MVC

Enables a clear separation of concerns

Enables testability including test-driven development

Enables fine-grained control over HTML and JavaScript

Page 26: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET “Then”…

Caching Modules

HandlersIntrinsics

Pages Controls

Globalization

Profile

Master Pages

MembershipRoles

Etc.

ASP.NET

One web applicationframework to rule them all…

Page 27: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET Now…

ASP.NETDynamic Data

ASP.NETWebForms

ASP.NETMVC

Presentation

RuntimeASP.NET

Core

Page 28: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

WebForms 4 is seeing huge improvements…

Client ID support

Granular viewstate control

Routing integration

Control enhancements

Much more

http://www.asp.net/learn/whitepapers/aspnet40

Page 29: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

WebForms is great, but some choose a different development style…

Page 30: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

MVC = Model-View-Controller

Model(Logic)

View(Presentation)

Controller(Input)

Page 31: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

How Does ASP.NET MVC "Look"?

Request

View

Controller

Response

Controller

Handles input(HTTP requests)

View

Visually representsthe model

Page 32: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Why settle for…

/Products.aspx?CategoryID=123

When you can have…

/Product/Puppies

Or whatever else your heart desires…

Clean URLs

Page 33: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET Dynamic Data

Page 34: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET Dynamic Data

DynamicDataManager Control

DynamicHyperLink Control

Field Templates for Email and URL

Support for Inheritance and Many-to-Many Relationships

Entity Templates

Page 35: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

ASP.NET Dynamic Data

Entity Templates

Page 36: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Conclusion

ASP.NET supports several very different types of web applications

Page 37: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Conclusion

ASP.NET Web Forms 4.0:

Provides you with better control over the front-end user experience

Has several improvements for the source-focused developer

Puts you, the developer, in control of your HTML markup and code

Page 38: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Conclusion

ASP.NET AJAX 4.0

Client-Side Templates and Controls

jQuery

New features coming with the AJAX Control Toolkit

Page 39: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Conclusion

ASP.NET MVC

Enables a clear separation of concerns

Enables testability including test-driven development

Enables fine-grained control over HTML and JavaScript

Page 40: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Conclusion

ASP.NET Dynamic DataMany new features

Entity Templates

Page 41: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Conclusion

ASP.NET MVC

Enables a clear separation of concerns

Enables testability including test-driven development

Enables fine-grained control over HTML and JavaScript

Page 42: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Conclusion

VISUAL STUDIO 2010

Web Authoring ProductivityHTML/JS Snippets

Dynamic IntelliSense for AJAX

DeploymentWeb Configuration Transformations

One-Click Publishing

Page 43: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Resources

ASP.NET 4.0 and Visual Studio 2010 Web Development Overviewhttp://www.asp.net/learn/whitepapers/

CodePlex ASP.NET Previewshttp://www.CodePlex.com/AspNet

Visual Web Developer Team Bloghttp://blogs.msdn.com/webdevtools/

Page 44: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

www.microsoft.com/teched

Sessions On-Demand & Community

http://microsoft.com/technet

Resources for IT Professionals

http://microsoft.com/msdn

Resources for Developers

www.microsoft.com/learningMicrosoft Certification and Training Resources

www.microsoft.com/learning

Microsoft Certification & Training Resources

Resources

Page 45: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

Complete an

evaluation on

CommNet and

enter to win!

Page 46: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity
Page 47: Harry Ng, Microsoft Certified Trainerdownload.microsoft.com/documents/hk/technet/techdays2009/... · 2018-12-05 · JavaScript. Conclusion ASP.NET Dynamic Data Many new features Entity

© 2009 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.