Viability of React Native - android

We are a team of 5 members, one of us having basic knowledge of Android App Development. We are planning to develop an app having functionalities similar to Uber. Following are some things we have in mind:
Building one app through react native, where our concern is the availability of Maps and other API's in React Native.
Or developing native apps for IOS and Android platform.
What would be the better case, considering that we are beginners to app development.

As someone that writes both native iOS and react native apps I can say the following:
react native excels in speed of "net" development time. > 90% of the code is cross platform and there is no need to build your project after every change (one of the biggest pains in mobile development IMO)
however, most of my efforts in my current RN project are dealing with technical issues, compatibility of different packages & breaking changes. the entire ecosystem is less mature, development tools are inferior and there is way less documentation.
RN fits my particular, relatively simple, project and it allowed me to write for both platforms wo knowing Java\Kotlin. I would think twice before starting a more complicated project in RN.
BTW, Airbnb that wrote the above mention react-native-maps, recently announced they're sunsetting RN development: https://medium.com/airbnb-engineering/sunsetting-react-native-1868ba28e30a
EDIT: I found myself wring a full blown production app in RN for the past 9 months and this is my current perspective:
RN is constantly evolving. The facebook team is doing an incredible job making the platform better.
Javascript can be tamed using typescript and working with design patterns (Im using redux-saga)
We use one codebase and repository for FE & BE: that's the biggest advantage IMO. The entire team is using the same language, we can review each other code and assist in tasks.
It may require some hacking but I have yet to encounter a situation where I couldn't achieve something that was required by product in RN.
The only real downside with RN is performance. By design, RN is less performant than native apps. For many apps, the difference will be negligible but if your app is heavy on animations, this is something to consider. The FB team are working on a big architectural change that's supposed to address this. (rumours say that the version of RN FB are using internally is way more performant).

If development effort/cost is not a matter for the organization, just go ahead with option 2: Developing native iOS & Android using swift and JAVA. Native development have access to complete capabilities of mobile development. It is very rich in UI design, performance, scalability and many other things. Lot of support and tutorial available in internet if you stuck in middle.
Option 1, Developing on react native: If majority of developers are experts in web development, java script and React JS please go ahead. It requires less development effort because one project will support for both android and ios. In this option, still you need native app development knowledge to develop custom, complex views and exported to React native.
Explore through internet to know the differences.

Don't worry about it because React-native-maps is good npm module for maps
You can find Github
doc here
It works great for android and ios
And more answer here: Which is best map to use on react native
But, in personal opinion i love native app, it's the best.

Related

How to choose the platform for my Mobile App and how to evolve it into multiple platform?

I'm finishing my Masters Degree in Computer Science and i just had this idea for a Mobile App to solve a problem i've been having for the last year or so. I have good knowledge of Java and i know that it's a good language for Android programming, but the thing is that this App would be to target both Android and iOS users.
Considering this, how do mobile developers go about this problem? Is it possible to make the application viable for both platforms or usually it works as a separate application with the same funcionalities?
For either cases, what tools/programming languages would you recommend for me to develop my idea? I'm on my 4th of 5 years but we still had no contact with mobile development.
Any other sugestions you think i might need to take into consideration when starting to develop an app are welcome!
Java can't be used for cross-platform development, as of my knowledge, but here are some great choices out there for cross-platform development. Here are some:
Flutter - developed by Google (my personal favourite)
Ionic
React Native
Xamarin
The question is does a cross platform SDK suite your needs. If you need to interact a lot with native APIs then it certainly isn't for you and you'll have to build two separate apps.
Another downside to using cross-platform tools is usually app size (for Flutter around 3-5MB larger for a simple app).
Here is my take on why I prefer flutter:
It's easy to build nice material UIs, since Google includes many material widgets
There are a lot of plugins available at pub.dev
It has close to native performance, because in opposition to the other SDKs the dart code is compiled into native code.
Hope I helped! Good luck in the strange world of app development!

Cross-platform advice Android / iOS / Windows

I'm maintaining a plethora of apps for one of my clients all of which have native projects for each of the three main platforms. The apps are relatively simple in functionality. My client wants to always take advantage of the latest features in each platform for marketing opportunities. They also want to appear to be a native app (responsive, not laggy). I haven't followed cross-platform development very much lately, so that's why I'm reaching out to SO.
My initial idea is to write a C++ library that has all the functionality shared by the three platforms. Then, for each platform, I'll write some network, file access, and UI-code that connects the abstract library code to the concrete platform.
Of course, this is exactly what cross-platform systems aim to do. Would it be a waste of my time to write the above myself when this has already been done by platforms like PhoneGap? My concern is that I would be dependent on a third-party. If I write the code myself, I have full control, and I will always have access to the latest features.
Hope to get some pro's and con's.
Thanks!
Yet a third option (after Facebook's React Native and Microsoft's Xamarin) is Google's new Flutter and as the other answers suggests "then writing the Windows app purely natively". BTW, React Native does have Windows support the lack of which in Flutter could be a plus or a minus depending on how you look at it.
Have you considered using React Native for iOS and Android, then writing the Windows app purely natively?
There are tons of articles out there about pros and cons for React Native.
PhoneGap is just a web, written in HTML, CSS and JavaScript. React Native actually renders native components for iOS/Android.
There is also Xamarin. It supports multiple platforms and uses c#. The new features from the native languages all work great.

Using JNI FOR IOS and Android

Is it Reccommended to use JNI and C++ Code to make a shared library code between IOS and Android ?
I'am asking this because i think it not just saves us plenty of wasted time for implementing same logic in both platforms but also we will have the speed of a C++ core Backing the logic-process of our modules.
Update :
I ask my question in another way :
is it recommended to share a C++ Library for core functions of Android And IOS versions of a similar app ? or it would be better to completely migrate the codes to a multiplatform language ?
Since I remember my needs back then, I know that hybrid apps were not an option, Also JNI is not used for making cross-platform apps but the best use is to drive hardware peripherals via native UNIX scripts for Android or run c++ code on Android. So if we omit PhoneGap, Appcelerator, Ionic etc we will be facing several cross-platform technologies that have attracted many developer attentions so far.
Xamarin:
The framework was founded by the same people who have created Mono, an Ecma standard-compliant, .NET Framework-compatible set of tools. Xamarin offers developers a single C# codebase that can be used to produce native apps for all major mobile operating systems.
Unlike many other frameworks, Xamarin has already been used by over 1.4 million developers from around the world. Thanks to Xamarin for Visual Studio, developers can take advantage of the power of Microsoft Visual Studio and all its advanced features, including code completion, IntelliSense, and debugging of apps on a simulator or a device. Xamarin Test Cloud makes it possible to instantly test apps on 2,000 real devices in the cloud. This is by far the best way how to deal with the heavy fragmentation of the Android ecosystem and released bug-free apps that work without any major issues.
But being honest I didn't enjoy my first time face-to-face meeting with Xamarin. There were so many bugs and also speed and performance problems were bothering.
React Native
React Native is developed by Facebook and used by Instagram, Airbnb, Walmart, Tesla, Baidu, and many other Fortune 500 companies. It is an open-source version of Facebook’s React JavaScript framework. Because React Native uses the same UI building blocks as regular iOS and Android apps, it’s impossible to distinguish a React Native app from an app built using Objective-C or Java. As soon as you update the source code, you can see the changes instantly manifest in an app preview window. Should you ever feel the urge to manually optimize certain parts of your application, React Native lets you combine native code with components written in Objective-C, Java, or Swift.
The ones I mentioned above are not the only options, but since now they are the most used frameworks between programmers. But beware that Flutter is being publicly announced by Google in Google IO and maybe it may be going to create a hit soon.

Disadvantages of cross-platform mobile app development using Visual Studio

Microsoft has introduced his new Visual Studio, with compatibility to develop multi-platform applications for Android, iOS and windows.
This is a very good news, for developers, that a large and reliable company produced such a thing. It can make life easier, a lot.
But, as you know, there are always disadvantages when you get advantages. So I want to know:
1) What is the difference between developing native apps for each platform, and using this kind of tools? What is the disadvantage compared to using for example Objective-C or Java for iOS and Android separately?
2) Is there any dependencies in order to running developed apps on different OSs? Something like .NET framework?
3) Is there any performance cost? Or works just like native ones?
4) What kind of apps are supposed to be developed with such tools?
In my point of view , this not good idea to develop android or ios application in XAMARIN. First of all performance issue occurs. You can not achieve performance like native application.
There are some dependencies like Xamarin compiles C# to native code, but still relies on the Mono runtime to do a lot of its work.
Native, no cheating – this is native. But there is an overhead, it isn’t like ObjectiveC native. The apps are going to be larger – this minor stuff matters when you are trying to get the max oomph out of your very resource restrictive mobile device.
You still need a mac for ios:-)
A huge emphasis on better app patterns like MVC or MVVM, because user interface is still native. You can write about 70% reusable code using Xamarin, but the last 30% or more depending upon your app design and nature, has to be native.
Generally speaking, in my experience, I’ve had better luck finding support and code samples for native, than for Xamarin.
And like I said, you still need to know ObjectiveC and Java – even if you are using Xamarin.
And Visual Studio + Xamarin = $$$$$. Plus a Xamarin developed product, while superior than HTML5 and Packaged HTML5, is going to cost you more. You have to evaluate if your needs justify the cost.
However, in practical application, I don't think it is very useful. Consider this... If you are coding in C# then this code has to be translated into objective-C or Java, and that translation depends on the Xamarin SDK. If Apple releases 4,000 new APIs in the next release of iOS tomorrow, how long will it be before the Xamarin API allows you to call those native APIs? And multiplied by two if adding Java. If you can't wait, then you code what you can in C#, and then write native code for the rest, but now you are supporting three code bases, and the advantage of Xamarin flys out the window.
I provide some links of debate on this topic
http://willowtreeapps.com/blog/xamarin-or-native-development-tools-for-ios-android-projects/
Android Xamarin limitation
https://developer.xamarin.com/guides/android/advanced_topics/limitations/
https://www.linkedin.com/grp/post/121874-5848849341191569409
https://www.quora.com/Why-would-people-build-native-mobile-applications-for-Android-iOS-using-Java-Objective-C-when-they-could-use-Xamarin-C-for-all-platforms-if-license-cost-isnt-an-issue
Why I Don’t Recommend Xamarin for Mobile Development

Appcelerator vs Android SDK

I have been looking at appcelerator it seems pretty fine! Without a doubt, one of the advantages of appcelerator is its support for multi-platform. I am interested in building an android app and maybe a iphone app later on. So it is not crucial to support multiple platforms at the moment.
If you disregard supporting multiple platforms and just focus on android development. Is appcelerator still advantageous? Does it lack any features of "Android sdk"?
(When I say "Andorid sdk" I mean development with Eclipse with native Android sdk, if it makes any sense)
We looked at Appcelerator when starting our Android project. We knew we would have to do an iOS client next, so Appcelerator was enticing.
We decided not to go that route because it doesn't support all the native features of each device.
For example, we decided early on that our user interface in Android would need a widget. No support for that in Appcelerator, as it's specific to Android. [This was a few months back -you may want to check again].
Compromising on the user interface was too much for us. We decided to go with C/C++ for the app logic and use Android SDK for the user interface.
Our apps now have two pieces: C/C++ as much as possible to the "brains" and the native (Android/Cocoa Touch) for the UI to take advantage of the UI experience.
Works of course for platforms that can integrate C/C++.
The parting advice: design your user interface first, then find a tool that can implement it. Users have high expectations of the UI in portable devices. Compromising on it early on may be the KOD for your project.
[EDIT] Every so often I see an upvote for this question. I would like to update with what we learned in the past two years:
Using C/C++ for the common parts of our application has paid off. It does require a slightly more complicated build process, but the savings are gigantic if the piece of code being shared is complex (as in our case).
For the user interface piece we are beginning to look into hybrid apps (some UI elements in HTML). There are still debates out there about HTML interfaces (Facebook and LinkedIn are two that move to native code for the UI), but also some reports that when chosen carefully it works. There is a great talk from Flipoard on that; with slides here.
UPDATE Oct/2014
In March/2014 Smashing Magazine published an excellent article comparing native iOS, native Android, PhongeGap (Cordova) and Appcelerator Titanium. They show the development of a simple app in each environment.
This is the last part of the series. At the top of this part there are links to the previous parts of the series and at the bottom there is the comparison of the approaches. There are also interesting comments from readers at the end.
UPDATE May/2015
Still get an upvote for this question every so often, so I would like to share what we have done since I wrote the first part of the answer.
We are now working on a project that also has a web client. We have now the iOS client, the Android client, plus the web client.
JavaScript is the natural choice for the web client.
Since we want to share as much code (at the business logic layer) across these clients, it means we need to find a way to run the JavaScript code in iOS and Android.
And that's what we ended up doing.
This is a summary of how we handle it:
For all clients: all data structures are defined with Google's protobuf. This allows to automatically generate the serialization/deserialization code for iOS and Android.
iOS: run the JavaScript code with the help of JavaScriptCore (a good overview here).
Android: run the JavaScript code with the help of Google's V8 engine.
The bridge between JavaScript and the iOS/Android layer can be a bottleneck, especially the serialization of the objects. We had to optimize a few things and learned a few lessons to stay out of trouble.
Generally the experience has been positive. We saved significant amount of time by sharing the code across all clients.
If I had to start another project like this one (that requires sharing code with web and mobile clients), I would also take a look at what Google did for inbox. It wasn't available when we started. Looks promising.
UPDATE August/2015
And the world keeps turning...
I would also take a good look at React Native if I had to start a new mobile app now.
It's based on JavaScript, bridging web and mobile development more easily.
There is a great tutorial in Ray Wenderlich's site.
UPDATE February 2016
My shortlist for cross-platform development is down to two:
ionic
React Native
I've been paying more attention to ionic because our web app uses AngularJS and so does ionic (Cordova + AngularJS). React Native will force the team to learn another framework (of course the argument is the opposite if your web app uses React).
Nevertheless, I'd seriously consider React Native, even having to learn another framework, because of the reported performance and look-and-feel of the app. From React Native's site:
With React Native, you can use the standard platform components such
as UITabBar on iOS and Drawer on Android
If you are starting now, I recommend you take the time to at a minimum complete their tutorials so you get a better feeling of each framework. Each tutorial can be complete in one to two hours:
ionic tutorial
React Native tutorial
For a simpler approach: Smashing Magazine just published (at the time I wrote this update) a good article showing how to use the native navigation elements to make the app feel (well...) native, while using web views to render the content. The article goes into the details of how to make the HTML/CSS usable in the mobile devices (it's not just pushing the HTML/CSS you already have).
If you only focus on develop apps for Android platform, I recommend you should use native Android (Eclipse + Android SDK as you said) instead Titanium.
Reason: Titanium is suitable if
You want to develop apps quicly, or
Your apps is simple, or
You see Java is so difficult (maybe :p ), so you choose the easier (Javascript of Titanium).
And here is the reasons why you should use native Android instead Titanium:
You want to develop a complex app, or
You want to customize app appearance. It's very important. Imaging you make an app for client, and they need their app to be customized for more eye-catching. Choosing Titanium means you must use their control, which lacks of ability to customize. It'd be better if using native Android that you can customize everything you want.
that is a very difficult question to answer without any specifics regarding the requirements of the application.
I would suggest you take a quick look at the API documentation of Appcelerator to see what the framework provides and also take a moment to list the basic requirements of your application and then determine what tool will be best for your project.
I think you are onto a good start using Appcelerator, since it uses JavaScript, etc. Easy to learn, but good examples. It will also enable you to use the same code and reach iPhone,iPad apps. Learning to use just the Android SDK is more complicated. Even then you still need to develop later iPhone etc apps. If you come from a web background this makes sense. There are good video's for quick learning. Good Luck
My experiences with Appcelerator seem to suggest they are more of an iOS shop. Their toolset for Android is, IMHO, quite lacking. ADT supports visual UI building and debugging on device, which Titanium Studio does not. There has been a bug filed about this for several months now, and it continues to be delayed. If your focus is Android, use Google ADT or MOTODEV Studio for Android. These IDEs are quite nice and are used by professionals.
The above answer presents a great way to develop mobile apps. DO NOT COMPROMISE ON A HIGH-QUALITY USER EXPERIENCE.
Lacking of bluetooth support is a huge deficiency for Appcelerator and no one gives a clue about roadmap.
edit : appcelerator now have BT support in Tizen 3.1
Well, in the new version of appcelerator (APPCELERATORSTUDIO 4.0) you can have alloy projects, and something like css files for your UI (tss), so in fact they are really customizable.
Greatings
Appcelerator has a lot of support and it really easy to use. It supports 100% of native api calls now. They have really good documentation too.

Categories

Resources