O'Reilly logo

Lean Mobile App Development by Aravind Krishnaswamy, Alberto Gonzalez, Richard Garabedian, Adam Dennis, Mike van Drongelen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Models

A canvas typically has a collection of Canvas elements, each representing a section of the Business Model Canvas. For the sake of simplicity, these classes contain only the most basic information.

The most important models used in the app are the Canvas and the CanvasElement models. Both the Canvas and CanvasElement classes implement the Parcelable interface. This will make it easier to pass (complex) objects to each fragment:

 
public class Canvas implements Parcelable { 
    private String id; 
    public List<CanvasElement> ELEMENTS; 
    public Canvas(){ 
        ELEMENTS = new ArrayList<>(); 
    } 
    public void setId(String value){ 
        this.id= value; 
    } 
    public String getId(){ 
        return this.id; 
    } 
    ... 
The CanvasElement class and the JSON object found in the template ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required