Back from ApacheCon North America 2016

I just get back from ApacheCon North America that was be held from 11 May to 13 May @Vancouver, Canada. The conference organization was really great and there were a lot of attendees in the conference sessions.

HazemSaleh_ApacheCon2016

I had the chance to present “Advanced Apache Cordova” in 12 May, the session was interactive, contained three live demos and I was really amazed by the energy, enthusiasm, and responsiveness of the attendees during the session.

My session is uploaded below.

Finally, I would like to thank all the organizers of ApacheCon conference for making the conference looks so great.

iOS 9, Cordova, and jQuery mobile apps Integration tips

Unfortunately after having iOS 9 update, you may find your Cordova jQuery mobile app has the following problems:

  1. All of your app’s popups are suddenly closed after the first opening time!
  2. All your app’s back button are not working anymore!

The root cause of these problems is a bug in iOS9 UIWebView‘s window.location.hash as shown in the link below:
https://openradar.appspot.com/22186109

Fixes

In order to fix these issues, you can do the following workarounds.

Fixing the sudden closing pop-up

In order to fix this issue, make sure to set the data-history attribute of jQuery mobile popup to "false". An example of this is shown in the link below:
https://github.com/hazems/cordova-mega-app/blob/master/www/index.html

Fixing the broken back button

In order to fix this issue, make sure to disable the hash listening behaviour for jQuery mobile when the device is ready. You need to be careful when applying this fix, make sure that this fix will be applied for only iOS version 9 as shown in the code snippet below.

if (device.platform === "iOS"  && parseInt(device.version) === 9) {
  $.mobile.hashListeningEnabled=false;
} /* when the device is ready */

Checking a working Cordova jQuery mobile app in iOS 9

Finally, you can check a complete working Cordova jQuery mobile app in iOS 9. This app is one of the examples of the “JavaScript Mobile Application Development” book which can be reached at:
http://www.amazon.com/JavaScript-Native-Mobile-Apps-Development/dp/1783554177/
https://www.packtpub.com/web-development/javascript-native-mobile-apps-development

The example app uses Apache Cordova 5.3.3 and jQM 1.4.5. Enjoy!

Creating Cordova jQuery Mobile Apps Rapidly

Cordova jQuery npm plugin allows you to add jQuery mobile’s ready-made templates to your existing Apache Cordova app using a neat easy-to-use CLI.

You can install Cordova jQuery npm plugin using the following npm command:
npm install -g cordova-jquery

Once you install it, you can start using it by executing cordova-jquery command from your Apache Cordova app’s root directory. The next six videos shows you how to create six Cordova jQuery mobile apps with different templates (Multipages, Header Navigation Bar, Persistent Navigation Bar, External Panel, Accordion, and ListView).

As shown in the videos below, after executing cordova-jquery command, all what you need to do is to choose the template you would like to apply to your existing Cordova app. All of the examples below work on Apache Cordova version 5.1.1 (The latest Cordova release until the moment).

Cordova jQuery plugin supports the following templates.

  1. Multiple Pages
    This template will apply a simple two page jQuery mobile template to your index.html file.
  2. Header Navbar
    This template will apply a three page jQuery mobile template to your index.html file that includes a header navbar for the header on each page.
  3. Persistent Navbar
    This template will apply a three page jQuery mobile template to your index.html file that includes a persistent navbar for the footer on each page.
  4. External Panel
    This template will apply an external panel to jQuery mobile. When this option is selected you will also be prompted for additional information such as which side of the page you’d like the panel to open on (left, right) and which reveal style would you like (reveal, push, overlay)
  5. Accordion
    This template will apply three sections’ jQuery mobile accordion template to your index.html file. Your existing content will be placed as part of the first section. It is important to note that you have to make sure that your existing content parent element does not use CSS “absolute” position in order to be controlled by the accordion section.
  6. List View
    This template will apply a jQuery mobile list view template to your index.html file. The first item of the list view points to your existing content page, and the second and the third items of the list view point to two placeholder pages.

The main objective of this plugin is to facilitate the usage of the jQuery Mobile in Apache Cordova, so feel free to use it and submit any issues you are facing to:
https://github.com/Open-I-Beam/cordova-jquery-npm/issues

Related Plugin Videos:

Back from ApacheCon North America 2015

I just get back from ApacheCon North America that was be held from 13 April to 16 April @Austin, Texas, USA. The conference organization was really great and there were a lot of attendees in the conference sessions.
IMG_8838

I had the chance to present “Apache Cordova In Action” in 13 April, the session had many attendees and I was really amazed by the energy, enthusiasm, and responsiveness of the attendees during the session.
Feedback

The session went great and I was glad to give a free copy of my JavaScript Mobile Application Development book to one of the attendees who answered a JavaScript quiz at the end of my session.
Books

I uploaded my session below:

Finally, I would like to thank all the organizers of ApacheCon conference for making the conference looks so great.
Main

Back from JavaLand Germany 2015

JavaLand2015Main

I just get back from JavaLand that was be held from 24 March to 26 March @Brühl, Germany. The conference organization was more than fantastic and there were a lot of attendees in the conference sessions.

I had the chance to present “Developing Mobile Applications using JavaScript” in 25 March, the session had many attendees and I was really amazed by the energy, enthusiasm, and responsiveness of the attendees during the session.
screenshot

The session went great and I was glad to give a free copy of my JavaScript Mobile Application Development book to one of the attendees who answered a JavaScript quiz at the end of my session.
Books

I uploaded my session below:

In the conference, I really had the pleasure to work in the IBM Bluemix booth, it was really a very exciting experience for me.
IMG_8443

javaland5
IMG_8419

Finally, I would like to thank all the organizers of JavaLand conference for making the conference looks so great.
IMG_8429_2
IMG_8444
IMG_8372_2

Speaking in ApacheCon North America 2015

Screen Shot 2015-03-21 at 1.15.10 AM
@Monday, April 13 10:45 AM, I will be speaking in ApacheCon North America conference (that will be held from 13 April to 17 April @Austin, USA) about Apache Cordova under the session title “Apache Cordova In Action”. My session will be a practical one, it will discuss why there is a need for Hybrid mobile development, the current challenges of mobile development, and how using Apache Cordova can help in overcoming many of these technical challenges. It also highlights the best practices of using Apache Cordova with jQuery mobile. then, it demonstrates a real Cordova mobile app that works on three mobile platforms (Android, iOS, and Windows Phone 8.1).

Finally, I hope it will be an interesting session for all the mobile development passionate :):
https://apacheconna2015.sched.org/speaker/hazems

Personally, it is my first time to visit Austin, beside enjoying technical stuff, I would like to visit some tourist places there, any suggestions are welcome :)?

I really wish to see all of you there in ApacheCon North America 2015!

Book Review #3 “Very good introduction into Apache Cordova”

Attached below the review of Werner Punz (a Web and Mobile Development Expert) about the “JavaScript Mobile Application Development” book:

JavaScript Mobile Application Development Book

JavaScript Mobile Application Development Book

Very good introduction into Apache Cordova
“This book is a very good introduction into Apache Cordova. It basically guides you from the basics to the API integration, then to the most common APIs. After that you get an overview on how to unit test the application and how to write your own plugins and in the end you will get a guide to the implementation of a complex Cordova app.
The only thing I personally found missing was in the IDE section a description on how to integrated Cordova in the Android Studio instead of Eclipse, since Eclipse is on its way out in the Android area of programming.”

Reference:

http://www.amazon.com/review/R19ORB0DCN16PA/

The book in Amazon:

http://www.amazon.com/JavaScript-Mobile-Application-Development-Hazem/dp/1783554177/

Review #2 about the “JavaScript Mobile Application Development” Book

Attached below the review of Safwat about the “JavaScript Mobile Application Development” book:

JavaScript Mobile Application Development Book

JavaScript Mobile Application Development Book

Excellent
“The book is an easy and comprehensive guide to whoever is interested in multi platform mobile development with examples it shows the full life cycle of developing mobile cordova apps.”

Reference:

http://www.amazon.com/review/R2N5YBCWJK44V2/

The book in Amazon:

http://www.amazon.com/JavaScript-Mobile-Application-Development-Hazem/dp/1783554177/

Review #1 about the “JavaScript Mobile Application Development” Book

Attached below the review of Zubin Wadia (the CEO & Co-Founder of CiviGuard, Inc, CEO & Co-Founder of RedRock IT Solutions, and Chief Technology Officer at ImageWork Technologies) about the “JavaScript Mobile Application Development” book:

JavaScript Mobile Application Development Book

JavaScript Mobile Application Development Book

A fine guide for web and native developers alike!
“Fabulous coverage of a powerful and mature cross-platform library. The book goes through the basics over the first five chapters, making sure native app developers aren’t alienated by the diaspora of HTML5/CSS3 web standards out there. A web developer will find that the book truly gets into its stride via the 5th, 6th, 7th and 8th chapters – which cover advanced Cordova API calls, platform specific code for iOS/Android/WinPhone, unit testing (critical) and finally a “Mega App” that puts your knowledge through some practical pacing.”

Reference:

http://www.amazon.com/review/R33GUDCXH5787J

The book in Amazon:

http://www.amazon.com/JavaScript-Mobile-Application-Development-Hazem/dp/1783554177/