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!

Tiraggo.js - JavaScript ORM that Leverages Knockout

Tiraggo.js - JavaScript ORM that Leverages Knockout | JavaScript for Line of Business Applications | Scoop.it

* Built upon Knockout and the MVVM Model
* All class properties are ko.observables and collections classes are ko.observableArrays
* Only 17k minimized
* Supports MS SQL Server, Azure, SQL CE, Oracle, PostgreSQL, MySQL, SQLite
* Supports WCF JSON Service and RESTFUL API's
* Supports Full Hierarchical Data Models
* Hierarchical Model Supports Lazy Loading (See video below)
* All saves take place within transactions, including complex hierarchcial saves
* Two Providers, either pure XHR or JQuery Ajax (you choose which one you want to use)
* Tracks Row Level and Column Level Dirty State
* Tracks Original Values so Edits can be Cancelled via RejectChanges
* Generic - Can be used with any ORM or Database Backend

No comment yet.
Scoop.it!

Wrapping JavaScript Functions

In the modern age of web applications and development, it seems we are constantly adding side effects to every part of our applications - everything from analytics to event triggering. Unfortunately in a lot of cases, we tend to cram this functionality into function with the useful stuff. As programmers, this causes numerous issues down the line - especially when it comes to refactoring and code comprehensibility.

A simple way to keep this functionality apart from the core code is create a helpful utility function to manage it for you. And to keep our code readability, we shouldn’t allow anything advanced that can break our understanding of the original function. That means we don’t want to be able to alter the original function, but we can still trigger any side effects we need to inline with the original function.

No comment yet.
Scoop.it!

A walk through the Ember ArrayProxy

Over the next few pages, I’m going to aim to explain:

* What problems Ember.ArrayProxy can solve
* What array proxies are
* How to implement custom behaviour in array proxies
* Pulling behaviour out into mixins
* Using multiple mixins with array proxies

No comment yet.
Scoop.it!

SOLID JavaScript In A Wobbly World (Wide Web)

SOLID JavaScript In A Wobbly World (Wide Web) | JavaScript for Line of Business Applications | Scoop.it

A talk on the SOLID software development principles, tarted at JavaScript, presented at CodeMash 2014.

Note that the slides are less useful without the video of all the things I said. You can find that here:http://www.youtube.com/watch?v=TAVn7s-kO9o

The code and raw keynote slide deck is available here: https://github.com/derickbailey/solid-javascript


No comment yet.
Scoop.it!

AngularJS: Better Enterprise Web Modules with Directives

AngularJs has taken the industry by storm and has been high on our list of recommended technologies for web apps and component based workflows. In this series, we are going to introduce, directives in angularjs with a “learn more widget”, going over some techniques to jump start your next enterprise project. That we are going to cover.

1. What are Directives  and how to use them

2. Adding interactivity to your widget

3. Styling Directives

4. Templating

 

AngularJS directives are a powerful tool in creating enterprise based solutions. From this example you can quickly see how we can reuse, build and expand on our learn more directive. The link function allowed us to bootstrap our directive by adding the events we need as well as ensure the correct css classes are either present or added. By using isolated scopes, we were able to make sure each instance of or directive was unique and can contain its own set of values. While our usage of the templates feature, allowed us to keep the markup centralized and removed the need for complicated setups.

No comment yet.
Scoop.it!

Resources for Leveling up your Javascript-Fu

Like many web apps these days, the front-end of our application uses Backbone + Marionette. We chose this framework because it provides us enough structure to ensure consistent separation of concerns across the code-base (read: it’s maintainable and testable), while still affording lots of flexibility in terms of implementation and integration.  With that in mind, here is a list of the resources that I’ve found useful… 
No comment yet.
Scoop.it!

Javascript Objects Function Tutorial

Javascript Objects Function Tutorial | JavaScript for Line of Business Applications | Scoop.it
Let us go through the basics of Javascript objects. How objects are maintained. What is inheritance in JS. Also lets check Javascript Functions.

Objects in JavaScript is nothing but collection of attributes (or properties to be more inline with ECMA definition). And a property is defined as a key-value pair. Object in JavaScript can be created using many ways, but for now we are gonna use a simple one.

No comment yet.
Scoop.it!

A Simple CRUD Demo with Koa.js

A Simple CRUD Demo with Koa.js | JavaScript for Line of Business Applications | Scoop.it

In my previous blog post, I have introduced Koa.js, a new framework building Node.js apps, by leveraging harmony (ECMAScript 6) features of JavaScript. In this blog post, I will demonstrate how to write a web app in Koa.js with basic CRUD functionalities. The source code of the demo web app is available on Github.

In order to working with Koa.js, you must install Node 0.11.9 or higher for JavaScript generator support. After installing Node 0.11.9 or higher, you can install Koa.js using npm.

Koa is a minimalist framework and does not bundled with middleware, so that Koa itself, does not provide routing infrastructure. To use routing for Koa, you can use koa-route, which is a simple route middleware for Koa.

No comment yet.
Scoop.it!

HandJS - Pointer Events for all Browsers!

Hand.js: a polyfill for supporting pointer events on every browser

Starting in September 2012, Microsoft proposed a specification for unifying touch, pen and mouse events called pointer events.

Currently this specification is a…draft :). So modern browsers are not supporting it right now. Only Internet Explorer 10 & 11 (obviously !) support it through vendor prefixes.

Hand.js is a polyfill that will allow you to write your code about touch only once even if the browser does not support pointer events.

Write once, use it everywhere! Don't bother with mouse and touch events. Pointer events are here for you.

No comment yet.
Scoop.it!

Computed Observable in Knockout.js

Computed Observable in Knockout.js | JavaScript for Line of Business Applications | Scoop.it

In this post we will take a look on Computed Observable in Knockout.js. Let us start with an example, you have a ViewModel.

Now you want a custom message to be rendered on the view, that message will depend on other observable of ViewModel. To create that custom message you need to create a Computed Observable. Computed Observable can be created as below...

No comment yet.
Scoop.it!

JSCS — JavaScript Code Style.

JSCS — JavaScript Code Style. | JavaScript for Line of Business Applications | Scoop.it

jscs is a code style checker. jscs can check cases, which are not implemeted in jshint, but it does not duplicate jshint functionality, so you should use jscs and jshint together.

 

* requireCurlyBraces
* requireSpaceAfterKeywords
* disallowSpaceAfterKeywords
* requireParenthesesAroundIIFE
* requireSpacesInFunctionExpression
* disallowSpacesInFunctionExpression
* disallowMultipleVarDecl
* requireMultipleVarDecl
* disallowEmptyBlocks
* disallowSpacesInsideObjectBrackets
* disallowSpacesInsideArrayBrackets
* disallowSpacesInsideParentheses
* requireSpacesInsideObjectBrackets
* requireSpacesInsideArrayBrackets
* disallowQuotedKeysInObjects
* disallowDanglingUnderscores
* disallowSpaceAfterObjectKeys
* requireSpaceAfterObjectKeys
* disallowCommaBeforeLineBreak
* requireCommaBeforeLineBreak
* requireAlignedObjectValues
* requireOperatorBeforeLineBreak
* disallowLeftStickedOperators
* requireRightStickedOperators
* disallowRightStickedOperators
* requireLeftStickedOperators
* disallowSpaceAfterPrefixUnaryOperators
* requireSpaceAfterPrefixUnaryOperators
* disallowSpaceBeforePostfixUnaryOperators
* requireSpaceBeforePostfixUnaryOperators
* disallowSpaceBeforeBinaryOperators
* requireSpaceBeforeBinaryOperators
* disallowSpaceAfterBinaryOperators
* requireSpaceAfterBinaryOperators
* disallowImplicitTypeConversion
* requireCamelCaseOrUpperCaseIdentifiers
* disallowKeywords
* disallowMultipleLineStrings
* disallowMultipleLineBreaks
* validateLineBreaks
* validateQuoteMarks
* validateIndentation
* disallowMixedSpacesAndTabs
* disallowTrailingWhitespace
* disallowKeywordsOnNewLine
* requireKeywordsOnNewLine
* requireLineFeedAtFileEnd
* maximumLineLength
* requireCapitalizedConstructors
* safeContextKeyword
* requireDotNotation
* validateJSDoc

No comment yet.
Scoop.it!

React vs Angular

React vs Angular | JavaScript for Line of Business Applications | Scoop.it

First of all I think it’s important to evaluate technologies on objective rather than subjective features. “It feels nicer” or “it’s cleaner” aren’t valid reasons: performance, modularity, community size and ease of testing / integration with other tools are.

I’ve done a lot of work benchmarking, building apps, and reading the code of Angular to try to come up with a reasonable comparison between their ways of doing things.

 

* Community / project maturity
* Performance
* Mechanisms for code reuse
* Server rendering
* Tooling integration
* Simplicity
* My conclusion

No comment yet.
Scoop.it!

A CRUD JavaScript Class

A CRUD JavaScript Class | JavaScript for Line of Business Applications | Scoop.it

The main idea was to provide a simple and tiny CRUD API (<2Kb once gzipped). Basically, you instantiate a database, inserts objects (documents if you're a fan of MongoDB) and store them wherever you want. Then you can retrieve, update and delete documents. Pretty easy.

At first I hard-coded the usage of localStorage, then with the help of Fabrice Weinberg and Valérian Galliat, I managed to externalize the driver (what does the storage) so that you can plug the CRUD class to whatever suits your needs.

 

The driver is what actually stores your data. It is the interface that deals with persistence. To put it simple, the Database class manipulate your data while the driver stores them.

You can code your own driver or use the one I made which relies on DOM Storage (eitherlocalStorage or sessionStorage, depending on how your initialize it). The driver can rely on any storage system that supports key/value pairs (DOM Storage, Redis...). Also, it has to implement the 3 methods: getItem, setItem and removeItem.

Jan Hesse's insight:

https://github.com/HugoGiraudel/CRUD.js

No comment yet.
Scoop.it!

Classical Inheritance in JavaScript

JavaScript is a class-free, object-oriented language, and as such, it uses prototypal inheritance instead of classical inheritance. This can be puzzling to programmers trained in conventional object-oriented languages like C++ and Java. JavaScript's prototypal inheritance has more expressive power than classical inheritance, as we will see presently.

But first, why do we care about inheritance at all? There are primarily two reasons. The first is type convenience. We want the language system to automatically cast references of similar classes. Little type-safety is obtained from a type system which requires the routine explicit casting of object references. This is of critical importance in strongly-typed languages, but it is irrelevant in loosely-typed languages like JavaScript, where object references never need casting.

The second reason is code reuse. It is very common to have a quantity of objects all implementing exactly the same methods. Classes make it possible to create them all from a single set of definitions. It is also common to have objects that are similar to some other objects, but differing only in the addition or modification of a small number of methods. Classical inheritance is useful for this but prototypal inheritance is even more useful.

To demonstrate this, we will introduce a little sugar which will let us write in a style that resembles a conventional classical language. We will then show useful patterns which are not available in classical languages. Then finally, we will explain the sugar.

No comment yet.
Scoop.it!

Wiring Associations in SailsJS

Wiring Associations in SailsJS | JavaScript for Line of Business Applications | Scoop.it

Today, I rewrote a prototyped Rails API into SailsJS, to take advantage of the dramatic speed boost of server-side Javascript. Waterline, the ORM used by Sails, currently does not support joins or associations (although they are coming soon), so manual solutions are required for the time being. This gave me a few headaches, but wasn't too difficult or complicated once I figured it out.

One issue that I ran into quite early deals with the way Javascript (and, by extension, Sails) handles function calls. Unlike most other languages, the majority of Javascript calls are non-blocking; that is, the following code...

No comment yet.
Scoop.it!

EmberJS, ES6 modules and Ember-Data

EmberJS, ES6 modules and Ember-Data | JavaScript for Line of Business Applications | Scoop.it

In this blog post about EmberJS and Ember-Data, we’ll use the example from the last blog post series (you can find it in this git repo on the branch master) and we’ll plug in the RESTAdapter in order to get data from an Express server instead of using fixtures. Clone the git repo, and follow me !

The Ember App Kit has a very useful little feature called ‘API-stub’, it let you create routes on Express and respond with data. We will use this API-stub to create our JSON that we want to send to our Ember app through Ember-Data, so let’s configure our ApplicationAdapter.

No comment yet.
Scoop.it!

Boilerplate web app using Backbone.js, ExpressJS, node.js, MongoDB

Boilerplate web app using Backbone.js, ExpressJS, node.js, MongoDB | JavaScript for Line of Business Applications | Scoop.it

A boilerplate project for a complete web application written using Backbone.js & Marionette, node.js & ExpressJS, MongoDB & Mongoose, Handlebars, Grunt.js, Bower, and Browserify!

I created a super basic single page application (SPA) that is a simple Contacts manager. While this app is pretty simple, there’s actually a lot that’s involved. My goal with this article is to cover the entire stack of the application including; back-end, data, front-end, tools and testing. The stack consists of the following core technologies:

* Back-end: node.js and ExpressJS
* Data Layer: MongoDB and Mongoose
* Tools: Grunt, Bower and Browserify
* Testing: Jasmine, Karma, and PhantomJS
* Front-end: Backbone.js and Marionette.js

 

I’ll go into detail on each of the above components comprising the “full” stack. Again, because its such a simple app, not a whole lot of time will be spent covering the bells and whistles of the user interface or how the app works because that’s fairly obvious (nor did I spend a whole lot of time on the actual implementation, as I didn’t want it to distract from the core of the app). Instead, I’ll go into detail covering every aspect of how the app was built and the workflow process using the various tools.

The end goal is to have a code base to act as a boilerplate starter for any new projects down the road. The code should be fully functional and complete, yet easily digestible. Ultimately, after you read this article and have a solid understand of everything under the hood, you should be able to simply clone the repo and start building your app!

No comment yet.
Scoop.it!

Fast interactive prototyping with Sketch and d3.js

Fast interactive prototyping with Sketch and d3.js | JavaScript for Line of Business Applications | Scoop.it

In this post, I want to share how we quickly develop interactive prototypes, by designing SVG content in graphical apps like Sketch and scripting them usingd3.js. The prototypes can then be shared on the web or installed as apps on a device. This allows us to quickly get how an app will feel in the hand of users.

In this post, I want to present the approach we've taken at Snips which to us seems to hit the perfect sweet spot: designing the app as SVG and adding complex interactions with d3.js.

 

Here are a few benefits of this approach from my vantage point:
* design the app with your favorite graphical tools (Sketch, Inkscape, Illustrator, ...gVim)
* fast iterations: animating SVG elements is far faster than implementing complex UI code for Android or iOS, but allows for almost everything that you would need: bouncy motion, * transparency, shadows, transforms etc.
share prototypes on the web or show them directly on a device (we show you how in a follow-up post!)
* most importantly be the cool kid using SVG and d3.js

This post will very quickly get to the gist of the approach, then describe my workflow with Sketch and d3.js.


No comment yet.
Scoop.it!

Frida - Inject JavaScript to explore native apps

Frida - Inject JavaScript to explore native apps | JavaScript for Line of Business Applications | Scoop.it

What is Frida, exactly?
It’s Greasemonkey for native apps, or, put in more technical terms, it’s a dynamic code instrumentation toolkit. It lets you inject snippets of JavaScript into native apps on Windows, Mac, Linux and iOS. Frida also provides you with some simple tools built on top of the Frida API. These can be used as-is, tweaked to your needs, or serve as examples of how to use the API.


Why do I need this?
There’s this new hot app everybody’s so excited about, but it’s only available for iOS and you’d love to interop with it. You realize it’s relying on encrypted network protocols and tools like Wireshark just won’t cut it. You pick up Frida and use it for API tracing.
You’re building a desktop app which has been deployed at a customer’s site. There’s a problem but the built-in logging code just isn’t enough. You need to send your customer a custom build with lots of expensive logging code. Then you realize you could just use Frida and build an application- specific tool that will add all the diagnostics you need, and in just a few lines of Python. No need to send the customer a new custom build - you just send the tool which will work on many versions of your app.
You’d like to build a Wireshark on steroids with support for sniffing encrypted protocols. It could even manipulate function calls to fake network conditions that would otherwise require you to set up a test lab.
Your in-house app could use some black-box tests without polluting your production code with logic only required for exotic testing.

No comment yet.
Scoop.it!

Interception using Decorator and Lazy-Loading with AngularJS

Angular provides it’s own dependency injection that supports everything from annotations to decorators. Interception is a feature that allows you to extend, intercept, or otherwise manipulate existing services. It makes it easy to monkey-patch existing APIs to suite the specific needs of your application. You can build an app that relies on the built-in services for common functionality such as logging and still apply your own custom behavior as needed. 

No comment yet.
Scoop.it!

Functions that yield multiple times

Functions that yield multiple times | JavaScript for Line of Business Applications | Scoop.it

I recently introduced you to JavaScript generators which I think are a really interesting feature that we should look at for the future of JavaScript. In that blog post I was talking about LINQ in JavaScript and kind of glanced over an important part of generators, and that's how you use them if you're not using a for-of loop. While generators make a lot of sense in the scope of managing datasets that isn't their only usage, in reality generators are quite useful if you want to lazily execute any function.

No comment yet.
Scoop.it!

Ember.js say hello to Apigility

Ember.js say hello to Apigility | JavaScript for Line of Business Applications | Scoop.it

Developing web applications today is quite easy, you will find always a framework/library that does most of the work for you. 

Some month ago, I heard about Apigility and lately I have been playing a little with it. So what’s Apigility?: Apigility is an API Builder, designed to simplify creating and maintaining useful, easy to consume, and well structured APIs. 

For this tutorial I’m going to show you how to create a Todo-Api, using Apigility on the backend and Ember.js on the front end. 

No comment yet.
Scoop.it!

Writing A Better JavaScript Library For The DOM

Writing A Better JavaScript Library For The DOM | JavaScript for Line of Business Applications | Scoop.it

In this article, Maksim Chemerisuk introduces live extensions and better-dom - a new Javascript library for working with the DOM.The objective was to review existing APIs and solutions and to build a clearer, testable and lightweight Javascript...

 

Lately, I have started to see more and more problems with jQuery, at least my use of it. Most of the problems are with jQuery’s core and can’t be fixed without breaking backwards compatibility — which is very important. I, like many others, continued using the library for a while, navigating all of the pesky quirks every day.

No comment yet.
Scoop.it!

Head First into ASP.NET Web API – A Time Card Service using Media Formatters and KnockoutJs

Head First into ASP.NET Web API – A Time Card Service using Media Formatters and KnockoutJs | JavaScript for Line of Business Applications | Scoop.it
Introduction of ASP.NET Web API before exploring custom Media Formatters in Web API and how to build one for ourselves.
No comment yet.
Scoop.it!

Easily Add a Back End to Your Angular App With Firebase

Easily Add a Back End to Your Angular App With Firebase | JavaScript for Line of Business Applications | Scoop.it

As a client-side framework, Angular alone is not enough to build a full back-end webapp. Often times, it’s difficult to know when to sync our data with the back-end, and how to handle the changes and potential conflicts of data between versions of modified content.

Using Firebase we can easily add a backend to our Angular app. Featured on the Angular.js home page, Firebase is quickly becoming the standard for Angular persistence.

Firebase is a real-time back-end for building collaborative, modern applications. Rather than requiring us to focus on building custom request-response models with a server-side component where we manually worry about data-synchronization, Firebase lets us get our app up and running in minutes. We can build a data-backed webapp entirely in Angular that can scale out-of-the-box and update all clients in real-time.

Even more, data stored in Firebase is standard schema-less JSON, which makes it incredibly easy to save data models of any type into Firebase. If a device loses network connection, Firebase continues to allow access to locally cached data and seamlessly synchronizes changes with the cloud when the device comes back online.

No comment yet.