Peepaal

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.

Tags: API, App, Engine, Quiz, REST, Week, of, the

Views: 14

Reply to This

Replies to This Discussion

Guys this seems to be more of a struggle than i imagined :-) .. folks please post back if you are facing issues. This is not an optional activity and all the folks involved in cloud projects have to complete this assignment.

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.......:(

we have got the propeller for the boat...just struggling to fix it and kickstart...more time please !!! :)
Ok i assume you are using the following config process. What is the issue you are facing ?

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 :(

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.

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.

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 :)

Share what you have already done using real entities that are relevant for your project. Like i indicated above, Step 3 is a little advanced.

So did anyone get this to work?

 

or is Kaushik the winner this time ;)

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

hah hah.

 

Awesome! jagz. Great to see a working app deployed on GAE :).

Reply to Discussion

RSS

© 2012   Created by Kaushik.

Badges  |  Report an Issue  |  Terms of Service