Web Service from Google App Engine/ Google Web Tool kit? - java

I am a total beginner to web programming.
I'd like to create a web service using GAE/GWT with Java which functions similarly to how WCF from the .NET platform works. Is this possible?
I've been researching for a while and there are no really good solid examples. If someone could point me to good reading or examples then I'd be happy to take a look.
I checked this out : How to write a Web Service for Google App Engine?
However, that is python.

I'd recommend to read the tutorial at the GWT official site. The StockWatcher example teaches how to write an application, and discusses the different ways to retrieve information from the server. It works in either GAE or any other servlet container, it has even an example about how to create the web service in a php and consume it.
The left index of the tutorial is not correctly sorted because the gwtproject.org site documentation is produced automatically, but clicking on the next step link in each page you go to the next one.
[EDITED]
Index of the GWT project is now correctly sorted after my changes

Related

Google App Engine backend service(module) with Java

I am a newbie in Google App Engine. I am trying to create a service (previously called "modules") in Eclipse in Java. I didn't find any resources which shows a step-by-step guide to create a service for app-engine in eclipse or any other IDE. What are the configuration files I need to take care of?
I have tried to find docs on cloud platform and everything says about having front-end. There are articles about micro-service architecture and migrate an existing app. But I don't have an existing app. Every tutorial talks about cloning an hello world app and deploying it which shows hello world with appspot url. But didn't found anything for the service(module).
The service I am trying to create does not have a front-end. It just runs in the background and watch the database and sends emails and notifications to the users based on database change. This is not an API and there isn't any request-response architecture.
How can I achieve this?
Any reference material or samples which can guide me to the right direction?
To set up an App Engine project you could have a look at Romin Irani tutorials which are very good (https://rominirani.com/google-cloud-endpoints-tutorial-part-1-b571ad6c7cd2#.qclm8gyd9).
There is also a free MOOC on Udacity which covers Endpoints with Eclipse: https://www.udacity.com/course/developing-scalable-apps-in-java--ud859
Both cover the building of Endpoints and querying them from front-ends, which I understand is not your goal. But the Udacity course covers Cron jobs and sending of emails (both in Lesson 5), which is what you would use for your needs. See also https://cloud.google.com/appengine/docs/java/config/cron#creating_a_cron_job which is very good Google documentation.
So in a nutshell: I would start by Romin's tutorial to understand Eclipse set-up and main concepts, then follow Udacity MOOC (especially part on Cron and mail) and then dive into the Google doc for the fine tuning of your development.
Last but not least, for sending emails, nowadays, Google advice to use Sengrid. But I think it worth following the Udacity lesson on sending email, even if you switch from native email sending to Sendgrid later on. Again, the doc is complete and clear.
Hope this helps!

How to connect android app with data store on app-engine

I am working with some friends on an android application and we want to use data store on google app engine.
Can anyone help me find a tutorial on how to create a connection between the android app and the data store, I couldn't find a good one myself.
Thanks.
I suggest you look at a few, quite recent Google services:
Endpoints will help you create an interface between your server code and your client, including generating a client library and doing OATH2 authentication.
Volley is an Android library that makes it easy to perform the requests to the server. (There are a number of 3rd party alternatives to Volley that are also good.)
Mobile Starter Kit is a simple way to get started, doing everything from the client initially, but with the ability to customize the server later.
Take a look at this Google blog post from a few days ago:
http://googlecloudplatform.blogspot.ca/2013/11/connecting-mobile-developers-to-the-cloud-with-google-cloud-endpoints.html
Those are good starting points, but don't assume you should use the recommended Google services. Endpoints for example, will lock you into GAE and it doesn't sound like you need the multi-platform support it offers. You could just create a REST/JSON servlet using one of many libraries.
I reccomand DropBox API.
It is not what you asked, but I guess you didnt start using the Google API because you are looking for a tutorial..
DropBox API has a lot of info and tutorials and it's kinda easy to handle..

API's and services of a website

I am developing an app for a website at present, I have obtained the login API for it and successfully implemented this (the login). Now I want to move on further into the rest of the pages in the website. My doubt is, will there be a separate API for each of these pages? Should I use a different url address for each of these pages?
I don't know much about HTML or web development some clarity in this matter would be much appreciated.
Thanks.
You should ask the Webservice developer about its documentation. They should provide you with a well documentation for the Webservice.
Normally a documentation should describe the accessing methods, parameters, response,etc.
W3School Provides a good tutorial about webservices. This link mighe help u.

How do I make a simple web app with log-in?

I have been doing android programming for a while now but only as a hobby. I know the basics of java, and can say I have a solid understanding of PHP and MySQL (I once followed a tutorial that showed how to create a very basic content management system). I've been wanting to expand my knowledge beyond the simple android apps I've made and recently had an idea for an android app. In this app, the user would create a Username and password the first time it is ran. From then, the user can fill out a form. From what i know so far, the valuesof this form can be stored in a MySQL database. So basically every user needs to have their own set of variables stored (which are not a lot). As I been looking around, i think there are many ways to create a web app, and there are different frameworks for doing so. I read I can create a web app with log-in, using ASP.NET. Can this be done using java? I just need some general guidance. I want to make the web app standalone, and then focus on creating an app for android that uses it.
I think good platform for your kind of case is to use Google App Engine (GAE). It provides platform to do your web-service with Java (or python if you prefer). It is also free for low amounts of traffic (like your service) and they have really good tools to manage the site (check the database entries, usage statistics, etc.).
Google has written a good set of tutorials to build webservice with Java in GAE:
http://googcloudlabs.appspot.com/
AppEngine documentation main page:
http://code.google.com/intl/fi-FI/appengine/
Signup here:
https://appengine.google.com/
I think you may want to look at JavaServer Pages.

Suggestion : Java server implementation for web application

I know this question might be repeated many times but would really appreciate any suggestions. I am working on developing a web application in java (server side). The client is developed in javascript and html5 (another guy) and i want to make the developement independent. I have been using java for quite long but have no experience in web development. After endlessly going thorugh many forums and articles i am so confused.
The web app is pretty simple one with options for user to login and upload some data and access those later.
I started with basic sevlets and JDBC APIs. The web application is not very complex one
Currently i have servlets for each resource to handle post and get call on them.
The suggestion i am looking for is do i need to use some framework to make it better. There are so many like springs, playframework, wicket etc.
Any link to sample web applications developed just usin servlets apis will also do a great deal to me
Thanks in advance for the suggestions
I don't think you need any framework. As you said your app was pretty simple one. A java Framework could make a complex app organized. But would make a simple app complex.
However, if in the future, you want to extend your app further more. you might need a framework. The most famous web frameworks in java are SSH(spring, struts, hibernate), you can find a lot of materials easily, so I won't dive into the detail here. SSH frameworks are not easy, avoid using them if you app is not complex enough.

Categories