Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm developing an Android application which consumes REST services that are not finished yet. I´ve been looking for some tool that could mock this REST services, in order to don't get stucked, and I found SoapUI. I'm having problems to setup this tool and make the REST services visibles for my mobile device.
My question is if I´m following the right approach or there are other choices that could fit better.
I don't have any experience with SoapUI, but I thought it only made Soap calls, not mock them. But maybe I'm wrong?
Either way, I would recommend doing the following for mocking your REST service that isn't finished:
Make an interface that represents the REST service. In Java you'd have something like DataService.java as the interface and then you can create various implementations of it. Things like DataServiceRestImpl.java - which would be the live REST service once it's done.
Afer you've made the interface, go ahead and make a mocked version of it. DataServiceMockImpl.java. This way you can pass around the interface in your code and the implementation can change easily.
Once the real service is ready you just swap the implementation of the interface and everything still works fine.
(As a note, this will also help you do unit testing!)
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I am already aware of the advantanges of retrofit and have used it in many scenerios. For a particular application , I need to call only 1 login API which will do authentication.
I am not sure if the advantages of retrofit are worth it for only one API. or is it a overhead and I should Http for sake of simplicity
If it is just a single request, then I'd say go with the simplest/lightest approach. But these things tend to evolve with time, therefore you are likely to find yourself in a position of adding another one, then another one...
Remember - networking mechanism is not an architectural decision. In fact, your application should not care what networking mechanism is being used - it should depend on a general interface that you define. You could start with implementing this interface using the simplest approach, and add a more complex implementation in case your networking requirements evolve. You could also implement several approaches and benchmark them...
So, whatever approach you choose, I recommend not to "pollute" your business logic with networking logic, but hide it behind interface. This way even if you make the wrong decision now, it will be a matter of few hours to fix it later.
For a single API call http is fine. As you know using library with your application is going to occupy user phone space when they install your application on their device. so for a single call, you are good to go with async task.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I did some research on Google Volley and found that it is somewhat easy and clean to use.
But I am still not sure as to what the advantages of using it are and whether I should still use the AsyncTask.
I know AsyncTask works as a background task and that it is separate but what about Volley?
Which one should I opt for?
This is mainly an opinion based question that is largely dependent on the needs of your particular application. Volley provides a lot of things for you out of the box, like network caching (assuming you're given correct cache headers from your server), and an easy to use API with all of your callbacks and different threading layers handled for you. So, it really depends on what you're looking. Personally, I think any production worthy application should use some sort of networking library that a team has spent plenty of time patching and prepping for you (rather than trying to reinvent the wheel), and since a Google team has gone through the trouble for doing this for you...why not?
One cannot compare Volley with an AsyncTask.
So your question makes no sense.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I know how to design and develop android application which works offline.But now i want to move towards dynamic android app,which works totally online like facebook,quora,newshunt.Where should i start please give me a way.
Thanks
I personally am completely self-taught when it comes to android, and, well, its been a journey.
For me, a big turning point was
"http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/"
It really gives you a good idea of what it takes to create an app that is connected to the internet, and it isn't hard to implement yourself. Mind you, before, you were working with just android, but once you integrate network connectivity and a server backend, the levels of complexity multiply.
If you're a solo-developer, just getting started, the Google App Engine does a pretty good job of making everything very easy to use, so I might recommend that. It has a free trial of all their cloud services which is $300 for 2 months.
https://cloud.google.com/appengine
Amazon AWS also is attempting to create a similar system, but they are seemingly geared to more enterprise-level operations.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
So I am creating a project with a couple of buddies and I need to create an API. This is my first time creating a big project and creating my own API. I don't know where to start. The project that we're working on will have a website, an app for Android and IOS, and use PostgreSQL. We will be using Javascript and Node.js as well. If there are any tips about creating API's for Android, IOS, and Web please let me know.
I would strongly recommend you read "RESTful Web Services" by Richardson
The book gives a thorough grounding in the "why?" behind organizing resources restfully. Also provides a good outline of different RESTful authentication mechanisms and the pros and cons of each - vital for a mobile app talking to a web-based back-end.
Then, sit back and outline the resources that will be necessary to run your app and have at it!
First of all take paper and pen to start design the architecture and write down all use cases. Also define the way data will be access.
While creating an API for mobile apps we should keep some important things in mind. First what type of API it should be JSON based or XML. And I will prefer JSON for mobile app as its lightweight and will take less time to parse. Also it will be fast to transmit. While XML bit costly.
One of most important thing you should design the api as secure as it could be. Because sensitive information can be sniff by some one. better to use SSL hand shake to make it secure.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have been doing some research to create an IM application. I saw many sample codes and still trying to decide which method to use. Before starting development I want to ask your opinion if anybody knows how popular IM applications such as Kakao Talk, Line, We Chat, WhatsApp work.
I saw some articles saying to use Google Cloud, and some articles about using XMPP.
I am a kinda new for Android development and before starting development I want to see all my possibilities and choose best method for that.
Thanks for your time.
Well, I would presume they don't all work the same way. There are different techniques one can use to implement a chat client. Each of these companies might have their own proprietory technologies depending on their scale, user base, finances etc.
2 popular options you can check out are :
XMPP - It's supported by most major chat clients and is used by the likes of Facebook (a customized version of it anyway). asmack is a popular XMPP library for Android which might be useful to you.
A Backend-As-A-Service (BAAS) provider like Parse. This will save you a lot of server side heavy lifting and writing backend code like you would have to do if you were considering something like AWS
If this is a learning project, I would suggest implementing a very simple client and writing both the server and client-side code so that you know how the whole stack works. Hope that helps!