Book

More Ionic CLI Updates

In preparation for my Safari Online Training, I was checking all the course instructions and discovered a surprise. With version 2 of the Ionic CLI, we could generate new Ionic apps based on external URLs, like GitHub repos. This is exactly what I did for two of the apps in my book. But, with the latest release of the Ionic CLI, this functionality has been disabled. Here are the steps you need to take to get back on track for each of those sample apps in the book.

IonicParks

Instead of just using the start command in the CLI, now we will need to manually overwrite the src directory with our new starter.

$ ionic start IonicParks tabs

In the IonicPark directory that was just created, delete the src directory.

Next, download the master branch from https://github.com/chrisgriffith/Ionic2Parks to another location. Unzip these files, then copy this src directory into the IonicParks directory. You should now be ready to work your way through the chapter.

IonicWeather

The same procedure for this application.

$ ionic start IonicWeather sidemenu

In the IonicWeather directory that was just created, delete the src directory.

Next, download the master branch from https://github.com/chrisgriffith/Ionic2Weather to another location. Unzip these files, then copy this src directory into the IonicWeather directory. You should now be ready to work your way through the chapter.

 

 

Advertisements

AngularFire 2 Updates

As I warned in the book about “everything in beta” (a phrase my friend Leif Wells loves to quote), some recent updates to AngularFire 2 impact the To Do application in my book.The reason behind these changes is by breaking AngularFire into smaller modules, your app will load and run faster (always a good thing). For example, if you don’t need the user auth module in AngularFire, no need to load it.

There are just a few minor changes, so let get started…

First, make sure you have installed the latest versions of AngularFire2 and Firebase. Check your package.json and check the version numbers:

"angularfire2": "^4.0.0-rc.0",
"firebase": "^3.9.0"
If you are referencing an older version, update the version numbers and update your node modules.
Next, in the app.module.ts file you need to now import this additional module:
import { AngularFireDatabaseModule } from 'angularfire2/database';

and then include it within the imports array:

imports: [
  BrowserModule,
  HttpModule,
  IonicModule.forRoot(MyApp),
  AngularFireModule.initializeApp(firebaseConfig),
  AngularFireDatabaseModule
]
The tasklist.ts file will also need two changes. The first is to change
import { AngularFire, FirebaseListObservable } from 'angularfire2';

to

import { AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database';

The AngularFire variable will need to be typed to AngularFireDatabase.

constructor(public navCtrl: NavController, public af: AngularFireDatabase, public dialogs: Dialogs) {...}

Finally, our reference to the data is now just:

this.tasks = af.list('/tasks');

And with that, your Ionic2Do app will run with the latest AngularFire.

Using the new Ionic CLI

With the release of the new Ionic CLI, several of the commands used throughout my book, Mobile App Development with Ionic 2, are now different. Here is a short table of the slight changes you need to make in order to use the new CLI:

v2 command v3 command
ionic start [appName] [template] --v2 ionic start [appName] [template]
ionic platform add|remove [platform] ionic cordova platform add|remove [platform]
ionic plugin add|remove [plugin] ionic cordova plugin add|remove [plugin]
ionic emulate ionic cordova emulate
ionic run ionic cordova run
ionic build ionic cordova build

If you ever have a question, the help in the CLI is greatly improved. You just need to add --help after any command.

Updating MOBILE APP DEVELOPMENT WITH IONIC

bookcoverJust as I thought I was done with the final edits on my Mobile App Development with Ionic 2 book, Ionic releases Ionic 3…

Fortunately, I was attending ng-conf, so I quickly got all the inside scoop on this new release from Mike and Josh from the Ionic team, who were also in attendance. Rather than delay the book, yet again to breaking changes, I opted to write new appendix that covers these new changes and what steps you need to take to have the three sample apps work under Ionic 3.

You can download the appendix now, and get up to speed using Ionic 3!

Mobile App Development with Ionic is Released!

My Ionic book has just been published by O’Reilly!

Mobile App Development with Ionic 2 Cross-Platform Apps with Ionic, Angular, and Cordova

Mobile App Development with Ionic 2 Cross-Platform Apps with Ionic, Angular, and Cordova

Learn how to build app store-ready hybrid apps with the Ionic 2/3, the framework built on top of Apache Cordova (formerly PhoneGap) and Angular. This practical guide shows you how to use Ionic’s tools and services to develop apps with HTML, CSS, and TypeScript, rather than rely on platform-specific solutions found in Android, iOS, and Windows Phone.

The book takes you step-by-step through Ionic’s powerful collection of UI component and then helps you use it to build three cross-platform mobile apps. Whether you’re new to this framework or have been working with Ionic 1, this book is ideal for beginning, intermediate, and advanced web developers.

  • Understand what a hybrid mobile app is, and what comprises a basic Ionic application
  • Learn how Ionic leverages Apache Cordova, Angular, and TypeScript to create native mobile applications
  • Create a Firebase-enabled to-do application that stores data across multiple clients
  • Build a tab-based National Park explorer app with Google Map integration
  • Develop a weather app with the Darksky weather API and Google’s GeoCode API
  • Debug and test your app to resolve issues that arise during development
  • Walk through steps for deploying your app to native app stores
  • Learn how Ionic can be used to create Progressive Web Apps

The digital version is available now, and the print edition will be out soon. Amazon, Barnes & Noble, or O’Reilly.

jQuery 2.0 Development Cookbook

jQuery 2.0 Development Cookbook The problem with frameworks that have been around for sometime, is you have to be careful of the solutions that might exist for a particular problem you might be having. jQuery is certainly one of those frameworks that has a long legacy. The jQuery 2.0 Development Cookbook aims to solve some of these issue by collection a nice set of solutions to many standard problems using the newer 2.x branch of jQuery.

Leon Revill takes the reader from some of the more basic solutions, such as standard DOM manipulations, through more and more advanced solutions. The later chapters of the book being to touch on the basics of both jQuery UI and jQuery Mobile.

One issue I did have with the book is the author did spend a modest amount of time covering some server side portions. I appreciated the effort to introduce the reader to some more topics, but wish the he had just pointed the solution. I also would have like to have seen more advanced recipes that really show the capabilities of using jQuery

Overall, found the book useful as a traditional reference for working with jQuery 2. New developer to the jQuery framework will find this reference useful, and intermediate developer might pick up a trick or two as well.

(Disclaimer: The publisher supplied a copy for review)

What’s New in Adobe AIR 3 & Flash Player 11 free ebooks now available

I was honored to be one of the technical reviewers for these publications. Go grab a copy and get up to speed on the new features in the Flash Player and Adobe AIR.

What's New in Flash Player 11 Quickstart Guide for Browser-Based ExperiencesWhat’s New in Flash Player 11
By Joseph Labrecque

This free ebook will present you with a full rundown of all the new features in the upcoming Flash Player 11 runtime. Along with each feature, if applicable, will be a demonstration of how to employ the new feature. There’s also be a short introduction to Flash Player and a chapter dedicated to providing you with additional resources.

What's New in Adobe AIR 3What’s New in Adobe AIR 3
By Joseph Labrecque

This free ebook will present you with a full rundown of all the new features in the upcoming AIR 3.0 runtime. Along with each feature, if applicable, will be a demonstration of how to employ the new feature. There’s also be a short introduction to AIR and a chapter dedicated to providing you with additional resources.