JavaScript for Line of Business Applications
504.5K views | +160 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!

Shaking Hands with RequireJS

Shaking Hands with RequireJS | JavaScript for Line of Business Applications | Scoop.it

Before you know it your site is growing in complexity and your JavaScript files are quickly becoming extremely hard to manage, let alone make performant.

Thankfully these days we have a handful of tools to help with this situation. Let’s examine RequireJS in an attempt to decide if it’s for you… or not.

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

TypeScript AMD with RequireJS Tutorial

TypeScript AMD with RequireJS Tutorial | JavaScript for Line of Business Applications | Scoop.it

In this TypeScript RequireJS tutorial I will show you how to setup AMD classes, setup your config file and how to use RequireJS plugins with TypeScript.

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!

Kendo UI SPA and Require.js

Kendo UI SPA and Require.js | JavaScript for Line of Business Applications | Scoop.it
Unlike some other SPA frameworks, Kendo's SPA implementation doesn't do much to dictate your code layout. In this article we will see one way to lay out your SPA application using Require.js and the kendo-template Require.js plugin.
more...
No comment yet.
Scoop.it!

Require.js packages for building large scale angular applications

Require.js packages for building large scale angular applications | JavaScript for Line of Business Applications | Scoop.it

Require.js is one of my favorite ways to work with large JavaScript applications. It allows you to build AMD (asynchronous module definition) style modules to break up your application into small reusable modules. This is a desirable feature in large code bases.

It's important to know when and why you may consider require.js. If you're working on a small application that doesn't have a need for many files and little logic, you may or may not need the overhead of require.js. However, you still can get value out of it's organization and structure it provides you.

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

Lazy loading AngularJS components using Providers

Lazy loading AngularJS components using Providers | JavaScript for Line of Business Applications | Scoop.it

In most of the example applications that I've seen, all application script files are loaded upfront i.e. all JavaScript files are loaded when the user accesses application. I get annoyed by this approach; why should all the components be loaded upfront when the probability of user accessing the entire application is very less. How does one architect a multi-page application using Angular? What would be the size of the application after minifying all the JavaScript files. Most importantly how does one load the components lazily. I've used RequireJS in my previous projects and it allows you to load components on demand; the idea is to load components based on the selected route. I've tried a similar approach with Angular using 'resolve' property in the $routeProvider.

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!

Introducing Atomify - A New Standard of Modularity

Introducing Atomify - A New Standard of Modularity | JavaScript for Line of Business Applications | Scoop.it

Everyone wants to write modular code, but it's not always easy. In the world of front end web development things like stylesheets, markup, and assets are some of the most easily identifiable obstacles to writing truly modular code. Add to that monolithic libraries like jQuery, Angular, etc. and it can be tempting to throw your hands up and simply dump all the code for an application into a single place.

Atomify makes overcoming these obstacles easy, and this post will begin to show you how.


So what, exactly, does it do?

  • Enables you to build properly atomic front end components
  • Brings a dependency graph to your CSS, removing the need for impossibly long and disorganized stylesheets
  • Unifies the bundling of your code, templates and styles into one easily configurable tool
  • Makes full modularity the default, instead of a complicated pipe dream
more...
No comment yet.
Scoop.it!

Introduction to Component

Introduction to Component | JavaScript for Line of Business Applications | Scoop.it

Component is a front-end JavaScript package manager developed by the prolific Tj Holowaychuk. It embodies the philosophy of small modules and is designed to manage assets as well as JavaScript. Currently, there exist over 1600 “components”. Although there are more popular JS package managers than Component, I chose to cover it because I love an underdog.

Jan Hesse's insight:

http://smalljs.org/package-managers/component-part-2/

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.
Scoop.it!

Post Series on Building a Test-Driven Grocery List Application

I decided to dedicate this series to building a test-driven application that would allow me to create a Grocery List. I figured it will be a small enough application to not get muddled down in large, complex requirements and several moving parts but still provide a real-life example of a CRUD-based application.

A Grocery List application is also something I have wanted to make for some time. We still, as a household, create a grocery list with pen and paper and take it in hand to the store. Nothing wrong with that, aside from the general user error of a)forgetting the list at home, and the user experience oversight of b) not being able to split up and cover parts of the list as a group. So, I thought it may be handy to have a web-based application that my family could add to, remove from and have available on the one thing we never leave the house without: attitudes. No. smartphones.

 

* Part I – Introduction
* Part II – Feature: Add Item
* Part III – Feature: Mark-Off Item
* Part IV – Feature: List-Item-Controller
* Part V – Feature: List-Controller Refactoring
* Part VI – Back to Passing
* Part VII – Remove Item
* Part VIII – Bug Fixing
* Part IX – Persistence
* Part X – It Lives!

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

Modular JavaScript with RequireJS & Browserify

Modular JavaScript with RequireJS & Browserify | JavaScript for Line of Business Applications | Scoop.it

1. Who's talking?
2. The dark past
3. CommonJS & AMD? What is this??
4. RequireJS
5. Browserify
6. UMD
7. What's next?

more...
Scoop.it!

Sample Mobile Application with AngularJS

Sample Mobile Application with AngularJS | JavaScript for Line of Business Applications | Scoop.it

In recent months, I have been sharing different versions of the Employee Directory sample application built with different technology stacks, different frameworks, and different back-end (REST services) implementations. Recent versions include:

Employee Directory with Backbone.js, RequireJS, and Twitter BootstrapEmployee Directory with Backbone.js, RequireJS, Topcoat and PhoneGap

A number of you have asked for a version of the application built with AngularJS. So here it is.

You can experience the application below...

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

Fornt-end with Knockout.js, require.js and TypeScript

Fornt-end with Knockout.js, require.js and TypeScript | JavaScript for Line of Business Applications | Scoop.it
Let's talk about how to correctly organize front-end with Knockout.js require.js and TypeScript. The problem If we will read TypeScript handbook we will find a lot information about how to load mod...
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!

Reusable UI widgets using RequireJS and Knockout

Reusable UI widgets using RequireJS and Knockout | JavaScript for Line of Business Applications | Scoop.it

Requirements
What I needed to do was to find a way to reuse custom UI components (widgets) in the most transparent way. That meant for me that I should be able to:

* Not have to declare all of my widgets dependencies in each webpage it was needed.
* Have all widget code in their own files. This applies to JavaScript source as well as HTML templates.
* Have each widget specify its dependencies to other widgets so I can easily compose them.


Gather the tools
Using an MVW framework is always a good idea when trying to structure your Web UI code. It separates your JavaScript from your HTML views in a clear way, so I tried a few. What I finally ended up using was Knockout.js, because of its HTML templates with data-bind tags. That was making it easier for a designer to work with them without messing with Handlebars magic.

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

RequireJS.NET

RequireJS.NET | JavaScript for Line of Business Applications | Scoop.it
RequireJS for .NET brings asynchronous JavaScript loading and flexible js bundling configuration to ASP.NET MVC. You can now have all the benefits of RequireJS and more in a way that is easy to use and fully integrated with ASP.NET
more...
No comment yet.
Scoop.it!

Creating An Application With Sails, Angular and Require.js

Creating An Application With Sails, Angular and Require.js | JavaScript for Line of Business Applications | Scoop.it

There are a lot of really good client-side and server-side JavaScript frameworks popping up, but there are not many in-depth articles on how they fit together. This series will look at a very specific stack and how it can be used to create an application.


Here is what we will cover:

* Starting The Sails Project
* Sails Server-Side Views
* Adding dependencies
* Angular Controllers
* Sails Models
* Syncing With The Server

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

Requiring Versus Browserifying Angular

Requiring Versus Browserifying Angular | JavaScript for Line of Business Applications | Scoop.it

The blueprint Angular offers is fundamentally quite simple – JavaScript doesn’t have a module system, so Angular provides one for you. Angular ensures that all of your JavaScript code is ready, loaded and available when your application runs. It does this primarily via dependency injection.

The next logical step would be to break these controllers, services, and anything else we can out into separate files. This would be the physical project structure that mimics the coded one. We generally have two options here – Browserify and RequireJS

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!

Angular JS localization with Require JS i18n module

When we started working with AngularJS, one of the first non-trivial challenges we were faced with was to find a way to localize the text in our app.

We had a few basic requirements for the localization solution:

  1. Will not require any changes to my existing controllers.
  2. Will not polute the current $scope.
  3. Be able to define the desired string directly on the markup with a simple syntax.
  4. Be defined as a module that can be minified and compiled with RequireJS.

Some brief research did not produce any options we were completely satisfied with. We then considered the RequireJS i18n module. It is a very simple and elegant solution that's worked very well for me in my previous projects, so I set out to write a small module that will bridge the gap between this module and my Angular JS code and views.

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!

Modular Workflow with Require.js

Modular Workflow with Require.js | JavaScript for Line of Business Applications | Scoop.it

Awesome, It Works!
RequireJS Is The Best

Please Tell Me More About AMD


Is That It?
Nope, There Are Many Ways To Define an AMD Module

Check Out More Module Definitions

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

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 | Scoop.it

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...

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

Using ColtJS in Modular Single Page Applications

Using ColtJS in Modular Single Page Applications | JavaScript for Line of Business Applications | Scoop.it

Building modular single page applications that are scalable has always been a nontrivial task, but with proper tooling, achieving this is a lot easier than you think.

A new framework called ColtJS allows the easy development of JavaScript applications using Asynchronous Module Definition (AMD). It depends upon the highly popular script loader, RequireJS, and aims to be lightweight, flexible and highly efficient.

more...
No comment yet.