ASP.net, PHP and Retrofit for Android - php

Can you use ASP.net with retrofit? I'm currently using PHP but might migrate to ASP.net. Any info or advise would be much appreciated.

The network libraries used in android(retrofit, volley etc) are not dependent on any server side languages like asp.net, php etc.
Can you use ASP.net with retrofit?
Yes you can use ASP.net with retrofit
By the way retrofit, like any other network libraries run on the client side and hence has no association with backend technology

So let me tell you what REst Api is.
It is known as REpresentational State Transfer. Which means that when you use MVC framework, the MVC framework is stateless and it gets data from Rest Api. This is the benefit of using MVC. On retrofit you are doing the same work i.e making an Okhttp connection which helps you to communicate with url of backend. Then backend processes data and gives you the response back. Thats why the backend does not matter whatever you do from.
Happy Coding!

Related

Converting existing webapplication to native android app

Let us say I have 3 dynamic website for example built using
I- Spring MVC
II- PHP
III-Angular JS
I am an Android developer who likes to built native customized android apps (without WebView).
Do I need knowledge of any of I, II or III frameworks to create my android app or can I just do it completely independent?
If I need knowledge of I, II or III frameworks, how much would I need?
Do I use Android's AsyncTask or Volley API's to accomplish this task? I am asking this because I am new to Android.
Thank you for your help in advance!!!
As the Android developer in this case you don't need knowledge of any of these PHP and JS frameworks. You only need to access the "data" of these websites through any kind of Web API. Normally such APIs use JSON or XML data to communicate.
In Android i think Volley is a good library to access remote data like JSON but you can use any other library which can handle XML or JSON data.

Php in phone gap application

We have to develop an application with more plattform. We would use the framework PhoneGap. For our application we need services of backend, the question is: Does PhoneGap support PHP?
If it doesn't support PHP. In which way we can solve the problem?
The most important thing is: make call server
(Get and Post), parsing a json and other functions
that PHP gives.
Phonegap does not have a server. You need to call via Ajax to remote servers.
The backend can be in any language which supports HTTP calls, as PhoneGap is an independent client.
You can use PHP to write an API for use within your Javascript PhoneGap application.
I can recommend the Laravel framework to accomplish this.
Yes...you can use PHP or any PHP framework to give backend for mobile app made using phonegap/cordova....point is phonegap/cordova app will be on client mobile which won't understand PHP embedded in phonegap html files....so write an API amd place it on a server and then make AJAX calls to server to do database and other backed operations
Try to return JSON data from the PHP API.....it's a famous data structure and supported by many applications

PHP as client to Node.js server

I want to use PHP (Symfony2) because building apps with it is quicker than building apps w node (IMO). I want the speed and scalability of node, however. My proposed solution is to use node to handle all of the app's data. I would then use Symfony2 as a client to node and pull any data I need from the node server's REST API. I could then connect to node directly with my iOS/android app and take advantage of its scalability. Is this a viable solution? How can this be improved?
What makes Symfony or any Rails inspired framework fast to develop is the scaffolding.
By using Node for the backend to handle the data management (API), you are loosing all of that, and keeping only the VC (View Controller) of Symfony's MVC. And you won't get any faster if you only keep those and add the mess of having 2 backends.
They are some Rails inpired frameworks for Node.js out there.
Railway is one of them.
If I understand you correctly you want to know.
a). If you can build a API server with nodejs. The obvious answer is yes.
b). If your PHP app can get data from the nodejs api server. Again yes you can do this.
c). If your mobile app can get data from the nodejs api server. 3rd time yes.
But understand that you now have to deal with two separate server-side technologies\langauages.
You will have to weight-up if this "quicker" or "more maintainable" then building both applications using the same stack.

Create mobile application (iOS, Android, WP)

If got a task to create a mobile application for iOS, Android and WP. This application needs to access a mySQL database which is already in use by the website running php.
What I found in the meantime, is that I have to create a php webservice and use this webservice to access the data in the mySQL database.
Since I did not found any clear advice which way is the best to do it (JSON, XML, REST, etc) - I just wanted to ask you, is there a kind of best practice which technologies should be used for the php webservice?
Additional it would be great for me if someone knows a good tutorial for the recommended technology.
Thanks a lot.
I am arriving a bit late but here is my answer : I believe that the easier way currently available is a PhoneGap application (with Sencha Touch or jQuery Mobile as a javascript framework) talking to the server through a simple PHP webservice. PhoneGap allows you to build an Android, iOS and WP app with the same codebase.
We use that technology in my company and it works great.

Best service/connection combo for Flex/Server Implementation

I'm starting a Flex app on a pretty big reporting engine and want to know how best to connect to a Postgres Database. I'd like to create a REST API architecture so I can use the service for more than just the Flex app(mobile possibly).
These are my options I've found:
Datatype: either XML, JSON or AMF
Flex Service: HTTPService or WebService
Server(using PHP): ZendAMF, custom json_encode implementation, Zend_Rest_Server
I've got my views all mapped out, and the api functions designed. Basically what I need is advice on which Flex / back-end service combo to provide.
Thanks for the advice!
Best service/connection combo for Flex/Server Implementation
There is no best way, but actually depends upon your project and how would you like to proceed. There are three ways.
Remoting
HTTP Service
Web Service
Since you would like to re use those services in other applications too, i would suggest you to go with Web Service. You can create your Web Service using any Server siding language which you prefer and communicate it with your Flex Application.
Regarding AMF
Its one of the ways how you can interact your Flex App with Server siding language. AMFPHP or ZendAMF does a good job and its so easy to communicate.
I would suggest you to concentrate more on Flex Architecture rather than looking into how your Flex is gonna communicate with Backend.
Check out for Modules based Architecture.
Check for which framework you are going to develop your Flex App. [ Mate, Cainogram, Swiz or someother] When you have decided with your frontend Architecture on how the flow should happen, you can then decide on how to communicate and which is the best possible approach for your project keeping the future things in your mind.
Since your Application is going to be reports oriented, go for Web Service.
[I] want to know how best to connect to a
Postgres Database.
Best is very subjective. You probably don't want to connect to the Postgres database directly from Flex. Flex is not designed for such things. I recommend using an application server as middleware. ColdFusion, .NET, PHP, Java, and just about any other 'current' application server can be used as that middleware. I would recommend using whatever you (or your team) is familiar with.
For Flex, I strongly recommend you using an AMF implementation. AMF is a binary format and will give you smaller data transfer packets, plus server side object to client side object conversion. It'll save you some time writing XML parsing routines, which can be annoying at times.
With ColdFusion, it is pretty easy to create a server side service (CFC) that can be used for AMF, SOAP Web Services, and REST services all at the same time. You just specify 'access="remote"' on the function definition. I would expect other server side languages have similar functionality, but never investigated the web service related features of other languages.

Categories