Live Chat
Monday - Friday 8am - 6pm EST Chat Now
Contact Us
Monday - Friday 8am - 8pm EST 1-800-268-7737 Other Contact Options
Checkout

Cart () Loading...

    • Quantity:
    • Delivery:
    • Dates:
    • Location:

    $

Defensive Programming in Android

This course covers defensive programming techniques that can be applied when creating Android apps.

GK# 7297

Course Overview

TOP

Defensive Programming is a set of techniques and coding practices that allow you to create software that is reliable, resilient, maintainable, easily tested, and efficient. It considers an approach to programming that aims to minimize the possibility of the unexpected occurring at run time, by anticipating and preparing for potential issues.This path of courses covers general defensive programming techniques that can be applied when creating apps for the Android mobile operating system.

Schedule

TOP
  • Delivery Format:
  • Date:
  • Location:
  • Access Period:

$

What You'll Learn

TOP
  • Input and Methods
  • Using Standards
  • Errors, Exceptions, and Testing
  • Network Access and Java Defensive Techniques

Outline

TOP
Viewing outline for:

On-Demand Outline

Defensive Programming in Android: Input and Methods

  • Identify common assumptions not to make about user input
  • Create code that handles file inputs to an Android app
  • Create code that handles URL inputs to an Android app
  • Validate user-provided input
  • Use a real-time approach to validating user-provided input
  • Use secure coding principles to guard against format string attacks
  • Parse and check input values before using that input in a WebView object
  • Restrict access to navigation methods in a WebView object
  • Protect against SQL injection by using parameterized and prepared statements
  • Recognize best practice in writing methods for Android apps in Java
  • Use best practices to name methods in Java for Android
  • Use best practices to name getter methods in Java for Android
  • Use best practices to name callback methods in Java for Android
  • Reduce method complexity in Android apps using Java
  • Use Java overloaded methods to reduce complexity in Java for Android
  • Recognize how constants can be used in defensive programming
  • Create and use constants in Java for Android
  • Use best practices for naming constants in Java for Android
  • Create and use resource files in an Android app
  • Recognize how to write if statements defensively to protect against potential bugs
  • Design while loops that are not vulnerable to running forever
  • Design for loops that are not vulnerable to running forever
  • Identify and avoid bugs caused by altered loop variables
  • Use defensive practices to code in Java

Defensive Programming in Android: Using Standards

  • Recognize how and where standards promote defensive programming
  • Identify and use class naming standards in Java
  • Identify and use variable naming standards in Java
  • Recognize the proper use of comments to make code more readable and maintainable
  • Use SQLite prepared statements to protect against SQL attacks
  • Recognize how both indentation and whitespace can be used to promote defensive programming
  • Use indentation to make source code more readable and maintainable
  • Use whitespace to make source code more readable and maintainable
  • Recognize what it means to keep code simple and how it makes programs more robust
  • Design classes that have a single and defined focus
  • Design methods that have a single and defined focus
  • Perform refactoring in Java
  • Avoid duplicating code in Java Android apps
  • Set up dependency management in Apache Maven
  • Set up dependency management in Gradle
  • Describe the characteristics of Design by Contract
  • Use comments to support Design by Contract
  • Use preconditions to support Design by Contract
  • Use postconditions to support Design by Contract
  • Use invariants to support Design by Contract
  • Use Design by Contract in Java
  • Use Design by Contract in Android
  • Create a simple app using Design by Contract principles
  • Defensive Programming in Android: Errors, Exceptions, and Testing
  • Recognize how errors and exceptions can be used in defensive programming
  • Use the Java exception classes
  • Use exception stack traces
  • Test for specific kinds of errors based on domain and code
  • Create custom Java error classes
  • Inform end users of error information in an Android app
  • Use an underlying error object to find out more detail about an error that has occurred
  • Release Java resources in the event of an exception
  • Recognize how unit testing can be used in defensive programming
  • Use the android testing API to construct automated unit tests
  • Use instrumentation in automated Android unit testing
  • Use test case classes in Android automated unit testing
  • Use Android assertion classes
  • Use mock object classes in Android automated unit testing
  • Use test runner classes for Android automated unit testing
  • View test results in the IDE
  • Recognize where end-to-end testing can be used in defensive programming
  • Set up the Android Testing Support API for automated UI testing
  • Use Espresso test classes for Android automated UI testing
  • Use instrumentation of activities for Android automated UI testing
  • Test UI components in Android
  • Use ViewAction, ViewInteraction, and DataInteraction classes to simulate actions when testing an Android app
  • Describe the use of assertions for defensive programming in Java for Android
  • Use basic assert statements in Java for Android
  • Identify and use precondition, postcondition and invariant assertions
  • Use annotations to aid in programming defensively for Android
  • Create a Java app to use exceptions and assertions

Defensive Programming in Android: Network Access and Java Defensive Techniques

  • Initialize instances of classes safely
  • Check for the presence of null to avoid errors
  • Design setters to avoid potential errors
  • Recognize how to compare two objects in Java avoiding potential errors
  • Work safely with the Java switch and case statements
  • Use atomic and nonatomic operations in threaded applications
  • Use final properties to minimize potential for errors
  • Recognize when to use mutable and immutable classes
  • Implement a basic enum in Java
  • Use enums to reduce the possibility of unexpected input
  • Implement an enum with a constructor and recognize the rules for enum constructors
  • Implement an interface in an enum
  • Create an enum with abstract methods
  • Use packages and classes to implement proper encapsulation
  • Import packages in Java Android apps
  • Use different scopes to implement defensive programming
  • Create APKs to run on Android devices
  • Create jars for exporting Java code between apps
  • Recognize the importance of maintaining a good user experience while accessing the network
  • Use AsyncTask to retrieve data asynchronously and preserve user experience
  • Use progress reporting to enhance user experience
  • Cache retrieved data to enhance user experience
  • Transfer large files in the background
  • Check network connectivity status in Android apps
  • Sanitize data transferred across the network
  • Create an Android app to access the network asynchronously

Who Should Attend

TOP

Android developers who have experience creating apps using Java, and who want to employ defensive programming techniques.

Course Delivery

This course is available in the following formats:

On-Demand

Train at your own pace with 24/7 access to courses that help you acquire must-have technology skills.



Request this course in a different delivery format.
Enroll