24. January 2017

A New Helper for Nodejs.cli Applications

So much about the configuration of a node js application is stored in npm’s package.json file found in every project. There is quite reasonable support for managing the dependencies record in the package.json, and some of the author information can be configured using npm init or if you are an npm ninja, you can even configure appropriate defaults for some elements in the package.json. However other parts of package.json are neglected by the npm tool set, one of which is the section for command line tools.

more

21. January 2017

Getting Started with an Android Widget Populated with Javascript and Apache Cordova

This is the forth part of a tutorial demonstrating the ability to re-use JavaScript in many different environments. The first part dealt with the creation of the re-usable service, a simple command line wrapper which called the service as well as a simple test which checks the service is performing as expected. The second part of the tutorial discussed the development of a simple web application based on that service, using browserify to wrap the service so that it will run in any modern browser. The third part took the web app, and showed you how to use Apache Cordova, a platform independent JavaScript mobile phone development framework, to make your simple app run on modern smartphones.

This fourth part of the tutorial assumes that you have understood the concepts so far raised in earlier parts of the tutorial.

more

21. January 2017

Tutorial with Examples - Converting a Simple Web Application to Cordova Mobile App

This is the third part of a tutorial demonstrating the ability to re-use JavaScript in many different environments. The first part dealt with the creation of the re-usable service, a simple command line wrapper which called the service as well as a simple test which checks the service is performing as expected. The second part of the tutorial discussed the development of a simple web application based on that service, using browserify to wrap the service so that it will run in any modern browser. This third part will take the web app, and show you how to use Apache Cordova, a platform independent JavaScript mobile phone development framework, to make your simple app run on modern smartphones.

This third part of the tutorial assumes that you have understood the concepts so far raised in earlier parts of the tutorial.

more

29. November 2016

A Simple Web Application for Querying Bitcoin Price Information

This is the second part of a tutorial demonstrating the ability to re-use JavaScript in many different environments. The first part dealt with the creation of the re-usable service, a simple command line wrapper which called the service as well as a simple test which checks the service is actually working as expected. This second part of the tutorial assumes that you have understood the points raised in the first tutorial.

more

29. November 2016

A Command Line Tool for Querying Bitcoin Price Information

This tutorial demonstrates how to create a nodejs command line tool, and a very basic reusable JavaScript service which can be re-used in many different environments. It also touches on writing tests for the service which is good practice. The example of a bitcoin price querying service is used because the API is freely available, and doesn’t require any authentication or API keys and so one which can complicate what is designed to be a simple tutorial.

This tutorial assumes you’ve successfully installed nodejs and have a code editor. The example here will always try to be operating system agnostic. It should work on any platform that nodejs runs on.

more

29. November 2016

How to reuse JavaScript in a variety of environments

By many accounts, JavaScript really has become a universal scripting language. This is, in large part, is thanks to the v8 JavaScript engine originally developed for the Google Chrome browser and then extracted to run as a separate engine on a server or on the desktop without the browser.

Added to that you also have Apache Cordova which allows you to run a web application inside the phone.

There are a number of benefits to this for especially for developers. A developer can write a lot of business logic and to run directly on the developers desktop, greatly facilitating testing and debugging. Then by adding various layers of wrapping its possible to eventually create a web application and then finally a mobile application.

more