ionic: using the framework with only HTML5 - html

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.

Related

HTML|JS|CSS framework/library that works with PhoneGap and major browsers

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.

ibeacon with HTML5 webpage

I am new guy to get know the IBeacon technology, as I understand taht IBecaon can invoke APP, I am thinking is it possible that we just use mobile phone webpage browser(HTML5), not to use the pre-installed APP.
In this way, can IBeacon send out the proximity signal as it always does and therefore to update the contents in the mobile phone webpage according to different IBeacon ID.
Is it difficult to implement this webpage and the back-end web service.
No, this is not possible. Unfortunately there are no standard HTML5 bindings to detect iBeacons. Building custom bindings would require you to build your own web browser.
See this answer for more info.

HTML5 code reuse Phonegap

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.

HTML5 app with Appcelerator Titanium

I am an Acquisition Editor for IT books. I am thinking of developing a book on developing HTML5 apps with Appcelerator Titanium. Does it make sense to have a book dedicated to developing HTML5 apps? if yes, what would you like to see in the book?
If your target it's iOS or Android I suggest you should work with JavaScript and generate a native app. Also you can run any HTML code in a Titanium Web View component but I don't recommend it.
But if you want to reach other mobile OS you can also use Titanium but you'll need to create a web app.
Take a look at this article:
http://developer.appcelerator.com/blog/2011/09/titanium-sdk-for-mobile-web-beta-1.html
Mobile Web dev has been improved a lot since that article was posted. Check this http://docs.appcelerator.com for the latest documentation of what Titanium can do.
It would be very niche book and not be useful for most people. With Titanium you can:
write javascript code agains the Ti api, in which case at runtime native UI elements are invoked.
use a web view to load a normal website, which can contain an html5 app. But then you are only using Titanium as a wrapper around a website. There is some value in this approach, as you can use Titanium to invoke the device's hardware functions in response to actions in the web view.
It's probably better to do 1. Why render a table in a web browser when you can just render a table? Some people probably have used the approach in 2, but I'm guessing they are few and far between.
If you want to use html5 techs to develop a mobile app, you are better off with Sencha Touch 2.

Starting point for learning how to build hybrid HTML5 apps?

I want to start building hybrid HTML5 mobile apps; build the core functionalities via HTML5, then wrap this with a native layer for iOs, Android, BB..etc
After some research: I found I need to be familiar with plenty of technologies, namely: HTML5, JS, CSS3. Other technologies/frameworks I was advised to be familiar with: JQuery for Mobile, Sencha touch, Node.JS, Backbone.JS, PhoneGap..etc
Till now I just know the basics of HTML5, JS & CSS.
My question is:
Is there a "single" place (Book/Tutorial/Screen casts) where I can find a walkthrough Tutorial that deals with some of these technologies and guide me to building hybrid HTML5 apps (Maybe on iOs for example)..
I would want to learn the mentioned technologies among these, yet I am pretty keen on learning them in the context of building a hybrid mobile app and not on separate basis. I much prefer learning by doing real work (The app in the Tutorial/Book/Screen cast here) rather than learning each technology on its own.
Much appreciate your answers.
Omar
OK, let me expand my original answer:
HTML is short for hypertext markup language.
It is used to specify how to display STATIC content via the HTTP protocol, vulgo web.
HTML5 is version 5 of the HTML language specification, and is a RECOMMENDATION to a standard, but not really a standard by itsself.
CSS is used to apply advanced STATIC formatting to STATIC text/images, such as alternating background colors for even/odd rows in a table, text-flow, text-direction, size, boldness, font etc..
To make static content DYNAMIC, you need JavaScript.
JavaScript is a scripting language, that runs in the webbrowser of a vistor (client) to the website. Theoretically, it is meant to behave the same on each browser, but in reality, Microsoft used unfair competition and intentionally crippled the JavaScript implementation in it's browser (Internet Explorer), by diverging from the ECMA standard, and by implementing proprietary features, to stifle competition (Netscape) and make it impossible to develop compelling web applications, for example online office software.
JavaScript, the client-side programming language, is complemented by PHP/ASP.NET/JSP, which are programming languages & frameworks that run on the server, and are there to dynamically create static pages, for example by filling in data from a database, and to process and save user input, such as orders, payment, emails, feedback, etc, and to process input from HTML forms (input masks).
JQuery is a JavaScript framework.
That mainly means, it's a library of JavaScript functions that were designed to provide often-needed functions that do the same on each browser, effectively bypassing the anticompetitive practises of software vendors such as Microsoft and Apple.
It also provides basic functionality for event handling, graphics and AJAX (asynchronous JavaScript and XML), and functions for serializing/deserializing JSON (JavaScript object notation).
JQuery for Mobile is a version of JQuery optimized for mobile devices, such as Android or the iAnything. So are Sencha touch, Node.JS, Backbone.JS, etc.
The difference between HTML 5 / and HTML4/XHTML is mainly that HTML5 provides a so-called "unified" way to embed audio video. Which is not necessarely true, because each browser supports different audio and video formats, and there is NOT ONE audio & video format that is universally supported across all browsers.
HTML 5 also provides the very useful WebSockets, which basically allow you to make client-server applications on the web. Since this would enable compelling web applications and office applications that would be on par with Microsoft Office, Microsoft hasn't implemented WebSockets in the standard browser. It's available as separate plugin, which basically nobody bothers to download, which means one cannot use web sockets anytime soon if the web application should work with internet explorer. Additionally, HTML5 is only implemented by IE9+, and not by IE8. IE9 however is only available for operating systems newer than windows XP (vista, 7, 8). Which means one cannot install IE9 on Windows XP (35 percent of current windows installations, Windows makes up 85 percent of the desktop market).
To embed web applications on mobile phones, you need to embed your applications in a embedded WebBrowser. For Android, the interface to the embedded browser is called WebView, and you need to learn the Java programming language to use it. For Apple, I have no idea whether they have such a thing at all, but I'd suppose they have, though it's probably going to be more complicated, since that's Objective C, and not Java. Since I have neither a iPhone nor an Apple computer, I cannot tell you anything about it, except that it's crap because it doesn't support Flash, and that it costs 10 times more than what it's worth..
Screencasts, you'll probably find on youtube, if there are any.
Again, google search will provide you with the necessary answers if you have a specific question.
My question is: Is there a "single" place (Book/Tutorial/Screen casts)
where I can find a walkthrough Tutorial that deals with some of these
technologies and guide me to building hybrid HTML5 apps (Maybe on iOs
for example)..
Yes, http://www.google.com/ncr
You know, it has a wonderful search box for just about any problem...
Other good pages:
http://www.w3schools.com/html5/default.asp
http://www.w3schools.com/js/
http://docs.jquery.com/Tutorials
Here is an update on this question, as building hybrid apps have come a long way in three years.
I would start with looking into Phonegap, or the Adobe owned version called Cordova. This is a very popular route in quickly developing and distributing hybrid cross platform mobile apps. So popular in fact many other frameworks are built around the Cordova framework to give it a more native feel, such as
Ionic - this is by far the most popular, it's open source (free) and my favorite as I find the quickest and easiest to work with. In addition they have great documentation and great pre-builds. It's command line interface framework that works combines the Cordova, Bower (a package/plugin manager), Grunt and Angular JS frameworks into one powerful and quick CLI. If you are unaware of these frameworks they're definitely worth looking up if you're looking into building web or hybrid apps.
Mobile Angular UI - is an HTML 5 framework which uses bootstrap 3 and AngularJS to create interactive mobile apps.
Titanium - is a "complete" solution for creating hybrid mobile apps with all you need in one place with there downloadable program Titanium studio
Telerik - a website based program similar to Ionic and titanium for rapid development
Those are great places to start. If you don't already have a subscription to Lynda.com I would highly suggested it. The subscription is roughly $25 a month depending on your location. They have hundreds online video courses that can run a few hours long and are very great I giving you a good scope and how-to do many projects and understanding many frameworks. teamtreehouse.com is another great tutorial tool they have a lot smaller selection of videos better more in depth and hands-on and will work with many other frameworks with in the project.
You want to learn how to develop a hybrid app that works with multiple platforms such as android, iOS, Windows, etc. This means you need to learn PhoneGap and Cordova(preferred). These are almost the same, one really is part of the other.
Google both phonegap and cordova, install the packages (requires a little bash command line knowledge). It is relatively quick and easy to get the example HelloWorld app in both Phonegap and Cordova.
After that? well, you will have to learn HTML, CSS, javascript at minimum for the web side of a hybrid application. The native side (Android, iOS, etc.) will require learning Android Studio/java for android, or Xcode/swift for iOS.
Everything you want to learn is either on youtube.com for free, or Udemy, Udacity, Lynda. Some sites you will have to pay for, but its WORTH IT.