Posts Tagged “Eclipse”

So getting started with Google’s App Engine is a breese, so easy this is probably pointless, but I want to document it none the less.
Getting Started
First things first, if you’re a java developer, get Eclipse. Next install the Google App Engine plugin. This can be done by going to the software updates screen and adding the plugin update site location, either http://dl.google.com/eclipse/plugin/3.4 for Ganymede or http://dl.google.com/eclipse/plugin/3.3 for Europa. Check the boxes to install the plugin and the SDK’s, click the install button in the upper right, then the obligatory next, next, next, accept, next, finnish process we are all familiar with and we are done (except maybe a restart of Eclipse). Images below to help those in need of some visual queues.

eclipsesoftwareupdateseclipsesoftwareupdatesavailableeclipsesoftwareupdatesavailableaddeclipsesoftwareupdatesavailableadded

Creating a new Project

Now the fun part, we get to create a new project.

  1. Click File > New > Web Application Project.
  2. Enter a project name, and give it a default package, here I’ve used com.weneck.gaetest.
  3. Click finish

eclipsenewprojecteclipsenewprojectdialogue

You’ll find the sample GWT project is allready set up for you. Simply clicking the run button will launch a modified jetty application server and a custom browser and you can view the application.

projectrun

Deploying

This is probably the coolest part about the process, deployment is simple as clicking a button. Well it will be once you have registered for an App Engine account. Create your account, sign in, then click the Create an Application button. I’ve entered wenecktest as my application id, and will use this value through the rest of the tutorial.

appenginecreate

Back in Eclipse, click the Deploy App Engine Project button, located on the toolbar at the top.

deploybutton

You will be asked for your email address (the one you registered for the app engine account with) and your password. you will also be asked for an application ID for the project, the one we just created, so click the App Engine project settings... link and enter your value.

appenginedeployappenginedeployid

The application will be compiled, uploaded and deployed, as easy as that(watch the console output). Mine can be viewed at http://wenecktest.appspot.com (disclaimer: I will be using this application id for testing purposes, so some clicks in the future might have a different application parked there.)

Well that is all good and dandy, but what if you have your own domain where you want this application hosted? Well Google has thought of that too. Through the magic of Google Apps, and a CNAME dns record you can access this at any domain you own. In the App Engine console you can click on the versions link in the left nav and then click the Add Domain... button. The rest of the process includes either signing up for Google Apps (which I’ve allready highly reccomended) or signing into Google Apps to prove you own the domain name. Then you have to add a CNAME record to your DNS server to point to ghs.google.com the rest is magic.  For those wondering the CNAME record for that looks like
•   googleappengine.weneck.com.     IN      CNAME   ghs.google.com.
to deploy to http://googleappengine.weneck.com . (same disclaimer applies)

Well, that it, it really is that easy. Now the only thing left to do is to actually write some effective code. I’m going to be looking into persistance using JPA annotations, so stay tuned for that adventure.

Comments No Comments »