I'm about to build a fairly simple 'energy use issue tracker' HTML5 mobile app (Android/iOS Webkit only) using Angular. I want to avoid frameworks like HTML5Boilerplate, and use as few js libs as possible, and avoid anything JQuery; neither are we using node.js. The only UI features I really need are screen transitions (preferably CSS3-based with hardware acceleration), and to avoid the 300ms tap delay. I've been considering angular-mobile-nav, but am interested in what others have chosen.
For now, this will be a 'save to home screen' single-page webapp so users can submit an issue (e.g. lights are on, no-one in the building'), take and attach a pic, and view/filter a list of issues already submitted, each of which can be up-voted and Tweeted. There's an existing REST backend the app will PUT/POST to, and we'll be using Server-sent events to update a list on the app.
None of that is too hard (I have the camera working and the backend is up and running), but finding a minimal Angular-friendly solution for a lightweight UI is holding me up.
I think AngularUI will let you reach your target specially UI Boostrap which contains a set of native AngularJS directives based on Twitter Bootstrap's markup and CSS. As a result no dependency on jQuery or Bootstrap's JavaScript is required. The only required dependencies are AngularJS (minimal version 1.0.4 or 1.1.2) and Bootstrap CSS and regarding the size of the library minified version is around 40 KB.
I hope my answer help you and Please feel free to ask me any question? and I will be happy to answer.
consider ionic framework, Ionic is a beautiful front-end framework for developing hybrid mobile , it is still in beta version , but there is an active community working on it
http://ionicframework.com/
Related
I'm thinking of using ionic for my project but in the beginning I'd like to only have a webapp without going to an app. Like what framework7 allows. But the information I gathered seems to indicate that this is not possible or fully supported by ionic.
Could someone share some experience to say if it's possible and how hard it is?
For ionic2 it is possible:
add codova platform browser
upload files under platforms/browser/www
point it in browser
done
Note: Plugins that depends on device will not work in browser (for instance camera etc..), the rest will work fine, so keep your app usable even without device plugins
It is possible to port your Ionic app as a mobile website.
Its basically an angular app with added benefits of Ionic ecosystem. This ecosystem includes nifty set of directives of mobile first ui components, js library for interactions (pull to refresh / slide etc) and other such things that compliments your app to make it look and feel like using a native app.
It really shines at accessing native components of your device (camera, location, battery info etc) using js apis (cordova.js). But it isn't of any use when you are building a mobile website with ionic. So, you could write platform specific code to support both web and native in conjunction. You could make the most of cordova.js when you start building your native apps. Else, leave it plain vanilla for your mobile site.
I have ported my ionic app as a web app to serve my audience on mobile browsers (also plan to roll out native apps soon) and I have not faced any major challenges so far. It truly has mobile first experience.
If making a single page desktop website is your sole objective, you should probably go for standard angular bootstrap web apps. Ionic isn't meant for it.
We have a requirement to build app with as much common codebase as possible, that works on desktop and mobile platforms (Android, iOS, Windows Phone). Also, the app on mobile platforms should act like an app (so not mobile-friendly website), with access to camera, position, and an icon.
Having looked at all the options and finding some or the other quirks, I decided on having webapp/site on browser and PhoneGap to base the mobile app on.
Now, as far as my understanding goes, sticking the codebase of browser webapp/site in Phonegap base structure should work for the mobile app. Of course, some minor changes may be warranted.
However, I also saw that relying only on phonegap and barebones HTML5 tech (without any UI framework) would need a lot of time and would be tiresome.
So I looked around for a UI framework and found - JQuery Mobile, Sencha Touch, Kendo UI, etc. jQuery Mobile, while could work in desktop browsers too, would not give me a grid-like system to position elements. The rest of them seem to work only on mobile platforms - they did not boast about it working/scaling on desktop browsers.
So, is there any common library/framework that can provide - CSS animations, grid-like system for positioning, etc.?
It's not an "answer" so much as an idea for a method. Perhaps try creating what you need from a desktop perspective first using bootstrap so it's mobile first. Then maybe make use of something like jquery mobile for the bare bones navigation and structure in the app. You can then pull in your page content via ajax using the same code/layouts from your "desktop version" (which will of course have a mobile friendly view/layout since it's written using bootstrap).
You'll likely have to either create an api for serving up the content for your app or else find some other way to differentiate the app from the desktop site on the server side so you know where they request is coming from, but it seems do able.
After some testing and verifications on browser and phonegap, I chose the following combination:
Yahoo's purecss library for grid system and basic widgets. Its awesome with the only pain that Google Search on it gives ambiguous results.
Reactjs to manage the view logic. This was the biggest pain in my previous project having only used jQuery, turning my whole project into a huge jQuery soup. React is extremely clean compared to that.
superagent probably, for AJAX requests to fetch server data. Extending this, I haven't yet decided to employ a model-like library that handles the state; may be I dont need one. I will decide as the project moves on.
hand-coded CSS with some common sense so that I learn something and dont waste my time in finding an all-in-one library. _The only necessary rule here is to weed out older best practices when you are looking for something. For example, in order to center something, the transition method is the best technique.
We have to build an app which should run on iOS and android. For expenses reason we decided to to it with html5 and phonegap.
Now we have to decide which mobile framework we wann use for it. I know there are already a lot of this issues and I also already did a lot of research. But I'm still not sure which one we should pick.
I've heard a lot down side points from Jquery mobile, but on the other hands it seems there is nothing really better, beside senche touch, out there.
What are your experience, what whould you suggest?
I'm looking forward hearing your opinion
(let me now if you need further information for evaluating)
Thanks
Building PhoneGap with Bootstrap and AngularJS is a breeze.
AngularJS provide a really nice separation between Route, Model, View, and Controller. Learn Angular directives and stop writing spaghetti js dom interaction code.
Bootstrap, though not as nice as jQM for mobile features (maybe until v3), still provide a nice starter CSS such as (navbar, fixed top, bottom, etc...) And if you know your css, then I think Bootstrap is more flexible than jQM. Combine with some nodejs build script to compile your less file to css and you are all set. Glyphicons is also a good starter set of asset/images.
I am sure you would have done a lot of research on this but from my experience I would suggest you to take a look at Sencha Touch + Phonegap combination.
The reason why I opted for Sencha Touch over Jquery Mobile is that the JM is quite sluggish when it comes to page transition and animation. Whereas, Sencha Touch provides you all-in-one place regarding building a rich mobile app with HTML5, CSS and Javascript. The only thing about ST is that you might require to learn some Ext JS which is used by Sencha Touch to create components. They do have a lot of documentations which you can refer to.
You can refer these links to kickstart on Sencha:
https://github.com/senchalearn
http://www.sencha.com/learn/touch/
All the best! :)
We have just started working with PhoneGap in my studio and we are using Backbone.js + Handlebars.js and Bootstrap or Ratchet depending on the case. It seems to work very well.
If you want some more resources on that I will suggest you start with
http://coenraets.org/blog/2013/05/top-10-performance-techniques-for-phonegap-applications/
http://coenraets.org/blog/2013/05/architecting-a-phonegap-application-video-slides/
http://coenraets.org/blog/2013/06/sample-mobile-phonegap-application-with-backbone-js-and-ratchet/
Really good resources.
Hello Fellow developers,
I am embarking on a new journey to develop HTML5/JS web site and looking a ways to reuse the same code for Mobile App (Would like to use it using PhoneGap or Appcelerator). The requirement is to develop once which can be used on desktop, and smartphones, but project sponser wants more secure way to handle data on smartdevices and hence we would like to choose this approach. Now my questions is
Can we reuse and architect the solution this way to reuse HTML5/jQuery code on Mobile within Appcelerator or Phonegap?
If yes, what percentage of rework will be required to support on mobile devices?
If no, what could be alternatives?
thanks all for your guidance.
(1).
If your current desktop website interact with server-side in webservice way,everything will be done very easy. Even you can directly modify the *.java in src\com\ like this:
super.loadUrl("http://balabalabala.com");
With phonegap wrap, your app can be access right now.
If not, you will need spend time in implementing the server-side interfaces for client-side.
(2).
You need to refactor your static html page with some javascript framework for mobile(such as jquery mobile,sencha touch).
Using them to make your phonegap app more simalar with native app.
That takes time too.
The 2 things above are what you need rework.
I hope you are planning to build a mobile website. If so, its very easy to convert it to a PhoneGap app with may be only 5% changes provided your website uses only HTML5,JS and CSS. Its not possible to run a a website written in serverside languages such as PHP, ASP.NET, ruby etc. Some important items to keep in mind:
start development of website and app together. test with mobile browser and phonegap so that you can fix issues as and when they arise.
use a mobile HTML5 based framework like Kendo UI Mobile/ jQuery Mobile etc for developement
so that you dont spend time fixing all the mobile related UI stuff.
Wherever you are using PhoneGap features, check whether you are running on PhoneGap or else fall back to the browser feature.
I am looking for a general mechanism to internationalize web application that have to work in offline mode.
Initially I was considering adding data-i18n tags to elements but this seems like a very ugly solution.
I came across http://panacodalabs.github.com/The-M-Docs/#components_&_utilities/m_i18n however I do not wish (or can due to time constrains) port my application to that framework.
I need a HTML5 jQuery Mobile friendly solution to this issue, that works in offline mode.
It seems to me that this crucial component is missing on the HTML5 framework.
I wouldn't necessarily say this is a feature JQM should provide, because this is probably done best with some server side logic.
there would be two ways I can think of doing this:
1. have all your language translations in some standalone js files, which you would have to include in manifest file. check the datebox plugin to see how this could be done ( top right - options).
2. create a local database and store translations in the required languages there.
i think the first one should be easier to handle, but probably harder to setup/maintain. also, depending on the amount of translations, js files do become large...
Have you looked at the jQuery i18n plugin?
http://recursive-design.com/projects/jquery-i18n/
I'm currently using it with jQuery 1.7.1 and jQuery Mobile 1.1.0, and it works perfectly.