JavaScript for Line of Business Applications
596.1K views | +0 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...

Popular Tags - Filter using the Funnel

Current selected tag: 'API'. Clear
Scoop.it!

Isomorphic TypeScript, fetch, promises, ava and coverage

Isomorphic TypeScript, fetch, promises, ava and coverage | JavaScript for Line of Business Applications | Scoop.it

Writing an API client in JavaScript is a lot of work, you have to write one for Node.js and one for the browser. I found out a way to have both on the same codebase with the same API, all that with only changes to the build scripts. It’s called isomorphic code, and doing it with modern TypeScript isn’t easy, but it’s achievable.

TypeScript brings lots of advantages to the JavaScript world with almost mandatory typings. But TypeScript code is transpiled, and to play well with other libraries that aren’t originally written in TypeScript needs manually written type definition and some hacks to play well with other external tools, like code coverage and test frameworks.

No comment yet.
Scoop.it!

Fluent asynchronous API 3: the helper library

Fluent asynchronous API 3: the helper library | JavaScript for Line of Business Applications | Scoop.it

In this third post, I’ll show the inner workings of the little helper library that I wrote to build fluent asynchronous APIs. As you’ll see, it’s not simple, but analyzing it does, I hope, give interesting insights about asynchronous programming.

Jan Hesse's insight:

https://weblogs.asp.net/bleroy/fluent-asynchronous-api-1-api-requirements

http://weblogs.asp.net/bleroy/fluent-asynchronous-api-2-building-an-api

No comment yet.
Scoop.it!

JavaScript API Design Principles

JavaScript API Design Principles | JavaScript for Line of Business Applications | Scoop.it
Ariya Hidayat discusses principles for designing JavaScript APIs by observing the interactions between modules, particularly the influence of an interface on the code patterns.
No comment yet.
Scoop.it!

Designing Javascript APIs

We at Filepicker.io spend a lot of time thinking about APIs. With the release of our Version 1.0 javascript API, we thought about best practices for javascript API design, and wanted to share them so that when we use your API, it’ll be just as awesome as when you use ours.

Rules of your Javascript API


* Rule 0: Never make breaking changes to your API. Unless you must.
* Rule 1: Provide wood and nails, and a complete house for your API
* Rule 2: Have nouns, verbs, and a complete bipartite graph
* Rule 3: When dealing with APIs fail fast, or better, not at all
* Rule 4: If the API is hard to use, it’s not good enough

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!

Using Express.js for APIs

Using Express.js for APIs | JavaScript for Line of Business Applications | Scoop.it

A few tips and libraries for creating and documenting RESTful APIs with Express.js.

These days I spend more time using Express for APIs that send nothing but JSON. In this post I’ll cover a few libraries and reminders to help keep your code organized and your API friendly for developers.

I’m assuming an API backed by MongoDB, and that we’re using Mongoose. Covering the basics of Mongoose is beyond the scope of this article, but I want to highlight a few lesser-known bits.

No comment yet.
Scoop.it!

Making Cross-Domain Requests with CORS

HTTP requests from Javascript are traditionally bound by the Same Origin Policy, which means that your ajax requests must have the same domain and port. The common ways to get around this are JSON-P, Proxying and message passing via <iframe>s. These all have their quirks, but the thing they generally have in common is legacy browser support.

CORS stands for Cross-Origin Resource Sharing. It is a more robust way of making cross-domain requests supported by all but the lowest grade browsers (IE6 and IE7).

No comment yet.
Scoop.it!

On Third-Party Javascript - The Principles

On Third-Party  Javascript - The Principles | JavaScript for Line of Business Applications | Scoop.it

Google Analytics, Mixpanel, Disqus - just to name a few products that heavily rely on third-party JavaScript development. In this post we are going to take a look on the principles of third-party JavaScript development - in Part II we will take a look on how other companies do it in details.


Before going into the details on how the big players out there do this, let's take a look at the key points that you should pay attention to.

Jan Hesse's insight:

http://blog.risingstack.com/on-third-party-javascript-in-production/

No comment yet.
Scoop.it!

Build a Node API Client - Part 2: Encapsulation, Resources, & Architecture

Build a Node API Client - Part 2: Encapsulation, Resources, & Architecture | JavaScript for Line of Business Applications | Scoop.it

Detailed How-To for building API Client libraries in Node.js. Client design and architecture using encapsulation and resources.


To achieve this, your Node.js client should only expose users to the public version of your API and never the private, internal implementation. If you’re coming from a more traditional Object Oriented world, you can think of the public API as behavior interfaces. Concrete implementations of those interfaces are encapsulated in the private API. In Node.js too, functions and their inputs and output should rarely change. Otherwise you risk breaking backwards compatibility.

Encapsulation creates lot of flexibility to make changes in the underlying implementation. 

No comment yet.
Scoop.it!

Express.js 4, Node.js and MongoDB REST API Tutorial

Express.js 4, Node.js and MongoDB REST API Tutorial | JavaScript for Line of Business Applications | Scoop.it

ere’s a brand new, revisited tutorial for Express.js 4, Node.js and MongoDB (Mongoskin) free-JSON RESTful API server.

Contents:

  • Node.js and MongoDB REST API Overview
  • REST API Tests with Mocha and Superagent
  • NPM-ing Node.js Server Dependencies
  • Express.js 4.x Middleware Caveat
  • Express.js and MongoDB (Mongoskin) Implementation
  • Running The Express.js 4 App and Testing MongoDB Data with Mocha
  • Conclusion and Further Express.js and Node.js Reading

This Node.js, Express.js and MongoDB (Mongoskin) tutorial will walk you through writing the test using the Mocha and Super Agent libraries. This is needed for a test-driven development building of a Node.js free JSON REST API server.

The server application itself will utilize Express.js 4.x framework and Mongoskin library for MongoDB. In this REST API server, we’ll perform create, read, update and delete (CRUD) operations and harness Express.js middleware concept with app.param() and app.use() methods.

No comment yet.
Scoop.it!

Intercooler.JS - The Javascript-optional AJAX library

Intercooler.JS - The Javascript-optional AJAX library | JavaScript for Line of Business Applications | Scoop.it

Intercooler is a Partial View Controller framework that allows you to add AJAX to your application with declarative HTML5-style bindings and REST-ful URLs, giving web applications a richer UX with a minimum of code.

Rather than expecting JSON responses it expects fragments of HTML (i.e. Partial Views), which are then loaded into the DOM directly.

* Scaleable

* Declarative

* Automatic Dependency Detection

* Framework Agnostic

* Bootstrap Friendly

* Open

No comment yet.
Scoop.it!

Easy API Scaffolding with Simple-API and Node.js

Easy API Scaffolding with Simple-API and Node.js | JavaScript for Line of Business Applications | Scoop.it

API’s are often a pain to build. There’s all kinds of moving pieces: routing, data parsing, serialization, database interactions, etc. For years I’ve struggled with writing web API’s in Node.js – there’s just so much complexity required in an API boilerplate. That’s why I wrote Simple API. Simple API is an incredibly easy to use module for writing web-based APIs in Node.js

I often hear people say that they’ve written a library that makes something “simple”, but in reality they’ve just made it a different kind of complex. In this article, I hope to prove that’s not the case with Simple API. This tutorial is going to teach you to write an API for a ToDo list, where the entire project is less than 300 lines of code. That’s the entire project – the API related files are less than 200 lines of code.

No comment yet.
Scoop.it!

Modern Web Application Layered High Level Architecture with SPA, MVC, Web API, EF, Kendo UI, OData

Modern Web Application Layered High Level Architecture with SPA, MVC, Web API, EF, Kendo UI, OData | JavaScript for Line of Business Applications | Scoop.it

It’s probably important you have at least a high level picture what an SPA architecture looks like now that there is quite a bit more design work involved on the client side especially with more and more implementations are around SPA and patterns like MVVM; so hence this post. Obviously there is no such thing as one size fits all especially when it comes to architecture, so feel free to omit or add to the architecture based on your specific needs.


Client Layer (HTML5 Browser)
Model View ViewModel (MVVM) is a design pattern which helps developers separate the Model (the data) from the View (the UI). The View-Model part of MVVM is responsible for exposing the data objects from the Model in such a way that those objects are easily consumed in the View. Kendo MVVM is an implementation of the MVVM pattern which seamlessly integrates with the rest of the Kendo framework (widgets and DataSource).

 

Web Layer (Server)
Almost the entire ASP.NET MVC Web Layer can leverage the DI & IoC Pattern, you can read up on what the benefits are and how to do this download both a sample MVC app that uses MEF or Unity 3 from one of my previous post.

No comment yet.
Scoop.it!

Designing APIs for Asynchrony

Designing APIs for Asynchrony | JavaScript for Line of Business Applications | Scoop.it

Personally, I don’t actually care all that much about the whole promises/callbacks/coroutines/generators debate. It’s provably trivial to turn any callback-taking API into a promise-returning API or generator-yielding API or vice-versa.

I’m of the opinion that breaking functionality into small enough chunks that your boilerplate doesn’t matter is much more important than which boilerplate you decide tastes the yummiest. In JavaScript, we have first-class language support for passing functions around, so I tend to use callbacks, simply because it requires no extra “stuff”.

What’s important to me is that an API be useful, performant, and easy to reason about. When I’m writing JavaScript, I care a lot about how V8 is going to optimize it, and so try to choose patterns that it can optimize nicely. As of today, generators just aren’t first-class enough, and Promises require an extra abstraction. That may change someday, but these principles probably will not.

No comment yet.