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

Ember.js + Sparkline: Touch-Driven Real-Time Graph Experiment

Ember.js + Sparkline: Touch-Driven Real-Time Graph Experiment | JavaScript for Line of Business Applications | Scoop.it

I was messing around, integrating a couple of data visualization libraries into an ember project and thought it would be fun to create a live-updating heartbeat-style graph whose data was bound to the oscillating movements of my finger on a touch screen. 

I looked around for a bit and saw that jquery sparkline had a little demo that would pulse up and down with the measurement of the user’s mouse speed. That looked pretty awesome, so I set about creating a similar touch-based real-time graph “the ember way."

Today, I’ll quickly take you through it. 

No comment yet.
Scoop.it!

HTML5 Canvas 3D / 2D Animation Library - taccgl

HTML5 Canvas 3D / 2D Animation Library - taccgl | JavaScript for Line of Business Applications | Scoop.it

HTML 5 Canvas 2D and 3D (WebGL) GPU Accelerated Animation Library - taccgl. HTML elements can be moved, rotated, ... in 2D and 3D, or mapped on 3D objects etc.

taccgl™ is designed for general cross browser desktop HTML pages. It is inactive on old browsers (i.e. IE 8 and older) or slow computers / devices. The idea is to put all essential content in HTML elements, accessible with all browsers and readable by search engines, and to add animations on these elements for the majority of the audience using newer browsers / equipment. It takes advantage of the GPU acceleation using HTML 5 canvas 3D WebGL™ as supported by recent versions of e.g. Firefox and Chrome on suitable hardware and drivers. 

No comment yet.
Scoop.it!

Writing a Javascript REST client with KnockoutJS, Bootstrap and jQuery

Writing a Javascript REST client  with KnockoutJS, Bootstrap and jQuery | JavaScript for Line of Business Applications | Scoop.it

We will develop a client application that will run on web browsers, so we need to decide what tools and/or frameworks we will use.

For the base stack we don't really have much of a choice: The layout will be done in HTML, styling will be done in CSS and scripting in Javascript. No surprises here. While there are other choices, these guarantee that most modern browsers will run our application.

But these technologies alone would make for a rough development experience. For example, while Javascript and CSS work in all browsers, implementations differ, many times in subtle or obscure ways. There are three areas in which we would benefit from higher level cross-browser frameworks:

* Presentation and styling* REST request management* Templates and event handling

Let's review each and evaluate what options there are.

No comment yet.
Scoop.it!

scaleApp

scaleApp | JavaScript for Line of Business Applications | Scoop.it

scaleApp is a tiny JavaScript framework for scalable One-Page-Applications / Single-Page-Applications. The framework allows you to easily create complex web applications.

You can dynamically start and stop/destroy modules that acts as small parts of your whole application.

scaleApp is based on a decoupled, event-driven architecture that is inspired by the talk of Nicholas C. Zakas - "Scalable JavaScript Application Architecture"

No comment yet.
Scoop.it!

AngularJS Best Practices

AngularJS Best Practices | JavaScript for Line of Business Applications | Scoop.it

Miško Hevery – the father of AngularJS – gave a very interesting presentation on AngularJS best practices in December of last year. This presentation is available on YouTube and the actual slides are on Google Docs.

I’m going to cover a few of the points he covered in his presentation and give my take on them.

* Directory Structure* Dependency Injection* Hiding Flashes of Unstyled Content* Separate Business and Presentation Logic
No comment yet.
Scoop.it!

Building Apps with Ember (a postmortem)

Building Apps with Ember (a postmortem) | JavaScript for Line of Business Applications | Scoop.it

The goal of this talk is not actually to teach you how to build an application with Ember. It’s to get you into the correct frame of reference. We could go through a todo list, but lets be honest, you don’t care.

I really don’t want to be the guy standing at a desk, building a demo, explaining every line of code. I’d rather share a few stories, why we at Embedly still like it and why you might want to give it a shot.

No comment yet.
Scoop.it!

Deferred objects, promises and asynchronous code

Deferred objects, promises and asynchronous code | JavaScript for Line of Business Applications | Scoop.it

Javascript is a highly asynchronous programming language. No matter if you play with ajax calls or a MongoDb query in Node.js, you will step over loads of callbacks being executed asynchronously.
When working with synchronous programming, you know that your code will execute sequentially, starting from the top of the code going downwards.
But When code is executed asynchronously, you provide a callback function to a the asynchronous function. The asynchronous function will then go on and be executed in the background, at the same time as your main code continues to execute. When the asynchronous function is done, the callback function will be called, and you have code being executed in parallel.

But, and this is a rather big one, asynchronous code quickly becomes horribly spaghetti-codish. You have callbacks for successful get’s, callbacks on errors, and when you put an asynchronous call within another, the code will look something written in the eighties. 

No comment yet.
Scoop.it!

The definitive solution for history support on Ext JS

The definitive solution for history support on Ext JS | JavaScript for Line of Business Applications | Scoop.it

Improve your app usability and unleash the power of URL deep-linking with ExtJS history support. Check this guide on Ext.util.History and Ext.ux.Router.

It might sound like something really hard to implement, but it’s not. It’s very simple and you are only a few steps away from making your app fully history enabled! Let’s dig into it.

No comment yet.
Scoop.it!

Implementing RESTFul Services with Node.js and MongoDB

Implementing RESTFul Services with Node.js and MongoDB | JavaScript for Line of Business Applications | Scoop.it

In my previous post, I shared a new version of the Employee Directory sample application. By default, the application uses an in-memory data store to provide a “download and run” experience (no need to set up a server or a database). In this post, I’ll show how to replace the in-memory data store with RESTful services powered by Node.js, MongoDB and the Express framework.

No comment yet.
Scoop.it!

JavaScript ‘wake’ event

For monocle.io I wanted to ensure that the list of posts is always kept up to date. This is especially a problem when the computer wakes up from a sleep, as the top posts are often way out of date!
It turns out there is no JavaScript wake event.
Jan Hesse's insight:

custom wakeup from standby detection 

No comment yet.
Scoop.it!

How to optimize inefficient computed properties in Ember.js

How to optimize inefficient computed properties in Ember.js | JavaScript for Line of Business Applications | Scoop.it
Read about how we solved displaying data from multiple arrays in the same list using a highly efficient custom class called `Ember.MergedArray`.
No comment yet.
Scoop.it!

Inserting Handlebars code dynamically from Ember

Inserting Handlebars code dynamically from Ember | JavaScript for Line of Business Applications | Scoop.it

One thing that can be confusing when starting out Ember is the different way that scopes are resolved between template code and in javascript code. For example in a template you might have {{#if controllers.user.isLoggedIn}}, but in order to access the same property in a route, you need to have this.controllerFor('user').isLoggedIn (use of controllerFor in a controller is deprecated, but the point remains). This post is about how I inject handlebars into views for the sake of displaying alert messages.

No comment yet.
Scoop.it!

10 Things You Can Do With EPF (That You Can't Easily Do With Ember Data)

10 Things You Can Do With EPF (That You Can't Easily Do With Ember Data) | JavaScript for Line of Business Applications | Scoop.it

The truth is more complex and ties into why we created Ember.js Persistence Foundation.

One way to shed light onto the situation is to give a simple enumeration of things that EmberData lacks and EPF provides. Having used ED for several years on a large project, these are things that, in our case, are major issues, but are perhaps surmountable for others. These are also issues that, based on my understanding of how ED is structured, are going to be fairly non-trivial to properly implement.

1. Create a Parent-Child Hierarchy
2. Know When a Transaction Completes
3. Change Models While Being Saved
4. Modify a Model in Isolation
5. Properly Handle Embedded Records
6. Deal With Errors
7. Handle "Conflicts"
8. Custom Actions
9. Load Data in the Background
10. Think in Terms of the Container

No comment yet.
Scoop.it!

CoffeeScript and AngularJS

AngularJS and CoffeeScript are a great combination, despite the lack of popularity of CoffeeScript in the AngularJS community. Here are a few ways CoffeeScript makes writing AngularJS code a breeze.

 

Angular uses a lot of anonymous functions - as such, short function definitions are the biggest timesaver when writing Angular code in CoffeeScript. As an example, lets write an ‘enter key’ directive that evaluates an expression when the enter key is pressed, and after a delay. Not particularly useful, but this should give you a sense of how CoffeeScript and AngularJS work together.

Scoop.it!

A meta style guide for JavaScript

A meta style guide for JavaScript | JavaScript for Line of Business Applications | Scoop.it

JavaScript has many great style guides. Thus, there is no need to write yet another one. Instead, this blog post describes commonly accepted meta style rules and conventions that I like that are controversial. The idea is to help you make a more informed decision about what is right for you.


* Existing style guides
* General tips
* Commonly accepted best practices
* Controversial rules


Whenever you are considering a style question, ask yourself: what makes my code easier to understand? Resist the temptation to be clever and leave most of the mechanical cleverness to JavaScript engines and minifiers.

No comment yet.
Scoop.it!

Ember Routing: The When and Why of Nesting

Ember Routing: The When and Why of Nesting | JavaScript for Line of Business Applications | Scoop.it

Understanding the proper use of the Router in an Ember.js app is a fundamental core concept of the framework. The docs tell us that the router translates a URL into a series of nested templates and almost all available tutorials show how to nest routes as part of an explanation of how the Router works. This is great when you want a UI where a list of items are present at the same time a single item is shown. This leaves many beginners struggling, however, as they try and replace the entire contents of a page with another route’s template. Today we’ll explore two ways to tackle this problem.

No comment yet.
Scoop.it!

Continuous Deployment with Yeoman and Jenkins

Continuous Deployment with Yeoman and Jenkins | JavaScript for Line of Business Applications | Scoop.it

Whenever a new commit is pushed to the master branch, our internal Jenkins server picks it up and runs not only the test suite, but the complete grunt pipeline. It also installs all the bower components before that, as those are not part of our repository. There are conflicting opinions on whether committing your components to the repository is a good idea or not. In our case we haven’t seen any negative side-effects. If the build and test suite passes, Jenkins updates or initializes a new git repository in the dist folder that the grunt build created and pushes the complete content to a dedicated deployment remote. After that, Jenkins kicks off capistrano which checks out the deployment remote on the staging server.

No comment yet.
Scoop.it!

Ember at Embedly: Templates and the Router

Ember at Embedly: Templates and the Router | JavaScript for Line of Business Applications | Scoop.it

In practice, everything is based off the router and templates. Ember handles the dynamic creation of views and controllers. You really don’t need them until you start dealing with data and events.

By default Ember sets up two routes for you: application and index.application is the container for your entire application while index is the route for the root of your site ‘/’. You can create the two templates for these routes in the templates directory.

No comment yet.
Scoop.it!

Introduction to Map and Reduce in Javascript

Introduction to Map and Reduce in Javascript | JavaScript for Line of Business Applications | Scoop.it

Recently I held a short lecture on the use of functions in Javascript, and how it’s possible to use functionality like map, reduce, filter and Javascript’s amazing variable context. I prefer to useunderscore.js so that I can use the wonderful functionality even on old browsers.

Lets start easy with _.map. Map is easy, what it does is take an input array, send each element into a function, and putting the result in a result array. The resulting array contains mapped versions of each element in the input array.

No comment yet.
Scoop.it!

CoffeeScript Is JavaScript Without The Headaches

CoffeeScript Is JavaScript Without The Headaches | JavaScript for Line of Business Applications | Scoop.it
I’ve never really liked writing JavaScript all that much. From the day I wrote my first line using it, I’ve always resented that whatever I write in it always ends up looking like a Jackson Pollock painting.

Despite its power and flexibility, JavaScript is by no means a pretty language. It takes verbosity to an extreme and has so many quirks and idiosyncrasies, even the most famous book about the JavaScript programming language nods to its inherent nastiness with its title ‘JavaScript: The Good Parts’.

It doesn’t have to be this way though. JavaScript has a wealth of amazing tools and libraries, and if you use CoffeeScript, you can make brilliant websites and tools without dealing with syntax which makes your corneas bleed. It’s also CoffeeScript’s time to shine, as more and more beginners look to JavaScript for their first language due to its usage in client and back end web development, as well as much of HTML5.

No comment yet.
Scoop.it!

Tuples in JavaScript

As my last post mentioned, I recently read Functional JavaScript and can’t physically recommend it enough. This book has caused me to make the mental leap between real world applications and functional programming due to the fact that it’s written in a language I live and breath.

One of the (many) things I saw in Haskell that I couldn’t think of an alternative to in JavaScript were tuples. Sure you can use an array, but it won’t have a fixed size or pseudo named properties. I say pseudo because they are not named, like an array, but they can easily be mapped to names, like an object. It seems to work like a middle ground between the two in my opinion.

So, I set about writing a tiny tuple implementation in JavaScript; this is what I came up with...

No comment yet.
Scoop.it!

JavaScript Overview for Beginner Learners

JavaScript Overview for Beginner Learners | JavaScript for Line of Business Applications | Scoop.it
In this article we will take an overview of JavaScript programming and also we will discuss the solution of problems related to JavaScript programming. We will discuss many problems may be you never thought about them.
No comment yet.
Scoop.it!

Video of Using KnockoutJS in an HTML5 Application

Video of Using KnockoutJS in an HTML5 Application | JavaScript for Line of Business Applications | Scoop.it

In this video tutorial series, we look at how to build a client-side HTML5 application with jQuery and KnockoutJS. We'll look at binding DOM elements to a data model, defining event handlers, and pulling data from JSON and REST services.

No comment yet.
Scoop.it!

AngularJS x Backbone.js x Parse Boilerplate

AngularJS x Backbone.js x Parse Boilerplate | JavaScript for Line of Business Applications | Scoop.it
parse-angular-demo - An opinionated, battle-tested boilerplate for building large, powerful, serverless apps with AngularJS, Backbone and Parse

The awesome thing about the Parse Javascript SDK is that it's a fork of Backbone, so we can make use of the kickass Model and Collection architecture, but still use AngularJS for all UI events and views (this is where Backbone loses out to other frameworks).

Jan Hesse's insight:

http://brandid.github.io/parse-angular-demo/#/features/data

No comment yet.
Scoop.it!

Infinite Scrolling with Ember.js

Infinite Scrolling with Ember.js | JavaScript for Line of Business Applications | Scoop.it

Let's implement a simple infinite scrolling pattern using Ember. 
First, we will start with a basic scaffolding app. Let's load some fake models in the index route.

We'll make sure our index controller is an array controller, since it will be showing a list of items (those returned from the route's `model` hook). 

We now have enough scaffolding to write up some simple templates to display this information. We'll create an 'application' template with an outlet, and an 'index' template that shows each object in the index controller's content.

Before we add the ability to automatically pull in content when the user scrolls, we'll add in a link the user can click to load more widgets manually. When that is working we'll figure out how to automatically trigger that code when the user scrolls to the bottom. 

No comment yet.