How an mobile compatible website handles the performance? - android

As we are now a days fond of bootstrap css which helps in compatiblity. My question is how exactly it deals with the loading as we have more load to the desktop apps and less to mobile. So according to me the css is handling through #media-screen object stylings with toggling of display and alignment. But even if we control the display from client side css or js. Server side will do its task of loading, So whether both desktop website and mobile website are taking the same amount of dataload.
Why am i asking this is if there is same amount of dataload, ill rather choose Android app instead of bootstrap for the fast performance.

Its important to remember that Bootstrap is a client side framework for helping to create responsive websites. You're right in that the same amount of stuff will be sent down the pipe regardless of the device that is used. This is true for any website that just uses client side frameworks to render for mobiles, such as jQuery Mobile.
If your application is big and complex then you may be better off serving up a different page for those mobile devices using Server side technologies. We use the Microsoft .Net stack which can render different views/scripts/css depending on a number of parameters to do with device. You can still use the Bootstrap framework, but maybe render less in the DOM, or have a smaller version of Bootstrap. You could even try a different framework such as the super tiny Pure framework.
Another alternative like you said is to build a native app. This will generally (if you make it right) be faster that what you can achieve in the browser, but you need to be careful that it is actually providing something useful to the user to encourage them to install it. If you are just using it to make it easier to make your website then you're doing it wrong, but if you are building a highly complex app that can leverage some of the extra functionality you can use in a native app then it may be a good way round it.
Without a real question there isn't a huge amount more than my own experience to draw on here, and there is no real right answer to how you go about it, but in answer to the question of how it deals with loading, client side frameworks can't really change what is being loaded without serious customisation or using some server side technology to deliver different pages altogether.

Related

Android User Interaction

I'm about to start developing my first Android application, I have been reading through the developer documentation, but am unclear on how user interactions are handled.
As a front end developer, I use alot of css/jquery to create rich and interactive user interfaces.
I see that Android has it's own version of stylesheets, which seem pretty straight forward, but I am left wondering how I can replace something like js/jquery. Is it possible to use JQ mobile for native Android apps? Is there a replacement to this? Does android's UI handle this?
I'm a little confused.
Yes, it is still possible to heavily leverage your js/jquery skills and create a solid Android application that provides a rich user interface which is primarily js.
This will obviously depend greatly on what kind of application you're writing however if you own a website that delivers rich web content to end users and you'd like to replicate this in an Android application then you should take a look at webviews. They should support most of what you're trying to do in js or JQuery and it would be a quick process to mock up a test app to see if it meets you needs. I have run into a few quirks when replicating some interactive d3js visualizations which required extra tweaking before working properly on mobile devices.
I expect these minor issues will be ironed out in the next few releases of Android. Kitkat is going to include webviews that are based on Chromium which will include an updated version of the javascript engine. Your best bet is to just test it out, the amount of Java code required for a mock application is quite minimal.

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.

Phonegap vs MonoTouch/Droid

We have an upcoming [big] project, involving a series of mobile apps. Unfortunately we're still new to this market. Our biggest problem is not learning something new, but rather having to develop the same app twice which means approx ~ twice the cost and Hence we're trying to find a cross platform solution.
Since our expertise is in C# and .NET we are very interested in MonoDroid/Touch, and from what I've read that it is a mature framework.
However it is not exactly cross-platform (or am I wrong ?) and so we turned to Phonegap, which lets you build mobile apps with js, css and html which are technologies which we feel comfortable using.
Our apps are going to be very data intensive and might also require to be "invoked" by the server, i.e. there might be 2-way communication between the server and the app.
and so my question, given these kind of apps would you suggest phonegap or monoTouch/Droid?
Thanks in advance.
Monotouch is NOT cross platform. It allows you to create reusable elements, but you can't build once and deploy to all platforms, especially if your project is really as complex as you are making it sound.
I don't know much about phonegap. I've always steered clear of it. It might have changed since I looked at it last, but as I gather its not very robust and doesn't create very good apps, especially (again) for a complex app.
There is another cross platform framework called Titanium, but similarly to the both above its not great. There is more support for it every day, but it is missing some key components and you tend to get so far into a project and realise that you're not able to get any further.
My answer, which you're not going to want to hear, is that you should do it for each platform separately, and charge your client as such.
Creating a mobile app cross platform is like creating a t-shirt that will fit everyone. Ok, so you can make it stretchy, and you can design it in a way that will "suit" everyone, but what you'll end up with is something that is going to be too big or too small, and no-one will enjoy.
iPhone, android, iPad, blackberry, windows phone 7, bada etc etc they're all VERY different platforms. Just because they're both mobile phones doesn't make them similar at all. The way that the UI is designed and displayed is varyingly different, and the way you interact with the hardware (and ultimately the user) is also different. Case and point - iPhone as you go down views you create a navigation stack which you navigate using a back button in the title bar (which has the title of the current view in it). Android you navigate with the back button on the device and the action bar is used for the app title and other "action buttons".
To this end I would suggest, if you REALLY don't want to do everything natively (which is definitely the best option) then I would suggest looking at Monotouch and creating two apps with reusable components.
With PhoneGap you will create a web application. It can look like a native app, but it's really a web app running inside a browser object.
You'll be programming the client HTML and javascript, just like any other client side web app. You can create ajax calls to the server to get your data and do all your usual C#/.Net stuff there.
With Mono, you will create a clients side application, and you can program that client in C#/.Net.
PhoneGap will be more or less free and can be used for other platforms than Windows, iOS and Android as well, though you'll have to setup environments for each version. You can compile for all platforms in the cloud, but that'll cost you money.
MonoTouch/Droid will set you back a few hundred dollars.
For each platform, you will have to do some extra tweaking. Probably giving it a native look and feel, call different API's, etc.
I would personally advise the Mono route, since you know C#/.Net already. It'll give you results faster. Make use of the free trial for MonoTouch and see if it's something for you and if it's worth buying ($698 for both 'touch and 'droid).
It depends.
I agree that going native gives you the best possible performance and user experience. It's certainly the only feasible option if the app has a demanding UI. But if the app is more informational (perhaps displays news feeds for example) then a hybrid HTML5 app could be the go. The support of HTML5 within a UIWebView on iOS has some quirks in the older iOS versions so tread with caution. And on Android and other platforms, HTML5 isn't quite there yet. Certainly not on older hardware that doesn't have the grunt or browsers with suboptimal javascript engines.
With your .NET background, I suggest you have a look at http://www.vsnomad.com and evaluate it for yourself. Throw a quick demo together and see how it holds up. Otherwise, yeah, go the native route.

Hard to choose between native or cross platform for mobile application

I would like to create an application that support in both Android and iPhone.
It will be a interactive system for people to chat,share photos, etc.
So, it will consist lo-gin system, and all information for users will stored in mysql.
The question is here, should I write two sets of code for Android and iPhone or use some cross platform tools such as Phonegap + jQueryMobile for development.
1)I am wondering if html + css + javascript can complete all the functions that I want to include in this application if I use Phonegap.For example, how to handle the data transfer when loading data from db, should I create many .html for different pages. And the performance of using Phonegap...
2)Also, how about the time of development. Suppose there is one developer for Android, and one for iPhone. If we develop separately, we cannot help each other. On the other hand, web may be easier and we can research on this together.
3)Then, for the UI, it is easier for native language. But it is much difficult for web to make the things like mobile application.
I have asked a lot of questions. But I really think about this kind of issue for a long time and this is the time for me to have the decision.
Can anyone help me and give me some idea? Really thx....
Consider these Factors & Make your own wise decision,
which coding technique are you familiar with (HTML, CSS, JS) or (Java, C#).
For your First Question about data transfer from db,(your question is not clear internal db or server side db) if internal db Here is My QuestionI couldn't find the solution with the given answers, Help me if you can solve the same.(if you are talking about server side db) both for native & Cross platform it has to be achieved by API's
Time of Development is less in PhoneGap, when consider for both platforms since you are coding for both platforms simultaneously.
UI is Easier in Native ONLY when you go with Default styles,
For example consider yourself adding a Customized Button in *.png format.
you are gonna add single button multiple times in multiple sizes. If you wanna achieve clicked or Hover Effect you are Gonna add 2 more Customized Buttons. Which makes totally 3 images for single click for single Screen & Single Orientation, to achieve Correct Quality, u have to add same image in different sizes in ldpi, mdpi, hdpi, x-hdpi, no-dpi which finally brings you 5x3=15 images for single Button.(imagine the size of your app). Finally you have to add few lines of Codes to achieve Clicked effect
The same can be achieved in CSS with few lines of Codes(hardly 5 KB). Many animations also can be achieved easily with js.
UI can be changed when ever you want with change in few lines of codes.UI - PhoneGap Wins your app runs in Browser, both Android & iOS use the same browser engine Webkit, but still significant differences even in Webkit
Here are few more issues in PhoneGap,
Performance Native wins. In PhoneGap your browser has to load js, CSS which gives you notable delay, which cannot be ignored. If you want awesome UI go with CrossPlatform. To achieve performance choose Native.
Finally time to take decision.
It depends on what your requirements are. Evaluate if all your requirements are possible with Phonegap. For a list of supported features see: http://phonegap.com/about/features
Note that you can only use the native phone functionality that phonegap provides.
The development time depends on various factors, such as complexity, size of project and developer skill. I think the main difference here is developer skill, as the complexity and size of project are the same.
This is a tradeoff you have to make. An example phonegap application can be found here:
http://coenraets.org/blog/2011/10/sample-application-with-jquery-mobile-and-phonegap/
1.If you build application using cordova with more page, you app will get slow and some time it will get more bugs of design. So it
is better if you use single html page with different dives for each
pages and use "display: none;" from your java script or JQuery to
show and hide you current pages.then your application will more
fast.
there a lot of plugins in cordova those are supporting for both iOS and android so you don't need a iOS developer or android
developer if you have proper html and css design like responsive web
site.
UI won't be problem if you build a responsive html pages using bootstrap

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