JavaScript for Line of Business Applications
508.5K views | +165 today
Follow
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...
Scoop.it!

Choose ES6 modules Today!

Choose ES6 modules Today! | JavaScript for Line of Business Applications | Scoop.it
Cody Lindley explains why you should ditch non-standard JavaScript module formats and move to the ECMAScript 6 module format with examples.

By using jspm.io you can make use of the official JavaScript module control system (and its syntax) today – all while not having to wait for older modules to be re-written or having to limit yourself to one particular module format or package manager. In other words, you shouldn’t have to care from where a package comes and in what format it’s being provided.

The ideal, and yes we have arrived, is to just use ES6 modules and let a tool like jspm.io sort out all of the ugly details as it pertains to non-es6 modules from multiple endpoints. Not to mention, by using jspm (and a ES6 transpiler like traceur or Babel) you get most everything that ES6 offers, not just modules. Writing ES6 code in your ES6 modules sounds good, right!

more...
No comment yet.
Scoop.it!

How Browserify Works

Browserify uses the term entry file(s) to describe where it will start reading a dependency graph, and its output is referred to as a bundle. At its highest level, a Browserify bundle is simply an IIFE, or Immediately Invoked Function Expression. This is of course a simple mechanism to make code run as soon as it is loaded.

more...
No comment yet.
Scoop.it!

Five Traits of Well-Managed JavaScript

Five Traits of Well-Managed JavaScript | JavaScript for Line of Business Applications | Scoop.it
As JavaScript projects grow, they tend to become difficult to manage if you're not careful. We found ourselves running into common problems including code that was difficult to reuse or test, and code that broke when introduced in new pages.
more...
No comment yet.
Scoop.it!

Frontend Dependency Management with Browserify

Frontend Dependency Management with Browserify | JavaScript for Line of Business Applications | Scoop.it

With frontend development moving as fast as it does at Bitly, things can get pretty messy. We found ourselves with piles of unmanaged script tags and little indication of what was still being used in the app’s current iteration. There had to be a better way!

Enter Browserify! 

more...
No comment yet.
Scoop.it!

Minimal AMD loader

AMD simplifies modularizing JavaScript applications but as it is not a browser built-in mechanism a loader library is still needed to bootstrap the process. Fortunately it is possible to write a loader that supports plugins in less than 850 characters of optimized code.

The loader implemented here:

  1. works in any modern browser without using any ES6 features like Promises,
  2. exposes basic AMD functions: define and require,
  3. is designed to be as small as possible after compression with Uglify.js while still being readable,
  4. can be extended by defining new loader plugins,
  5. does not preserve compatibility with require.js.
more...
No comment yet.
Scoop.it!

Components with Backbone.js and Marionette.js

Components with Backbone.js and Marionette.js | JavaScript for Line of Business Applications | Scoop.it
Build and use reusable components in Backbone.js and Marionette.js to make clean and modular code.

Components are critical to scaleable applications because they encourage separation of concerns. Each piece of an application, including components, should have one responsibility and not heavily depend on the other pieces. Applications with tightly coupled modules or a lack of division of work will become incredibly more difficult to maintain and amend with newer features. Adding a single feature could require changing code in several places. Altering a function here breaks a function there, which then requires this other function to handle another parameter.

more...
No comment yet.
Scoop.it!

AngularJS with Browserify

AngularJS with Browserify | JavaScript for Line of Business Applications | Scoop.it

WHAT
Browserify is and does
WHY
Using it is a good thing
HOW
Your AngularJS code will benefit

more...
No comment yet.
Scoop.it!

Modular Architechtures in JS

SEPARATE MODULE CHOICES FROM YOUR CODE
  • Abstraction Layers
  • Functional Mixins
  • Architecture Assistance
more...
No comment yet.
Scoop.it!

Building robust web apps with React: in-browser prototypes, optimising with Browserify, testing with Jasmine

Building robust web apps with React: in-browser prototypes, optimising with Browserify, testing with Jasmine | JavaScript for Line of Business Applications | Scoop.it
The robustness engrained into key parts of the web stack gets forgotten as we build more dynamic applications, users might not get anything when even a small problem occurs. React provides a straightforward means to creating adaptive-hybrid or isomorphic web applications which can inject robustness back into our projects.



  • in-browser prototypes
  • optimising with Browserify
  • testing with Jasmine
Jan Hesse's insight:

http://maketea.co.uk/2014/03/05/building-robust-web-apps-with-react-part-1.html

http://maketea.co.uk/2014/04/07/building-robust-web-apps-with-react-part-2.html

http://maketea.co.uk/2014/05/22/building-robust-web-apps-with-react-part-3.html

more...
No comment yet.
Scoop.it!

Working with Modules in Angular.js

Working with Modules in Angular.js | JavaScript for Line of Business Applications | Scoop.it

We can think of a module as a container for the different parts of our app – controllers, services, filters, directives, etc. Angular JS supports modules, using which we can divide the JavaScript code involved in our application. Creating modules not only helps separating the code into individual concerns but also improves unit-testability. The modules can be easily replaced by some mocks while unit testing Angular controllers.Every module should have a name, which is specified in the first parameter. Second parameter to module function is an array, which may contain names of other modules or services. If the module doesn’t depend on anything, the array can be left blank. 

more...
No comment yet.
Scoop.it!

Introducing Tready.js «

Introducing Tready.js « | JavaScript for Line of Business Applications | Scoop.it
Tready.js is a JavaScript framework, that allows running components in Node.js and the browser.

So we asked ourselves, “Wouldn’t it be nice to implement something once and use it in both environments?”. Luckily Node.js provides a way to run JavaScript on the server. Who knows, otherwise we might have ended up trying to run PHP in the browser.

We like to call this approach “Shared Code”, but it might be better known as “Isomorphic JavaScript”. We certainly weren’t the only ones thinking like this. Nodejitsu wrote about this in 2011 and Airbnb picked it up for their Rendr framework.

But we had more ideas. We wanted to build a modular thing similar to an app store, where you’d be able to choose from a pool of apps to put together a website.

more...
No comment yet.
Scoop.it!

Small.JS

Small.JS | JavaScript for Line of Business Applications | Scoop.it

The Javascript world is dominated by frameworks, and it is because of our reluctance to having dependencies in our libraries. If you are going to write a Javascript library, you have two options:

  1. Depend on a proven framework.
  2. Depend on no one.

If you choose option #1, you contribute to the worship of the framework.

If you choose option #2, you are faced with a problem. If you make it too small, it may not be useful enough to warrant a download (are you download-worthy?). What happens sometimes is a set of smaller functionalities get packaged up into a larger library to give users more value for the download. Another thing that tends to happen is established libraries get bigger over time as new techniques are discovered and new features invented, because this makes it easier for existing users.


As someone who likes to write small libraries, the dream for me, is this: I want easy dependencies: regardless of how many dependencies and/or nested dependencies my project has, I want to be able tell people "using my library is as easy as 1-2-3."

What I want is something like NPM.

Jan Hesse's insight:

http://smalljs.org/

more...
No comment yet.
Scoop.it!

Mastering the Module Pattern

Mastering the Module Pattern | JavaScript for Line of Business Applications | Scoop.it

I'm a massive fan of JavaScript's Module Pattern and I'd like to share some use cases and differences in the pattern, and why they're important. The Module Pattern is what we'd call a "design pattern", and it's extremely useful for a vast amount of reasons. My main attraction to the Module Pattern (and it's variant, the Revealing Module Pattern) are because it makes scoping a breeze, and doesn't overcomplicate JavaScript design.

It also keeps things very simple and easy to read and use, uses Objects in a very nice way, and doesn't bloat your code with repetitive this and prototype declarations. I thought I'd share some insight as to the awesome parts of the Module, and how you can master it and it's variants and features.

more...
No comment yet.
Scoop.it!

Browserify VS Webpack - JS Drama

Browserify VS Webpack - JS Drama | JavaScript for Line of Business Applications | Scoop.it

Webpack, for all its size and features is actually pretty flexible in its usage. You can use it in various ways as long as you’re willing to write a long enough config file.

If you only use commonjs and don’t use webpack for managing any CSS or images, then you could, use it like browserify and maintain compatibility with node. But webpack doesn’t try to conform.

Browserify on the other hand, being smaller and more established is easy to pick up. And if you conform to some of its conventions, you have write very little or no configuration to make it work.

So, Browserify is much more likely to work with minimal configuration but will force you into a small set of conventions. Webpack on the other hand will always require some configuration to work for anything but the most basic case.

more...
No comment yet.
Scoop.it!

ES6 Modules: The End of Civilization As We Know It?

ES6 Modules: The End of Civilization As We Know It? | JavaScript for Line of Business Applications | Scoop.it

This article shares some techniques and tools for building web apps using future friendly ES6 module syntax. We begin with an exploration of current module formats and ways to work both forwards and backwards in time.

For many years JS had a single widely accepted module format, which is to say,there was none. Everything was a global variable petulantly hanging off the window object. This invited risky propositions, too sweet to ignore, and some of us began monkey patching built in objects. Chaos prevailed. We had run amuck.The JS of that era was nightmarish, intertwined, lacking order and utterly without remorse.

more...
No comment yet.
Scoop.it!

asynchronous frontend dependency management without AMD

asynchronous frontend dependency management without AMD | JavaScript for Line of Business Applications | Scoop.it

Frontend dependency management is always the discussion point, people have a lot of to say. The key reason for this is that javaScript language itself does not provide module like support, it really sucks developers.

For years ago, developers used to use <script> tag to write code, however when the page codes grows, the maintainability will be harder and harder. Then, with the arise of nodejsCommonJS brings up using require, exports to resolve modules. It seems really nice when using in nodejs, however, when it meets browser, it works not quite well. The reason is simply that browser does not support synchronous require, it can not load a script from file I/O. Then AMD comes up a specification used well for browser.

more...
No comment yet.
Scoop.it!

Browserify All The Things

This talk is about how to use browserify to develop front-end modular code using Common.JS, and how those modules should be documented, designed, and released using an automated build system. In order to explain these concepts I'll walk you through a few of my own open-source creations, highlighting interesting points as we go along.

more...
No comment yet.
Scoop.it!

It's Not Hard: Making Your Library Support AMD and CommonJS

It's Not Hard: Making Your Library Support AMD and CommonJS | JavaScript for Line of Business Applications | Scoop.it

Proponents of AMD and CommonJS – two different 'specs' around creating modules in JavaScript – have been arguing foryears at this point over which one is the best approach. I've heard devs on both sides of the debate declare that their side had won, debate over. Myopic nonsense.

It's easy to come away from this debate thinking you're stuck with an "either-or" decision. After all - they're very different approaches. Requiring modules in an AMD scenario is an asynchronous operation, and the opposite is true of the CJS inline-require approach. 

more...
No comment yet.
Scoop.it!

JavaScript Modules

The next version of JavaScript comes with a module system heavily inspired by Node.js modules.
Here’s how it works.

more...
No comment yet.
Scoop.it!

Getting Started with Browserify

Getting Started with Browserify | JavaScript for Line of Business Applications | Scoop.it

This article introduces the Browserify tool. It also shows how Browserify can be integrated with Grunt and Gulp.

any of us now work with JavaScript modules – independently functioning components that come together to work as a cohesive whole, yet can happily have any component replaced without causing armageddon. Many of us have been using the AMD module pattern and RequireJS to accomplish this neatly.

more...
No comment yet.
Scoop.it!

jQuery: Using Only What You Need

jQuery: Using Only What You Need | JavaScript for Line of Business Applications | Scoop.it

With the ever-increasing importance of mobile, performance on the web has never been more critical. Because of its popularity, jQuery is often targeted as too big because of its size.

The good news is, as of jQuery 2.1, jQuery uses AMD to organize its dependencies internally. This means you can use AMD to load individual pieces of jQuery, and not the whole library. In this article you’ll see which jQuery modules are available, and how to use them in an AMD context. For each, I’ll show how many bytes you save by using an AMD approach. Finally, we’ll look at how to write jQuery plugins that leverage these new modules.

more...
No comment yet.
Scoop.it!

Reusing require.js modules in Node.js

Reusing require.js modules in Node.js | JavaScript for Line of Business Applications | Scoop.it
A tutorial on how to reuse require.js AMD modules directly in Node.js at the same time as using the standard Node's modules using AMDrequire library.
more...
No comment yet.
Scoop.it!

Getting Started with ES6 Modules

Getting Started with ES6 Modules | JavaScript for Line of Business Applications | Scoop.it

An amazing omission in Javascript’s design is the lack of a built-in module system. As more projects used Javascript and shared more code, the need for a robust module system became necessary. Two contenders sprung up, Asynchronous Module Definition (AMD) and CommonJS (CJS). The former is much more popular with browser applications and the latter is much more popular with server applications written in node.js.

Having two major standards for defining modules led to a technological holy war in the Javascript community akin to the vim/emacs arguments of the editor world. It wasn’t pretty.

Fortunately, there is light at the end of the tunnel.

more...
No comment yet.
Scoop.it!

The Power Of Kendo UI And Straight Up HTML

The Power Of Kendo UI And Straight Up HTML | JavaScript for Line of Business Applications | Scoop.it

You already know that Kendo UI has magnificent widgets. UI is in the name, and Telerik has a long proud history of building amazing UI components. What you may not know, is that you can actually use Kendo UI (specifically MVVM) to work with plain HTML to construct your own widgets. This is sort of like running on the bare metal, but it’s tons of fun and thanks to Kendo UI’s streamlined MVVM, it’s quite easy as well.


Knockout provides the ability to loop over a collection by implementing a for iterator. The power of this really can’t be underestimated since it allows you to take collections and render them visually with HTML getting fine grained control over how each of the items will look. The only problem with this, is that for loops can get unwieldy and don’t mix very gracefully in HTML attributes. This earned some bad rep for Knockout in it’s early days through no fault of the framework itself. Regardless of it’s tendency to clutter HTML, it’s a powerful construct that is noticeably absent from Kendo UI’s MVVM implementation. Or is it?

more...
No comment yet.
Scoop.it!

Creating standalone JavaScript library builds with browserify, watchify, and uglify-js

Creating standalone JavaScript library builds with browserify, watchify, and uglify-js | JavaScript for Line of Business Applications | Scoop.it

Recently I had the opportunity to use Browserify as one of the tools for creating a JavaScript module for a client that is building a mapping product for architects and urban planners.

In that project I used Browserify and npm scripts to bundle the module into a file the client could use as a standalone library that could be added to any web page that needed to use the tool.

It was a fairly straightforward and flexible build process, and here I'll outline a similar structure that you could use in your projects.

Our example project will be named Pizza, because our example library will do nothing but return the string 'Pizza'. Deal with it.

more...
No comment yet.