Java Development 2.0: Gaelyk for Google App engine

Source: Internet
Author: User
Tags ticket couchdb

This series explores the technical aspects that will determine the development of today's and future Java™ development. Java Development 2.0 will be developed faster and faster, thanks to innovation in the open source field and the commercialization of hardware. You can lease other people's hardware platforms to host your own applications (mainly assembled using open source libraries, tools, and frameworks), and costs include only acquiring and maintaining your own infrastructure.

The first issue of this series, "using Google App Engine," discusses the concept of renting Google's infrastructure for free to host your Java applications (but at the expense of a little flexibility). In the following article, you learned about the differences between APP Engine and Amazon's EC2. Last month's article, "Implementing REST through CouchDB and Groovy's restclient", investigates potential alternatives to relational databases: CouchDB. CouchDB the lack of schemas and their document-oriented features may be a little refreshing for you, but you've seen another modeless data store implemented by Google App Engine.

This article will go back to discussing Google App Engine. The open source world has jumped on the app Engine train, and an accelerated architecture of application development for the platform emerges. You will learn how the Gaelyk framework leverages many of the techniques already described in this series to further simplify application development.

Lightweight is a new trend

While Google's infrastructure is mostly free (when storage space and bandwidth reach 500MB and the monthly page hits about 5 million times per month), it can sacrifice some flexibility to some extent. Google's infrastructure supports Java technology, but this does not include all of the core Java libraries and related open source libraries. APP Engine is a platform-you need to build on it. But it is not surprising that open source innovation will help overcome the hurdles of using the Google App Engine process.

The Gaelyk framework is a typical example of this project, designed to accelerate the development of lightweight applications that use the model-view-controller (MVC) pattern developed with Groovy. In the magic of Groovy, Gaelyk will inject some usability factors into the App Engine API. In addition, you can use Gaelyk with the Google App Engine plug-in for Eclipse. Rapid development and deployment of Google app Engine applications will become very simple.

"Implementing REST through CouchDB and Groovy restclient" uses a parking ticket system to demonstrate the characteristics of a document-oriented database. In this article, I'll continue to create a WEB application that supports creating, updating, and deleting parking tickets. The Google persistence architecture is not document-oriented, but its modeless features implement a more flexible model. As a result, the WEB will create a parking ticket model as accurately as possible, which requires access to:

Name of police officer

Date

Position

violation situation

Any relevant comments

I reserve the position as an ordinary text box, because some people can use a variety of ways to indicate where the violation occurred-for example, in the parking area of Best Buy or at the corner of Street 18th and D. In fact, I'm not trying to describe a particular format because it doesn't necessarily fit the domain.

First, you need to install the Google App Engine plugin for Eclipse (see "Using Google App Engine" for detailed steps). You will also need to download the Gaelyk JAR file from the project's Web site (see Resources). Remember the location of this download, because you will then need to move it to a specific directory.

The Gaelyk framework relies on groovy, so you also need the latest groovy release: At the time of this writing, it's a simple JAR file, Groovy-all-1.6.5.jar (see Resources). Finally, you need to create an application ID through the Google app Engine admin panel. (If you want, you can reuse the application ID created in "Using Google App Engine").

Next, create a new Google Web application Project in Eclipse, click the Next button and fill in the appropriate information. Make sure the Use Google Web Toolkit option is unchecked, as shown in Figure 1, because you do not need it:

Figure 1. Create a Google Apps Project in Eclipse

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.