Bower or NPM

I’ve been trying to chose between Bower or NPM as the tool I’m using for installing libraries. After using both for a little while I’m going to use Bower.

The main reason for this is because Bower is more for ‘front-end’ work, while I see NPM as more of a Node library loader. For me as a front-end developer I use Bower to get all the libraries I need for a project, for example AngularJS, Bootstrap and Gulp.

I see NPM as more of a tool for creating and managing your Node projects. As my experience using Node/ExpressJS grows I’ll probably use NPM a lot more.

But for me both package managers are a fantastic, when I look back at when I started building websites and I had to find, download, unzip, copy over to my folder, update the links in my HTML, all to install jQuery. So now we as web developers are lucky to have tools like Bower and NPM.

 

Using Ionic View

Today I’ve used Ionic’s new feature, Ionic view. This is the first time I’ve used this and it’s fantastic.

The basic idea behind Ionic View is that you build your app, then ‘upload’ it to Ionic’s servers. Once there you download the Ionic View app (which is available for both iOS and Android). Then with you use your Ionic.io log in credentials and Ionic View lists the apps that you’ve uploaded.

Then in the Ionic View mobile app you select the project you want to view, this then downloads the files to your phone to view it.

Ionic View is a great system, makes getting a early working version of your app on a phone so quick and easy.

A new series on learning Ionic from Josh Morony

Josh Morony has just started a new series on learning Ionic. So far part 1 is going through the basics of creating and setting up a Ionic app, but it is an interesting series, because Josh has mainly developed mobile apps using Sencha, which I’ve never used. Seeing how a developer moves from alternative technology to Ionic shows that Ionic is getting some real traction and become a real contender for mobile hybrid apps.

 

First Blog Post Using Desk

Using Desk for the first time. I’ve been a fan of Desk for a while, reading John’s blog and his videos about developing Desk.

So finally I thought I’d pay for the app. And this is my first post using Desk.

A couple of the things I like about Desk is the full screen editing, which forces you just to write. I also like that it links to multiple blogging platforms, there aren’t many apps that link with so many different blogging platforms. So I was really impressed with Desk.


jQuerymobile – what it needs to be good again

Working with jQuerymobile today, it’s so hard to go back to that after working with Ionic for the last few weeks. jQuerymobile is good and the original mobile/hybrid web framework, but it is now so far behind. For me this it what it needs:

  • A new grid system or one that has more classes and options to layout screens
  • New UI, the current on looks a little dated compared to other mobile frameworks
  • UI support for both iOS and Android, not one look for both platforms. This is especially important with Google’s drive to Material Design
  • Ability to work well with mainstream JS frameworks. If you have tried getting jQuerymobile to work with Angular and the routing within Angular you know how difficult it is to get working.
  • More components

jQuerymobile isn’t terrible its just getting a little stale and needs a new UI and built in support for a major JS framework (KnockoutJS works well with it, so does Backbone and HandlebarsJS).

The main thing jQuerymobile needs is a driving force behind it. Ionic has Drifty, KendoUI has Telerik, both companies are pushing forward with their hybrid frameworks, but who is driving jQuerymobile forward?

 

Ionic CLI tip

Just reading through the CLI documentation on the Ionic site, found this small tip for updating the version of Ionic you have in a project.
To do this go to your project in terminal, then run:

ionic lib update

This then updates Ionic for that project to the latest, nice….

App Store Realities — Article by Stephen Orth

I’ve been a fan of Chris Beshore and his iOS newsletter, though I’m not a iOS developer the newsletter does have some great articles. One of them in this weeks newsletter is a story by Stephen North on his journey as a iOS indie developer.

Its a great read and inspiring to hear someone has started this journey as a mobile indie developer. Worth checking out.

https://medium.com/@sorthman/app-store-realities-7b54af3f574e

Loading data at startup in a Ionic app

I’m working on a Ionic app that loads data at startup and also checks to see if this data is available everytime a view loads.

So to do this I’ve created a Service that loads the data, this I can call within the run function in the main JavaScript file, where I set up the routes using ui-router.

These run functions, and there can be more than one, are called when the application first runs.

.run(function(StartupService){
    StartupService.loadData();
})

In the above example I can call a function from my StartupService. The loadData() function then can load the data into localStorage so it is accessible when offline.

This was all fine, but I also wanted to check when a view loads to see if the data is accessible from local storage. Looking through the great documentation on the Ionic website there are a set of events that the ion-view has including:

  • $ionicView.loaded
  • $ionicView.enter
  • $ionicView.leave
  • $ionicView.beforeEnter
  • $ionicView.beforeLeave
  • $ionicView.afterEnter
  • $ionicView.afterLeave
  • $ionicView.unloaded

All these lifecycle events can be listened for, using the $scope.$on event handler.

So I used the $ionicView.enter event to make a call to see if the data was available in local storage.

This may not be the ideal approach, but it does work. The one thing I did get from this was the use of the event lifecycle for views and how it can help to tie into them.

A great article on these views and the lifecycle events is Navigating the Changes from the Ionic blog.