Search code examples
androidioscordovahybrid-mobile-app

Apache cordova or native development for an instant messaging app?


I have to develop a mobile app for iOS and Android .

I'm undecided whether to use a cross-platform approach with Apache Cordova or to develop in a native environment, with Eclipse ADT and Xcode . The problem with the native development is that I have to build two distinct app, doing the same job for these two platform.

With Apache Cordova i should build a single HTML/CSS/Javascript app but i have serious doubts about the efficiency of this type of app development.

The app is an Instant Messaging system for medical doctors, with exchange of multimedia elements. It is important that the message exchange is protected via a cryptographic protocol like TLS .

Specifically, i have to implement:

  • A multi-platform registration and authentication system communicating with a Web server through PHP language and MySQL DBMS; The requests and response format is defined with an XML document;

  • Research of users by giving the opportunity to open a conversation with a particular user;

  • Research of medical cases giving the opportunity to participate in the discussion of one or more cases;

  • Creation of medical cases with description, media attachment and initial selection of participants according to different medical specialties;

  • A user profile with the possibility to modify the entered information.

  • Push notification system (GCM for Android) . Clicking on the notification will directly open the chat;

  • Protection of client-server communication via HTTPS protocol, which includes functions of asymmetric encryption and data integrity checking.

Through the chat it will be possible:

  • To show user profile by clicking his photo;
  • Report any abuse;
  • Send the conversation via email
  • Share the conversation on Facebook and Twitter.

I have read about the inefficiency of the hybrid app development, becouse it relies on the WebView native component which makes the app heavier and slower.

On the other hand, the native developement approach takes more time but assures best performance . (If the app is well written).

Based on the characteristics I've listed, what kind of approach do you recommend to follow?

Thanks :)


Solution

  • Of course if you have enough resources(time, money etc) creating native application is always better solution.

    But if you need to save time of development and feature support of app, I recommend you to use hybrid approach, but without Cordova or Phonegap. You can just create some parts of UI and logic as independent HTML5 components on your server and then load it in webview on your apps.

    Simple example: You have to implement form which will allow user to write a review about doctor.

    1. Create HTML5 page of form on your server (with js and css). You can use jquery mobile for make it responsive.
    2. Load this page on webview on your apps (both IOS and Android).
    3. Logic which validates and submits form is also on server (php, js), so there is no need to create it inside app.

    Such approach allows you to use HTML5 only for simple things, like forms, popups etc. You also always have flexibility to choose how do you want to use it and you are not restricted with any external framework.