JavaScript for Line of Business Applications
504.4K views | +62 today
Follow
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...
Scoop.it!

Create a character voting app using React, Node.js, MongoDB and Socket.IO

Create a character voting app using React, Node.js, MongoDB and Socket.IO | JavaScript for Line of Business Applications | Scoop.it

In this tutorial we are going to build a character voting app (inspired by Facemash) for EVE Online - a massively multiplayer online game. You will learn how to build a REST API with Node.js, save and retrieve data from MongoDB, track online visitors in real-time using Socket.IO, build a single-page app experience using React + Flux with server-side rendering and then finally deploy it to the cloud.

more...
No comment yet.
Scoop.it!

Building a Real Time Application with Express, SocketIO and Ember.

Building a Real Time Application with Express, SocketIO and Ember. | JavaScript for Line of Business Applications | Scoop.it

There are a lot of new fancy web applications out there that are using real-time functionality. You can see examples of this used to great effect in Google Docs' multi-user editing, and the way all the social media sites update you of whats happening in real time.

All of these applications are a far-cry from the old "request-response" pages of the early 90s, in fact the only way to achieve realtime web communication back then was to use Java Applets, and I believe you could use Flash for it too.

Luckily I'm not 8 years old in 2015, and today we have Web Sockets that allow us to maintian persistent connections between client and server!

more...
No comment yet.
Scoop.it!

Flux over the Wire

Flux over the Wire | JavaScript for Line of Business Applications | Scoop.it

When doing real world web apps, there is a very common pattern: single source of truth shared by multiple clients. The best example of this is a chat: the message list, and the user list, must be readable and kept up to date for every connected client.


Lets assume for a moment that all your clients are React apps executed in the same browser window. Then its easy: just use Flux! All clients will update their components every time the stores representing the message list and the user list is updated. Message posting will just be an action dispatch, as well as users joining or leaving a room.

The problem is that all your clients are not in the same browser window. They actually are on different computers, on different hosts, and their only means of interacting with the server it through asynchronous communication (typically HTTP requests).

This seems like a hard problem. Or is it?

more...
No comment yet.
Scoop.it!

Nuts and Bolts of WebSocket Devoxx 2014

Agenda

* Introduction

WebSocket and Node.js

*WebSocket using JSR 356

* Server

* Client

* Securing WebSocket

* Embedded WebSocket

* Load Balance WebSocket

* Pub/Sub over WebSocket

* STOMP over WebSocket

* MQTT over WebSocket

* REST and SSE

* Scalability

* Debugging

* Production Tips

more...
No comment yet.
Scoop.it!

A chatroom for all! Part 3 - Building a Backend with Node, Mongo and Socket.IO

A chatroom for all! Part 3 - Building a Backend with Node, Mongo and Socket.IO | JavaScript for Line of Business Applications | Scoop.it

In this part, I will show you how to use your existing express-based node.js app to create a chatroom backend with WebSocket support.

Now we have a chat system capable of broadcasting a message received via websockets to all other connected clients, it saves the message to the database and retrieves the last 10 messages to give context to every new user who joins the chatroom.

more...
No comment yet.
Scoop.it!

Horizontally Scaling Node.js and WebSockets with Redis

Horizontally Scaling Node.js and WebSockets with Redis | JavaScript for Line of Business Applications | Scoop.it

The Node.js cluster module is a common method of scaling servers, allowing for the use of all available CPU cores. However, what happens when you must scale to multiple servers or virtual machines?

That is the problem we faced when scaling our newest HTML5 MMORPG. Rather than trying to cluster on a single machine, we wanted to get the benefit of a truly distributed system that can automatically failover and spread the load across multiple servers and even data-centers.

more...
No comment yet.
Scoop.it!

Transforming WebSockets

An introduction to WebSockets and why Primus might be a better fit for your project.

Jan Hesse's insight:

http://primus.io

more...
No comment yet.
Scoop.it!

Realtime bandwidth

Realtime bandwidth | JavaScript for Line of Business Applications | Scoop.it

One of our key products is a trading dashboard that handles hundreds of thousands of events from football matches and related betting markets. To consistently deliver value, we need to be able to handle this flurry of messages over a WebSocket connection and reliably keep the UI in sync.

At its peak, on a typical Saturday afternoon, each WebSocket connection will receive upwards of 500 messages per second. Translating each of these messages into a UI update yields incredibly bad performance: the incumbent dashboard does just that, but as the business has scaled, we are hitting the limits of the current solution.

So that we can continue to provide value to our users, we need to think about ways we can separate the concerns of receiving messages and updating the UI. Doing so has pushed us to evaluate our tech stack and rebuild portions of our dashboard from the ground up.

more...
No comment yet.
Scoop.it!

Finding the right Node.JS WebSocket implementation  

Finding the right Node.JS WebSocket implementation   | JavaScript for Line of Business Applications | Scoop.it
A journey with ws, Socket.IO, Engine.IO, and Primus

For a current project at WhoScored, I needed to learn JavaScript, Node.JS and WebSocket channel, after seven years of writing web applications with Java and Spring framework. We wanted an application that can send data to thousands of concurrent users, and Node.JS appeared to be the right way of doing it with its event-driven, non-blocking I/O model that can scale up easily.


Compared Frameworks

* einaros / ws
* Socket.IO
* Engine.IO
* Primus


Performance limits
* Changing the flow based on limitations
* Test 1: The impact of data size
* Test 2: The impact of concurrent connection size
* Test 3: The impact of data broadcasting frequency


more...
No comment yet.
Scoop.it!

Twitter Streaming API with Node.js, Socket.io and ReactJS

Twitter Streaming API with Node.js, Socket.io and ReactJS | JavaScript for Line of Business Applications | Scoop.it

I have been working in a prototype using the Twitter Streaming API with Socket.io and ReactJS for the frontend, Node.js in the backend, cool stuff!

I used several articles as a reference, the one using the streaming API using socket.io(but AngularJS and ntwitter npm package), real-time django using node.js and socket.io or a modern python stack for a real time web application.

In the end as I said I used nodejs, the twit package and socket.io in the backend. With all these tools was incredibly easy to have something running fast.

And these are the different parts composing the example, the installation of the different tools is beyond the scope of this article just because I want to focus more in functionality and I don't want the article to be very long.

Anyway if you have a question/criticism here I am. :-)

Jan Hesse's insight:

More ReactJS Intro: http://javaguirre.net/2014/02/09/reactjs-by-example/

more...
No comment yet.
Scoop.it!

Remote Desktop Client with AngularJS and Yeoman

Remote Desktop Client with AngularJS and Yeoman | JavaScript for Line of Business Applications | Scoop.it

In this blog post I’m going to show you how to build a VNC client using AngularJS and Yeoman.

We should have a VNC server on the machine we want to control. This machine provides interface accessible through the RFB protocol. The proxy in the middle has RFB client, which knows how to talk to the RFB server. The proxy also provides HTTP server, which is responsible for serving static files to the client and also allows communication through socket.io. The last component in our diagram is the “AngularJS VNC client”, which consists few HTML and JavaScript files provided to the browser by the proxy. This is what actually the user of our VNC client sees. He or she use the form provided in the “AngularJS VNC client” in order to enter connection details and connect to the machine he or she wants to control

more...
No comment yet.
Scoop.it!

Creating a real-time multiplayer game with WebSockets and Node.js

Creating a real-time multiplayer game with WebSockets and Node.js | JavaScript for Line of Business Applications | Scoop.it

During the workshop I explained exactly how to take a single player HTML5 game and turn it into a multiplayer one using Node.js and WebSockets.


Each player is identified using a unique client.id number. We'll use this later when communicating game updates to other players. For now the util.log line will output the client identification number to the terminal on connection.

The client.on event listeners are used to detect when a player has either disconnected or sent a message to the server. Right now they point to handler functions that don't exist.


more...
No comment yet.
Scoop.it!

Using Node.js and Websockets to Build a Chat Service

Using Node.js and Websockets to Build a Chat Service | JavaScript for Line of Business Applications | Scoop.it

Node.js and Websockets are the perfect combination to write very fast, lag free applications which can send data to a huge number of clients. So why don't we start learning about these two topics by building a chat service! We will see how to install Node.js packages, serve a static page to the client with a basic web-server, and configure Socket.io to communicate with the client.

So why use this combo?

There are a lot of platforms which can run a chat application, but by choosing Node.js we don't have to learn a completely different language, it's just JavaScript, but server-side.

Node.js is a platform built on Chrome’s JavaScript runtime to make building applications in JavaScript that run on the server, easy. Node.js uses an event-driven, non-blocking I/O model, which makes it perfect for building real time apps.

more...
No comment yet.
Scoop.it!

SocketCluster - Scalable realtime environment

SocketCluster - Scalable realtime environment | JavaScript for Line of Business Applications | Scoop.it

SocketCluster is an open source, multi-process realtime engine for Node.js. You can build entire applications on top of it or you can use it alongside existing systems written in other languages.


SC supports both direct client-server communication (like Socket.io) and group communication via pub/sub channels.


SC is designed to scale both vertically across multiple CPU cores and horizontally across multiple machines/instances (via pub/sub channel synchronization).

more...
No comment yet.
Scoop.it!

Real Time Trader Desktop with React, Node.js, and Socket.io

Real Time Trader Desktop with React, Node.js, and Socket.io | JavaScript for Line of Business Applications | Scoop.it

The virtual DOM is one of the key characteristics of React. When you render a component, React creates a lightweight description of the UI, diffs it with the previous version, and generates a minimal set of changes to apply to the DOM. That diffing algorithm is very fast, making React particularly well suited for apps with a lot of UI changes.

That prompted me to revisit a type of application I’ve built in the past with different languages and frameworks: a trader desktop showing real time market data updates. This new version uses React for the client-side and Socket.io to push simulated market data updates to the client.

more...
No comment yet.
Scoop.it!

More Responsive Single-Page Applications With AngularJS & Socket.IO: Creating the Library

More Responsive Single-Page Applications With AngularJS & Socket.IO: Creating the Library | JavaScript for Line of Business Applications | Scoop.it
In this first tutorial, we'll learn how to build a Socket.IO library for AngularJS to help improve the responsiveness of your web application's user-interface. | Difficulty: Intermediate; Length: Medium; Tags: JavaScript, AngularJS, Web App, Web Development
more...
No comment yet.
Scoop.it!

Swarm.js+React — real-time, offline-ready Holy Grail web apps

Swarm.js+React — real-time, offline-ready Holy Grail web apps | JavaScript for Line of Business Applications | Scoop.it

Skipping collaborative apps, these days even a single user needs to sync his/her devices. The device landscape is getting predominantly mobile, so an average user has multiple powerful devices with unreliable internet connections.

Popular solutions suck for one simple reason: common sense fails us in distributed systems. Proper sync needs some math like a GPS device needs some relativity formulas. Yes, that is just a box that says your x and y. No, it can’t work by common sense alone; it needs math.

more...
No comment yet.
Scoop.it!

WebRTC chat with React.js

WebRTC chat with React.js | JavaScript for Line of Business Applications | Scoop.it

In this blog post I’m going to share how could be build WebRTC chat with React.js.

In the beginning of the blog post I mentioned that React.js application contains a finite amount of React.js components composed together. In this subsection I’ll illustrate, which are the different components of our application and how they are composed together.

more...
No comment yet.
Scoop.it!

WebSockets in Windows Store Apps

WebSockets in Windows Store Apps | JavaScript for Line of Business Applications | Scoop.it

In this article, Jeremy Likness shows how to connect to WebSockets using both message-based and real-time connections from Windows Store apps.

more...
No comment yet.
Scoop.it!

KWAND JavaScript Full Stack Web Development for the Next Generation

KWAND JavaScript Full Stack Web Development for the Next Generation | JavaScript for Line of Business Applications | Scoop.it
KWAND JavaScript Full Stack Web Development for the Next Generation of Web and Mobile Applications

Uses Koa · WebSockets · Angular · Node · Dokku like this:


Client:

  • AngularJS
  • AngularUI
  • Socket.IO

Server:

  • Co
  • Koa
  • Jade
  • WS

Storage:

  • MongoDB

Develop:

  • Gulp
  • Stylus
  • LiveReload
  • Nodemon

Test:

  • SuperAgent
  • Mocha
  • Travis

Package:

  • NPM

Deploy:

  • Dokku
  • Heroku
  • Forever


more...
No comment yet.
Scoop.it!

Browser to browser communication with Vert.x, websockets and HTML5

Browser to browser communication with Vert.x, websockets and HTML5 | JavaScript for Line of Business Applications | Scoop.it

I've been playing around with Vert.x for a couple of weeks and I'm really starting to like the simplicity of the framework. With very little configuration you can quickly get impressive results. In this article I'm diving a bit deeper in how to set up browser to browser communication using the Vert.x eventbus by using the javascript client side API. In short I'm going to show you the following things:

  • Use Vert.x as a simple web server
  • Configure vert.x on the serverside to act as bridge for the browser eventbus implementation
  • Create a simple example that shows how to use the eventbus from javascript


I'm going to skip the explanation on how to set up Vert.x. If you want more information on that look at this article where I explain the setup I've used in this example. So let's get started with the first step.

more...
No comment yet.
Scoop.it!

How to send live data from a C# Desktop Application to Web using Websockets

How to send live data from a C# Desktop Application to Web using Websockets | JavaScript for Line of Business Applications | Scoop.it

This is a step-by-step guide about how to expose live data from a C# console application to a web browser using WebSockets. The example has been implemented and tested on Windows7.

more...
No comment yet.
Scoop.it!

Using WebSockets to keep a local cache in sync

Given that the client didn't want to move his server for is current hosting provider, but was complaining all the time of how slow things were, I realised that I had to find a way to improve application responsiveness by having the data already stored locally when the user/UI actually needs it.
So, devised a strategy of keeping a local cache and using web sockets to notify my local cache that local data as dirty and needs to be updated.

Conceptually, I like the idea of having my cache resembling a database and and an ORM implementation. Having that I mind, my implementation would require the following components:
 * An Entity, that will map to a server side collection of data (usually a table but can actually be just a view)
 * A local cache/db, that will store a set of entities and provide convenient API's to access them

more...
No comment yet.
Scoop.it!

Making Angular.js Real-Time with Pusher

Making Angular.js Real-Time with Pusher | JavaScript for Line of Business Applications | Scoop.it

Front-end application frameworks have given developers the tools to build client side applications with rich user experiences. Let’s say your application is built with one of these frameworks and you want to notify connected clients that something on the server has changed – how can you do that while keeping a rich user experience? This is where Pusher and angular-pusher come into play.

Using Pusher will allow us to subscribe to events triggered by other clients. First I’ll show you the simple changes needed in our ItemListController to use angular-pusher. Then I’ll show you an example of using Pusher in a Node.js server when an item is updated.

more...
No comment yet.
Scoop.it!

JSONsvc - a "proxy-peer/peer" protocol for Websockets

JSONsvc defines a simple format for data to be sent between a Websocket server and its clients. It allows browser clients to view the connection as a type of "proxy-peer-to-peer" network. i.e. any client can send data to another client as if they were directly connected - the websocket server does the routing.

The protocol also allows multiple clients to automagically receive data they are interested in whenever anyone else sends it - again routed by the websocket server.

The intended interest here is in the use of general-purpose protocol with a server, rather than some ad-hoc scheme which means you would have to change client and server code to add or change any functionality.  

more...
No comment yet.