This question already has an answer here:
Convert a website to an android application [closed]
(1 answer)
Closed 9 years ago.
I have an ASP.NET website I want to convert to a downloadable native app for iOS/Android devices.
I was wondering if this was at all possible - I am aware of all the tweaks required to make the website mobile-friendly (server/client wise), but I'm currently unaware of how to compile the website as a native app.
Also, since my site has server-side logic, the native app should work like my normal website, sending and receiving data between the client and server.
Thanks,
Ron
While you are right that a native app and a website are similar that they send and receive data from the server, that's probably the only similarity.
As a concept native apps and websites are very different and I don't think you can expect to convert between the two. Depending on how the website is implemented, it might be more work or less work.
ASP.NET encourages a development model where you don't think about the client and server as separate entities and tries to abstract the technology underneath (HTTP, HTML, web server). This is why most ASP.NET websites are usually implemented in a way which you wouldn't follow when developing an app.
I think your best bet is to either make the existing site mobile-friendly or just implement a native app from scratch. For info about the first suggestion, you can read Scott Hanselman's blog post. As for native apps, I'm sure you can find many resources through Google.
For the fast solution, create a mobile friendly responsive CSS for your existing site and use Cordova/Apache Phonegap shell to embed it as initial page.
If your ASP.NET page is developed using MVC, I would suggest you to write another HTML5 page that uses ASP.NET Web API and use it with Cordova. Of course, you can also choose to develop a native app in a native language of the platform (like Swift in IOS or J2ME in Android) if you can convert it to WEB API structure.
It would be very hard to convert old-styled ASP.NET apps to mobile native apps. Once, I wrote a Cordava hybrid app for a similar issue that uses a browser object to open some local and server pages on the native app. Native part was used for header and tab control navigation. Hybrid apps are like native apps, you can download from app store / google play but they uses internal web browsers to show the content. Some part of your app can be still native.
If you are interested in this Web/Hybrid app development approach, you can also look at Ionic Framework.
Look at Hybrid apps and Cordova for the start. Good luck!
Related
I would like to ask for some advice on this issue I am having. I am working on a website that is made with ruby on rails (along with html.slim, css, angular.js).
I would like to create an Android (and, if possible also iOS/Windows Phone) app to access a part of this website.
The website does nothing more than making some api calls to a server and it's really light, so I think that I don't need to make a native app. I would like to make this app in the fastest and easiest way possible. I thought that I would be able to make convert the site using Phonegap, but this would work if it was made only with html,css and js, not also with ruby on rails. The only thing I need is to store a small string on the device (the website stores a cookie) and then to make a few simple API calls.
Thank you for any advice on this - not so clever - question.
Bye!
PhoneGap, Cordova, Ionic, etc. - all the same. None of them will run your API (aka server side code - PHP, Ruby, .NET) without doing something dramatic.
Easiest approach - write server side services (e.g. REST services) using your favorite server side code - like Ruby, and use JS to securely call into those services.
This fits the PhoneGap/Cordova/Ionic paradigm, and will allow you to build a hybrid app (aka seemingly native app) the quickest.
Just my 2 cents.
Maybe (if you need real simple app for mobile platforms) you should create Android/iOS app with browser object inside app who will be receiving html data from your public website and show it for user. You just need to create mobile layouts in your rails application.
pros:
You can create this app real quickly;
Easy for update;
Don't need to update app if something changed in general web application layouts or logic.
When you create layouts for mobile they will be work for your applications and for mobile devices who doesn't use your app.
cons:
This is not classic application, it just browser inside your app.
It is not a bad solution for start. For most sites, and projects it will be enough.
More information about rails and mobile layouts for rails you can find here:
http://railscasts.com/episodes/199-mobile-devices
Example how looks like android app with browser (Webview) object:
http://www.mkyong.com/android/android-webview-example/
https://developer.chrome.com/multidevice/webview/gettingstarted
I'm sorry if this is not the answer you were looking for.
I created a web application on Openshift using Spring MVC and MySQL.
Now I want to go mobile for this application. I want to publish the same application as a mobile app (Android mainly). Primarily, this mobile version should play with HttpPost/Webservice security authorisation too.
I know Pivotal has a Spring Mobile project which helps create a mobile site for the same application (with more sophistication like spring form tags and all).
On the other hand, Phonegap can create a cross-platform mobile app with the help of HTML5 and CSS.
My questions are:
Is it worth it to put my effort on Phonegap or Spring Mobile?
If I choose Spring Mobile, how do I publish a mobile app in the Android Play store?
Some pros and cons or any links for reference would be helpful.
Intro
First, let me give you a warning. While this is a constructive question (better than average questions asked here), people usually like questions from users who spent some time searching for an answer themselves. I will explain this part later.
Differences
Phonegap (Cordova) and Spring Mobile are two completely different frameworks, they serve completely different purposes. You could have found that Googling.
Phonegap (Cordova) is a wrapper framework used for hybrid mobile app creating. Your HTML/CSS/JavaScript code is wrapped into native shell and you can use JavaScript <-> Native bridge code to access native phone functionality. Though you can use it as it is with vanilla JavaScript, it is often used with other mobile frameworks like jQuery Mobile, Sencha Touch, or Kendo UI.
Spring Mobile is an extension to Spring MVC that aims to simplify the development of mobile web applications. Spring Mobile is a framework that provides capabilities to detect the type of device making a request to your Spring web site and serve alternative views based on that device.
Effort
Everything depends what are you going to do. Hybrid mobile applications are usually done with separate client and server side code. Communication is done using AJAX. Because of this I would skip Spring Mobile and use only Spring as a RESTful web service framework. I personally prefer Play framework, but that's just me.
Of course, you would still need to choose a client-side JavaScript framework, or you can create everything from scratch. I would advise you to use prebuilt frameworks like mentioned jQuery Mobile.
If you really really want to use Spring Mobile
If you really want to use Spring Mobile, it can still be done. Phonegap can be used to wrap remote web sites into mobile applications. This approach has several downsides. The application is useless if your site is down and you will not be able to create iOS application because these kinds of applications are rejected on first sight.
Best course of action
Separate client and server side code
Choose a client side mobile JavaScript framework.
Use Spring as RESTful web service, or any other RESTful framework such as Play.
Wrap your client side code into Phonegap (Cordova)
Publish as Android, iPhone application
Links
How to create jQuery Mobile application with Phonegap | Mac version
Sencha Touch vs jQuery Mobile
Secrets of a good jQuery Mobile page architecture
If you already have experience with jQuery, learn the differences between jQuery and jQuery Mobile
http://projects.spring.io/spring-android/
Spring for Android is a framework that is designed to provide components of the Spring family of projects for use in Android apps. Like all Spring projects, the real power of Spring for Android is found in how easily it can be extended.
I am embarking on the creation of an Android application (and subsequently iOS, if it makes a difference to the answer) as a mobile version of an existing website. I would like users on the website to be able to log into the mobile version and vice versa.
The website is written in ASP.NET MVC and I was planning to use ASP.NET Web API (accepting and returning xml/json) to submit/retrieve necessary data for the application. The website uses a .NET membershipprovider for authentication.
Can I reuse my existing authentication mechanisms to authenticate android users and enable them to log into the Android App? If so, what is the suggested method of doing so?
Thanks,
JP
Considering that you want to create an android version and later an iOS version too, you should consider using a web based framework for mobiles. Take a look at jQuery mobile
These are not for everyone. They work great for webapps. But are not as fast as native apps.
Your native application would only be a wrapper then that presents the mobile version of you site in a web view. Both android and iOS have support for this.
Would save you a lot of code rewrite and maintenance if it works for you.
If you do want to create a native app, you can definitely create a WebAPI based login and use that from an android client.
I'm developing an iOS app and Android app that have to read data from (and maybe write data to) my web app. On the web app the users login, modify a dashboard (their data), and their changes are reflected in the iOS and Android apps. Pretty basic stuff. I just don't know what a good design for me is.
Things I'm considering:
The web app is a client. The web app makes calls to an API I build where
all the user's data is added/modified. Android and iOS apps both
make calls to this API as well.
The web app lets users login and modify the dashboard. As changes are made they are fired off to a BaaS (such as QuickBlox, StackMob, Parse, CloudMine, etc...). The iOS and Android apps make calls to the BaaS.
The web app is everything. User logs into web app, modifies data. Android and iOS both make calls to web app.
Your recommendation...
Considerations:
I'm a junior dev with limited but growing experience. I'm fairly comfortable with Ruby. Java and Objective-C is a WIP.
I want to get this up and running ASAP. Willing to do a V2 the "correct" way once I get customers or funding.
Please advise on architecture. Thank you.
You can use Webview for Android. Read this link:
http://developer.android.com/reference/android/webkit/WebView.html
I am .net developer. I want to develop an application for mobile devices. As i am a web developer i am well versed with web technology & scripting languages. I am a big fan of JQuery so, i found something Jquery Mobile Framework for mobile application development.
So, I've got few questions:
Will this framework help me develop web applications or only for designing purpose?
Can i use my Jquery knowledge to implement web application using Jquery Mobile Framework?
Can i use Jquery AJAX in mobile app development?
It won't help you build a mobile "application" but it will help you create a mobile enabled web site.
It will help you build the front end of a mobile web application.
Yes
Yes, if you are referring to mobile web applications.
The back-end technology you use does not matter. I've built several .NET MVC sites using jQuery Mobile, which have all worked pretty well.
jQuery Mobile will help you build a website, you can then view that website in a browser or package it into an app. If you want to create native applications out of HTML/CSS/JS then you will need an intermediary step that lets you run a webview as your app. PhoneGap is an example of a framework that allows you to use native APIs while building your application in HTML/CSS/JS.
Your knowledge of jQuery will come-in handy but you will be forced to think about a jQuery Mobile website differently. For instance, pages are not HTML documents, but pseudo-pages that can be in separate documents but can also have multiple pseudo-pages inside a single HTML document. And because remote documents are brought into the DOM via AJAX (for animated transitions), you need to code your site to use unique IDs across the whole site, not just from page to page.
Absolutely! jQuery AJAX makes creating dynamic websites and native apps easy. You basically just load a bunch of views (in HTML/JS/CSS) into the app. package and then your server does the modeling. One cool thing to take into consideration is that since you are running from a mobile app., there is no domain from which the response is sent, so there is no cross-domain-policy to worry about.
If you have not yet checked-out PhoneGap, do so, and also see the documentation on the jQuery Mobile website regarding how to create PhoneGap applications using jQuery Mobile:
http://jquerymobile.com/demos/1.1.0/docs/pages/phonegap.html