I am having a browser-oriented web app build on Rails (3.1). I want to make some features of the web app available on mobile devices, too.
Besides...
1.) Building native apps for each vendor of devices and interacting with my rails web app using JSON/XML, ...
I am thinking about reusing as much as business logic already implemented in my rails app by reusing controllers/models and add some new views targeted to mobile devices (in terms of screen size and the like...).
With this approach, I see two alternatives:
2.) Let the end user access the part of the rails app targeted to mobile devices in the mobile browser.
3.) Set up a native mobile app wrapper, e.g. using PhoneGap, and refer to the same part of the rails app used for 2.).
The advantage of 3.) is that I can reuse business logic of my rails web app and having a "phantom" native app for mobile devices at the same time. (I used the term "phantom" because besides the wrapper, it's not really native, this approach actually just mimics a native app.)
Question 1: Are there any other alternatives besides 1.) to 3.) ?
Regarding 3.)
Question 2: Does Apple accept this kind of apps (which fetch large portions remotely) to be uploaded to the app store?
-> I would be surprised if it is so, because it would allow one to change large parts of the app without the notice of Apple.
Question 3: From an architectural/technical point of view, is it recommended to remotely fetch prerenderd html/js to be executed in a "phantom" native mobile app build on top of e.g. PhoneGap?
-> Wouldn't it be better to set up an independent client app within the native mobile app (maybe using backbone.js), keeping all html, css, js locally within the mobile app, and communicate with the backend using JSON/XML or whatever?
I think this is a good question and I've recently come across similar difficulties. I've ended up using (Q3) vaadin with touchkit. Fine if you're doing free but a bit expensive if you're doing commercial (although then you can probably afford it). I realise this doesn't relate to rails but still, I'm assuming the main point of the question was should I build native apps which use web services / middleware or go for pure web apps.
RE (Q2), during my trawl of this current technology, I did read a few articles suggesting that apple are not allowing the web app style. As in, app which simply masks browser window loading remote web app. Essentially, I think where apple are concerned, you'd need to have the functionality tied down to what they agreed to. This doesn't really affect web apps though as you can surely just access them directly from the browser.
RE (Q1), the only alternatives I can see would be different middleware (e.g. MQ, SOAP etc).
Related
I made a website by ruby on rails on c9 and I want to make this as a mobile application.
I found there are cordova, phonegap and etc.
I don't know how to use my previous code I wrote on c9 by using ruby on rails.
Is there any way to use my ruby on rails code to make an android application by cordova or phonegap.
Phonegap uses primarily JavaScript/HTML5/CSS so it's not clear that you'd be able to "directly" reuse your existing codebase as a Phonegap application in the "now it's a web site, now it's a mobile app" sense. The answer that elimcjah posted does present some reasonable ideas though.
As a broader point, the first question when creating an app is what its value-add over a mobile site is (especially since you already have a functioning web site). I'd consider whether you want to make sure that your existing web site conforms to the principals of responsive design or if you really do need to make this an app. It's actually not all that easy to convince people to install an app and keep it there, especially if there's not a perceived value add over their mobile site. There's also the additional expense and effort of submitting the app to the various play stores (which will likely require a subscription fee and may have a non-trivial "vetting" process; Apple's vetting process is notoriously stringent).
What I want to develop: Crude Overview?
Suppose 10 web links present on my (native/web) app, and user will scroll through links. And when user clicks on any of the link, it will open that website. And user might wish to close this website and again views the list of those URLs on my app and the cycle may go on as per his wish. Also, user can create custom list of those links. Also, these lists will be updated regularly, may be on monthly basis. Which I guess I just need to update data files and not app.
No, it is not similar to browser bookmarks but in very crude terms you can relate it. Anyways, I will accessing user's bookmarks with his permission which I guess can be easily done with the APIs available.
Right now, technologies in my mind.
1) Phonegap ( to be precise, its phonegap build - as I don't have MAC) with JQuery mobile and deploy as native app,or
2) SenchaTouch and deploy as web app or native app using sencha cmd.
3) I want to use MongoDB along with above 1st or 2nd option. Is it required or JSON can suffice? Also, I may need some security by encrypting this data while storage at user's mobile and also while collecting user's custom lists.
4) In future, I would also need Node.js for the purpose of collecting MongoDB or JSON data files in above 3rd point. Is there any other way so that it can be integrated with phonegap or senchaTouch.
Please suggest things if existing resources can help me develop my idea and guide me what to use!
Note: All technologies I am picking up are focused on single code base with minimal focus on platform specific changes-iOS/android/Windows/Blackberry.
I want to go for Native app rather than web app. Why?
1) I feel that it would perform faster if I deploy my idea as android/iOS/Windows app rather than web application.
2) My cost of hosting the application on server will go to null because I am using local storage of the user's mobile.
3) Since I want a feature in my app which stores user custom settings so it would be better if I deploy it as mobile app rather than web app so that I don't have to maintain user specific settings which may make my DataBase hosted on server to grow immense in future.
4) Also,I feel that there is no sense in hosting this application on a dedicated server because there would be less user interaction with my backend. But later I would plan a feature to collect data/settings done by user to improve feed for which I think I need to use Node.js. But then also there is no requirement of hosting frontend to a dedicated server. Hence, I can use dedicated server to serve my own purpose of analytics to improve feed rather than service user's purpose of unnecessary access to my web application always through the server and fetching lists of links which are maintained on server in custom manner for him.
My dilemma!
My above points are valid to prefer deploying as native app over rather than web app. But I feel what if I keep my app as offline web app which runs on the default browser of the user but loads the jquery and other data and scripts from the storage in mobile. Is this possible? I am unaware of this.
If this is available then it is the best thing for me to adopt as my application redirects to other websites. Because, if I am deploying my app as native app then it would ruin user experience of opening my app and selecting an option whose URL opens up in default user's mobile browser which is a different app and then there are many chances that user will switch back to my app and then again he would be redirected to that mobile browser. And obviously I cannot develop my own browser in my app as I would have to develop several things from security and other perspective which would be a cumbersome task. So, having my offline web app will be opened in user's default browser itself without annoying him to switch back and forth between my app and browser as in previous case and thus creating seamless experience.
Also, I am not sure whether we can create offline inbuilt browser plugins as we can do in chrome browser on desktop. If so, then I think I would have to concentrate differently on different mobile browsers Safari, Chrome, mozilla which I feel is not worthy. Please throw some light on this for me.
I have no idea why people are downvoting my question as I feel that it is kind of unique question.
Here is what I found more and with the help of my friend
1) I don't have to use MongoDB as my application is not much complex. So simple JSON will suffice.
2) I'll be using Phonegap for android and windows phone and phonegap build for iOS along with jQMobile. So the app will be in the native form only.
3) I'll be using inApp browser for seamless experience although it is not as perfect as having my idea as web app.
4) No need for senchaTouch as it is heavier than phonegap and not required for me idea.
5) My next look forward is comparing the above points with offline web app built using JQMobile and JSON and finally whatever I decide I will share.
EDIT:
I am finally going with phonegap for native deploy rather than offline web app or web app hosted on server for reasons that I found on several blogs.
People downvoted my ques so I feel that it is not worth writing answer further but if you want the detailed reason you can always add a comment.
Thank you
You should definitely go for web. It is cross platform. If you do an android App, or iOS App, they are restricted to the specific devices. So I definitely recommend Web App
I am working on a project requirement.the project will be a ASP.Net Web application.
Database will be Microsoft SQL Server.this ASP.Net Web application will contain all the business logic and functionalities.
I have another requirement that all the functionalities in that web application should be accessible through mobile(IOS/Android) devices.
I hope we can do this in 2 ways.
1.Develop that web application with Responsive UI Design that supports all IOS/Android mobile devices.
2.Develop the web application business logic functionalities as .Net WebServices.Then Develop Separate Android/IOS applications to communicate with .Net Web Services and provide Better user interaction in Mobile.
Which way is the best way? Is there any other ways to accomplish this task?
among above two ways,How hard to make it possible / which is the hardest way?
Please somebody give a good solution.
Thanks
It depends on how "native" the app should be. Is it ok for the client to open a browser to visit the app? Or maybe it's enough to use phone gap to "emulate" a native app. From the actual point of view it`s hard to say what solution would fullfill the requirements. However, developing a native app arises a new maintenance channel. If you develop a reponsive web app it will be the only app that needs to be maintained. With every additional app you create (android, IOS and maybe Windows) you will create an additional app that needs to be maintained and to be tested, rolled out etc. Just keep that in mind while designing the architecture.
I think you should go with responsive web application.
Because as your are developing a new application then if you go with responsive then will save you time and the version problems which users face with **Android/IOS** will not occur with you.
Although you can provide full functionality to user with responsive. If you develop mobile application then it has some limits.
I want to develop an application which works both in a regular browser and as an Android app. Both seem suitable but would I be right in saying if I went with Phone Gap, deploying the same html content as a regular, server hosted website is not trivial and would require modification? Also, are multi page applications not desirable in a Phone Gap wrapper?
Are there any alternatives I should consider? I'm surprised someone hasn't already written an Android wrapper with all the hardware access wiring done already. Or have they?
There are few things you should know,
If you are going to publish your app also on iOS, you can't use server hosted website for your app.
All of your basic functionality must stand on your app assets, is one of the iOS guidelines, and its also make-sense for best ui performance (both iOS & Android).
Use server-side wisely, when you want to fetch data which have to be up-to-date.
there are some new mobile browser features which will be available in the future, that allow your website to use the device hardware functions:
Device API on W3C
Good luck dude ;)
You can try with jquery mobile framework:
http://www.jquerymobile.com
It is jquery based framework for developing web apps that works on standard web and on multiple mobile devices (with cordova)
How does one approach building the mobile app version of one's Rails app, with little to no mobile development experience? iOS, Android, one or the other, or both.
First, you might want to create (private) APIs for services your web app provides. The de facto standard for Android apps is REST-like endpoints that accept/return JSON. You can use whatever Ruby REST framework works best. Then you need to consider how you would authenticate Android apps, if needed. Do you use the same authentication database? Can you allow anonymous access, what parts of the app do you expose, etc.
Finally, you need to build the frontend. A few options here:
learn Android
hire someone to do it
use a framework that lets you develop using Web(-like) technologies: Thitanium, Rhodes, etc. The upside is that you get to use what you know and might also get an iOS app for free.
The downside is that you can never get the native performance, and look-and-feel might not be completely Android-like (never used Rhodes, so maybe it does this well enough, but still)
Consider using http://www.rhomobile.com/.