Mobile Portal Optimization

Similar documents
Campaign Guidelines and Best Practices

GUIDE TO CODE KILLER RESPONSIVE S

Designing portal site structure and page layout using IBM Rational Application Developer V7 Part of a series on portal and portlet development

Creator Coding Guidelines Toolbox

Base template development guide

Microsoft Expression Web Quickstart Guide

Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates

Designing HTML s for Use in the Advanced Editor

This document will describe how you can create your own, fully responsive. drag and drop template to use in the creator.

The Essential Guide to HTML Design

HTML TIPS FOR DESIGNING

CSS for Page Layout. Key Concepts

Essential HTML & CSS for WordPress. Mark Raymond Luminys, Inc mraymond@luminys.com

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

How to Properly Compose HTML Code : 1

Skills for Employment Investment Project (SEIP)

Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University

Web Authoring CSS. Module Descriptor

RESPONSIVE DESIGN FOR MOBILE RENDERING

8 STEPS TO CODE KILLER RESPONSIVE S

Kentico CMS, 2011 Kentico Software. Contents. Mobile Development using Kentico CMS 6 2 Exploring the Mobile Environment 1

MCH Strategic Data Best Practices Review

ICE: HTML, CSS, and Validation

Coding HTML Tips, Tricks and Best Practices

White Paper Using PHP Site Assistant to create sites for mobile devices

RESPONSIVE DESIGN BY COMMUNIGATOR

CHAPTER 10. When you complete this chapter, you will be able to:

Looking Good! Troubleshooting Display Problems

CST 150 Web Design I CSS Review - In-Class Lab

DESIGNING MOBILE FRIENDLY S

Web layout guidelines for daughter sites of Scotland s Environment

How To Design An In Html (Html) And Html (Mailbox) Safely

Contents. Downloading the Data Files Centering Page Elements... 6

HTML and CSS. Elliot Davies. April 10th,

CREATING A NEWSLETTER IN ADOBE DREAMWEAVER CS5 (step-by-step directions)

CREATING RESPONSIVE UI FOR WEB STORE USING CSS

ireview Template Manual

Saving work in the CMS Edit an existing page Create a new page Create a side bar section... 4

RIT Message Center Compose and Send Messages

We automatically generate the HTML for this as seen below. Provide the above components for the teaser.txt file.

Learning Web Design. Third Edition. A Beginner's Guide to (X)HTML, Style Sheets, and Web Graphics. Jennifer Niederst Robbins

ITNP43: HTML Lecture 4

Basics of HTML (some repetition) Cascading Style Sheets (some repetition) Web Design

Fortis Theme. User Guide. v Magento theme by Infortis. Copyright 2012 Infortis

Agenda2. User Manual. Agenda2 User Manual Copyright Bobsoft 1 of 34

Development Perspective: DIV and CSS HTML layout. Web Design. Lesson 2. Development Perspective: DIV/CSS

Responsive Web Design for Teachers. Exercise: Building a Responsive Page with the Fluid Grid Layout Feature

Using and creating Crosstabs in Crystal Reports Juri Urbainczyk

Style & Layout in the web: CSS and Bootstrap

Eloqua What is this and why should I read it?

Ad Hoc Reporting. Usage and Customization

Introduction to Adobe Dreamweaver CC

Level 1 - Clients and Markup

Official JSN Epic PRO v2.0 Configuration Manual version for Joomla! 1.5.x

You can use percentages for both page elements and text. Ems are used for text,

Making Responsive s

Web Design I. Spring 2009 Kevin Cole Gallaudet University

Create Your own Company s Design Theme

Web Design Revision. AQA AS-Level Computing COMP2. 39 minutes. 39 marks. Page 1 of 17

Using Style Sheets for Consistency

Web Portal User Guide. Version 6.0

Oracle Business Intelligence Publisher: Create Reports and Data Models. Part 1 - Layout Editor

How To Create A Web Page On A Windows (For Free) With A Notepad) On A Macintosh (For A Freebie) Or Macintosh Web Browser (For Cheap) On Your Computer Or Macbook (

The Essential Guide to HTML Design

Sage CRM. Sage CRM 2016 R1 Mobile Guide

HTML CSS Basic Structure. HTML Structure [Source Code] CSS Structure [Cascading Styles] DIV or ID Tags and Classes. The BOX MODEL

Web Development I & II*

Going Beyond SAP ITS Mobile Apps to a Responsive Design Mobile Apps. JK (JayaKumar Pedapudi) Principal Consultant NTT DATA, Inc.

Making Web Application using Tizen Web UI Framework. Koeun Choi

Understanding Responsive Web Design (RWD) & Environment Aware Component Design Version:

The Da Vinci Coding: The Art of HTML

TEMPLATE GUIDELINES OCTOBER 2013

{color:blue; font-size: 12px;}

WEB DEVELOPMENT IA & IB (893 & 894)

Web Design and Databases WD: Class 7: HTML and CSS Part 3

Web Publishing Basics 2

Dreamweaver and Fireworks MX Integration Brian Hogan

css href title software blog domain HTML div style address img h2 tag maintainingwebpages browser technology login network multimedia font-family

Editing the Web Template Files

DESIGN RESPONSIVELY DRUPAL CAMP CT RESPONSIVE WEB DESIGN AND DRUPAL PROJECT. Monday, August 27, 12

Mobile Web Design with HTML5, CSS3, JavaScript and JQuery Mobile Training BSP-2256 Length: 5 days Price: $ 2,895.00

Themes and Templates Manual FOR ADVANCED USERS

Creative Guidelines for s

ART 379 Web Design. HTML, XHTML & CSS: Introduction, 1-2

Interspire Website Publisher Developer Documentation. Template Customization Guide

The Birth of Responsive Templates

FUNCTIONAL OVERVIEW VERSION: 1.0

Page Create and Manage a Presentation 1.1 Create a Presentation Pages Where Covered

SE Ranking Report

Use the Microsoft Office Word Add-In to Create a Source Document Template for Microsoft Dynamics AX 2012 WHITEPAPER

Appendix H: Cascading Style Sheets (CSS)

Table of Contents Find out more about NewZapp

Using Adobe Dreamweaver CS4 (10.0)

Citrix StoreFront. Customizing the Receiver for Web User Interface Citrix. All rights reserved.

THE SAS OUTPUT DELIVERY SYSTEM: BOLDLY TAKE YOUR WEB PAGES WHERE THEY HAVE NEVER GONE BEFORE! CHEVELL PARKER, SAS INSTITUTE INC.

Fundamentals of Web Design (One Semester)

Customising Your Mobile Payment Pages

Principles of Web Design 6 th Edition. Chapter 12 Responsive Web Design

End User Guide SharePoint Web Parts Site Creation Package

How To Change Your Site On Drupal Cloud On A Pcode On A Microsoft Powerstone On A Macbook Or Ipad (For Free) On A Freebie (For A Free Download) On An Ipad Or Ipa (For

Transcription:

IBM Mobile Portal Accelerator Mobile Portal Optimization Approach & Techniques Version 0.3 KRISHNA C KUMAR, PRINCIPAL SOFTWARE ENGINEER, IBM MPA DEVELOPMENT/L3 SUPPORT, INDIA SOFTWARE LABS, BANGALORE

HIGH LEVEL APPROACH Identify the screens for different device categories 3 Different variants of UI created for different categories of devices Create a Global Styles (to be included in most of the pages portlets). This is NOT THEME File Identify styles that should go into <nativemarkup> for <nativemarkup> wrapped code Identify generic global styles as CSS Create ViewPort.jsp for including in the portlet JSPs for devices which supports viewports (This is needs to be included at the Aggregator JSP Level) Modify/Create MCS Artifacts Add/Modify Portlet JSPs/java Classes [Avoid any device/model specific Conditions ] Modify Default XDIME Aggregator JSPs/Themes

GLOBAL STYLES

Creating Global Styles - I 1. In what format the Global Styles to be created? JSP format as Style/CSS.jsp, which can be included in the required portlet jsp pages 2. Why globalstyles.jsp to be used instead of Global Theme based on MCS Themes? By default, WEMP has global themes which comes out of box with XDIME Aggregator as wp_styles.mthm wp_styles.mthm takes care of rendering Aggregator related themes/styles Every XDIME/JSP or the canvas can be styled using a single mcs theme file (*.mthm file) In case if we place all the styles configured globally in a single theme, it is not be possible add local themes (themes for minor changes which is specific for a particular page) as a layout canvas element of XDIME cannot have more than one theme file. 3. Where this should be included? To be included within Common.jsp or default.jsp of the XDIME Aggregator 4. Contents of the Global Styles? <style type= text/css >.. </style> With CSS Styles with ID Selectors and Class Selectors Identified common styles across all pages

Creating Global Style - II 6. Global Styles & Nativemarkup? It is a good practice to include Nativemarkup rendering as a separate JSP, say nativecss.jsp and include 7. Types of Contents of nativecss.jsp <nativemarkup targetlocation= html.head expr= true() ><style type= text/css >..</style></nativemarkup> <nativemarkup targetlocation= html.head expr= device:getpolicyvalue( layoutengine ) = Webkit ><style type= text/css >..</style></nativemarkup> Use Correct MCS expressions in the expr attribute of nativemarkup element, this will save the page from unneccssary CSS rendering from nativemarkup on the final markup on the device 8. Global Styles Fonts Set the font properties globally in the style jsp and include the same in the required pages. Say body{ font-family: RonniaBasicLight; font-size:110% } Set the font-size as body selector e.g. body{ font-size: 100% }, this will ensure all the font-size globally is the default browser font size rendering. Locally these font-size can be handled when there is a reduction in size or increase in font size Any variations over the font style or settings needs to be handled locally in theme files for the specific XDIME/JSPs

Creating Global Style - III 9. Global Styles Colors & Background Colors Maximum used Colors, Font colors, background colors, background images (both image components or images) needs to be added to the Global Styles jsp Examples : Grey and White background, Green backgrounds, Maximum used Font colors, Heading Text Color, Button Styling, Form controls, etc. 10. Identify the common styling across all pages and create Global Styles jsp and for elements which occurs every page uniformly. Say button styled red on all pages Sample globalstyles.jsp <style type= text/css > body{margin:0;padding:0;font-family:ronniabasiclight,sans-serif; font-size:100% }.stylered{color:red;}.black{color:#000000;}.white{color:#ffffff;}.blue{ color:#000000;}.grey{ background:grey;}.white{background:#ffffff;}.itembkgroundg{}.itembkgroundw{}.buttongrey{} #numvalidate{-wap-input-required:true;-wap-input-format:nnnnnnnnnn;} adimage{ width:100%; display:block } podimage{ width:100%; display:block }.inputboxstyle{ }.marqueestyle{ } </style>

Creating Global Style - IV 11. Conditional handling of Global Styles for variants Using globalstyles_240px.jsp, Using globalstyles_320px.jsp Using global styles conditionally w.r.t to device screen size can be an example to handle well coarse grained styling for different styling variants Sample nativeglobalstyles.jsp /*here <nativemarkup> comes within the XDIME JSP */ <style type= text/css > table{border-collapse:collapse;} </style> Sample nativeglobalstyles.jsp OR <nativemarkup expr= true() targetlocation= html.head > <style type= text/css > table{border-collapse:collapse;} </style> </nativemarkup> <nativemarkup expr= device:getpolicyvalue( pixelsx ) >= 240 targetlocation= html.head > <style type= text/css > table{border-collapse:collapse;} </style> </nativemarkup>

VIEWPORTS

Considering Viewports - I 1. What is viewport.jsp? For information on what is viewport, refer Apple Documentation (http://developer.apple.com/library/ios/#documentation/appleapplications/refer ence/safariwebcontent/usingtheviewport/usingtheviewport.html) Similar to global themes inclusion as JSP, viewports needs to be included in the Aggregator level JSPs This exists for only highend devices only It is a simple meta tag element with viewport configured. Different vendors follow different view port standards. So kindly refer vendor specific sites. Following are the vendors uses viewport for rendering/controlling the rendering on their high resolution devices Include viewport conditionally for All Apple products, Windows Mobile 5, 6, Windows Phone OS 7/7.5, Blackberry, Android Device specific configuration is unavoidable as viewport is proprietary Certain level of generalization can be performed using mcs-functional expressions effectively 2. Where should we use viewport.jsp? Aggregator level (include as JSP based on conditions using mcs-expressions) 3. Is this must to use? YES. Mandatory 4. What if viewport settings are not used? Pages will look inappropriate to the size of the screen and rendering will look small

Considering Viewports - II 5. How should we include viewports? 5. Include viewports using nativemarkup and mcs-expressions 6. Example Code Viewports.jsp <nativemarkup targetlocation= html.head expr= device:isinstanceof( Apple ) > <meta name= viewport width= device-width /> </nativemarkup> <nativemarkup targetlocation= html.head expr= device:isinstanceof( RIM-OS ) > <meta name= viewport width= device-width; user-scalable= no /> </nativemarkup> <nativemarkup targetlocation= html.head expr= device:isinstanceof( Windows PhoneOS 7.5 ) > <meta name= viewport width= device-width; user-scalable= no /> </nativemarkup> 7. This file can be modified if there is any new viewport setting is recommended by device manufacturers.

LAYOUTS

Creating Layouts - I 1. Can we use global layouts? NO, It is not possible 2. Points to be remembered while creating layouts Create layouts without empty grids Avoid using unnecessary nested grids (for e.g. using 1 X 1 Grid for adding a pane) Use style classes required for grid/panes in Format Attributes Avoid Variants of layouts (unless required) Create generic variants with default variant For different class of UI different layout can be created. Say homepagesimple.mlyt, homepagemedium.mlyt, homepagecomplex.mlyt for simple, medium and complex page variants of a home page respectively Conditionally use the layouts in the portlet jsp as follows <canvas layoutname= <%= layoutname %> type= portlet > </canvas> Identify common patterns and use it as layouts and its contents. This will reduce the size of the layouts Make sure column width is set correctly for the grids Try to avoid not include static panes within Form of the layout Do not use any Spacer panes

Creating Layouts - II 3. Using Spatial Iterators Row-wise or column-wise iteration should be handled using spatial iterator settings instead of separate panes with two iterations Use :odd & :even pseudo class selectors for alternate row styling (background, fonts, foreground etc.) 4. Using regions Use of regions in layouts enables reuse of layout. Identify common patterns and use regions to plugin the layout patterns on the pages Do not use too much of regions. Use regions if the layout pattern is quite big, for small patterns like 1 or 2 panes do not use regions, instead of reducing complexity it increases meaninglessly 5. Customizing Aggregator Layouts Optimize the aggregator layouts By default the aggregator layouts have spatial iterators in the header for displaying multiple levels of headers. In case if the implementation doesn t need multiple headers remove the same. Maintain Single Variant (or single set of layouts) for Aggregator Layouts, as the aggregator generally renders a logo in header and footer with some default text on all pages

MCS THEMES FOR PORTLETS

Using Local Themes 1. What are local themes? Themes added to the portlet JSP in the canvas element for theme= attribute is termed as local theme Local theme affects only the particular canvas on the specific XDIME/JSP only A single theme file can be reused on multiple JSP canvas 2. Scenarios where local themes has to be used? In general, restrict all styling to the global themes/css If there is a specific change only for a particular page, then use the local mcs theme for incorporating the changes Example: If the overall font family to be displayed is Arial, and for a particular page, specifically for a heading if the font-family has to Verdana create a class selector in the local theme and add the font-family as verdana and use the same in the JSP. In this case, that particular heading will be styled with font-family from the local theme/css, since local theme has more preference than global A single theme file can be reused on multiple JSP canvas 3. Any alternate to local themes? <style> elements with or without <nativemarkup> can be included in any XDIME page When using <nativemarkup> make sure the rendering is not going to happen for all pages unnecessarily, i.e. use right conditions- otherwise whether the styles will be used or not it will be rendered on to the final device specific markup and increases the page size unnecessarily

IMAGE COMPONENTS

Creating Image Components - II 1. How to create image components? Since different screen sizes are capable of rendering different image sizes, it is recommended to create image components generic for different sizes For example, logo_240.mimg, logo_320.mimg This needs to be conditionally handled based on the screen usable width from the device repo (similar to handling layouts) Every image component should be created with image pointed to generic variant 2. Points to be noted in creating image components? Add alt= attribute with suitable text, if there is no text required at least empty string for the alt attribute in the <img> xdime tag should be used (MANDATORY) Use forward slash (/images/test.jpg) to point the images in the image component, by default it adds with backward slash Make sure the image file is browsed and located for image component. This will avoid wrong format/dimensions/etc. In every image component, use generic variant for 3 types of image formats to suit all devices (png, jpg, gif) MPA will choose the best image for the device runtime 3. Don'ts in creating image components 1. Do not edit image components with text editor use always GUI editor 2. Do not use variants 3. Do not use backward slash to point to the image file 4. Do not manually change the file format listed in the image component after pointing to the image 5. Do not change the file extension of image and set it as a different file format

Creating Image Components - II 4. Using images (without image components) When using images directly from a remote server, creating image component may not be applicable. So use <img> with url attribute instead of src Use alt attribute When the remote server image is static and fixed (which is not going to change at all) image components can be used with settings as image Location set to Remote Server or URL Context locate the same in the Image component editor

Some Important Tips 1. For Tables 1. In general, unlike PC in mobile web, the table border is not much used because of size restrictions. So always use border-collapse style for table with CSS selector 2. <nativemarkup> can be used to render the border-collapse on all the pages (set this in nativeglobalstyles.jsp once. 3. Do not set this in local themes/css 4. Important While using Tables with percentage, old nokia devices rendering is not perfect because of XHTML MP handled by nokia browsers in a mysterious way. So try to use % for low end device when required (say device usable Width less than 240px) 2. Image within Table 1. Do not use any text-align property for images as it will cause gaps above and below images on certain devices 2. Use img { display:block } to avoid white spaces above and below images when used within tables td element 3. Dynamic Style parameters 1. Use <style> element for dynamic style parameters 2. Say if you want to pass percentage dynamically use as follows <style type= text/css > div.header{ height:<%= headerheight %>px }</style>

Thank You