MBL 305 ASP NET Mobile Controls Best Practices

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 Presentation Layer Mobile UI Desktop UI Business Logic Business Objects Data Store Data Access Objects SQL Data

Single URL redirection

Security Option Type Windows “NTML” Pros Cons • Very secure • Digest • More secure than basic • Basic • Widely implemented • Form • • No Windows Account needed Could be use with HTTPS • Not many mobile device support it Not many devices supports it It does not encrypt user name and password Required coding the login page

Form Authentication Create Login Form Add User validation logic Enable Form Authentication <authentication mode="Forms"> <forms name="name" login. Url="url“ protection="All|None|Encryption|Validation" timeout="30" path="/" require. SSL="true|false“ sliding. Expiration="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 site Requires WTLS from client to gateway

Securing a mobile web application

Templates Header Template Item Template Alternate Item Template Separator Template Pocket PC Customization Footer Template List Control Parts Cell Phone

Objectlist customization Modify the control rendering by using templates Header. Template Footer. Templates Item. Template Alternating. Item. Templates Separator. Template Item. Details. Template Setting the Objectlist view Defined the objectlist

Setting the Object List

Image Display Multiple format BMP : Openwave. Com Wbmp : Wap browser Jpg : HTML browsers If you have the right format use property override Dynamic image control

Dynamic image control

Store information strategies Type Session. State Pros • All Server side Cons • • Hidden Variables • No server side impact • • • Query String Cookies • • Included in HTTP query string Flexible • • May impact server performance Web farm deployment is more difficult Overloads client with data More bandwidth usage Potential security risk Client side size limits Must hand build parser Potential security risk Not all the devices supports it

Storing information

Setting focus on a control Create an inheritance control Add a Java. Script property Override the render method

Setting focus of a control

Set a Right Softkey WML 1. 1 - 1. 2 does not provide a way to set the right softkey Step 1 define a filter <device. Filters> <filter name="supports 2 Soft. Keys" compare="Number. Of. Softkeys" argument="2"/> </device. Filters> Use Scripttemplate <mobile: Device. Specific runat="server"> <Choice Filter="supports 2 Soft. Keys" > <Script. Template> <do type="options" label="MS"> <go href="www. microsoft. com" /> </do> </Script. Template> </Choice> </mobile: Device. Specific >

Adaptive Rendering Tips Navigation Reduce the number of clicks Improve navigational links Object. List Tips Turn pagination on Turn wrapping off Input form Literal Text Turn Break. After property off Insert space in HTML view

Optimizing 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. 1 ASP. NET controls are part of the redist http: //www. asp. net/download-1. 1. aspx? tabindex=0&tabid=1 Read the Quick. Start Tutorial http: //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 answered Participate in Peer to peer forums http: //www. asp. net/Forums/default. aspx? tabindex=1& tabid=39 Apply the latest device support Download the latest Device Update http: //www. asp. net/mobile/deviceupdate. aspx? tabindex=6 Let us know what you think Send Feedback to: mitsup@Microsoft. com

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 3 rd party extensible

Questions?

Ask The Experts Get Your Questions Answered I will be available in the ATE area after this session

Community Resources http: //www. microsoft. com/communities/default. mspx Most Valuable Professional (MVP) http: //www. mvp. support. microsoft. com/ Newsgroups Converse online with Microsoft Newsgroups, including Worldwide http: //www. microsoft. com/communities/newsgroups/default. mspx User Groups Meet and learn with your peers http: //www. microsoft. com/communities/usergroups/default. mspx

evaluations

© 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.
- Slides: 28