JavaScript for Line of Business Applications
560.1K views | +85 today
JavaScript for Line of Business Applications
Keeping track of current JavaScript Frameworks that help design your clientside Business Logic Layers.
Curated by Jan Hesse
Beam to my Inbox:
Your new post is loading...
Your new post is loading...!

Gulp is awesome, but do we really need it?

Gulp is awesome, but do we really need it? | JavaScript for Line of Business Applications |
I've been using Grunt and Gulp for some time now. However, I've realized lately that with a simple package.json I can do the same, but more manteinable and with less code. In this post, I'll explain how we can do it!!
No comment yet.!

Creating a Web-app with Grunt – Part 2

Creating a Web-app with Grunt – Part 2 | JavaScript for Line of Business Applications |

In this instalment, we will build on what we covered previously during the first part of the tutorial in order to create the logic of the Breeze application – loading and displaying current temperature information for various locations by making AJAX requests to the OpenWeatherMap API. We’ll also improve the Grunt workflow and briefly look at SCSS variables and mixins.

No comment yet.!

Node, Grunt, Bower and Yeoman - A Modern web dev's Toolkit

Node, Grunt, Bower and Yeoman - A Modern web dev's Toolkit | JavaScript for Line of Business Applications |

This article aims at introducing you to some of the currently most popular tools when developing modern web applications with JavaScript. These are totally not new at all and have been around for a couple of years now. Still, I found many devs still don't use or know about them (as you might), wherefore this article tries to give you a quick, concise intro to get you started.

No comment yet.!

Building front-end assets for web development

Building front-end assets for web development | JavaScript for Line of Business Applications |

Building, transpiling, or compiling front-end assets, whichever way you want to state it, modern web development is best accomplished using tools like LessCoffeeScriptBrowserifyRequireJs, or any other variant that does or will exist. The difficulty comes in unifying this vast pool of resources to arrive at the most efficient application you can for todays standard web browsers. But, more importantly that they leave the door open for you to migrate to the next powerful tool without significant effort. It is important to note that these technologies are not required to write an efficient application, but they are paramount when developing a maintainable codebase.

No comment yet.!

Scaffolding AngularJS SPA(s)

Scaffolding AngularJS SPA(s) | JavaScript for Line of Business Applications |

While working on many Web SPA projects, I frequently need to present concepts and rationalizations on SPA scaffolding considerations.

Typical Questions:

  • What client tools should I use ?
  • What is NPM and Bower ? And why should I use both ?
  • How should I structure my code to scale ?
  • Why would I need/want a NodeJS server ?

Slide topics:

  • Full-Stack and development tools such as NPM, Bower, Grunt
  • SPA source code packaging
  • Present a middle-tier, NodeJS app-server solution with custom routing.
No comment yet.!

Supercharging your Gruntfile: How to squeeze the most out of your build configuration.

Supercharging your Gruntfile: How to squeeze the most out of your build configuration. | JavaScript for Line of Business Applications |

Learn how to squeeze the most out of your Gruntfile, by splitting it across multiple files, autoloading, concurrent tasks and smart notifications.

In this article, we won’t focus on what numerous Grunt plugins do to your actual project code, but on the Grunt build process itself. We will give you practical ideas on:
* How to keep your Gruntfile neat and tidy,
* How to dramatically improve your build time,
* And how to be notified when a build happens.

Time for a quick disclaimer: Grunt is just one of many tools you could use to accomplish the task. If Gulp is more your style, great! If after surveying the options out there, you’d still like to build your own toolchain, that’s ok too! We chose to focus on Grunt for this article due to its strong ecosystem and long-standing user base.

No comment yet.!

Grunt vs Gulp - Beyond the Numbers

Grunt vs Gulp - Beyond the Numbers | JavaScript for Line of Business Applications |

And so the evolution of front-end development continues with Gulp, the new build system that has already garnered praise amongst many web developers.

After spending some time reading the docs and playing around with Gulp, I’ve finally decided to test its adoption in an existing project that currently uses Grunt. From what I’ve seen so far, Gulp is blazingly fast when compared to Grunt for similar tasks.

Let’s dig a bit deeper though, and get a little understanding of the differences between Grunt and Gulp, beyond superficial speed comparisons.

In this post we’ll cover:

* A shallow dive into Gulp, and how it compares with Grunt.

* Things to consider when choosing between the two tools.

Goran Peoski's curator insight, February 2, 2014 6:18 AM
gulp.js - the streaming build system!

Automated JavaScript Tests Using Grunt, Phantomjs, and QUnit

Many developers and development shops have embraced testing in their server side code – either using a TDD model, or sometimes just with unit or functional tests created on the fly – but very few developers I talk to test their front end code beyond eyeballing it in a few browsers (or if they’re lucky, with a service like BrowserStack). And even fewer of those use any kind of automation. In this post I’m going to try and help out that majority of you who aren’t testing – or maybe just aren’t automating.

Lately I’ve been converting a number of my jQuery plugins over to Github – something the new jQuery plugin site is requiring – and while doing so I’m refactoring and adding tests with QUnit(created by the same folks that write the jQuery core). I realized pretty quickly that having to go to the browser, hard refresh, and then run the tests again after every change was a time killer, but I didn’t want to write a whole bunch of tests and then go check the results, otherwise I could be tracking down bugs (in my code and the tests) for days. Instead I set up some automated testing using Grunt, PhantomJS, and a couple Grunt plugins. Here’s how.

No comment yet.!

Gulp is the new black.

Gulp is the new black. | JavaScript for Line of Business Applications |

There are many things I like about Grunt, and many of them are still true.

I like that Grunt gives you the choice of being a Config file or just straight up JS (write your own functions using Node Modules).

I like that it had it's own API to do things and forced plugins to be written in a common way (much like jQuery) - this made it easy to A : Use plugins quickly; and B : Write plugins.

I like that it garnered a quick following and is now used by a lot of Open Source projects. This in no doubt helped spawn a metric-shitton of plugins.

But there was room for more. There's always room for more.


gulp.src takes a glob (a list of files) and then you just pipe them through plugins. This is the thing with Gulp, it's all about Streams. Just think of it like the chaining you do with jQuery.

I like Gulp a lot, it feels like discovering Grunt all over again. I like the way its code over configuration; don't get me wrong, I love the simplicity of Gruntfiles and I think it gives opportunities to those who wouldn't normally write their own scripts to assist with automation to dive in. I am also aware that with Grunt you can choose to have code over configuration.

Grunt and Gulp can co-exist to serve different groups of people, for now though, im sitting with Gulp. I can't wait to start doing more with it.

No comment yet.!

Grunt for People Who Think Things Like Grunt are Weird and Hard

Grunt for People Who Think Things Like Grunt are Weird and Hard | JavaScript for Line of Business Applications |

I bet you’ve heard of Grunt. Well, Grunt is a task runner. Grunt can do all of those things for you. Once you’ve got it set up, which isn’t particularly difficult, those things can happen automatically without you having to think about them again.

But let’s face it: Grunt is one of those fancy newfangled things that all the cool kids seem to be using but at first glance feels strange and intimidating. I hear you. This article is for you.


In production, we would concatenate all those files together for performance reasons (one request is better than three). We need to tell Grunt to do this for us.

But wait. Grunt actually doesn’t do anything all by itself. Remember Grunt is a task runner. The tasks themselves we will need to add. We actually haven’t set up Grunt to do anything yet, so let’s do that.

The official Grunt plug-in for concatenating files is grunt-contrib-concat. You can read about it on GitHub if you want, but all you have to do to use it on your project is to run this command from the terminal.

No comment yet.!

Learning 30 Technologies in 30 Days: A Developer Challenge

Learning 30 Technologies in 30 Days: A Developer Challenge | JavaScript for Line of Business Applications |

I have taken a challenge wherein I will learn a new technology every day for a month. The challenge started on October 29, 2013. Below is the list of technologies I've started learning and blogging about. After my usual work day, I will spend a couple of hours learning a new technology and one hour writing about it. The goal of this activity is to get familiar with many of the new technologies being used in the developer community. My main focus is on JavaScript and related technologies. I'll also explore other technologies that interest me like Java, for example. I may spend multiple days on the same technology, but I will pick a new topic each time within that technology. Wherever it makes sense, I will try to show how it can work with OpenShift. I am expecting it to be fun and a great learning experience.


October 29, 2013 – Day 1: Bower—Manage Your Client Side Dependencies. The first day talks about Bower and how you can use it.

October 30, 2013 – Day 2: AngularJS—Getting My Head Around AngularJS. This blog talks about how you can get started with AngularJS. It is a very basic blog and talks about how to build a simple bookshop application.

October 31, 2013 – Day 3: Flask—Instant Python Web Development with Python and OpenShift. This blog introduces Flask–a micro framework for doing web development in Python. It also reviews “Instant Flask Web Development” book and port the sample application to OpenShift.

November 1, 2013 – Day 4: PredictionIO—How to A Build Blog Recommender. This blog talks about how you can use PredictionIO to build a blog recommender.

November 2, 2013 — Day 5: GruntJS—Let Someone Else Do My Tedious Repetitive Tasks. This blog talks about how we can let GruntJS perform tedious tasks on our behalf. It also covers how we can use grunt-markdown plugin to convert Markdown to HTML5.

November 3, 2013 — Day 6: Grails–Rapid JVM Web Development with Grails And OpenShift. This blog talks about how we can use Grails to build web application. Then we will deploy the application to OpenShift.

November 4, 2013 – Day 7: GruntJS LiveReload--Take Productivity To Another Level. This blog talks about how we can use GruntJS watch plugin and live reload functionality to achieve extreme productivity.

November 5, 2013 - Day 8: Harp--The Modern Static Web Server. This blog post will discuss the Harp web server and how to install and use it

November 6, 2103 - Day 9: TextBlob--Finding Sentiments in Text

November 7, 2103 - Day 10: PhoneGap--Mobile Development for the Dummies

November 8, 2013 - Day 11: AeroGear Push Server--Push Notifications Made Easy

November 9, 2013 - Day 12: OpenCV--Face Detection for Java Developers

November 10, 2013 - Day 13: DropWizard--The Awesome Java REST Server Stack

November 11, 2013 - Day 14: Stanford NER--How To Setup Your Own Name, Entity, and Recognition Server in the Cloud

November 12, 2013 - Day 15: Meteor--Building a Web App From Scratch in Meteor

November 13, 2013 - Day 16: Goose Extractor--An Article Extractor That Just Works

November 14, 2013 - Day 17: JBoss Forge--Build and Deploy Java EE 6 AngularJS Applications using JBoss Forge and OpenShift

November 15, 2013 - Day 18: BoilerPipe--Article Extraction for Java Developers

November 16, 2013 - Day 19: Ember--The Missing EmberJS Tutorial

November 17, 2013 - Day 20: Stanford CoreNLP--Performing Sentiment Analysis of Twitter using Java

November 18, 2013 - Day 21: Docker--The Missing Tutorial

November 19, 2013 - Day 22: Developing Single Page Applications with Spring, MongoDB, and AngularJS

November 20, 2013 - Day 23: TimelineJS--Build Beautiful Timelines

November 21, 2013 - Day 24: Yeoman Ember--The Missing Tutorial

November 22, 2013 - Day 25: Tornado--Combining Tornado, MongoDB, and AngularJS to Build an App

November 23, 2013 - Day 26: TogetherJS--Let's Code Together

November 24, 2013 - Day 27: Restify--Build Correct REST Web Services in Node.js

November 25, 2013 - Day 28: OpenShift Eclipse Integration for Java Developers

November 26, 2013 - Day 29: Yeoman Chrome Generator--Write Your First Google Chrome Extension

November 27, 2013 - Day 30: Play Framework--A Java Developer Dream Framework

Benjamin Dean's curator insight, November 30, 2013 10:24 AM
I love a good challenge...accepted!!

Eliminating Code Smell With Grunt

I love clean code. There, I said it. I pride myself on passing strict linting standards and keeping my code easy to read. It's not just a personal proclivity, but a choice I hope benefits other developers.

My general experience with teams has been that code style is something people care about and have strong personal preferences. Typically, at some point people get tired of dealing with inconsistency and a standardization meeting is called. This is, of course, an important discussion to have. The problem that tends to occur is either lack of documentation or lack of enforcement of the agreed upon style. Additionally, new team members or contributors may not have access to a clear set of rules.

Beyond the challenge of defining rules lies the supreme annoyance of enforcing them. Code reviews become cluttered with nits to be picked. Time is wasted. The solution I settled on was simply automating the conformance process.

I set forth to solve this problem:

Establish coding standards that are clearly defined and automatically verifiable.

Jan Hesse's insight:

No comment yet.!

Building Web Apps With Yeoman And Polymer: Scaffold your webapps with modern tooling

Building Web Apps With Yeoman And Polymer: Scaffold your webapps with modern tooling | JavaScript for Line of Business Applications |

Tooling for scaffolding Polymer web apps

As I mentioned earlier, Polymer is a library of polyfills and sugar which enables the use of Web Components in modern browsers. The project allows developers to build apps using the platform of tomorrow and inform the W3C of places where in-flight specifications can be further improved.

generator-polymer is a new generator for Yeoman that helps you scaffold out Polymer apps using Yeoman, letting you easily create and customize Polymer (custom) elements via the command line, and import them using HTML Imports. This saves you time by writing the boilerplate code for you.

No comment yet.!

Automating JavaScript tests with QUnit, PhantomJS and Grunt

Automating JavaScript tests with QUnit, PhantomJS and Grunt | JavaScript for Line of Business Applications |
QUnit’s setup is fairly simple and is easy to use. To get started, I will be using a simple boilerplate webpage. Notice that the two files required for QUnit (qunit-x.js and qunit-x.css) are included in the page source. Additionally, I have some inline JavaScript for which QUnit tests will be written. home.html Within tests.js, I …
No comment yet.!

How to Use npm as a Build Tool

How to Use npm as a Build Tool | JavaScript for Line of Business Applications |

Last month I noted my opinions on why we should stop using Grunt, Gulp et al. I suggested we should start uing npm instead. npm's scripts directive can do everything that these build tools can, more succinctly, more elegantly, with less package dependencies and less maintainence overhead. 

No comment yet.!

Grunt & Gulp – an overview

Grunt & Gulp – an overview | JavaScript for Line of Business Applications |

Most often people associate both Grunt & Gulp with building systems but they are not restrict to that and both can form part of the of a front end dev’s day to day development process being able to run tests & reload html when altered, etc

  • Both use Node.js to provide their functionality
  • Installed via NPM & need both a global and project specific install
  • Have a plugin eco-system
  • Their configuration files are valid JavaScript
  • Configuration consists of “Tasks”
No comment yet.!

Trimming Down jQuery With Grunt

Trimming Down jQuery With Grunt | JavaScript for Line of Business Applications |

In the past several releases, the jQuery team has reorganized their file structure to make the blacklisting process more effective, by placing less common pieces of functionality in their own files. In this article we’ll look at how to blacklist jQuery modules, which modules you should remove, and how to automate the whole thing.

No comment yet.!

Mocking a REST backend for your AngularJS / Grunt web application

Mocking a REST backend for your AngularJS / Grunt web application | JavaScript for Line of Business Applications |

or a single-page application, build with a framework such as AngularJS, that gets all it's data from a REST backend this means you should verify your front-end against different responses from your backend. For a small application with primarily GET requests to display data, you might get away with testing against your real (development) backend. But for large and complex applications, you need to mock your backend.

In this post I'll go in to detail how you can solve this by mocking GET requests for an AngularJS web application that's built using Grunt.

No comment yet.!

Managing Bower components with Grunt

Managing Bower components with Grunt | JavaScript for Line of Business Applications |

Originally it took me a while to get on board with using Bower as part of my main development workflow. My biggest gripe was the way it handled repositories that were missing a bower.json file to configure ignored files etc.
In that scenario the whole repository is installed into the bower_components folder and although there are two sides to it, checking that fluff into my Git repository doesn't feel right. That is of course, until Grunt came along.

Like most of life's problems, Grunt can help.
The process goes a little like this:
* Instructing Git (or your chosen VCS) to ignore the bower_components folder
* Checking for and installing any updated packages
* Copying the required files across into a directory that gets checked in to the VCS

By selectively copying files this way our repository can be kept free from test folders, READMEs and other cruft.

If you then needed to update jQuery to the latest version all it would require is changing the version number in the bower.json (or by installing it on the CLI), running the Grunt task and then committing the updated files to the repository. No manual downloads or file copying required.

No comment yet.!

Grunt.js: Custom Tasks

Grunt.js: Custom Tasks | JavaScript for Line of Business Applications |

Previously, I talked about some tips and tricks I use with Grunt.js. If you haven't heard of Grunt.js you may want to check out my article on the basics of grunt. This time I want to wrap things up by talking about custom tasks in grunt. While there are a lot of great plugins for grunt sometimes you need something custom, lucky for us grunt makes it easy for us to define our own tasks.


Grunt.js provides two types of tasks: Basic Tasks and Multi-Tasks. Basic Tasks are little more than a named javascript function you can run from the command line. Multi-Tasks are what most plugins provide, you provide a namespace and code to run those tasks, then the user creates instances of that tasks by placing options under a config object of the same name.

No comment yet.!

Getting Started With Gulp.js

Gulp.js is a build system/task automator written for nodejs. It’s useful for simplifying and speeding up your build process, automating tasks for you such as compiling code, minification, and concatenation.

Gulp differs from Grunt through the use of streams and a code-over-configuration approach. Through the use of streams, it allows you to write very simple scripts in a very similar way that you would to the front end using a library like jQuery while being very efficient and only writing files to the disk when you’re ready.

It’s also very easy to pick up and get running with only 6 methods to worry about. Only some minimal knowledge of the command line and npm is needed and then anyone comfortable writing javascript will get alon g nicely.

No comment yet.!

And just like that Grunt and RequireJS are out, it's all about Gulp and Browserify now

And just like that Grunt and RequireJS are out, it's all about Gulp and Browserify now | JavaScript for Line of Business Applications |

In a demonstration of how insane the Javascript world is, a revolution happened last week and it looks like Grunt was dethroned as the go-to task -runner. But wait you may say, wasn’t the Node and Grunt revolution just beginning? After all Grunt had just managed to find its way to job descriptions. Apparently we weren’t done revolutionizing.

And what I saw was that it is indeed much better, much more intuitive to Node.js devs and simpler to use. And that concluded it for me.

So now  instead of Grunt’s harder to understand syntaxes and laborious pre-config, we have this...

No comment yet.!

Unit testing with angularjs, grunt, karma, and travisci

Unit testing with angularjs, grunt, karma, and travisci | JavaScript for Line of Business Applications |

If you’ve done much reading about angularjs you’ve no doubt come across mention of karma, a test runner recommended especially for use with angularjs applications. The angular-seed project is a great way to get started with the basics of angular testing using karma, but for projects of any significant size you will soon hit the cieling in terms of organization complexity. What I want to share in this article is the approach I have taken using Grunt and the grunt-karma plugin to sustainably manage my projects’ client side unit tests and run them via TravisCI.

No comment yet.!

Package Authoring with Paqui

Package Authoring with Paqui | JavaScript for Line of Business Applications |

Creating client-side JavaScript packages is increasingly becoming a painful endeavor. We need to publish our package to different repositories such as bower, component, and npm, and there are others! Crazy. People might be using volo,jam, or Ender... Have I named enough yet?

Then there's building the package for human consumption. That's where things get really cute. You have CommonJS modules and browserify, AMD modules with Require.js, plain-old raw JavaScript, and a bunch of other "input" formats. There is plenty that can be done in that field, and plenty is done indeed. The output isn't that complicated, but everyone expects you to provide at least the minified (and unminified) code for your module tighly packaged in a single .js file.

Solutions such as Grunt or yeoman kind-of solve these problems, but leave you but a bunch of code that you might have no idea how it works.

No comment yet.!

Easy JavaScript Documentation with YUIDocs and Grunt.js

Easy JavaScript Documentation with YUIDocs and Grunt.js | JavaScript for Line of Business Applications |

Documenting code is a rough, but necessary evil. Having a well maintained and documented code base can ease new developers into your code base and also help keep tabs on certain pieces of your application.

YUIDoc is a node app that assists in parsing certain JavaScript comments out to generate API documentation. Here are some of the basics of the syntax for documentation.

It allows you to tag pieces of your application to be processed for later documentation.

No comment yet.