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

Edge.js - connects Node.js V8 and .NET CLR - in process

Edge.js - connects Node.js V8 and .NET CLR - in process | JavaScript for Line of Business Applications | Scoop.it

Edge.js allows you to run .NET and Node.js code in one process. You can call .NET functions from Node.js and Node.js functions from .NET. Edge.js takes care of marshaling data between CLR and V8. Edge.js also reconciles threading models of single threaded V8 and multi-threaded CLR. Edge.js ensures correct lifetime of objects on V8 and CLR heaps. The CLR code can be pre-compiled or specified as C#, F#, Python, or PowerShell source: edge.js can run CLR scripts at runtime. Edge can be extended to support other CLR languages.

No comment yet.
Scoop.it!

Scalable JavaScript Application Architecture

Discover how to build a JavaScript application framework that scales for the challenges of today's complex web applications.
No comment yet.
Scoop.it!

Unit Testing AngularJS Controller Using QUnit and Sinon

Unit Testing AngularJS Controller Using QUnit and Sinon | JavaScript for Line of Business Applications | Scoop.it

Angular JS is known for and is becoming increasingly popular due to its nature of testability. Angular’s in-the- box abstractions make any amount of code easily testable. Code written using Angular JS can be tested using any JavaScript unit testing framework out there, may it be QUnit, Jasmine, Mocha or some other library.


QUnit is a JavaScript unit testing framework developed by jQuery team. It is used in the projects like jQuery, jQuery UI, jQUery Mobile. QUnit is a very simple and generic framework that can be used to test any piece of JavaScript code. Unlike Jasmine, QUnit doesn’t have built-in support for creating spies. 

Sinon is a JavaScript library that makes the process of creating spies, mocks and stubs easier. It doesn’t depend on any other JavaScript library and easily integrates with any JavaScript unit test framework. Official site has a nice API documentation covering different features of the library. 

No comment yet.
Scoop.it!

Why The Hell Would I Use Node.js? A Case-by-Case Introduction

Why The Hell Would I Use Node.js? A Case-by-Case Introduction | JavaScript for Line of Business Applications | Scoop.it
Node.js was never created to solve the compute scaling problem. It was created to solve the I/O scaling problem. Find out why, with case-by-case analysis.

In one sentence: Node.js shines in real-time web applications employing push technology over websockets. What is so revolutionary about that? Well, after over 20 years of stateless-web based on the stateless request-response paradigm, we finally have web applications with real-time, two-way connections, where both the client and server can initiate communication, allowing them to exchange data freely. This is in stark contrast to the typical web response paradigm, where the client always initiates communication. Additionally, it’s all based on the open web stack (HTML, CSS and JS) running over the standard port 80.

Jan Hesse's insight:

love it, really really to the point

Augusto Porto's curator insight, August 28, 2013 8:55 AM

Good insight on "what is" Node.js

Scoop.it!

Understanding Scope and Context in JavaScript

Understanding Scope and Context in JavaScript | JavaScript for Line of Business Applications | Scoop.it

JavaScript’s implementation of scope and context is unique to the language because it is so flexible. Functions can be adopted for various contexts and scope can be encapsulated and preserved. These concepts lend to some of the most powerful design patterns JavaScript has to offer. However, this is also a tremendous source of confusion amongst developers, and for good reason. The following is a comprehensive explanation of scope and context, the difference between them, and how various design patterns make use of them.

No comment yet.
Scoop.it!

Incredibly convenient testing of front-end Javascript with Node.js

Incredibly convenient testing of front-end Javascript with Node.js | JavaScript for Line of Business Applications | Scoop.it

You do have automated testing for your front-end Javascript application / library / framework don’t you? And tests work equally well at console, browsers and Travis aren’t they? And you run them in every possible browser on each release (or even push) right? If the answer is no, you might be doing it wrong. Let’s see if we can do something about it!

This article briefly describes a little piece of theory behind testing of standalone front-end projects, issues that you are likely to meet and the solution I came up with.

When it comes to testing, the first question is — which framework are we going to use? There are numerous articles on the Internet that describe pros and cons of those.

I personally prefer Jasmine and Mocha (coupled with CoffeeScript and Chai they feel so much like RSpec). But it’s only a matter of taste in fact. Their capabilities are more or less equal.

Let’s say we have a framework. Then we can manually create HTML file, include JS we want to test, open it in a browser and, well, test. It’s certainly a kind of automatic testing already but still so far away from something reasonable. And the first thing to think about is Continuous Integration. You can only run such tests manually and see the results with your eyes. No “on-commit runs”, no Travis integration. Sadness.


No comment yet.
Scoop.it!

ember-beats - A drum machine built with Ember.js

ember-beats - A drum machine built with Ember.js | JavaScript for Line of Business Applications | Scoop.it

Try and you might find your DJ skills.

No comment yet.
Scoop.it!

Building a Knockout.js based client for Web API services in an ASP.NET MVC app

Building a Knockout.js based client for Web API services in an ASP.NET MVC app | JavaScript for Line of Business Applications | Scoop.it

A common question is how to create an editable list of data allowing users to Edit and Save existing data. The default MVC scaffolding in Visual Studio provides us with a way to implement this where Create/Edit/Delete are implemented on the server side and each action has a separate UI. Today we will see how we can implement it using jQuery and a lightweight client side library knockout.js (also referred to as KO).

On the server, we will use ASP.NET Web API to expose the database services that will be accessed by JavaScript. Needless to say we will use AJAX to communicate with the backend Services.

For any ‘List’ of data there is a need for implementing some kind of template or repeater behavior so that we can define the UI for one row of data and the library/framework takes that template and repeats it for the entire list. We know how to do this in ASP.NET MVC using Razor syntax. Today we’ll see how implement the repeater UI using KO’s templating engine. We will also see how we can define separate templates for Display and Edit modes.

No comment yet.
Scoop.it!

Using an AngularJS Factory to Interact with a RESTful Service

Using an AngularJS Factory to Interact with a RESTful Service | JavaScript for Line of Business Applications | Scoop.it

AngularJS provides a great framework for building robust Single Page Applications (SPAs) and provides built-in support for routing, MV*-style programming, services and factories, modules, testing, and much more. Although Angular can consume virtually any HTTP resource, in this post I’m going to focus on using it to consume a RESTful API created using ASP.NET Web API (note that any back-end service could be used). If you’ve worked with jQuery before then you’re used to calls such as $.getJSON() or $.ajax(). Although Angular plays really well with jQuery, it has built-in HTTP functionality that can be used out of the box and a way to encapsulate data functionality using factories or services.

Let’s kick things off by taking a look at a basic backend service written using ASP.NET Web API and then walk through several AngularJS features including a factory that talks to the service.

No comment yet.
Scoop.it!

Beautiful JavaScript: Easily Create Chainable (Cascading) Methods for Expressiveness

Beautiful JavaScript: Easily Create Chainable (Cascading) Methods for Expressiveness | JavaScript for Line of Business Applications | Scoop.it

Chaining Methods, also known as Cascading, is the technique of repeatedly calling different methods (or the same method) on an object in one continuous line of code. This technique is popular in jQuery and other JavaScript libraries, and it is even inherent in JavaScript’s native methods like the common String methods. It is just so lovely that we can’t resist making our own methods facilitate cascading.

We will learn that this technique is easy and effortless because it is rather straightforward to implement chainable methods in JavaScript. We only have to return this(the object we want subsequent methods to operate on) in each method. Let’s learn this baby quickly and get back to what we were doing.

No comment yet.
Scoop.it!

HTML5 WebSockets (Test WebSocket For Client/server)

HTML5 WebSockets (Test WebSocket For Client/server) | JavaScript for Line of Business Applications | Scoop.it
As you learn about HTML5 WebSockets in my previous article which is introduction article here in this article we will going to test the websockets.
No comment yet.
Scoop.it!

Decoupling Your HTML, CSS, and JavaScript

Decoupling Your HTML, CSS, and JavaScript | JavaScript for Line of Business Applications | Scoop.it

In today's large Web companies, an increasing number of people are touching an increasingly large percentage of the front-end code. As a result, most organizations struggle to keep their code modular. Changes to one part of the application often inadvertently break unrelated parts downstream.

Preventing unintended consequences is not an easy problem to solve, especially since HTML, CSS, and JavaScript are, by their nature, co-dependent.

To make matters worse, traditional computer science principles like the separation of concerns, which have long been a part of server-side development, rarely get discussed when it comes to front-end code.

In this article I'll talk about how I've learned to decouple my HTML, CSS, and JavaScript. From my experience and the experience of people I know, the best ways to accomplish this are far from obvious, often counter-intuitive, and sometimes go against much of the so-called "best-practices" out there.

No comment yet.
Scoop.it!

Using Angular.js Factories To Get Remote Data

Using Angular.js Factories To Get Remote Data | JavaScript for Line of Business Applications | Scoop.it

In this post, I’d like to show the differences between using an Angular.js factory to get local JSON data vs remote data via an AJAX call.

To make a HTTP call via an Angular.js factory, we need to pass the $http object into the factory and then make a call to the remote HTTP request using the $http.get() method.

In this example, you can see that the controller makes a request to the factory which then calls an asynchronous function ($http.get) to get the data. When this asynchronous function completes successfully, it calls back to an anonymous function in the controller and populates the view model.

No comment yet.
Scoop.it!

Services (Part 6 of AngularJS from beginner to expert in 7 steps series)

Services (Part 6 of AngularJS from beginner to expert in 7 steps series) | JavaScript for Line of Business Applications | Scoop.it

We started our demonstrating the core components of the application and how to set up an AngularJS app. In the previous post, we covered the internals of directives in AngularJS.

In this section, we’ll tackle services, clean up our code, and finalize our audio player.

Throughout this tutorial series, we are building an NPR audio player that will show us the current stories on the showMorning Edition and play them in our browser. To see the fully finished demo, head over here.

Up until now, we’ve only concerned ourselves with how the view is tied to $scope and how the controller manages the data. For memory and performance purposes, controllers are instantiated only when they are needed and discarded when they are not. That means that every time we switch a route or reload a view (we’ll cover routing in the next post), the current controller gets tossed out.

Services provide a method for us to keep data around for the lifetime of the app and communicate across controllers in a consistent manner.

No comment yet.
Scoop.it!

Ember and D3 - Building a simple dashboard

Ember and D3 - Building a simple dashboard | JavaScript for Line of Business Applications | Scoop.it

Last night I gave a talk at the Boston Ember.js meetup group. Here are the materials from my presentation.

Slides: http://slid.es/samselikoff/ember-and-d3

Demo: Each part is self-contained, so you can view source to see exactly what’s going on:

Part 1 - ScaffoldingPart 2 - DatepickerPart 3 - Data from routesPart 4 - Data within routesPart 5 - Flexibility

Video: http://www.youtube.com/watch?v=gz7Jy2abm10.

Or, you can take a look at the project on github.

Have fun!

No comment yet.
Scoop.it!

Configuring Dependency Injection in AngularJS

Configuring Dependency Injection in AngularJS | JavaScript for Line of Business Applications | Scoop.it

Dependency injection is the act of supplying values or object instances (dependencies) to target objects from outside of the target object. In many (most?) cases this is automated by a framework, such as AngularJS.

This means that a given target object does not create its own dependencies, through the use of thenew keyword or other creation methods.

By creating and managing dependencies outside of an object, it makes it much easier to switch out that dependency as needed. This is very useful when you are writing your unit tests, and can have many advantages in larger systems.

There are only three ways for an object to resolve its dependencies:

  • internally, via the new operator
  • lookup via a global variable (requirejs is an example)
  • the dependency is passed to the object

The third option is dependency injection, and it is the preferred approach in AngularJS apps.

No comment yet.
Scoop.it!

Backbone and Ember

Backbone and Ember | JavaScript for Line of Business Applications | Scoop.it

Ember and Backbone are both promising JavaScript frameworks but have completely different philosophies. In this post, I'll compare the two, both from a practical and philosophical perspective. I'll defer to real world experience with Backbone and SproutCore (Ember's predecessor), as well as basic experiments with Ember (full disclosure: haven't built a large Ember app yet).

So we have a roughly apples-to-apples comparison. Let me dive in and talk about some philosophical differences:..

No comment yet.
Scoop.it!

Introducing MacGyver- an AngularJS module comprised of directives, filters and utilities

Introducing MacGyver- an AngularJS module comprised of directives, filters and utilities | JavaScript for Line of Business Applications | Scoop.it

Today we’re happy to announce the release of MacGyver, the duct tape and swiss army knife for AngularJS applications.

What is it?

MacGyver is an AngularJS module comprised of directives, filters and utilities for quickly developing your UI. It was built to meet the need for reusable components between multiple AngularJS applications.

 

What does it include?

MacGyver includes the following directives:

  • autocomplete

  • datepicker

  • file upload

  • menu

  • modal

  • spinner

  • tag autocomplete

  • tag input

  • time input

  • tooltip

- See more at: http://tech.shift.com/post/58726393361/introducing-macgyver#sthash.wdN5JTik.dpuf

No comment yet.
Scoop.it!

JavaScript Object Oriented Programming(OOP) Tutorial

JavaScript Object Oriented Programming(OOP) Tutorial | JavaScript for Line of Business Applications | Scoop.it

JavaScript supports Object Oriented Programming but not the same way as other OOP languages(c++,php,Java,etc.). The main difference between these language and JavaScript is, there is no Classes in JavaScript where the classes are very impotent to create objects. But there is a way we can simulate the Class concept in JavaScript. 
Another important difference is data hiding. There is no access specifiers like (public,private,protected) in JavaScript. Again we will simulate the concept using variable scope in functions. 

Object Oriented Programming Concepts

1)Object
2)Class
3)Constructor
4)Inheritance
5)Encapsulation
6)Abstraction
7)Polymorphism

No comment yet.
Scoop.it!

HTML5 Real-Time Chat with Websockets, jQuery, and Spike-Engine - CodeProject

HTML5 Real-Time Chat with Websockets, jQuery, and Spike-Engine - CodeProject | JavaScript for Line of Business Applications | Scoop.it

MyChat: a simple real-time client-server chat using fancy HTML5 features and identicons.

Everything in the web becomes increasingly real-time and HTML5 finally offers some facilities to build efficient, simple and robust real-time applications on the web. This article serves as a demonstration of such facilities in building a fun and simple client-server chat: 

  1. It uses websockets internally, but abstracted by Spike-Engine, will fallback to flash sockets for older browsers.
  2. It uses HTML5 Data URI for rendering images streamed from the server as byte arrays.
  3. It uses custom fonts and jQuery for animated rendering.
  4. It is cross-platform and with a minimized packet payload and message compression.
  5. The application server is a self-hosted executable and the client is just a plain html file.

First of all, we need to define a communication protocol between. This represents the messages which are exchanged between the client and the server. Spike-Engine simplifies the networking implementation and allows expressing this protocol declaratively via an XML file. This part is quite straightforward, check the user guide on their website for more info. 

No comment yet.
Scoop.it!

Brick - UI Components for Modern Web Apps

Brick - UI Components for Modern Web Apps | JavaScript for Line of Business Applications | Scoop.it

Brick is a bundle of reusable UI components created to enablerapid development of HTML5 apps. Brick adds new HTML tags- allowing developers to express the structure of an application in a clearer, more concise manner.

No comment yet.
Scoop.it!

ko.public - A New Way for Your Knockout.js Modules to Talk

ko.public - A New Way for Your Knockout.js Modules to Talk | JavaScript for Line of Business Applications | Scoop.it

As developers we know that we should be keeping out code modular. That means if you’re using a library like Knockoutjs you shouldn’t put all your code in a single viewmodel.

So what if you need those modules to be able to communicate with each other? Typically you would use a PubSub type of structure to allow cross module communication but what if there was an easier way?

As I was developing in Knockout I thought, what if there was a way for me to specify a value on 2 different viewmodels that used the same observable value? So when one is updated, the other would get that message and automatically update and push changes to the view.

Well, it turns out it is easier than I thought. A few lines of code later and I had it. I’m calling the solution ko.public, and it’s available on GitHub under the MIT license. So go nuts, and enjoy!

No comment yet.
Scoop.it!

Implementing SignalR Stock Ticker using Angular JS

Implementing SignalR Stock Ticker using Angular JS | JavaScript for Line of Business Applications | Scoop.it

In last post, we implemented SignalR part of the stock ticker sample using Angular JS and modified the HTML page to use Angular’s directives. As promised earlier, we will finish the implementation in this post by incorporating UI changes using directives and filters. 

Angular JS is designed with separation of concerns in mind. One of the best architectural features of Angular JS is, it makes it easier to separate HTML and JavaScript separated from each other while playing together at the same time. Features like directives and filters can be used to easily extend Angular’s expressions and behaviour of HTML elements without wasting a lot of time and energy. 

No comment yet.
Scoop.it!

Bancha - Rapid Development for ExtJS and Sencha Touch with CakePHP

Bancha - Rapid Development for ExtJS and Sencha Touch with CakePHP | JavaScript for Line of Business Applications | Scoop.it
Bancha seamless integrates CakePHP 2 with ExtJS 4 and Sencha Touch 2.

Bancha lets you use CakePHP models in your Ext JS/Sencha Touch application. These models get all fields, validations, associations and fully configured proxies from the server. Out of the box they also support remote sorting, filtering and paging.

Simply require your CakePHP model (e.g. 'Bancha.model.User') and you get a fully configured model from server-side data.

No comment yet.
Scoop.it!

Pong clone in JavaScript

Pong clone in JavaScript | JavaScript for Line of Business Applications | Scoop.it

The ability to create interactive games in JavaScript is getting easier with the constant improvements to JavaScript engines and the ability for browsers to utilize the GPU. To demonstrate how easy it is to write games in JavaScript we’re going to write a pong clone.

No comment yet.