Two questions about HTML5 web coding to Android device - android

1
Which one method is faster to open and use HTML5/jQuery Mobile page in android device?
Use Phonegap or just make normal activity with WebView? Page is in assets folder and App doesn't need to use any hardware component. It's just list of different web page links. And Every link should open second activity and open the link in WebView.
2
Someone says that Sencha Touch is faster than jQuery Mobile and someone else says that jQuery is as fast but much more stronger because there is more abilities to do. So which one is more recommended. Or is it only what you like is better? (Like it really doesn't matter which one you use)
jQuery is much more easier to start if you don't have experience about web coding. Am I right?

Which one method is faster to open and use HTML5/jQuery Mobile page in android device?
Use Phonegap or just make normal activity with WebView? Page is in assets folder and App doesn't need to use any hardware component. It's just list of different web page links. And Every link should open second activity and open the link in WebView.
Normal Activity with Webview will be faster then using phonegap because phonegap takes more time to get the document to be ready as compared to Native thing.
Someone says that Sencha Touch is faster than jQuery Mobile and someone else says that jQuery is as fast but much more stronger because there is more abilities to do. So which one is more recommended. Or is it only what you like is better? (Like it really doesn't matter which one you use)
jQuery is much more easier to start if you don't have experience about web coding. Am I right?
Yes you are right Jquery is much more easir then sencha touch. I use jquery mobile and its awesome. Although Sencha is little bit faster but i will recommend you to use Jquery mobile. :)

In general yes JQM is a lot easier to learn. I've spent about a week now looking through Sencha and if you don't know EXT.js it seems pretty complex. Even the demos are confusing and it seems to be way more programmer oriented in the way things are constructed versus design oriented.
I'm also looking at netbiscuits tactile - but I haven't spent enough time looking at that yet.

Related

Is it useful using WebView whole layout in native Android app?

I am currently developing a native android app. My app has a lot of activities. I want to develop native android app. But in some case, I want to use a webview where the entire layout is just a webview. Not linear or relative or another layout, just a webview. All of the images and other things running in HTML. All of screen will run in HTML5.
So, I can partially transfer my app into iphone app or other platforms. This is the benefit of this way to me.
But I don't know. Is this way better? What will the performance be? What is the disadvantages of converting to an HTML5 app?
Can you explain?
There is a very good presentation about this very topic.
Performance: You are adding an additional layer in between, A webkit engine cannot always match native (and sometimes hardware accelerated) rendering performance.
Disadvantages: One is that the API use is limited, you can bind a page's JavaScript to Native code, but not all functionality is available.Though you might want to have a look at capabilities of Cordova project. Another is that emulating complex widgets via JavaScript will slow down the page.
Portability: Indeed is a great advantage, that's why PhoneGap and Cordova are popular. Though many like Facebook App etc have switched to native App for better performance.
The approach you require actually depends on your requirements. This may be my personal rant but IMHO: a markup can be only twisted so far, it can't out-perform industrial grade GUI programming setups as of yet.
Cons WebView
Can't use full performance of device, Since web view form an extra layer.
Web view can't listen all user event.
You can't fully share or save data from your web view to app.
Take more time to load. Other we get all things in a simple API and can be rendered.
Changing a simple fields in page need to load full page again.
Online required, can't extend offline features.
Orientation changes and full screen make difficulties.
Pros of using Web view
One page for both android and IOS.
I think the main advantage is the ability to make changes without the need for each user to update the app on his device, because all the pages are on your server.
No wait for app store approval for updation.
Some Techniques
Native elements TOGETHER with WebView. I think it will be much better, as there are a lot of functions that can't be done with WebView only. The combination of the two is much more recommended.
Rendering from locally, Create an assets directory for HTML files – Android internally maps it to file:///android_asset/ (note singular asset). So you can feed your web view form locally even if you are offline.
I think -by using this way- your app quality will be weak and app will be hard to use because the webview object not having a lot of tools that you can make it be compatible with android. e.g you can't share or save data from your webview to app. whatever that reference on your app what need and what dosen't need, by the way i tried to develop an app with html but it was bad.

Mobile HTML5 development: Backbone.js + Zepto vs. Sencha

I am about to start working on my first mobile HTML5 app. It is NOT a graphically challenging app like a game, but a typical mobile app that interacts with a REST server.
I already know Backbone, and zepto is pretty much same as jQuery so I was thinking about using this combination (and packaging it with Phonegap). But then I saw this video from Sencha https://plus.google.com/+Scobleizer/posts/ZtnZNrCfWv6 and am now amazed.
I used to think I have to pay for a Sencha license but as the video says, the license is free (Although I don't know how they make money if everything is free). Also, they have all the implementations of technically-challenging browsing modules, like carousel and infinite scrolls.
Although I've been using Backbone a lot, I have never done a mobile version (I've never really worried much about re-using cells, etc.), so I am wondering how difficult this part is if I wanted to go with Backbone+zepto option. I can imagine implementing cell recycle myself and feeling unhappy about how unoptimized it is. But then again, it could be easier than I think. I have no idea what it's like.
So please, could you share your experience using Backbone + zepto? Also pros and cons of using either option vs. the other. Thank you!

Creating iOS & Android app from a simple html5 + javascript game?

I've written some simple online games using purely HTML5 and JavaScript. Nothing fancy, no server side stuff involved, essentially each game is just a single .html (which includes javascript and css) and some .png and .jpg images.
Now, this kinda works on mobile devices as well (android/iphone/ipad) by just surfing to the particular page, but I guess a dedicated app would work better / be more convenient on these devices.
I have exactly zero experience developing for iOS or Android, so maybe this question is too complicated to fully answer right away, but:
Is it possible to create an app for Android, and similarly for iOS (iphone/ipad), based on my html page, other than basically rewriting the entire game for those particular platforms?
If yes, how do I go about this? What would be the easiest way? Is there a ton of Android / iOS knowledge required, or is there some kind of generic "conversion" that wraps my html page (+required images) into a mobile app?
I guess that phonegap would perfectly fit your needs.
Hope it helps
Appcelerator can do that. It builds native Android apps and iOS. The language is based on HTML5 and JS so I think it can help you.
http://www.appcelerator.com/
https://cordova.apache.org
Mobile apps with HTML, CSS & JS
Target multiple platforms with one code base
Free and open source
I recommend you to use construct 2. It has better development tools for HTML5. Here is a link to construct 2 website.

Phonegap or native for a TV Guide app

I'm planning to create a TV Guide app. The app has to interact with a server to get the data and display it in a timetable. The speed and UX are really important. Nothing flashy, I just want the page and state transitions to be very smooth and the assets/icons to look very good. Is it viable to use Phonegap for this app? I'm more proficient in HTML+CSS+javascript than Java/Obj-C but won't mind going native if it's the best way provide awesome UX.
You can totally do it with phonegap. I'd recommend using a javascript framework as well such as backbone.js for transitions and such.
PhoneGap just wrapps a native-app hull around a browser-application. This means: the phonegap-app must simulate a webbrowser and its javascript-engine. It does not convert your application into a real native app. This makes phonegap-apps slower than native apps.
I made bad experiences with an app that is scrolling through a long table of more than 1000 items, each of them holding five text-strings and two icons. Scrolling through the first 10 or 20 items was reasonable, but at item #50 it became really slow, and beyond item #100 scrolling was almost imposible.
So I wrote a native iPhone-App, and it scrolls at the end of the list as fast as at the beginning.
conclusio:
PhoneGap is fine for simple apps that need little resources. But when dealing with long lists or pages that are made of many different items, phonegap is considerable slower than a native app.
Really the decision to use phonegap comes down to abilities, resources and performance needs. Phonegap will be slower than native just by it's very nature that it's another layer on top of native whereas native is optimized to be as fast as possible. Then the second question is your resources. If you only plan on releasing to one platform and have the ability to build native, that could make the most sense. On the other hand if you don't have the resources and want to build to multiple platforms quicker, phonegap will definitely fill that need.
For frameworks, there is sencha, jquery mobile, Dojo Mobile (I find that framework to be the most difficult to use) and Kendo UI (newest of the bunch but not really free either).
And another great template start is to use Mobile Boilerplate to understand the best practices for an hmtl5 starting page.
http://html5boilerplate.com/mobile
if you use phonegap, it will be more easy to create the app for the other platformes(android WP7 ...)
but improving it will take you much more time.
because to have nice transitions and effects with phonegap , you wil need some libs and frameworks like (jquery mobile ,sencha touch ,dojo framwork)

Efficiently converting a web UI to be better viewed on an iPhone or Android device?

I'm sure there are plenty of discussions about this floating around, but I'm curious what may be considered most useful by folks in the community here presently:
What is a solid approach, css framework or otherwise that would facilitate proper display of a web app on an iOS device (meaning, in particular, iPhone displays) or Android devices?
This is especially pointed at a web app that's already done UI wise and so I'm looking to tune the display a bit, although it already looks good, it could be a little more clear for smaller displays.
Have a look at jQuery mobile and also Sencha framework.
I have rather mixed feelings about jQuery mobile, but it does give you an almost-native-app look & feel out of the box.
Is there any need to use Jquery mobile or sencha.
Cant he display the web UI on iphone or android browsers using any User Agent.

Categories

Resources