Getting started with Java without having to deal with Android. Covers:
The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects / classes and a relational database. Lightweight JPA here means the implementation of the API can run in an environment which has significant resource constraints such as a mobile device. The motivation for the Java developer is to take advantage of the ease with which of application objects can be persisted to a database without the hassle of having to write boilerplate database code.
Dagger is a lightweight dependency injection package for Android and Java. The benefits of using dependency injection are having loosely coupled classes that can be wired together easily in various ways to adapt for different platforms, available resources and operational requirements. The benefits of using Dagger dependency injection is rapid development and performance through doing things not only at runtime, but at compile time as well.
The OrmLite ManyToMany sample is reworked as the Classy Data many2many-example project. The original sample appears in the ormlite-core test sources in the com.j256.ormlite.examples.manytomany package. The readme text says: "This shows how you can use a join table to implement many-to-many type of object layout." If you compare the entity class "UserPost" in both implementations, you will see OrmLite "@DatabaseField" annotation replaced with Java Persistence annotations @Id, @OneToOne and @JoinColumn. Comparing User classes, the Classy Data User has @Column and @ManyToMany annotations.
AndroidHelloTwoDbs is based on the same-named ORMLite example. Three versions of this application are presented to make the following points about Classy Data persistence:
This boils down to focusing on the application rather than expending effort on developing and maintaining database boilerplate code.
Various open source and commercial Continuous Integration (CI) tools are available, but the good news is that Maven is both widely supported and easy to set up regardless of what tool is selected. Classy Data is proven on Jenkins which is a popular open source CI server and some guidelines for setting up Classy Data are given here, but are generally applicable for any CI server.
Known issues.
Android Studio is now the official Android IDE. Here is how to install a set of sample applications contained in an Android Studio project, allowing you get going quickly with Classy Data.
VM options and Jack/Java8 pre-compiler configuration.
Android-specific guide to Eclipse installation, workspace set up and importing Maven projects.
Here is an alternative sample applications project is available for the Maven + Eclipse ADT combination, which is being maintained for those who have special requirements such as:
Getting started with Eclipse, which supports Java development natively and Android with appropriate plugins installed. Covers:
Android aar files are not compatibile with Eclipse. Use the Classyfy project and gradle-eclipse-aar-plugin to migrate aar files to Eclipse libray projects.
ClassyFy performs searches of a relational database containing a directory of business records. The data is shaped like a tree structure. ClassyFy has an Action Bar search function which includes search suggestions. Some highlights of ClassyFy are:
Identifies and explains Android API Level and SDK Platform Tools parameters android.platform.version and android.sdk.version and Support Library parameter android.support.version.
Content providers manage access to a structured set of data. They encapsulate the data, and provide mechanisms for defining data security. See demonstration of custom search suggestions using a fast text search engine which is included in the Classy Data package. It is customizable with regards to column mapping, sorting and filtering. of text.