Continuous Community Learning
Ok, now for this week we will change our regular pattern and have a programming exercise. This is a required activity for all the folks involved in the Cloud project or others who attended the App Engine session.
Here is what you need to do:
1) Build a REST Web Service to expose some key interfaces to access your system entities. You are free to use any approach but we recommend the Data Nucleus API which comes with App Engine and deploy on App Engine. Here are some jars you may need to include in your project Data Nucleus Jar and Flex json
2) Once you build your APIs share with us urls/invoking process and what each of them provide. Cover some key read/search APIs. We will review your system entities and the data that we can retrieve against your project requirements.
3) Extra bonus points if someone can build something to consume the REST APIs and display the content :-) .. step 3 is for the folks who can stretch
No specific rules this time, all standard rules apply and you have till Saturday to complete this.
Permalink Reply by Kaushik on February 22, 2011 at 5:22pm
Permalink Reply by Roshan Nagekar on February 22, 2011 at 9:42pm Sir,
This one was indeed tough.... tried almost around 8 different ways to do it.... researched many websites too.... none of the articles were good enough in deploying it..... the code always had some or the other error.... all my group members tried it individually as well......... Also contacted jagannath over it to se if it worked for him...... i guess we all were in the same boat.....:P.......:(
Permalink Reply by Jagannath Patil on February 22, 2011 at 10:48pm
Permalink Reply by Kaushik on February 23, 2011 at 7:58am
Permalink Reply by Jagannath Patil on February 23, 2011 at 10:17am yeah....i even got the datanucleus api doc for datanucleus rest...
i m facing problem in using JSON....
here`s a sample code i saw jarvana rest sample .
i am confused...if we are using Json then y use Jdo...
maybe i m asking a silly question but let it be...i mean i have all the material but the thing that i m not able to join them all to do a HALF-AN_HOUR effort is killing me :(
Permalink Reply by Kaushik on February 23, 2011 at 2:51pm
Permalink Reply by Jagannath Patil on February 23, 2011 at 3:42pm i just realised that the jarvana code sample wasnt a sample but the RESTSERVLET implementation itself...duh !!
i am on it !!
Kaushik said:
If you read the Data Nucleus documentation carefully you will realize that you do not need to code for this specifically. It automatically handles the process. Take your project or stockwatcher example and follow the process for including the Data Nucleus APIs and deploy on app engine. You will get it to work.
Permalink Reply by Jagannath Patil on February 23, 2011 at 4:19pm i used data nucleus restservlet and JDO and got GET method implemented.....i mean when i use GET method then i get the CUSTOMER object in return...
one doubt..is it necesarry to use JSON....is there any alternative to it ?
Now i am trying to use JSON and completing the rest REST stuff :)
Permalink Reply by Kaushik on February 24, 2011 at 7:10am
Permalink Reply by Vishal Pai Vernekar on February 25, 2011 at 8:23pm So did anyone get this to work?
or is Kaushik the winner this time ;)
Permalink Reply by Jagannath Patil on February 27, 2011 at 10:25am hey vishal,
nopes we wont let kaushik win so easily :)
I had implemented the REST GET method part few days before but somehow magically let myself believed that it was nothing but wrong stuff. Yesterday when i showed it to kaushik i understood that it was the right thing and i was doing R&D in unnecessary things :(
Anyways i have deployed it as following with just GET method implementation which returns all the objects of a class Customer(id,name,address) in the form of JSON array of JSON objects.
the deployed app is : http://jagz-test.appspot.com
Permalink Reply by Vishal Pai Vernekar on February 27, 2011 at 11:33am hah hah.
Awesome! jagz. Great to see a working app deployed on GAE :).
© 2012 Created by Kaushik.