• Online, Self-Paced
Course Description

Defensive Programming in Android uses coding practices and techniques to create apps that are reliable, predictable, and resilient. This course will teach you about enforcing standards in the Android apps you create in order to make source code more predictable and maintainable.

Learning Objectives

Using Standards

  • start the course
  • 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

Indentation and Whitespace

  • 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

Simplifying Code

  • 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

Dependency Management

  • set up dependency management in Apache Maven
  • set up dependency management in Gradle

Design By Contract

  • 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

Practice: Design By Contract

  • create a simple app using Design by Contract principles

Framework Connections