JavaScript for Line of Business Applications
606.6K views | +4 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...

Popular Tags - Filter using the Funnel

Scoop.it!

Scalable JavaScript Design Patterns

Scalable JavaScript Design Patterns | JavaScript for Line of Business Applications | Scoop.it

Welcome to the resource page for my talk on Scalable JavaScript Design Patterns last presented at Web Directions (South). It's an extended version of the talk I gave at Fronteers and includes more information about a highly-decoupled architecture for building large applications I've been discussing recently. This version of the talk also covered live code demos of 'Aura', a framework based on some of the ideas in the presentation (see lower down for some code examples). Many of the concepts presented build upon previous work by Nicholas Zakas.

In this talk, I describe a JavaScript application architecture that:

* Is highly decoupled, encouraging modules to only publish and subscribe to events of interest rather than directly communicating with each other
* Supports your application continuing to function even if particular modules fail
* Supports improved module management, where a central body is able to manage when modules start, stop or need to be restarted
* Supports module-level security, whereby modules are only able to execute behaviour they've been permitted to
* Supports optional framework agnosisty - this is an opt-in component of the architecture whereby an abstracted API layer is created around specific JavaScript frameworks and toolkits allowing you to easily swap one for another without the need to rewrite any of your code (eg. you can switch your modules from using jQuery to Dojo in just one line).


No comment yet.
Scoop.it!

A Guide to Web Components

A Guide to Web Components | JavaScript for Line of Business Applications | Scoop.it

Recently I was working with a client to train their internal teams on how to build web applications. During this process it occurred to me that the way we presently architect the front-end is very strange and even a bit broken. In many instances you’re either copying huge chunks of HTML out of some doc and then pasting that into your app (Bootstrap, Foundation, etc.), or you’re sprinkling the page with jQuery plugins which have to be configured using JavaScript . It puts us in the rather unfortunate position of having to choose between bloated HTML or mysterious HTML, and often we choose both.

In an ideal scenario, the HTML language would be expressive enough to create complex UI widgets and also extensible so that we, the developers, could fill in any gaps with our own tags. Today, this is finally possible through a new set of standards called Web Components.

No comment yet.
Scoop.it!

Understanding AngularJS Directives Part 2: ngView

In a previous article I explored ng-repeat, it’s implementation, and how to create a custom repeater. In this article I’ll first delve into the inner workings of ngView and then walk through the creation of an “ngMultiView” directive. To get the most out of this article you’ll need an intermediate understanding of creating directives (via the previous article on ng-repeat and reading the the AngularJS directive guide).

Starting with AngualrJS 1.2, the ngView directive, and the $route service were moved into a separate module called ngRoute. As a result, to use routes and ngView your app must explicitly declare it as a dependency. Furthermore, the syntax for the “otherwise” statement is slightly different from older versions of AngularJS. 

No comment yet.
Scoop.it!

AngularJS End to End

AngularJS End to End | JavaScript for Line of Business Applications | Scoop.it

* Building your First App (basic concepts)

* Internals of AngularJS (How it all works)* The New Stuff (animations, track by, controller as, security, error messages)
No comment yet.
Scoop.it!

Towards a More Modular Future for JavaScript Libraries

Towards a More Modular Future for JavaScript Libraries | JavaScript for Line of Business Applications | Scoop.it

Until recently, JavaScript did not have much of a module story. In other words, there was no good way of sharing code with others. I would argue that it still doesn’t have a great one, even today. First, let’s look at the ways we share JavaScript code today. I’ll discuss why I think we are framework-heavy as a community. Finally, I’ll look at potential solutions that exist, and some of the issues they face.


An unspoken rule in the world of .js files is ”depend on no one” - that is, unless it’s jQuery.

Today, you seldomly encounter a library that requires you to download other dependencies. People are impatient, and the more stuff you ask them to do before actually seeing things happen, the less likely they are to use the library in the first place.

If a library must have dependencies, what usually happens is: either they ask you to download a .zip file that contains all of the dependencies, or they concatenate the dependencies into a monolithic file along with the library itself. You’ll see this with some libraries that depend on JSON parsing or base64 encoding, for example.

For the most part, we, the library authors, have shied away from depending on other libraries. This is a limitation. It makes it hard to stand on other’s shoulders, but it also makes it hard to reuse our own code in multiple contexts, which can be an effective way to remove code duplication. In this way, we have been handicapped for many years.


No comment yet.
Scoop.it!

What to Use on the Microsoft Stack

What to Use on the Microsoft Stack | JavaScript for Line of Business Applications | Scoop.it
With Microsoft’s unwillingness to officially deprecate technologies such as Silverlight, figuring out which technologies on the .NET stack have a future and which should be avoided can be challenging.

One way to find out is to review a little known document called the ".NET Technology Guide for Business Applications". Released earlier this year, the Guide offers insight into where Microsoft intends to put its efforts and what technologies should be avoided.

This overview is a good place to start your exploration of Microsoft and related technologies.

* Mobile
* Services
* Guidance for Small and Medium Business Applications
* Guidance for Large, Mission Critical Business Applications
* Patterns and Practices
* Conclusions

No comment yet.
Scoop.it!

AWS JS SDK - The Canonical Angular Guide

AWS JS SDK - The Canonical Angular Guide | JavaScript for Line of Business Applications | Scoop.it

One of the biggest benefits to building a single page app (SPA) is the ability to host flat files, rather than needing to build and service a back-end infrastructure.

However, most of the applications that we will build need to be powered by a back-end server with custom data. There are a growing number of options to enable us developers to focus on building only our front-end code and leave the back-ends alone.

Amazon released a new option for us late last week to allow us to build server-less web applications from right inside the browser: Amazon AWS Javascript SDK.

Their browser-based (and server-side with NodeJS) SDK allows us to confidently host our applications and interact with production-grade back-end services.

Now, it’s possible to host our application stack entirely on Amazon infrastructure, using S3 to host our application and files, DynamoDB as a NoSQL store, and other web-scale services. We can even securely accept payments from the client side and get all the benefits of the Amazon CDN.

With this release, the Javascript SDK now allows us to interact with 5 of the dozens of Amazon AWS services. These five services are:

* DynamoDB
* Simple Notification Service (SNS)
* Simple Queue Service (SQS)
* Simple Storage Service (S3)
* Security Token Service (STS)

No comment yet.
Scoop.it!

Angular Adaptive

* Alternative Control Methods

* Conditional Components

* Utilities

No comment yet.
Scoop.it!

A Step-by-Step Guide to Your First AngularJS App

A Step-by-Step Guide to Your First AngularJS App | JavaScript for Line of Business Applications | Scoop.it

First, let’s decide the nature of the app we want to build. In this guide, we’d prefer not to spend too much time on the back-end, so we’ll write something based on data that’s easily attainable on the Internet—like a sports feed app!

Since I happen to be a huge fan of motor racing and Formula 1, I’ll use an autosport API service to act as our back-end. Luckily, the guys at Ergast are kind enough to provide a free motorsport API that will be perfect for us.

For a sneak peak at what we’re going to build, take a look at the live demo. To prettify the demo and show off some Angular templating, I applied the awesome Plastic Admin Bootstrap theme; but seeing as this article isn’t about CSS, I’ll just abstract it away from the examples and leave it out.

No comment yet.
Scoop.it!

An In-Depth Introduction To Ember.js

An In-Depth Introduction To Ember.js | JavaScript for Line of Business Applications | Scoop.it

With the release of Ember.js 1.0, it’s just about time to consider giving it a try. This article aims to introduce Ember.js to newcomers who want to learn about this framework.

First, we will clarify the main concepts of the framework. Next, we’ll go in depth with a step-by-step tutorial that teaches you how to build a simple Web app with Ember.js and Ember-Data, which is Ember’s data storage layer. Then, we will see how views and components help with handling user interactions. Finally, we will dig a little more into Ember-Data and template precompiling.

No comment yet.
Scoop.it!

Immediately invoked constructors and object literals

Immediately invoked constructors and object literals | JavaScript for Line of Business Applications | Scoop.it

By now, you are probably familiar with immediately invoked function expressions (IIFEs,[1]). This blog post looks at immediately invoked constructors and immediately invoked object literals.

No comment yet.
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...

No comment yet.
Scoop.it!

Simple Github API Webapp - AngularJS Style

Simple Github API Webapp - AngularJS Style | JavaScript for Line of Business Applications | Scoop.it

Since I’ve been working with the GitHub API lately as well as AngularJS I decided to refactor his code using AngularJS instead of jQuery. I tried to make minimal changes from Jake’s example to make comparison easy.

The results show the power of AngularJS’ data binding and separation of logic and view.  There was no need to manipulate the DOM in Javascript or output HTML from Javascript.

It’s a simple, but very nice example, so the refactor wasn’t very difficult. Removing jQuery and using AngularJS, the initial form, getting the user data and displaying it which is two calls to the GitHub API. One to get the user information and another to get a list of that users repositories.

No comment yet.
Scoop.it!

Rendering Templates in Ext JS – So Many Choices

Rendering Templates in Ext JS – So Many Choices | JavaScript for Line of Business Applications | Scoop.it

Ext JS 4.0 provides a number of ways for custom components to render their HTML content for display:

autoEl, html, tpl/data, renderTpl/renderData

As I have been learning Ext JS, I have often struggled with knowing which technique is the correct one in a given situation. Here I will briefly discuss the different ways of specifying content, followed by some thoughts on when you might want to use them.

No comment yet.
Scoop.it!

Knockout js for Beginners

Knockout js for Beginners | JavaScript for Line of Business Applications | Scoop.it

This article will help begenners to understand how knock out will work with asp.net and communicate client-side server side and the usefulness of the responsive ui design.

No comment yet.
Scoop.it!

Twitter Bootstrap 3 – JavaScript Components

Twitter Bootstrap 3 – JavaScript Components | JavaScript for Line of Business Applications | Scoop.it
Twitter Bootstrap happens to be the easiest and the best CSS framework on the Internet today. It allows developers with no CSS knowledge to build basic templates without any efforts. But this doesn’t stop designers from using Bootstrap.
No comment yet.
Scoop.it!

Apollo.js, standalone class manipulation API for HTML5 and legacy DOM

Apollo.js, standalone class manipulation API for HTML5 and legacy DOM | JavaScript for Line of Business Applications | Scoop.it

Apollo is a <1KB standalone DOM class manipulation API for adding, removing, toggling and testing the existence of classes on an element. Apollo is the successor to an original post I published on raw JavaScript class functions earlier this year, but is completely rewritten and enhanced for the next level, whilst integrating HTML5.

Under the hood, Apollo uses the HTML5 classList API (jQuery isn't even using this yet!) when available and fallbacks to manual class manipulation for legacy support, making it the most powerful class manipulation API on the web. HTML5 classList performance far outweighs the legacy method.

Support? IE6+ for legacy support and internal feature detection to switch to HTML5 when available. Cross-browser compatible.

No comment yet.
Scoop.it!

21 JavaScript Parts I Struggle To Remember

21 JavaScript Parts I Struggle To Remember | JavaScript for Line of Business Applications | Scoop.it

This article is a review of the JavaScript ES3 parts that, for whatever reason, fade over time in my mind or I outright forget about. Some of the parts mentioned are quirks and some are just plain language realities that I personally find difficult to keep straight.

The eluding parts I discuss here are not focused on method nuances that can be resolved by referring to a JavaScript reference. I have tried to mainly focus on the parts of JavaScript that cannot easily be found in a language reference (i.e the difference between apply()and call()).

Additionally, before I begin, I need to clarify the following three points about what I am NOT suggesting by writing this article:...

No comment yet.
Scoop.it!

Prebrowsing | High Performance Web Sites

Prebrowsing | High Performance Web Sites | JavaScript for Line of Business Applications | Scoop.it

Browser cache isn’t enough
You might ask, “isn’t this what the cache is for?” Yes! In many cases when you visit a website the browser avoids making costly HTTP requests and just reads the necessary resources from disk cache. But there are many situations when the cache offers no help:

* first visit – The cache only comes into play on subsequent visits to a site. The first time you visit a site it hasn’t had time to cache any resources.
* cleared – The cache gets cleared more than you think. In addition to occasional clearing by the user, the cache can also be cleared by anti-virus software and browser bugs. (19% of Chrome users have their cache cleared at least once a week due to a bug.)
* purged – Since the cache is shared by every website the user visits, it’s possible for one website’s resources to get purged from the cache to make room for another’s.
* expired – 69% of resources don’t have any caching headers or are cacheable for less than one day. If the user revisits these pages and the browser determines the resource is expired, an HTTP request is needed to check for updates. Even if the response indicates the cached resource is still valid, these network delays still make pages load more slowly, especially on mobile.
* revved – Even if the website’s resources are in the cache from a previous visit, the website might have changed and uses different resources.
Something more is needed.

No comment yet.
Scoop.it!

Dependency injection for JavaScript with injector.js

Do you recognise the problem with gaining access to an object that is defined somewhere else in the application than where you will want to use it? In order to do this you either need to pass a reference along throughout your application or pollutte your global namespace. This problem is not new and it is something that is addressed in many programming languages in many different ways. A while after completing the project with Michiel I silently started working on an open sourced version and injector.js was born. SwiftSuspenders clearly inspired me hence the many similarities between both API’s.

No comment yet.
Scoop.it!

Creating a Single Page Todo App with Node and Angular

Creating a Single Page Todo App with Node and Angular | JavaScript for Line of Business Applications | Scoop.it

Today we will be creating a very simple Todo application using the MEAN (Mongo, Express, Angular, Node) stack. We will be creating:
* Single page application to create and finish todos
* Storing todos in a MongoDB using Mongoose
* Using the Express framework
* Creating a RESTful Node API
* Using Angular for the frontend and to access the API

While the application is simple and beginner to intermediate level in its own right, the concepts here can apply to much more advanced apps. The biggest things we should focus on is using Node as an API and Angular as the frontend. Making them work together can be a bit confusing so this tutorial should help alleviate some confusion. Buckle those seatbelts; this could be a long one.

No comment yet.
Scoop.it!

Augmenting JavaScript Core Objects Revisited

Augmenting JavaScript Core Objects Revisited | JavaScript for Line of Business Applications | Scoop.it

Directly adding properties to a core object or its prototype is controversial. In his Extending JavaScript Natives blog post, Angus Croll addresses several problems with this approach. For example, future browser versions may implement an efficient property or method that gets clobbered by a less efficient custom property/method. Read Croll’s blog post for more information on this and other problems.

 

Because core object augmentation is powerful and elegant, there should be a way to leverage this feature while avoiding its problems. Fortunately, there is a way to accomplish this task, by leveraging the adapter design pattern, which is also known as the wrapper pattern. In this article, I introduce a new version of my library that uses wrapper to augment various core objects without actually augmenting them.

No comment yet.
Scoop.it!

Angular WYSIWYG

Angular WYSIWYG | JavaScript for Line of Business Applications | Scoop.it

ponyedit allows us to interact with a contentEditable element by following the Obey and Report pattern. It emits events whenever its state changes, and it takes commands that alter this state. This enables us to completely decouple the user interface from the component's functionality. In this article, we'll dig a little deeper into the pattern, analyzing the decisions made in ponyedit, how it came together, its resulting API, and the sample bare bones UI implementation.

No comment yet.
Scoop.it!

Ember.SimpleAuth implements RFC 6749 (OAuth 2.0)

With the OAuth 2.0 support also comes support for access token expiration and refresh tokens. Using expiring access tokens improves overall security as replay attacks are less likely while with refresh tokens Ember.SimpleAuth can automatically obtain new access tokens before they expire so that the user doesn’t recognize the token actually changes.

Currently I’m working on adding API documentation within the source together with a means of generating some nice HTML out of that. I don’t currently see that there is much else missing in the library soI’d like to release a 1.0.0 version soon. 

No comment yet.
Scoop.it!

Initialization Free Widgets

Initialization Free Widgets | JavaScript for Line of Business Applications | Scoop.it

As web applications grow larger and larger, the ability to manage the vast number of widgets within the application becomes more and more complex. In early stages of development, widgets are often initialized with one-off scripts running when the DOM has fully loaded. As the number of widgets increases, developers often find ways to avoid explicitly initializing each individual widget. However, most implementations either have shortcomings or have limitations on how additional content can be loaded on to the page.

What if widgets could be built in a way that didn't require any initialization at all? This may sound strange; how can you have a JavaScript widget without running some JavaScript to initialize it? Let's take a look at a simple pattern that has been around for a while: hijacking clicks on anchors to generate Ajax requests. The concept is simple: listen for the click event, prevent the default action, and start an Ajax request.

No comment yet.