I am trying to program a native Objective-C and Native Android application using 3rd Party libraries. I have already chosen the libraries and I am already progressing in it.
One person in my team argues that the websocket currently implemented in concentration to web browsers, If we use this 3rd party libraries to implement the same from a native application it may not be stable.
He says maintaining a websocket connectivity from a native mobile application could be trivial, But webkit browsers already does that naturally, therefore we should think about creating a hybrod app.
Can anyone throw a comment on this?
Websockets can be used by any client (read: "app"), as long as the client implements the Websocket protocol - no browser (or hybrid) required.
For example, SocketRocket is an Objective C library that helps you implement Websockets in iOS native apps.
There's a nice article here about implementing Websockets in native iOS and Android apps.
I think that implementing Websockets without Webkit is a better way to go. Creating a Hybrid app can impact performance. If you're using only one feature (websockets), Webkit might be too heavy.
The only question is - are the libraries you are implementing mature enough?
Good Luck!
Related
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.
Browsers already adopted HTTP/2 and major web servers should all support it within 2015. If client browsers needed adapting to take advantage of HTTP/2, so should client native mobile apps.
How can native Android apps take advantage of HTTP/2 to better communicate with their servers, and what should we be doing (or stop doing) to adapt our native apps, from the front-end point of view?
I am not sure if I understood correctly your question, but you can use one of the libraries for communicate with servers sharing same connection.
One of the libraries which supports HTTP/2 is OkHttp.
But can you provide more details about what do you mean by
How can native Android apps take advantage of HTTP/2 to better communicate with their servers, and what should we be doing (or stop doing) to adapt our native apps, from the front-end point of view?
I did quite a bit of research today without comming to a satisfactory conclusion. I need/want to build a service, that has both:
a web frontend
cross platform apps (focused on iOS, android and windows mobile)
I found a lot of frameworks, that allow cross platform mobile apps (stack overflow helped a lot), however I couldn't find any that also promotes extensive code reuse with a web frontend.
At the moment I'm favorizing the following solution:
Split the web backend into a REST framework accessed by both the web frontend and the apps (developed with Phonegap to allow reuse of HTML5 / JS surface code where possible).
Since the project-team is rather small, code duplication should be avoided as much as possible.
Is there another solution/framework (I've probably overlooked), that would cater to my requirements more adequately than my intended solution?
Thanks.
The Javascript frameworks you can use for your web frontend and that can help you for cross platform apps are
Angular JS - Nice databinding features, dependency injection and MVC framework
ChocolateChipUI - Theming based css to look like native iOS / Android / WP8
There are other couple of options you can give a shot. Ionic framework
I work at Backbeam. It is a backend-as-a-service with great support for both mobile applications and web applications. You can write server-side logic and reuse it on all platforms. Here you can read an overview about the server-side logic functionality.
At this moment is a hosted service but we have plans to release an Open Source edition this year.
If you have further questions we will be glad to assist you :)
Is there a project that provides libraries for communication over WebSocket for both Android and iOS? I know jWebSocket, but it is pretty much dead, and does not provide a lib for iOS. I know Autobahn, but it too supports only Android. I also know SocketRocket, but that is only for iOS. Is there something that supports both, or two solutions that are 100% compatible with WebSocket?
Thanks!
iOS uses ObjectiveC and Android Java, so there can't be a library that provides building the same unmodified user source code for both platforms for the platform's native language. You could have that (in principle) using C. And of course JavaScript.
Apart from that regarding the wire protocol AutobahnAndroid and SocketRocket should be absolutely compatible, since both use the AutobahnTestsuite to test protocol compliance.
Above is for pure WebSocket. If you want to use higher level features of i.e. Autobahn like the Publish & Subscribe and RPC messaging patterns provided by WAMP, we plan to have a iOS version of Autobahn that adds those .. on top of SocketRocket. No need to reinvent a mature, robust WebSocket implementation on iOS.
Disclaimer: I am creator of Autobahn/WAMP.
There are so many cross platform libraries that I am kinda lost to get an answer to a very basic java question.
I have a java library that works well on Android. It does not use any android specific functionality and also builds on the standard java sdk. This library uses sockets (plain simple Socket, ServerSocket kinda architecture) to communicate between the library and a server hosted (may be on a ec2 or some virtual public server).
Now my question is, can other developers import my java library (built using java sdk) to a application that uses html/css for User Interface, package all of this into a mobile application for iPhone (use native iPhone packaging, and a WebView to launch) ? Also can I ship this library so other software developers can build a web application to work on desktops and cross browser's ?
Some questions on stackoverflow are close to what I am looking for, but not quite there.
Developing Mobile Apps for Multiple Platforms (without a cross-platform framework!)
Will a webserver be able to use my library that connects to the server using sockets ?
And will every client that connects to this webserver create a new instance of my library ?
If you library doesn't use any dependencies on either Android or any other library, another developer can use it pretty much anywhere they want. Although keep in mind that platforms like EC2 may have a preferred way of using communication. (I'm no expert on EC2, so you'll have to see what they use.)
So I guess it's better to abstract out that socket functionality for good.
I don't think you can use a Java library in iPhone. iOS terms of use clearly states that you cannot use a compiler or interpreter on the device other than the one given in the SDK and the webkit javaScript engine in Safari. So there's no way your Java code is going to run on iPhone (without jail-breaking.)
I don't understand the question about webView. Do you mean navigating to a site that is powered by your library ? If yes, then yes as long as you keep it in the boundaries of Safari. (no Flash, no Java Applet .etc.)
Will a webserver be able to use my library that connects to the server
using sockets ?
For the most part, yes. But as I said, the platform may not allow raw connections, so it's good to abstract it out.
And will every client that connects to this webserver create a new
instance of my library ?
This depends on the design of your library and its public APIs.
Hope this helps.