androidiosweb-servicesxsltsymphony-cms

Move Web Symphony Application on Android and IOS


I've done a responsive web site with Symphony/XSLT (http://www.getsymphony.com/). I want to write 2 applications (IOS/Android), that follows the same behaviour of my responsive website.

Then, logically, I will have to call the database from the IOS app and the Android app. however, I will make duplicate code because I want the application to be similar in both platform.

So, what's the best way to do it ? Android/IOS app would call a webservice, and this webservice will call the database and return data to the application ?

Is there a way to make like a "DLL" and provide that "DLL" to the Android/IOS app as a library ?

Do you have any other solution ?

Cheers.


Solution

  • Unfortunately, since iOS and Android are written in completely different languages you cannot share libraries between them.

    The business case will really decide if you should use an HTTP REST service to send data to and from a database. With that said, most of the apps I've developed almost always use a web service for something.

    If your goal is to create fully native apps, then you really have no choice but to copy all of the business logic and data access logic to meet your needs. However, if staying native is not a huge priority then I'd actually recommend Xamarin for your app.

    Xamarin is a cross-platform framework that can be used to create native iOS, Android and Windows apps. You would write your logic in C# using the Mono framework APIs, and that code would then be translated to the respective SDK specific API calls.

    Where Xamarin is different from all of the other cross-platform frameworks is its design patterns. Xamarin recommends that you create a single project that has three sub-projects.

    First, you'd create two sub-projects for the UI: one for iOS and one for Android. These projects would create the UI that would be true to the platform. Therefore, your end result would be an app with a 100% native look and feel.

    Second, you'd create a sub-project for your public common library (PCL). This is where all of your database access, business logic and network connections would take place. This PCL can be used in both iOS and Android sub-projects.

    This would be the ideal solution for what you're wanting. You'd get a true native look and feel for both iOS and Android, and you'd get a library that can be shared between the two.

    I have personally used Xamarin as well as written many native iOS and Android apps and I would recommend it for your business case.