Android Project Rapid Development Framework Exploration (mysql+ Ormlite + Hessian + Sqlite)

Source: Internet
Author: User
Tags sqlite sqlite database java web mysql database tomcat

Combined with the previous ormlite and Hessian, plus the SAE has supported Java, the server to switch to Java, there is this article. Using Hessian to do data transfer, the ormlite is used to realize the storage of the client and server, which greatly reduces the crud work. This article for exploration stickers, not formally used for large-scale projects, welcome to discuss the use of!

First, Introduction

1.1ormlite

Ormlite[object Relational Mapping Lite (ORM Lite)]

The Object Relational Mapping Compact (ORM) provides some simple, lightweight, and persistent Java objects to SQL databases, while avoiding complexity and the overhead of more standard ORM packages.

The JDBC call to support the database, of course, is certainly the most important thing it supports the Android native database API call SQLite.

--reprinted from here.

1.2hessian

Use the method reference this Bo two articles:

[Hessdroid] Android uses Hessian to communicate with Java server

[Hessdroid] The pass-through test using Hessian and Java server-side communication under Android

1.3Android Rapid Development Framework Description

Consider some of the following features:

A). Both client (Android) and server use the Java language

B. Both client (Android) and server support Hessian and ormlite frameworks

c). Complete support for object-oriented development: storage and interactive transport

Second, prepare

2.1 Development environment

To facilitate the development of both the Android and the Java Web, this is a version of the Eclipse IDE for Java EE Developers, and then installs the latest ADT Plug-ins and Tomcat Plug-ins.

2.2 Service Side

The application server uses Tomcat, which uses Java (Jsp/servlet) to implement the service-side business logic, and the database uses MySQL. Quick Frame Build recommend everyone use XAMPP (integrated Apache, MySQL, PHP, etc., support green installation).

2.3 Client

The Common Android environment

2.4 Communication and storage instructions

Server-side and the client through the Hessian data exchange, through the Ormlite to save the database (through JDBC saved to the server side of the MySQL database, can also be directly saved to the client's SQLite database);

Third, the Code

3.1 Project Engineering screenshot (service side)

Holib is used for both client and server to ensure consistency of interfaces and data objects.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.