I am writing an application using GWT on Windows that needs to do some network calls.
I know that if these aren't to the same machine I'm developing on I need to setup a proxy, right?
I was just wondering if anyone could help with what my GWT code would look like?
What proxy should I use on Windows?
Thanks!
If you're simply requesting data from a RESTful service from a different domain, you can use JSONP (http://code.google.com/webtoolkit/tutorials/1.6/Xsite.html).
If you're trying to post data, you'd have to perform the network calls on the server side. (There are some hackish ways to try to submit via a hidden iframe, but they're non-standard). What this means is that you simply invoke a method on your server which does the network call (see http://code.google.com/webtoolkit/tutorials/1.6/RPC.html).
If you mean Google Web Toolkit, and you're trying to evade cross-domain scripting restrictions, check out Yahoo's how-to guide. There's even PHP sample code.
Why not perform the network calls in server side? That way you are not restricted to cross domain restrictions.
I think this is what you are looking for:
http://code.google.com/p/google-web-toolkit/issues/detail?id=3131
Related
In a "computer system" there are two web servers that manage independent applications, both using JSP technology. There is a necessity to have access from server A to information stored in server B. In case of interconnection with:
Invocation of a data access service with GET/POST of an URL.
Definition and use of Web services.
Direct integration in Java, with Java RMI.
Which would be the best solution? Why? What are the advantages and disadvantages of each of them?
A solution would be to use REST API on the server from where you need to invoke the information. You might want to use an ajax call or just include contact via iframe.
Get call will be simple and quick to develop and maintain however if it is low latency and high throughput application then you might want to go with Java RMI.
Is it possible to host a GWT-compiled web application in NodeJS?
I like NodeJS however there are lots of work already made with GWT for my projects.
Cheers.
On the client side, as #riley-lark said.
You can also use GWT code on the server-side on NodeJS; see https://github.com/cretz/gwt-node and http://code.google.com/p/gwt-exporter/
Yes. GWT is a client-side technology and does not need to interact with your server at all. It is possible to send arbitrary requests to any server and process the feedback.
You won't be able to use GWT-RPC or RequestFactory.
We have a web-based BI reporting product. We have exposed certain webservices which mainly return html content and do authentication.
We are in a initial process of developing an iPhone App, which will interact with these services and get data on iPhone.
There are couple of things we need to make sure before we start with the actual development process...
1) Should we use SOAP or REST (Will have to write the server part in Java) for the communication between iPhone and our web-application?
2) If we use SOAP, Can you suggest something, which will effectively create web services stubs in Objective-C.
3) In either case (SOAP or REST), what security mechanism is suggested by Apple?
We want to know your thoughts on the best and effective way communication could be done between iPhone app and backend servers (mostly written in Java)
Thanks in advance.
If it is an option, I'd use REST
Never did it, but may this will help: http://abhicodehelp.blogspot.com/2010/12/handling-soap-with-iphone.html
I'd do any HTTP-Communication using ASIHttpRequest. It is SSL-capable
In my apps I use simple URL requests returning XML / Cocoa-touch plists over https. I guess that's called "REST" -- it's simple and quick to implement. There are long flame-fests over SOAP vs. REST -- I just use this technique and get my apps done :)
Im trying to set up a system similar to this web site
http://www.appmakr.com/
My problem is the uploading to the appstore. does anyone has an idea about how to make this process automatic? the only way i can think of is mimicking the web requests and the application loader but is there an interface for that ?
Thanks in advance.
All web request boil down to simple PUT/POST/GET/DELETE etc… calls. Mimicking a user through code is possible and the only way to do this as there is no API. Get an app like HTTPScoop to determine how to form the requests yourself, then use curl or some other net tool to emulate the requests in code, with the appropriate delay.
I'm thinking about creating an application for the iPhone and Android that will need to access a common backend to retrieve account information. Can both access a web service over https? What other way would allow me to have one interface to the backend that is accessible by both?
They both work over http and https which is a common enough protocol. I would suggest you go with a RESTful web service so you expose your service via URI's like http://www.myservice.com/weather/zip/98007 which would return an XML blob that can be parsed by the client.
if you are starting from nothing, i'd definitely go with RESTful service that returns/accepts JSON... there are plenty of libraries for both platforms that will accept JSON and turn it into arrays and dictionaries.
I'd recommend using a RESTful web service backend, which is all standard HTTP and/or HTTPS. If you can use Ruby on Rails, its default scaffolding will get you about 99% of the way there and for the iPhone there is an open source project called ObjectiveResource that will automate your communication with this Rails backend. I haven't investigated yet what options are available on Android but since it is all simple HTTP it should be straightforward. I am not the maintainer of ObjectiveResource but I have contributed some code. You can check it out here:
http://iphoneonrails.com
One good approach I have seen used with other services is to write the backend in such a way that it can feed data back in different types - for Android an XML response is best, but for the iPhone sending back plist data is preferred (though it can also work with XML if required). In both cases it's easier to simply POST updates back to the server than to wrap an update in XML.
Both platforms should be able to use whatever form of authentication you wish to use, the iPhone I know supports all methods of HTTP authentication.