Download presentation
Presentation is loading. Please wait.
Published byAbraham Alvin Taylor Modified over 9 years ago
1
Developing an ASP.NET Application and using the Mobile Internet Toolkit Bart Vande Ghinste bartvagh@microsoft.com Developer Consultant Microsoft Belux
2
2 Agenda Architectural Overview Data Binding Validating User Input Authentication and Authorization User Controls Server Controls Mobile Internet Toolkit Tips and Tricks from the Trade
3
3 Presentation Data Architectural Overview WS Façade (asmx) WS Façade (asmx) WIN Service WIN Service Business WS Façade WS Façade ES Façade ES Façade Biz Services Biz Services DALDAL DALDAL SPSP SPSP or browser admin reporter ASP.NET UI (aspx) ASP.NET UI (aspx)
4
4 Football247.net Football247.Presentation User Tier Business Tier Data Tier System Architecture Solution Structure Application Architecture.Administrator,.Reporter.WebSite.WebControls.WinControls.Facades Football247.Business.Facades.Host.Services Football247.Data.DataAccess Football247.Common.Core.Datasets
5
5 Agenda Architectural Overview Data Binding Validating User Input Authentication and Authorization User Controls Server Controls Mobile Internet Toolkit Tips and Tricks from the Trade
6
6 Data Binding Support in ASP.NET Binding controls to a data source Based on the fact that most data access is read only Search Pages Displaying Team or player data Several data sources can be used Datasets Collections IBindingList Interface You can assign data to any run-time accessible property Display Text TextBox, Button etc. Target Page of link controls Also Width, Height, BgColor, Class…
7
7 Data Binding Support in VS.NET Different types of data binding Multi Record Controls Repeater DataList DataGrid … Single Value Controls Label TextBox … HTML Server Controls Data Binding Expressions Design Time versus Run Time Binding Use the DataBinding Event to bind during Run Time Combine Design Time and Run Time
8
8 Data Binding Support in ASP.NET
9
9 Agenda Architectural Overview Data Binding Validating User Input Authentication and Authorization User Controls Server Controls Mobile Internet Toolkit Tips and Tricks from the Trade
10
10 Validating User Input Validation Controls Validation Controls can validate HTML Controls Web Server Controls Validation happens when Click events are processed Page.IsValid Property Multiple conditions are tested with a Logical AND Programmatically by calling Validate Method Types of Validation TypeControl Required EntryRequiredFieldValidator Value ComparisonCompareValidator Range CheckingRangeValidator Pattern MatchingRegularExpressionValidator User DefinedCustomValidator
11
11 Validating User Input Validation Controls Server-Side and Client-Side Validation Always Server-Side Also Client-Side if browser supports DHTML Custom Validation Complete Control over Format and location to place output BaseValidator Control Displaying Error Information Display OptionError Output Location In PlaceNext to Validated Control SummaryIn one dedicated place In Place and SummaryShow shorter message or glyph in place, detailed message at other location CustomFull Control
12
12 Validating User Input
13
13 Agenda Architectural Overview Data Binding Validating User Input Authentication and Authorization User Controls Server Controls Mobile Internet Toolkit Tips and Tricks from the Trade
14
14 Authentication and Authorization Authentication is process of obtaining credentials and validating against some authority Authorization is to determine if identity is granted access to a resource File Authorization URL Authorization Impersonation is acting of behalf of the calling Identity Authentication Providers in ASP.NET Authentication ProviderDescription Forms AuthenticationUnauthenticated request are redirected to HTML Form acquiring user credentials Passport AuthenticationCentralized Authentication Service Windows AuthenticationProvided by IIS Basic Digest Integrated with NTML or Kerberos
15
15 Forms Authentication IIS Browser Forms Authentication Module Get Shop.aspx Redirect SignIn.aspx Post SignIn.aspx Authenticate Credentials BUSINESSFACADEBUSINESSFACADE BUSINESSFACADEBUSINESSFACADE Authentication Data Set Cookie + Redirect Get Shop.aspx Global.asax AuthenticateRequest Context.User = Principal Global.asax AuthenticateRequest Context.User = Principal web.config
16
16 Forms Authentication Web.config Configuration FormsAuthentication Utility Class SignOut Encrypt/Decrypt GetRedirectURL …
17
17 ASP.NET Authorization File Authorization Handled by the FileAuthorizationModule Active when using Windows Authentication Checks the ACL URL Authorization Handled by the URLAuthorizationModule Maps Users and Roles to URI namespace Special Identities Web.config IdentityDescription *Refers to all identities ?Refers to the anonymous identity
18
18 Authentication and Authorization
19
19 Agenda Architectural Overview Handling Business Data Authentication and Authorization User Controls Server Controls Mobile Internet Toolkit Tips and Tricks from the Trade
20
20 User Controls Similar to Web Page User Interface Code Behind File No HTML, BODY or FORM elements Extension is.ascx Advantages Easy to create Good for static layout Same programming technique as web pages Disadvantages No UI in VS.NET Limited Visual Design Support Separate copy of control is required in each application Cannot be added to the toolbox in VS.NET
21
21 User Controls
22
22 Agenda Architectural Overview Data Binding Validating User Input Authentication and Authorization User Controls Server Controls Mobile Internet Toolkit Tips and Tricks from the Trade
23
23 Server Controls Compiled Component Resides in an Assembly Can be signed and versioned Can be placed in the GAC Advantages Full Visual Design Support in VS.NET UI in Design Mode Custom Editors Only a single copy is required Good for dynamic layout Can be added to the toolbox in VS.NET Disadvantages Harder to create compared to User Controls
24
24 Server Controls
25
25 Agenda Architectural Overview Data Binding Validating User Input Authentication and Authorization User Controls Server Controls Mobile Internet Toolkit Tips and Tricks from the Trade
26
26 client-side applications code web pages Visual Studio.NET.NET Framework Mobile Web Browser.NET Compact Framework web applications client-side applications Mobile Internet Toolkit
27
27 Mobile Internet Toolkit Automatically adapts display and interaction for mobile devices Web-enabled cell phones PDA Generates HTML, WML or CHTML Extends VS.NET and.NET Framework Mobile Internet Designer Mobile Internet Controls Runtime Emulators are provided by hardware manufactures
28
28 Mobile Internet Toolkit
29
29 Agenda Architectural Overview Data Binding Validating User Input Authentication and Authorization User Controls Server Controls Mobile Internet Toolkit Tips and Tricks from the Trade
30
30 Tips and Tricks from the Trade Dynamic Web Service Endpoints web.config Uri Property of Web Reference Several HTC’s are available WebService Behaviour ToolTip Behaviour … ASP.NET Caching with Cache Class Time based External Dependencies DataView Component Easiest way to filter data Avoids unnecessary sorting round trips
31
31 Tips and Tricks from the Trade
32
32 Resources http://www.football247.net Football247.Net Workspace on http://www.gotdotnet.comhttp://www.gotdotnet.com http://www.asp.net http://www.swarren.net http://msdn.microsoft.com/workshop/author/behaviors/be haviors_node_entry.asp?frame=true http://msdn.microsoft.com/workshop/author/behaviors/be haviors_node_entry.asp?frame=true
33
33 © 2002 Microsoft Corporation. All rights reserved.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.