Date post: | 18-Jan-2016 |
Category: |
Documents |
Upload: | malcolm-bond |
View: | 214 times |
Download: | 2 times |
MBL 305
ASP.NET Mobile Controls: Best Practices
Gökşin Bakir
CSA
Yage Ltd.
Microsoft Regional Director
Agenda
A Single URL for desktop and mobile
Securing your application
Template Customization
Displaying Images
Storing Dynamic Data
Setting Client Focus
Using Softkeys
Optimize the UI
Redirection
Business LogicBusiness Logic
Data StoreData Store
Presentation LayerPresentation Layer
Business ObjectsBusiness Objects
Mobile UIMobile UIDesktop UIDesktop UI
Data ObjectsData Objects
SQL DataSQL Data
Data Access ObjectsData Access Objects
Single URL redirectionSingle URL redirection
Security Option
Type Pros Cons
Windows
“NTML”
Very secure Not many mobile device support it
Digest More secure than basic Not many devices supports it
Basic Widely implemented It does not encrypt user name and password
Form No Windows Account needed
Could be use with HTTPS
Required coding the login page
Form Authentication
Create Login FormAdd User validation logic
Enable Form Authentication<authentication mode="Forms">
<forms name="name"
loginUrl="url“
protection="All|None|Encryption|Validation" timeout="30"
path="/"
requireSSL="true|false“
slidingExpiration="true|false">
Securing resources
<authorization>Define how can or can not access a resource
A resource could be a page, application or subdirectory
Two elements<deny> <allow> elements
Mobile Security Support Cookie-less devices (default)
Enable HTTPS on your siteRequires WTLS from client to gateway
Securing a mobile web Securing a mobile web applicationapplication
Templates
List Control Parts
Header Header TemplateTemplate
Item TemplateItem Template
Alternate ItemAlternate ItemTemplateTemplate
FooterFooterTemplateTemplate
SeparatorSeparatorTemplateTemplate
Pocket PC Customization
Cell Phone
Objectlist customization
Modify the control rendering by using templates
HeaderTemplate
FooterTemplates
ItemTemplate
AlternatingItemTemplates
SeparatorTemplate
ItemDetailsTemplate
Setting the Objectlist view Defined the objectlist
Setting the Object ListSetting the Object List
Image Display
Multiple formatBMP : Openwave.Com
Wbmp : Wap browser
Jpg : HTML browsers
If you have the right format use property override
Dynamic image control
Dynamic image controlDynamic image control
Store information strategiesType Pros Cons
SessionState All Server side May impact server performance
Web farm deployment is more difficult
Hidden Variables No server side impact
Overloads client with data
More bandwidth usage
Potential security risk
Query String Included in HTTP query string
Client side size limits
Must hand build parser
Potential security risk
Cookies Flexible Not all the devices supports it
Storing informationStoring information
Setting focus on a control
Create an inheritance controlAdd a JavaScript property
Override the render method
Setting focus of a Setting focus of a controlcontrol
Set a Right Softkey
WML 1.1- 1.2 does not provide a way to set the right softkey
Step 1 define a filter<deviceFilters> <filter name="supports2SoftKeys"
compare="NumberOfSoftkeys" argument="2"/>
</deviceFilters>
Use Scripttemplate<mobile:DeviceSpecific runat="server">
<Choice Filter="supports2SoftKeys" >
<ScriptTemplate> <do type="options" label="MS"> <go href="www.microsoft.com" /> </do>
</ScriptTemplate>
</Choice>
</mobile:DeviceSpecific >
Adaptive Rendering Tips
NavigationReduce the number of clicks
Improve navigational links
ObjectList TipsTurn pagination on
Turn wrapping off
Input formLiteral Text
Turn BreakAfter property off
Insert space in HTML view
Optimizing the UIOptimizing the UI
Download emulator
List of link of the current available emulators:
http://support.microsoft.com/default.aspx?scid=kb;en-us;320977
Getting Started
Download .NET Framework 1.1ASP.NET controls are part of the redist
http://www.asp.net/download-1.1.aspx?tabindex=0&tabid=1
Read the QuickStart Tutorialhttp://samples.gotdotnet.com/mobilequickstart/Samples
Review existing sample application 5 ASP.NET Starter Kits Available
http://www.asp.net/Default.aspx?tabindex=9&tabid=47
Get your question answeredParticipate in Peer to peer forums
http://www.asp.net/Forums/default.aspx?tabindex=1&tabid=39
Apply the latest device supportDownload the latest Device Update
http://www.asp.net/mobile/deviceupdate.aspx?tabindex=6
Let us know what you thinkSend Feedback to: [email protected]
Summary
The ASP.NET Mobile Controls…Makes it easy to build mobile web applications for cell phones, PDAs and pagers
Leverage current investment in the .NET Framework and Visual Studio .NET
Is 3rd party extensible
Questions?Questions?
Ask The ExpertsGet Your Questions Answered
I will be available in the ATE area after this session
Community Resources
Community Resourceshttp://www.microsoft.com/communities/default.mspx
Most Valuable Professional (MVP)http://www.mvp.support.microsoft.com/
NewsgroupsConverse online with Microsoft Newsgroups, including Worldwidehttp://www.microsoft.com/communities/newsgroups/default.mspx
User GroupsMeet and learn with your peershttp://www.microsoft.com/communities/usergroups/default.mspx
evaluationsevaluations
© 2003 Microsoft Corporation. All rights reserved.© 2003 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.