The “James Bond” of programming: Javascript And Its Importance To Business Development

James Bond Skyfall Image
If James Bond can be rebooted, as Daniel Craig has done back in 2008, then so can programming languages.  That is the backstory for JavaScript, which has grow in capability and importance since its pop up window days.

JavaScript has been rising in importance for web and app design over the past few years. It’s an old programming language, much like James Bond is an old movie series. But just as Daniel Craig revitalized the series back in 2008 with Casino Royale, culminating in 2015’s Spectre,  JavaScript is being revitalized for a new era of mobile devices and IoT that was not in existence in its 1996 debut in Netscape.

Part of the reason stems from the canvas element in HTML5. Because it is called out in a container, called <canvas>, Javascript can be used to manage the elements. This gives Javascript the capability to manage elements in an unprecedented way, such as data visualization.

Another source is a growing number of Javascript libraries for interacting with the document object model. Originally Javascript was used for pop up windows – to instruct the browser to show another window automatically – or infamously, depending on the content.

But new uses developed, requiring more interaction with the DOM in the browser. The DOM is an operational code within the browser that is accesses to tell the browser how to render a page or another media that appears in a browser.

The business value is the capability for developing browser features that the user can see and interact while cutting calls to a server and reducing time to render a site or app.

A dashboard with visual elements, telling the story of trends that lead to business decisions, is a great example. The data can be called without multiple calls to a server, permitting visualization for tablet devices.

You can read how JavaScript is influencing technology in the following posts:

CMSWire – How To Use JavaScript for App and IoT Development

IOT Solutions – The IoT Ushers In the Ascendance of JavaScript

Also check out this Zimana JavaScript post on coding basics that can help you understand JavaScript better for your website and app development plans.

1 Comment

What is Javascript? An Explanation and Helpful Resources

Ok, by now, if you are maintaining a website or thinking of maintaining a website, you may have heard of the programming languages used to create a site or app. One of those languages typically mentioned is JavaScript.   Let’s cover a few basics, and some resources on where to learn more.

The Essential Definitions

JavaScript is a dynamic scripting language that can instruct the browser to make changes to page elements after loading a page.  Its value is making site elements function more dynamically without  requiring a call to a server.  This can provide some benefits, such as improving  performance loading a website page or an app in the browser.

Javascript generally appears in one of 3 positions in a website or app:

  1. in the head of a webpage
  2. in the body of a webpage
  3. Maintain a separate file. The benefits of a separate file for the J/S code are:
    • easier for controlling a version of a libraries
    • universal share across HTMLs

Web developers describe JavaScript as an Object Oriented Programming Language.  An Object Oriented Programming Language essentially treats each element in a page as an object according to the script called in Javascript (or in another language, such as Ruby). Thus everything belongs to something else, and everything has a relationship.  This structure makes it possible for an image position to be rotated or a  section of text to scroll into view. The image or text sections are treated as objects.

Each object generally has a property – a property is a description of that object.   Think of an object and a descriptive phrase that you would imagine if you close your eyes.  An object named dish would be smooth. An object named water would certainly be wet.

Each object can be made active or dynamic through a method – an action called within a javascript script.  So now think on object and an activity – a dog (object) barks (method), a sports car engine “roars”.  Objects and methods are usually called through a function –  statements that perform a task.  A function takes the general form below:

 function functionname ( ) { }

Additional parameters are described in the parenthesis, while the objects and methods – the elements and associated actions – appear in the brackets.  Below is an example of a for loop function.

for (var i=0; 1 < numbers.length; i++)
     // Print value to console

(The double slashes “//” are meant to provide a comment instead of a function.)

Learning about Libraries and JQuery

So with the thought of webpage elements as objects, writing a Javascript programs sounds easy, right?  Not exactly.  Unlike other well-known languages, Javascript is not compiled – that means there’s no need to have another program of software compile and interpret instruction.   Thus JavaScript uses regular text which can be interpreted.

But every browser has its own interpreter for the text, a Document Object Model (DOM).   A DOM model is an interface, a means to “talk” to different elements in a page.  So Javascript has to account for that difference.

In texts and posts on Javascript or in developer gatherings, you’ll read and hear a lot about libraries (you’ll hear something similarly described in other object oriented languages, such as gems which are used in Ruby). Libraries are needed to account of different operational features of the major browsers, despite acceptance by browser makers of protocols.  Browsers have different implementation of a DOM, so libraries provide a unified view of Javascript code.

Libraries are called with the following element notation:

<script src=”chart.js”></script>

in which a script, chart.js, is a called as a source.

In many cases you’ll hear the name JQuery come up. JQuery is a JavaScript library, a file that highlight elements in the same style as a Cascading Style Sheet (CSS)  does for a webpage.  Its purpose is to provide a set of objects and methods that can be called while minimizing the interaction with the DOM for a browser. The result is a case  Think of it as a sort of API which interact with the DOM in the form of a library.

Tools and Associated Libraries

To create that great method and ensure that is functions in the grand scope of your app or site, a little debugging becomes required.  To debug means to review code and edit as needed.  The following are tools and resources that make debugging code much easier:

  • JSLint – This is an in-browser debugging testing software
  • JSfiddle – This is a development platform for creating Javascript frameworks. The screen features four quadrants – one for HTML, one for CSS, and one for Javascript, with the fourth displaying the results from running a code. The platform provides a means to show code alongside each other for easier, more holistic QA of  a trial code.
  • JSBin – Like JSfiddle, this console lets user try out HTML, CSS, and Javascript code on screen. Users can save and share their creations for expert opinions.
  • Jshint – This is an error checker for verifying Javascript code
  • Codeacademy – has a number of helpful pages on code, including a dedicated Javascript section
  • Qunit – testing framework to verify jQuery code
  • Venkman is another debugging software, available from Mozilla, the creator of the Firefox browser
  • Karma is a testing environment
  • Mootools – an open source JavaScript framework meant for advanced development for cross browser code

Books and Website Resources

The book Javascript and JQuery  by Jon Duckett has additional resources available at its supporting site, I wrote a review on it at Small Business Trends.  It’s an excellent modern book that offers a solid overview on Javascript and associated subjects like JSON, JQuery, and APIs.

You can also check out Programming Javascript Applications, which is a bit more advanced book but also offers insight into how to make the most of Javascript.

The site offers a number of resources and covers the basics on JQuery.  Not only is this a good resource of JQuery-associated features like plugins, but the site can also provide some understanding of how libraries in general work.

There are online video sites, such as – This website offer programs on Javascript techniques – there is a dedicated page for frameworks.  These have a subscription price, and can be a bit advanced  – users who are comfortable with GitHub will appreciate the GitHub availability.

There is good ol’ Tuts – this site hosts a number of how to related to web design and development.  You can check out the site here.

You can also check out the descriptions for popular frameworks, such as AngularJS.  The main site offers several tutorials, and some advanced definitions that can help one understand JavaScript much better.

Also, need a text editor for practice – consider one of these text editors outlined in this Zimana post.  Sublime and BBEdit are just two of the ones mentioned here in which a user can create a JavaScript script.

Analytics Tip: How The Google Analytics Measurement Protocol Hit Builder Helps Your Business

Google Analytics Measurement Protocol Example

When I first describe analytics to clients back in the day, I direct their attention to two definitions, metrics, which are scores to measurement a certain behavior, and dimensions, which show where the behavior occurred.  I use this approach to explain what should appear in their reports.

But today that explanation falls short of what commonly worries marketers: what data should appear in a dashboard and what to do about it. Web analytics solutions are deemphasizing “web” in their functionality, embracing means to incorporate external data into the reports.   This new feature has influenced my explanation to clients – that they need to consider the customer experience beyond a webpage.

Measurement Protocol in Google Analytics is meant to incorporate digital devices metrics into the analytics reports. It achieves this through a HTTP call to the Google Analytics server used for creating reports.
Adding Measurement Protocol takes a developer’s insight to appreciate the parameters and diagnose if a call actually worked correctly.  To make calls easier for developers to verify, Google introduced a new online tool called Measurement Protocol Hit Builder.   Developers construct a test measurement protocol and then receive a validation if the call functions correctly.
So how does this work? Well there are several parameters that are entered at the Hit Builder page.  The parameters support a POST or GET HTTP server call to the Google Analytics server.  These parameters form a payload – the data that is to be returned from the server.
There are four standard parameters in the protocol:
  • Protocol release version
  • Tracking ID, which represents the Google Analytics property or the account to which the data is associated
  • Client ID for a unique user
  • A “hit type,” which gives an indication of the type of interaction collected for a particular user. There are several selections, each a match to metrics typically seen in a Google Analytics report.
In addition to these main parameters, there are optional parameters meant to match device data to dimension and metrics within Google Analytics. Google describes the entire list of optional parameters here
Once these parameters are entered, the developer receives an on-screen indicator of acceptance at the server.
All of this implies how Google Analytics, a web analytics tool, has gone further than being a tool strictly for websites.  The same can be said for other solutions. Many analytics tools, such as WebTrends Streams and Adobe Analytics, have also incorporated external data into their reports.
The best recommendation for a marketer deciding what to do first is to see If a web analytics solution is already in usage.  The marketer can then verify which data collection is in place and decide what kinds of data can be added, if necessary.

The IoT-related trend in cross device measurement has influenced how marketers must identify data that appears in their dashboards and reporting tools.   That change in outlook brings new meaning to dimensions and metrics, and brings new ideas into how analytics can aid your business.

Google Analytics Trash Can Data Recovery Feature: What The Trash Can Is For

Google Analytics Trash Can
Google Analytics Provides a Neat Way to Recover Deleted Data, Assuming a Short Period Had Passed Between Deletion and Error Discovery
Every once in a while, data needs to be removed from an account. Every once in a while, the removal is accidental.  Google has provided few options (read “ZERO!”) if the data is lost.  Been so since its introduction in 2006.
Well now times have changed, and they have brought new options for managing analytics data. Earlier in 2015 Google introduced a beta feature for Google Analytics called Trash Can. This feature allows users to recover deleted data associated in an analytics account.
To access Trash Can, users navigate to the admin page in the Google Analytics accounts.  The can appears in the account column.  Select it and then choose the data that you want to recover.
Data from within accounts, properties, and views can be recovered.  35 days from the date of deletion is the threshold for how far back deleted data can be retrieved.
So while trash can provides another way to recover, it is still important to check on the data regularly. If data is deleted and checking data is conducted in periods beyond 35 days, then it’s possible to overlook the point where deleted data is recoverable.   Overall it is a useful feature for those who do make mistakes despite regular usage.

Mobile Trends in Africa – Infographic by @GSMA

Mobile devices play a big part in internet usage, but they are more of necessity in places outside of the United States. African countries have been developing services with mobile phones in mind, since many have higher penetration rates among their populations.

I wrote about the leader in African Mobile in an earlier blog for UBM Tech – check out the post Mobilizing South Africa.  But that was back in 2012, where SMS was a key communication delivery platform and smartphones had not fully penetrated the market.

3 years later smartphones are making headway, encouraging local app development and economic expansion.  So says the latest report from GSMA, an organization representing uniting nearly 800 operators with more than 250 companies in the broader mobile ecosystem.

The team summarizes the report on their main page.

The mobile industry in Sub-Saharan Africa continues to scale rapidly, reaching 367 million subscribers in mid-2015. Migration to higher speed networks and smartphones continues apace, with mobile broadband connections set to increase from just over 20% of the connection base today to almost 60% by 2020. Falling device prices are encouraging the rapid adoption of smartphones, with the region set to add more than 400 million new smartphone connections by 2020, by which time the smartphone installed base will total over half a billion. – See more at:

You can download a copy of the report as well as learn more about GSMA.  An infographic is also available; You can view it below.

Stats On Mobile Device Usage In Africa