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

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.

No comment yet.
Scoop.it!

Angular, Ember, And Backbone: Which JavaScript Framework Is Right For You?

Angular, Ember, And Backbone: Which JavaScript Framework Is Right For You? | JavaScript for Line of Business Applications | Scoop.it
Picking a Javascript framework isn't about preference. It's about what best fits your project.

If you’re reading this, I’m assuming that you’re a beginner or novice developer, or else you’re hiring somebody else to develop your idea for you. But while you’ve probably heard the words Angular, Ember, and Backbone, you might not know what they are, or why they help web development.

Developers use JavaScript for lots of different Web applications because it can really make the client side—that is, the user’s side—look and work beautifully. But while it may not look old, the JavaScript language has been around for nearly 20 years, and it has the variety and vastness to prove it. If you keep adding more and more (see: redundant) code to make it work in multiple browsers and use cases, it can quickly become a big, confusing mess. 

Enter JavaScript frameworks. Frameworks like Angular, Backbone, and Ember bring structure to your JavaScript code and keep it organized. They’re all open source, so they’re constantly being improved by the community. They also save you time because they’re each built on top of JQuery, a powerful library that makes some of JavaScript's tricker operations easier to perform and more readable.

No comment yet.
Scoop.it!

How to pass JavaScript variables from a server to AngularJS

How to pass JavaScript variables from a server to AngularJS | JavaScript for Line of Business Applications | Scoop.it

I came across the problem of sending JavaScript variables from my backend, in this case an Express.js server, to my frontend, means an AngularJS controller. I'm using Jade as my template engine but the presented solutions should work with others, too.
Basically you've got three options for doing this:
* Put the variable into the view file inside a script tag
* Make an HTTP request from AngularJS and serve the data as JSON from the backend
* Be smart and use ng-init

At the end of the article you find a link to a GitHub repo containing working examples for all the presented solutions. To play with the code fork and modify it according to your needs or start from scratch and add code while reading on. So, let's start...

No comment yet.
Scoop.it!

Angular and Polymer Data Binding, Together!

Angular and Polymer Data Binding, Together! | JavaScript for Line of Business Applications | Scoop.it

Angular, a super heroic MVC framework, and Polymer, polyfills and enhancements for custom elements built on top of Web Components, can live harmoniously in the same app. This post shows you how to connect Angular-controlled components to Polymer-controlled elements via data binding. And we do it all in Dart.

There are some similar features between the two libraries. Both libraries implement a data binding solution (which we cover below). Angular is beginning to build on top of emerging web standards (like Shadow DOM). I expect that, over time, more and more of Angular will take advantage of the Web Components family of specifications.

We can interop Angular and Polymer via the DOM, as well as via data binding.

No comment yet.
Scoop.it!

Testium: integration test platform for Node.js using mocha and a sync api

Testium: integration test platform for Node.js using mocha and a sync api | JavaScript for Line of Business Applications | Scoop.it

With testium you can write integration tests that:
* use a familiar BDD syntax
* are written in CoffeeScript/JavaScript
* have a synchronous API
* can leverage Selenium

Why Create a New Tool?
Since the beginning of our transition to Node.js, we have been looking for a great way to include integration testing in our Node.js applications. In Ruby on Rails, we had a Cucumber setup that could run tests in real browsers via Selenium. The relationship with testing tools was not strongly defined for Node.js (the platform) or even Express (the underlying framework).
That lead us to look for other existing tools we could adopt. We tried a couple of tools, but they just didn’t fit our needs for different reasons.

No comment yet.
Scoop.it!

Get your Frontend JavaScript Code Covered

Get your Frontend JavaScript Code Covered | JavaScript for Line of Business Applications | Scoop.it

So finally you're testing your frontend JavaScript code? Great! The more you write tests, the more confident you are with your code… but how much precisely? That's where code coverage might help.

The idea behind code coverage is to record which parts of your code (functions, statements, conditionals and so on) have been executed by your test suite, to compute metrics out of these data and usually to provide tools for navigating and inspecting them.

Not a lot of frontend developers I know actually test their frontend code, and I can barely imagine how many of them have ever setup code coverage… Mostly because there are not many frontend-oriented tools in this area I guess.

Actually I've only found one which provides an adapter for Mocha and actually works…

No comment yet.
Scoop.it!

Combining WinJS, TypeScript, jQuery and Knockout

Combining WinJS, TypeScript, jQuery and Knockout | JavaScript for Line of Business Applications | Scoop.it
A tutorial on getting started with building Windows Store apps using TypeScript. It shows you how to use frameworks you already know, like jQuery and Knockout.

In this tutorial we’re going to build a very simple Windows Store application that uses jQuery and Knockout to get some data from the internet and show this in a GridView. I’ll show you how you create a new project, get all the the TypeScript definitions you need, get data from a web service and bind that to the GridView control. I’m assuming you have at least a little TypeScript knowledge. 

No comment yet.
Scoop.it!

Building a Google Calendar Booking App with MongoDB, ExpressJS, AngularJS, and Node.js - Part 1

Building a Google Calendar Booking App with MongoDB, ExpressJS, AngularJS, and Node.js - Part 1 | JavaScript for Line of Business Applications | Scoop.it

As fate would have it, a friend of mine needed some help building a booking app linked to his Google Calendar so his clients could book his photography studio from his website. The app needed to display the days already booked on his calendar and allow users to book any of the open days in the future. I took this as the opportunity and motivation I needed to dive into learning these new frameworks.


I'm going to take you through my code to create a basic calendar booking application. Starting with building the Node.js API in part one and finishing with the Angular interface in part two. Before I start digging into the code I want it to be mentioned that this is by no means meant to be considered a best practices guide or anything of the sort. I've only just started learning Node.js and the following is just the different methodologies I've gathered from multiple resources all over the web. If you have see anything that can be improved upon please don't hesitate to comment below!

Jan Hesse's insight:

Part2: http://blog.jonathanbroquist.com/building-a-google-calendar-booking-app-with-mongodb-expressjs-angularjs-and-node-js-part-2/

No comment yet.
Scoop.it!

Sample Force.com Mobile Application with Ionic and AngularJS

Sample Force.com Mobile Application with Ionic and AngularJS | JavaScript for Line of Business Applications | Scoop.it

In my previous post, I wrote about Ionic, a new UI framework that’s built on top of AngularJS and that provides mobile-optimized UI components to build high-performance hybrid applications that look and feel native. I also shared an employee directory sample application built with Ionic and AngularJS.

In this post, I’ll share the same application connecting to the salesforce.com platform using the Force.com Mobile SDK. After authenticating with OAuth, the user can search for contacts by name, and then call, text, or email the selected contact.

No comment yet.
Scoop.it!

Generating Files with JavaScript and Ember.js

Generating Files with JavaScript and Ember.js | JavaScript for Line of Business Applications | Scoop.it

My colleague Jason Porrit recently wrote about loading and processing files with Ember.js. Today, I’ll cover two techniques for going in the opposite direction: generating files with JavaScript in the browser. I used these techniques while working with Jason on an Ember.js app, so my examples are geared toward Ember.js, but the techniques themselves can be used with any JavaScript framework (or no framework at all).

In a typical web app, files are generated on a server and then downloaded by the browser (or other client). We decided to turn that idea on its head, shifting the responsibility to the browser. This was a clear win in the case of our Ember.js app because we already had nearly all of our presentation logic in the client-side JavaScript code. Our server is merely responsible for providing data upon request. It’s the responsibility of the client-side code to present that data to the user, whether in a web page or as a downloadable file.

Jan Hesse's insight:

Two techniques for generating files with JavaScript and Ember.js, entirely in the browser.

No comment yet.
Scoop.it!

I-want-to-optimize-my-JS-application-on-V8 checklist

Samurais had something called bushidō, way of the warrior, code of conduct they had to follow. In similar manner you have to follow certain opt-dō if you want to optimize your application. I have tried to sketch such a path in my nodecamp.eu talk "Understanding V8" and +Daniel Clifford tried to do the same in "V8 Performance Tuning Tricks" talk on GDD11 in Berlin. But not everybody has seen those talks and the question keeps coming back again. So I decided to write down a quick check list for developers who want to optimize their apps. tl;dr version of my checklist is: "Understand before you act". 


he more you understand about your app the better you can optimize it. Sometimes a tricky algorithm or a cache placed in right place will yield more improvements than any local tweaking. Understanding your application in large is a very difficult problem which requires special tooling and discipline. I highly recommend to read @coda's Metrics Metrics Everywhere talk if you want to get a glimpse of that world. Sometimes it is possible to split big application into pieces and optimize them separately but there is no guarantee that overall gain will not be lost when those pieces are connected back together.

No comment yet.
Scoop.it!

How to leverage SQL Server with Node.js using Edge.js

How to leverage SQL Server with Node.js using Edge.js | JavaScript for Line of Business Applications | Scoop.it

If you've ever tried connecting to MS SQL Server from Node.js, then you know that the modules currently available are incomplete and immature. Microsoft released an official SQL Server driver. However, it is still "preview" technology with a number of missing features and outstanding issues that haven't been addressed since its release.

One compelling alternative I have discovered is Edge.js. Edge.js is a Node.js module that allows .NET code and assemblies to run in the same process with Node.js. This potentially enables a Node.js developer to leverage technologies that have traditionally been very hard or impossible to use in the past. For example:
* SQL Server
* Active Directory
* Nuget packages (currently 18K+ packages available)
* PC or Server hardware (e.g. webcam, microphone, and printers)
* Legacy .NET code

No comment yet.
Scoop.it!

Code Organization in Angular

Code Organization in Angular | JavaScript for Line of Business Applications | Scoop.it

The number one question I see over and over with programmers new to angular is “how do I organize my code?”. I think that this is because the way you organize sample code is completely different than simple code, which again, is totally different than a complex application, and those transitions are not self-evident.


* Sample Code - aka One Big File
* Simple App - aka The Angular-Seed Method
* Splitting your application up into modules
* Angular and Require.js
* Choosing what is right for your project


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

No comment yet.
Scoop.it!

AngularJS Testing: Consolidating Injections

AngularJS Testing: Consolidating Injections | JavaScript for Line of Business Applications | Scoop.it

With AngularJS, you get Dependency Injection - duh, great post so far…

You love DI so you start cranking out tests injecting and mocking everything under the sun. You wake up 3 months later and you have a nasty code smell: Copy Paste Monsters are everywhere

Solution: Try your best not to be so damn lazy…I fight it every 2 seconds…

No comment yet.
Scoop.it!

Convert a view into a component

Components landed in Ember in 1.0.rc6, in June 2013. They are reusable widgets that are built on top of HTML and provide a richer functionality. For the sake of reusability, they are isolated from their surroundings, and -as opposed to views- do not have access to their context. Everything a component has to know from the outside world has to be passed in at creation. Anything it wants to communicate to the outside world needs to be sent via events (or actions, in Ember parlance).

Usability is meant not just between different parts of the same application but across Ember applications, too. Once achieved, it would imply that a component for a specific task needs to be written once and could be used anywhere, just like jQuery plugins.

That is an ambitious goal which is to expected from an ambitious framework. We are not quite there, yet, and the specifics are still under discussion. Nevertheless, components are a great thing and you should start using them today, if you have not already.

No comment yet.
Scoop.it!

Selectize.js binding for Knockout.js

This is a custom binding for using Selectize.js with your Knockout.js powered application.

Selectize is an HTML select alternative (like Select2, Chosen). Knockout is an MVVM framework for Javascript.

The custom binding can be used as:
<select data-bind="selectize: items, value: item_id, object: item"></select>

items is an array (or observable array) whereas item_id and item are observables. The dropdown is created with all objects from items.

This custom binding wraps the built-in options binding of Knockout.js. So, additional parameters like ‘optionsValue’, ‘optionsText’, ‘optionsCaption’, etc. can be used with this binding. See official documentation for further details. By default, the selectize binding uses id for optionsValue and name for optionsText.

By default, the text Choose... is used as optionsCaption. You can use optionsCaption: null for no captions (first item is selected by default).

The selectize binding provides optional object parameter. While the observable provided with value parameter (like item_id in our example) holds the id (or whatever property optionsValue defines), the observable provided with object parameter holds the whole item itself.

No comment yet.
Scoop.it!

total.js / web framework for node.js

total.js / web framework for node.js | JavaScript for Line of Business Applications | Scoop.it
Free web application framework for building Web sites and Web applications using JavaScript, HTML and CSS.
No comment yet.
Scoop.it!

PropertyCross: WebApp Frameworks compared (with actual code)

PropertyCross: WebApp Frameworks compared (with actual code) | JavaScript for Line of Business Applications | Scoop.it
Helping you select a cross-platform mobile framework - Apps using jQuery Mobile, Sencha Touch, Titanium and more


Some of the frameworks deliver a native user interface, whereas others construct a native-like interface using HTML5 technologies. When selecting a framework it is important to test the end-user experience that the framework delivers and ensure you are happy with any compromises.

The code-sharing which can be realistically achieved with each framework varies considerably. To aid in this comparison there is a build script which produces code metrics for guidance. Although, as developers I am sure you are aware that lines-of-code metrics are flawed.

It is also worth investing quite a bit of time familiarising yourself with tools provided by each framework. The cost and quality of these varies considerably.

No comment yet.
Scoop.it!

lets build a backbone based framework!!

I’ve been building large scale applications in Backbone for about 8 months now. In that time I’ve used throax as well as building custom solutions in backbone.
Last night, I live coded the creation of a demo backbone framework similar in features to Thorax. I’m going to walk you through how I’ve solved architectural problems in contructing a large scale backbone framework.

When building a large scale Backbone, there are several consderations to consider.
* How are we going to have templates load? Inline html declarations in the views do not scale
* how do we handle render?
* how do we handle child views?

By default, backboneView.render() is a noop. Its meant to be overidden. Backbone.Events gives us a nice set of methods to allow Backbone objects to listenTo() events off each other, However, the actual bindings and callbacks are left to the implimenter.

No comment yet.
Scoop.it!

Creating a Visualization App Using the Google Charts API and AngularJS

Creating a Visualization App Using the Google Charts API and AngularJS | JavaScript for Line of Business Applications | Scoop.it

Nowadays, JavaScript is everywhere. A number of useful JavaScript frameworks like Ember.js, Backbone.js, etc. are changing the face of the Web. Among the most popular frameworks is AngularJS, developed by Google. This article, the first of three, will teach you how to build a visualization app using AngularJS. The example app will visualize data using the Google Charts API. We’ll be using one of the awesome two-way binding features of Angular to make our charts dynamically change as per change in data and user input.

Before getting started, let’s first take a look at how to use the Google Charts API. For the purposes of this app, we’ll stick to some basic charts like line charts, pie charts, etc.

Jan Hesse's insight:

Part2: http://www.sitepoint.com/creating-visualization-app-using-google-charts-api-angularjs-part-2/

No comment yet.
Scoop.it!

Why AngularJS Will Be Huge

Why AngularJS Will Be Huge | JavaScript for Line of Business Applications | Scoop.it

Like most people, when I first started learning Angular I found it to be a very high quality foundation for building great apps, and doing it quickly. Testability, dependency injection, separation of the logic/view layer, and designer-developer harmony are all great things us devs can get behind, and Angular had it in spades.

But we all know it's hard to get by on just merit alone, and the verdict is always going to be out on whether Angular is really technically better than the alternatives (developers are notoriously unwavering when it comes to tech wars).

No, in order for a technology to be truly, incredibly successful, it needs to become more than just a quality framework. It has to become a platform.

No comment yet.
Scoop.it!

Sigma.js | dedicated to graph drawing

Sigma.js | dedicated to graph drawing | JavaScript for Line of Business Applications | Scoop.it

Sigma is a JavaScript library dedicated to graph drawing. It makes easy to publish networks on Web pages, and allows developers to integrate network exploration in rich Web applications.

Sigma provides a lot of built-in features, such as Canvas and WebGL renderers or mouse and touch support, to make networks manipulation on Web pages smooth and fast for the user.

Sigma provides a lot of different settings to make it easy to customize how to draw and interact with networks. And you can also directly add your own functions to your scripts to render nodes and edges the exact way you want.

Sigma is a rendering engine, and it is up to you to add all the interactivity you want. The public API makes it possible to modify the data, move the camera, refresh the rendering, listen to events...


No comment yet.
Scoop.it!

AngularJS SEO with Prerender.io

AngularJS SEO with Prerender.io | JavaScript for Line of Business Applications | Scoop.it

AngularJS is an excellent framework for building websites and apps. Built in routing, data-binding and directives among other features enable AngularJS to completely handle the front-end of any type of application.

The one pitfall to using AngularJS (for now) is Search Engine Optimization (SEO). In this tutorial, we will go over how to make your AngularJS website or application crawlable by Google.

Search engines crawlers (or bots) were originally designed to crawl HTML content of web pages. As the web evolved, so did the technologies powering websites and JavaScript became the de facto language of the web. AJAX allowed for asynchronous operations on the web. AngularJS fully embraces the asynchronous model and this is what creates problems for Google’s crawlers.

If you are fully utilizing AngularJS, there is a strong possibility that you will only have one real HTML page that will be fed HTML partial views asynchronously. All the routing and application logic is done on the client side, so whether you’re changing pages, posting comments, or performing other CRUD operations, you are doing it all from one page.

No comment yet.
Scoop.it!

Yet Another Framework Syndrome (YAFS)

Yet Another Framework Syndrome (YAFS) | JavaScript for Line of Business Applications | Scoop.it

Almost every day, we see new libraries, frameworks and tools being released in the JavaScript community - many of which simply reinvent the wheel.

This regular stream of solutions, which opt to create something new rather than improve an existing solution is what we at TodoMVC refer to as ‘Yet Another Framework Syndrome’ - or in more general terms NIH (Not Invented Here). Whilst innovation is something we should all welcome, YAFS can lead to confusion and frustration for users because there’s a big risk of it introducing more noise than value. Just one example is MVC.

Developers often just want to start writing an app but don’t want to manually evaluate 300 different options in order to select something maintainable. There’s currently however almost too much choice when it comes to what to use for structuring your JavaScript application. Part of this problem is fueled by how different JavaScript developers interpret how a scalable JavaScript application should be organized — everyone feels their way is the best. As a community we seem to prefer creating our own silos over improving existing solutions.

No comment yet.