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

Stop Being Cute and Clever

Stop Being Cute and Clever | JavaScript for Line of Business Applications | Scoop.it

Let me preface this in that I really don't want to criticise anyone's individual code here. More than that, if someone would look at my own JavaScript code it would not be any better. If anything it's worse, because I did not spend much time on it and I'm not very experienced with JavaScript.

However I do see a worrying trend of absolutely appalling code quality in JavaScript libraries (at least the selection of the ones I was using) and I started to do some thinking on why that is.

There are so many problems I have with JavaScript libraries and all of them are pretty much a result of how the language works and that nobody seems to care. Not that you could not write better code, but it seems like everybody gravitates towards falling into the same traps.

The first pain point is people being cute and clever with JavaScript. And that makes me reviewing code and hunting for bugs ridiculously paranoid. Even if you know the idioms applied you will still not be sure if the side effects are intentional or if someone made a mistake.

No comment yet.
Scoop.it!

Build an Ember.js app with Firebase

Build an Ember.js app with Firebase | JavaScript for Line of Business Applications | Scoop.it

Ember.js is an outstanding client-side framework for building single-page applications. To make your application truly come to life, Firebase, being a real-time backend, is a natural choice as the server-side component.

Sending data between the server and the client is a task all web applications have to address. However, if one uses the Firebase-Ember.js stack, this problem is largely abstracted away by these wonderful frameworks.

To make them work together, the Firebase team released their official Ember.js bindings, emberFire.

No comment yet.
Scoop.it!

Controlling Web Pages with Javascript and on{X}

Controlling Web Pages with Javascript and on{X} | JavaScript for Line of Business Applications | Scoop.it
This article describes how on{X} is used in conjunction with Node, Express, and Socket.IO to control web pages from an Android device.

I had lost my phone. I left it on a couch in a shopping mall and returned back to find it gone. Someone had been gifted a new phone via the awful art of stealing. I sent JavaScript code remotely to my phone over the web that sent me the coordinates of the device any time I texted it. I tracked it to a Sizzler restaurant until they turned the phone off and it disappeared forever. I bought myself a new phone but saw new potential in a powerful app I’d barely used until that point called on{X}.

In this article I’ll be sharing a very different use of the app compared to the horror story of my lost phone. I’d like to show you how you can use your Android device to send remote instructions to a live web page. I’ll be using the example of remote controlling a HTML presentation but the concepts can be expanded to do any number of interesting things.

No comment yet.
Scoop.it!

Knockout.js href Binding

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

I've been using this simple binding lately and I just thought I'd share. Sometimes I end up needing to construct URLs from viewmodel properties. Knockout has a built in binding that gets you there, attr.

With the built in binding, you have two options. First you can created a computed property on your viewmodel to do the concatenation and then bind the href attribute to that.

No comment yet.
Scoop.it!

Ember 1.0 Tutorial Video

Steve Kane presents 'Ember 1.0' brought to you by Mantra, Inc.

Ember.js is built for productivity and designed with developer ergonomics in mind. It's friendly APIs help you get the job done — fast.

No comment yet.
Scoop.it!

Building D3 Bar Chart for Angular

Building D3 Bar Chart for Angular | JavaScript for Line of Business Applications | Scoop.it

D3 a very powerful tool and at times can be a bit overwhelming. Today I would like to simplify things by walking you through building a bar chart using D3.

First step is to create a barChart directive.

It will will take an data array and add a svg tag to our element. We will using this svg to build our chart.

D3 allow us to resize our data to the portions of the SVG using d3.scale. We tell the scale the upper and lower bounds of the dataset using domain and the upper and lower bounds of the chart using range. Using x and y functions generated from d3.scale.linear(), we can then place bars in the right spot on the SVG.

No comment yet.
Scoop.it!

Testing your ExtJS 3.4 components with Jasmine

Testing your ExtJS 3.4 components with Jasmine | JavaScript for Line of Business Applications | Scoop.it
Tutorial on how to write behavior driven tests of ExtJS 3.4 components with Jasmine.

Developing your own ExtJS components for your application is more fun and results into more resilient code if you write them hand-in-hand with test code. A solid test basis can also facilitate the task of refactoring your software.

Although, test driven development is easy for javascript code, how can ExtJS 3.4 components be tested? Which parts of our components should be tested to accomplish a successful refactoring?

No comment yet.
Scoop.it!

Where does this keyword come from?

Where does this keyword come from? | JavaScript for Line of Business Applications | Scoop.it

In this post I want to shed some light on this in JavaScript hopefully bring some clarity to how this works. It’s not all dark magic, learning about this can be tremendously helpful to your development as a JavaScript programmer. 

* How this works
* Tampering with this
* Scoping this
* Other Issues?


No comment yet.
Scoop.it!

Exploring the Eternal Abyss of Null and Undefined

Exploring the Eternal Abyss of Null and Undefined | JavaScript for Line of Business Applications | Scoop.it

When discussing primitive data types in JavaScript, most are aware of the basics, starting with String, Number, and Boolean. These primitives are fairly straightforward and function as you might expect. This article, however, will be focusing on the more unique primitive data types known asNull and Undefined; what makes them similar, dissimilar, and overall unusual.

In JavaScript, null is a literal and language keyword that represents no discernible object value. In other words, it’s an indication of “no value”. While similar, undefined actually represents the non-existence of a value. Both are completely immutable; have no properties or methods, and are incapable of property assignment. In fact, attempting to access or define a property will raise a TypeError. They are, as their names suggest, completely void of value.

No comment yet.
Scoop.it!

Rapid and responsive UI development with Knockout.js

Rapid and responsive UI development with Knockout.js | JavaScript for Line of Business Applications | Scoop.it

I’m sure all JavaScript developers have had that “oh…my…god!” moment when they were introduced to frameworks such as jQuery or MooTools for the first time. The realisation that what was a nightmare of cross browser wiring, and verbose commands has been replaced with a simple, succinct and universal interface making accessing the browser DOM a breeze.

Well, how those frameworks revolutionised DOM access,Knockout aims to revolutionise user interactions. By providing a simple two way binding mechanism between your UI and your view model, Knockout takes care of all the wiring and event binding to keep the two constantly in sync.

What follows is a two-part guide to creating a sample application, Slidr (a simple slideshow generator), that demonstrates some of the core features that most developers would use in real life. Starting with the fundamentals of Knockout and leading on to integrating Knockout with existing third party UI components. By the end you’ll be sure to be saying “oh … my … god!” once again.

Jan Hesse's insight:

Part 2 - 

Integrating Knockout.js with third-party libraries:


http://www.creativebloq.com/javascript/integrating-knockoutjs-third-party-libraries-3126407

No comment yet.
Scoop.it!

Implementing microstates in Backbone.js

Implementing microstates in Backbone.js | JavaScript for Line of Business Applications | Scoop.it

When developing a Backbone.js mobile web app recently, I needed to create a unique history state without a unique URL when opening an overlay. This was done to allow the user to hit back in the browser and be returned to the view which launched the overlay. While solving this problem, I landed upon a concept of microstates which I thought might be of interest to other web app developers.

In this post I will first give an overview of the HTML5 History API, then talk about how to create a microstate in a Backbone app, and conclude with the implications of exposing microstates.

No comment yet.
Scoop.it!

Angry Birds of JavaScript

Angry Birds of JavaScript | JavaScript for Line of Business Applications | Scoop.it

In this Angry Birds session we uncover concepts of modern JavaScript development. Each bird represents an area of JavaScript along with its strengths. Some topics covered include code organization, events and messaging, prototyping and mocking, design patterns, linting, and build systems. The goal is to defeat the pigs and by doing so produce highly tested quality JavaScript code.

No comment yet.
Scoop.it!

AngularJS Data Model

As we already know, AngularJS doesn’t come with an out of the box solution for data modeling. In the most abstract way, AngularJS lets us use JSON data as a model in the controller. As the time passed and my application grew, I realized that this modeling method isn’t powerful enough to fit my application’s needs. In this article I will present the way I dealt with data modeling in my AngularJS application.

 

As long as the book’s structure and methods are relevant only to one controller, all is fine and our work here is done. But as the application grows, there might be other controllers that will deal with books. Those controllers will sometimes need to fetch a book, update it, delete it or get it’s image url or availability. Therefore we have to share the behaviors of a book between controllers. In order to do this we will use a factory that returns the book’s behavior. Before writing this factory, I would like to mention here that we could make the factory return an object that contains helper methods for book (i.e. functions that get a book JSON and do what asked), but I prefer to use prototype for constructing a Book class, which I believe is the right choice:

No comment yet.
Scoop.it!

Using JavaScript Promises to Reason About User Interaction

Using JavaScript Promises to Reason About User Interaction | JavaScript for Line of Business Applications | Scoop.it

In functional programming, we rarely worry about concurrency primitives like threads. Instead, we use abstractions to make our code easier to reason about. In JavaScript, a Promise is the most common abstraction we encounter. It is usually associated with an Ajax request. We often use abstractions to reason about our concurrent code, but those abstractions can apply in other situations, as well. High level user interactions are essentially large asynchronous events, and can be represented as such in code.

Example: A video storefront
No comment yet.
Scoop.it!

New Reactive Extension Support for ES5 JavaScript Developers in RxJS 2.2

New Reactive Extension Support for ES5 JavaScript Developers in RxJS 2.2 | JavaScript for Line of Business Applications | Scoop.it

Today we want to let you know that RxJS 2.2 is now available via the Rx.js CodePlex project and includes various bug fixes and contributions from the community.

Reactive Extensions (Rx) is a programming model that allows developers to use a common interface for writing applications that interact with diverse data sources, like stock quotes, Tweets, UI events, and Web service requests. Since Rx was open-sourced by MS Open Tech in November, 2012, Rx has become an important under-the-hood component of several high-availability multi-platform applications, including NetFlix and GitHub.

One common question from our customers is, "Could we get a core of RxJS with a set of operators we use most often in a single, smaller library?" We hear you and have now provided rx.lite.js. This library consists of the most commonly used features, including factory methods for creating observable sequences, standard operators such as where, select, and zip, relative-time based operators and the most commonly used features from rs.async.js, including events, callbacks and promises bindings. The file size has is drastically reduced – currently just 7k when zipped. We also provide a compatibility build, rx.lite.compat.js to support older browsers.

Jan Hesse's insight:
Compatibility Builds, a lite version, and other improvements in RxJS 2.2
No comment yet.
Scoop.it!

Don't Fear Directives In Angular.js

Don't Fear Directives In Angular.js | JavaScript for Line of Business Applications | Scoop.it

If I could go back and stop myself from making a whole bunch of mistakes in that app, I would have started with explaining that a directive is just a simple little reusable component for describing the way HTML should behave. The Angular docs try to harp on this but inevitably they make it seem obtuse and complicated. Note: Though they could be better I don’t think it’s cool to hate on the Angular docs. They’ve gotten way better even in the short time I’ve been using the framework.

In my opinion it’s a very useful tool because it allows you to encapsulate functionality in a semantic way that will (hopefully) make sense to anyone looking at your markup, and keep your functionality well “chunked” so that you can keep track of what is happening where instead of dealing with things mutating globally (which most of us hopefully know by now is bad news).

Ever had this happen with jQuery? You need to do some JavaScript magic with a particular element on the page, and so you give it some arbitrary id so you can access it with$('element#id'). Now you get to write a bunch of JavaScript that listens for the relevant events, checks the element’s state to see that it is congruent with our expectations, modify its class to change how it is displayed, and so on. It starts out as a few simple functions using a very powerful tool that soon grows into a complicated mess of callbacks, weird looking selectors, and re-render functions. It may be strewn across several files with no rhyme or reason.

Not only is it no fun, it makes it very hard for your designer friends to look at your markup and know what the expected behavior for that HTML is. So, Angular provides us with directives, which are actually pretty simple to create. So don’t be scared of them like I was. 

No comment yet.
Scoop.it!

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

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

CRUD Operations Using Knockout.JS and EntityFramework 5 in MVC4 Application

CRUD Operations Using Knockout.JS and EntityFramework 5 in MVC4 Application | JavaScript for Line of Business Applications | Scoop.it
This article is a tutorial of how to set up the knockout.js environment in a MVC4 application and perform CRUD operations on it.

I have been browsing multiple sites for a complete end-to-end tutorial or article upon CRUD operations using Knockout.JS and MVC 4. Unfortunately all I found were incomplete or short explanations. In my last article we learned about imlementation of CRUD in ASP.Net web forms using MVC and EntityFramework. This article is the continuation of the series. My effort in this article will be a kind of tutorial to explain how to set up the knockout.js environment in a MVC4 application and perform CRUD operations on it.

No comment yet.
Scoop.it!

How I Built Emojitracker - Adventures in Unicode, Real-time Streaming, and Media Culture

How I Built Emojitracker - Adventures in Unicode, Real-time Streaming, and Media Culture | JavaScript for Line of Business Applications | Scoop.it

While the source code for emojitracker has been open-source since day one, the technical concepts are complex and varied, and the parts of the code that are interesting are not necessarily obvious from browsing the code. Thus, rather than a tutorial, in this post I intend to write about the process of building emojitracker: the problems I encountered, and how I got around them.

I’d been playing around with the idea of realtime streaming from the Twitter API on a number of previous projects (such as goodvsevil, which was the spiritual predecessor to emojitracker), and I was curious about seeing how far I could push it in terms of number of terms monitored. At 842 terms to track, emoji seemed like a prime candidate.

Emoji are also a great way to get insight to the cultural zeitgeist of Twitter: the creative ways in which people appropriate and use emoji symbols is fascinating, and I hoped to be able to build a lens that would enable one to peer into that world with more detail.

 

* Background Understanding: Emoji and Unicode

* Emojitracker Backend Architecture
Feeding the Machine: Riding the Twitter Streaming API
Data Storage: Redis sorted sets, FIFO, and Pubsub streams
Pushing to Web Clients: Utilizing SSE Streams
Performance Optimizations for High Frequency SSE Streams
Gotcha: Many “cloud” environments don’t properly support this (and a workaround)
Not crossing the streams: The admin interface

* Frontend Architecture
* Frontend Performance
* Deploying and Scaling
* Things I’d still like to do
* Reception and conclusions

No comment yet.
Scoop.it!

A Deep Dive into Asynchronous Templating

A Deep Dive into Asynchronous Templating | JavaScript for Line of Business Applications | Scoop.it

Nunjucks does a lot of things, like loading templates, calling filters, and more. All of this is synchronous by default (which isn't a problem for loading templates, since they are loaded once and cached forever). This limits what you can do in filters and template loaders, since you can't use any async functions.

Asynchronous templates can be paused in the middle of rendering and resumed later.

This hasn't been a problem for a long time, and for most people never will be a problem. You don't want to mix too much logic with your templates, so you usually do all the complicated async work in a controller and pass the data to the template.

However, I can imagine sites that are heavily template-driven and developers wanting to wrap up some sort of behavior that depends on an async operation into a filter or custom tag. Nunjucks is built to allow people to add logic to their templates as needed, and works great for large content-heavy projects where not everybody is familiar with the backend.

Regardless, I think asynchronous control is an interesting feature that doesn't adversely effect existing templates, so I decided to dig into it. Here's what I came up with.

No comment yet.
Scoop.it!

Creating a Simple JSONP API with Node.js and MongoDB

Creating a Simple JSONP API with Node.js and MongoDB | JavaScript for Line of Business Applications | Scoop.it
By leveraging the Node.js middleware “express”, we can create functionality for viewing, adding or deleting JSON data.

The goals for this article are:
* Allow the user to view all data in the database
* Allow the user to make a JSONP call to get all data
* Allow the user to add a new name to the Sales database
* Allow the user to delete all data in the database

 

When completed, this will be far from a robust or production-ready application, but we will, at minimum, learn how to view / add / delete data in our MongoDB database, using clean URLs in the browser.

No comment yet.
Scoop.it!

Backbone.Notifier | Powerful UI Notifications & Dialogs Framework for Backbone.js

Backbone.Notifier | Powerful UI Notifications & Dialogs Framework for Backbone.js | JavaScript for Line of Business Applications | Scoop.it

Backbone.Notifier was born as part of JSNAIL.IT (not live at the moment, maybe will revive it some day), an independent project I've worked on. It started as a component I were quite pleased with, and thought it may be also useful by others, so I've decided to add some features, make it completely independent and open it's source.

After years of working and using dozens of open-sourced projects, I'm glad to contribute to this amazing community and hope you'll find it useful. Feel free to contact me for any purpose.

No comment yet.
Scoop.it!

Integrating jQuery Chosen plugin with EmberJS and Bootstrap

Integrating jQuery Chosen plugin with EmberJS and Bootstrap | JavaScript for Line of Business Applications | Scoop.it

I would like to show you how Chosen can be quickly integrated into your EmberJs application together with Twitter Bootstrap.

I’m currently working on web application. We use JavaScript MVC web framework called EmberJs. It is very cool framework, and I will write about it more in the future. Ember has small set of views and input-helpers. Just using them is not always enough to build solid and rich application. Fortunately there are tons of controls available online, and it is quite easy to write your own controls with Ember.

Most of online available controls/plugins are based on jQuery (no surprises, of course) and they use plain javascript objects. Ember wraps javascript objects into Ember.Object, so it allows for data binding, data tracking and other advanced features, but on other hand it makes impossible to use vast majority of web components right away. You need to adapt them in order to to use them with Ember.

Having component created with Ember would result in application-specific html-tag, that would use JavaScript logic defined by you. Something like: <my-own-html-tag… that does and shows what you want.

Chosen. One of the controls we wanted to use was Chosen. “Chosen is a jQuery plugin that makes long, unwieldy select boxes much more user-friendly.” It allows you to have nice multi-selects that look like one below:

No comment yet.
Scoop.it!

Single Page Application Boilerplate with AngularJS and Phalcon Micro Framework

Single Page Application Boilerplate with AngularJS and Phalcon Micro Framework | JavaScript for Line of Business Applications | Scoop.it
The web is evolving so quickly.
While web browsers and computers are getting more powerful, architectures which give load to clients are getting popular.

Single Page Application (SPA) idea is one of them. In this post, I’ll setup a simple boilerplate for my future SPA tutorials. I’am going to keep posting about SPAs based on this boilerplate.

No comment yet.
Scoop.it!

Managing JavaScript Complexity

These are the slides for the talk "Managing and Visualizing JavaScript Complexity" given at QCon SF 2013 by Jarrod Overson