grooming session android cwc

Post on 03-Sep-2014

1.190 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

TRANSCRIPT

CWC Grooming Session: Android

Outline

Problem Set for CWCJudgment CriteriaPragmatic Practices in Android Development

Some Dos and Don’tsUX Design Fundamentals

Designing for PerformanceDesigning for ResponsivenessSupporting Multiple ScreensLocation Based Services

UI Design PatternsTesting

Problem SetA courier service company wants to give its delivery employees ability to perform deliveries easily and enable them to do on site reporting quickly. In order to solve this problem, they want to have an Android application which will be delivered to designated employees.

The key features of the app would be to

1. See the tasks assigned to an employee2. See the delivery locations on Maps3. View task details of a delivery item with associated location information

and recipient phone number.4. After a successful delivery the details are emailed or synchronized with

server and task lists are auto updated based on that.5. Ability to do any reporting from on site.6. Tracking the performance of an application user through graphical charts

or aided system.

Problem SetRequired Features of Android (For your preparation)

1. Location Based Service2. Consuming Web Services3. Integrating Maps Library4. Using SQLite Database5. Unit Testing6. Black-Box Testing

Battle: Round 11. A codebase and bare bone project along with

requirement specification will be provided to each group over online repository on 20th January

2. You have to implement the unimplemented features of the specification

3. You will also have to improve the given source code4. During round 1 of the battle you’ll be given 3-4

assignments on your project5. Your deliverables of round 1 of the battle will be

judged with the following criteria

Judgment Criteria 1. User Experience Design2. Efficient handling of multiple screen sizes3. Power efficient design4. Database design5. Unit Testing6. Black-Box Testing7. Quick integration with open source components8. Application of Object oriented principles and design

patterns

Pragmatic Practices: Some Dos and Don’ts

Some DON’Ts (1)

SLOTHBe Fast, Be Responsive

Golden Rules

Don't do work that you don't need to doDon't allocate memory if you can avoid it

Some DON’Ts (1) SLOTHBe Fast, Be Responsive

Optimize judiciouslyAvoid creating objectsUse native methodsPrefer Virtual over InterfacePrefer Static over VirtualAvoid internal setters and gettersDeclare constants finalAvoid float and enumsUse package scope with inner classes

Performance Pointers

Source: http://developer.android.com/guide/practices/design/performance.html

Some DON’Ts (1) SLOTHBe Fast, Be Responsive

"Application Not Responding“-ANRRespond to user input within 5 secondsBroadcast Receiver must complete in 10 seconds

Users perceive a lag longer than 100 to 200ms Use Threads and AsyncTasks within Services

Responsiveness

Source: http://developer.android.com/guide/practices/design/responsiveness.html

Some DON’Ts (1) SLOTHBe Fast, Be Responsive

Responsiveness

Some DON’Ts (2)

GLUTTONYUse System Resources Responsibly

Don'tsDON'T over use WakeLocksDON'T update Widgets too

frequentlyDON'T update your location

unnecessarilyDON'T over use Services

DOsDO use Receivers and Alarms not Services and ThreadsDO let users manage updates

Some DON’Ts (2) GLUTTONYUse System Resources Responsibly

What is a WakeLock?

Force the CPU to keep runningForce the screen to stay on (or stay bright)Drains your battery quickly and efficiently

Some DON’Ts (2) GLUTTONYUse System Resources Responsibly

Using WakeLock?Do you really need to use one?

Use the minimum level possible PARTIAL_WAKE_LOCK SCREEN_DIM_WAKE_LOCK SCREEN_BRIGHT_WAKE_LOCK FULL_WAKE_LOCK

Release as soon as you canSpecify a timeout

Some DON’Ts (3)

HOSTILITYDon’t Fight Your Users

User experience should be your top priorityRespect user expectations for navigating your appDon't hijack the native experienceRespect user preferences

Some DON’Ts (3)

HOSTILITYDon’t Fight Your Users

Respect User Expectations For Navigation Flow

The back button should always navigate back through previously seen screensAlways support trackball navigationUnderstand your navigation flow when entry point is a

notification or widgetNavigating between application elements should be easy and intuitive

Some DON’Ts (3) HOSTILITYDon’t Fight Your UsersDon’t Hijack The Native Experience

Don't hide the status bar Back button should always navigate through previous screensUse native icons consistently Don't override the menu buttonPut menu options behind the

menu button

Some DON’Ts (4)

ARROGANCEDon’t Fight The System

Don't use undocumented APIs. Seriously. Don't use undocumented APIs

Make your app behave consistently with the system

Respect the application lifecycle model

Support both landscape and portrait modes

Don't disable rotation handling

Some DON’Ts (5) DISCRIMINATIONDesign For Everyone

Avoid Size Discrimination

Don’t make assumptions about screen size or resolutions

Use Relative Layouts and Device Independent Pixels

Optimize assets for different screen resolutions

Source: http://developer.android.com/guide/practices/screens_support.html

Some DON’Ts (5) DISCRIMINATIONDesign For Everyone

Ensure Future Hardware Happiness

Specify uses-feature node for every API you use.Mark essential features as required.Mark optional features as not required.Check for API existence in code.

Some DON’Ts (5) DISCRIMINATIONDesign For Everyone

Ensure Future Hardware Happiness

Specify uses-feature node for every API you use.Mark essential features as required.Mark optional features as not required.Check for API existence in code.

UX Design FundamentalsUI GuidelinesDesigning for PerformanceDesigning for ResponsivenessSupporting Multiple Screens

Location Based ServicesSource: http://developer.android.com/guide/topics/location/obtaining-user-location.html

Location Based Services (Contd.)

How often do you need updates?What happens if GPS or Wifi LBS is disabled?How accurate do you need to be?What is the impact on your battery life?What happens if location 'jumps'?

Location Based Services (Contd.)

Restricting Updates• Specify the minimum update frequency• Specify the minimum update distance

Location Based Services (Contd.)

Use Criteria to Select a Location Provider

Location Based Services (Contd.)

Use Criteria to Select a Location Provider

Specify your requirements and preferencesAllowable power drainRequired accuracyNeed for altitude, bearing, and speedCan a cost be incurred?

Find the best provider that meets your criteriaRelax criteria (in order) until a provider is foundCan limit to only active providersCan use to find all matching providers

UI and UX Design (Some Tips)

UI and UX Design (Some Tips)

UI and UX DesignSome Resources:1. http://developer.motorola.com/docstools/library/Best_Practices_for_Use

r_Interfaces/

2. http://www.androidpatterns.com/3. http://pshyama.wordpress.com/2011/07/05/android-os-research/4. http://www.slideshare.net/mswolfson/android-ui-patterns5. http://www.youtube.com/watch?v=M1ZBjlCRfz06. http://speckyboy.com/2010/05/10/android-app-developers-gui-kits-icons

-fonts-and-tools/

7. http://coding.smashingmagazine.com/2011/06/30/designing-for-android/8. http://www.androiduipatterns.com/2011/07/trending-android-ui-anti-pat

terns.html

Black-Box Testing Testing of functionality of the application. The tester knows

what the software is supposed to do, but not how. Specific knowledge of the application's code/internal

structure not required. Test cases are built around specifications and requirements. The test designer selects valid and invalid inputs and

determines the correct output. Can be applied to all levels of software testing:

unit, integration, system and acceptance.

Black-BoxInput Output

Black-Box Testing in Android: Robotium A test framework created to make it easy to write powerful

and robust automatic black-box test cases for Android. Full support for Activities, Dialogs, Toasts, Menus and Context

Menus. Benefits

Powerful test with minimal knowledge of app under test Handles multiple Android activities automatically Minimal time to write solid test cases Improved readability of test cases

Resources Project Home: http://code.google.com/p/robotium/ Wiki: http://code.google.com/p/robotium/wiki/Getting_Started Tutorials: http://code.google.com/p/robotium/wiki/RobotiumTutorials

Testing in AndroidSources:

http://developer.android.com/guide/topics/testing/testing_android.html

Questions???

top related