Skip to content
charles-boyd edited this page Jan 16, 2013 · 1 revision

A guide for developers interested in modifying Paridroid.

Design Overview

PariDroid attempts to adhere to a strict Model-View-Controller design pattern, though Android does not make this easy since there is little if any abstraction between the View and the Controller.

The Model

This consists of a list of input/output pairs, which we store in a Java ArrayList wrapper class nested within the main Android activity.

  • OutputArrayAdapter class nested under paridroid/PariDroid/src/org/freemonad/paridroid/PariActivity.java

The View

The view components are specified in XML resource files`, which is standard for Android applications.

The view gets loaded by the controller (main activity) at runtime and binds to the Model once the Pari library is loaded.

  • paridroid/PariDroid/res/{layout, menu, values, drawable}
  • paridroid/PariDroid/src/org/freemonad/paridroid/utils/ParidroidUtils.java

The Controller

The controller consists of the main Android activity, which communicates with the model by making callbacks to native C functions declared in libparidroid.so and exposed to Java through JNI wrappers.

  • paridroid/PariDroid/src/org/freemonad/paridroid/PariActivity.java
  • paridroid/PariDroid/src/org/freemonad/paridroid/PariNative.java
  • paridroid/PariDroid/jni/paridroid/paridroid.c
  • paridroid/PariDroid/jni/paridroid/org_freemonad_paridroid_PariNative.c

Build Environment

TODO

Clone this wiki locally