How to Develop and Deploy an Application in Google App Engine?
In my previous tip, I explained about the Basics of GAE.
Since I have used Eclipse IDE(Eclipse 3.5 (Galileo) ) for development and deployment, I will prefer to explain on that.
>>Configurations for Development<<
1.First we need Eclipse plugin and Java SDK provided by Google :–
For Eclipse IDE : Click , HELP menu >Install New Software > “Provide URL”
[N.B:- URL is different for different eclipse version : For, Eclipse 3.5 (Galileo) :- "http://dl.google.com/eclipse/plugin/3.5" Eclipse 3.6 (Helios) : - "http://dl.google.com/eclipse/plugin/3.6" Eclipse 3.4 (Ganymede):- "http://dl.google.com/eclipse/plugin/3.4" ]
2. Then it will prompt to select both plugin and sdk and then press “NEXT” and the job will be done for you.
>>For Development<<
1. Google provides its own “Datastore” to store data which is different from traditional RDBMS.
2. App Engine supports two different APIs for the datastore:
a) JDO(Java Data Objects)
b) JPA(Java Persistence API)
3. After installing the plugin a small icon( fig – A(2) ) will appear on Eclipse IDE, use this icon to create a google app engine project.
4. Folder structure of a “google app engine project” ( fig – A(1) ) is different from the folder structure of normal “dynamic web project”.
>>Points to remember<<
1. Google datastore is not a relational database.
2. SQL joins are not supported in the datastore.
3. You can not perform write operation.
4. Objects, that you want to store in datastore must be serializable.
5. To enable session in your applicaton set, “<sessions-enabled>true</sessions-enabled>” tag in appengine-web.xml.
>>For Deployment<<
1. First you need to Sign In into google app engine.
2. GAE allow maximum 10 app. to deploy, for a single account.
3. Create your own app. with a unique “Application Identifier”(inside your account). If your Application Identifier is “mfchatmfchat” then after deployment you can access your app.using “http://mfchatmfchat.appspot.com“.
4. One application can contain different versions i.e consider i have deployed an application with Application Identifier “mfchatmfchat” and version=1, then i did some modification on my application and i want to deploy again at that point of time you can use the same Application Identifier “mfchatmfchat” but you need to change the version i.e version=2. Which shows that you have deployed one application(mfchatmfchat) with two version. If your app. contain more than one version, there is a facility inside GAE account to make one of them as default which means the default one will serve to your user.
5. Before deployment always remember to set your application name in “<application></application>”(fig- A (4)) tag and version in <version></version>(fig- A (5)) tag inside appengine-web.xml.
6. Go back to Eclipse and select the GAE project folder, you can see a small icon(fig-A(3)) , click there it will prompt you to set email and password then click deploy button, if the deployment is success then it will print a success message in console.