JavaScript for Li...
Follow
Find
419.2K views | +48 today
 
Scoop.it!

Conventional HTML in ASP.NET MVC: Client-side templates

Conventional HTML in ASP.NET MVC: Client-side templates | JavaScript for Line of Business Applications | Scoop.it

In our last post, we brought everything together to build composable blocks of tags driven off of metadata. We did this to make sure that when a concept exists in our application, it’s only defined once and the rest of our system builds off of this concept. This reduces logic duplication across several layers, ensuring that we don’t have to “remember” to do repetitive tasks, like a required field needing an asterisk and data attributes.

All of this works great because we’ve got all the information at our disposal on the server-side, and we can push the completed product down to the client (browser). But what if we’re building a SPA, using Angular or Knockout or Ember or Backbone? Do we have to revert back to our old ways of duplication? Or can we have the best of both worlds?

There tend to be three general approaches:

  • Just hard code it and accept the duplication
  • Include metadata in your JSON API calls, through hypermedia or other means
  • Build intelligence into templates

I’ve done all three, and each have their benefits and drawbacks. Most teams I talk to go with #1, and some go with #2. Very few teams I meet even think about #3.

more...
No comment yet.
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!

optimizely/nuclear-js

optimizely/nuclear-js | JavaScript for Line of Business Applications | Scoop.it
nuclear-js - Reactive Flux built with ImmutableJS data structures. Framework agnostic.
more...
No comment yet.
Scoop.it!

An Introduction to Functional JavaScript

An Introduction to Functional JavaScript | JavaScript for Line of Business Applications | Scoop.it
M. David Green demonstrates how you can start thinking functionally in JavaScript, by refactoring some all-too-common imperative code to a functional style.
more...
No comment yet.
Scoop.it!

Cerebral - an intelligent react application framework

Cerebral - an intelligent react application framework | JavaScript for Line of Business Applications | Scoop.it

Cerebral is a framework. It provides concepts for handling application state and depends on React for its UI. Routing, http requests etc. are separate tools you choose based on what the project needs. Technically Cerebral does not need React to work.

So why would you even consider Cerebral? Before going into the thoughts behind Cerebral I want to point out that this is not another “FLUX framework” with its own take on actions, dispatchers and stores. I am certainly not talking down those frameworks, many of them are really great, but Cerebral is a new take on how to handle application state alltogether. It is inspired by Flux and more recent solutions like Baobab. So big thanks to all the brilliant people working on tools to make web application development more fun than frustrating!

Core features

  • An architecture inspired by Flux and Baobab
  • A single object for all application state
  • One way flow of state
  • Has complete control of your application state flow using signals
  • Can retrace state changes live in the UI
  • Specific concepts for handling asynchronous code and relational data
  • Immutable data
  • A functional approach to interactions
  • Gives errors on invalid code
  • Requires React as your UI layer


Jan Hesse's insight:

https://github.com/christianalfoni/cerebral

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

Polymer for reusable web components

Polymer for reusable web components | JavaScript for Line of Business Applications | Scoop.it

Getting started with Polymer, a library to create web components, reusable packages of HTML, CSS and JavaScript.

As you can see web components still has a long way to go before it’ll be supported natively by browsers and reach maturity, but luckily nothing is stopping us from already taking a look at it today. And if nothing of that rang any bells, don’t worry, it’ll become clear once we look at some examples!

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

Functional Reactive React.js

Functional Reactive React.js | JavaScript for Line of Business Applications | Scoop.it
A brief journey into reactive interfaces with FRP and React.js
more...
Daniel Leitinger's curator insight, May 28, 8:02 AM

It was overwhelming and took me in. The very granularity was the most important thing.

Scoop.it!

A Database of Pokémon Characters with Polymer and Web Components

A Database of Pokémon Characters with Polymer and Web Components | JavaScript for Line of Business Applications | Scoop.it

Creating my own component
Polymer Designer is a fantastic browser-based tool made by Google, which allows you to design a paper element inside of the browser with their drag-and-drop GUI. Even better — it spits out the code for you! This proved to be invaluable when I was learning how polymer worked.

I wanted to design something simple, so I created a container to hold three radial buttons; one button for each language selection. Users now have the ability to select a radial button associated with a language (en-EN, en-GB, and es-ES), which would in turn be tied into the audio web component and change
the accent.

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

Building a Coffee Run app using Node.js and Knockout

Building a Coffee Run app using Node.js and Knockout | JavaScript for Line of Business Applications | Scoop.it

In this post I’ll discuss how I built CoffeeRun as a Single-Page Application (SPA) using Node.js and Knockout.js. This was my first foray into the world of SPAs and Node, so it’s written as a guide to anyone else who is looking to dip their toes in for the first time. I’ll also cover deployment to Azure.

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

Guide to Full Text Search in Meteor

Guide to Full Text Search in Meteor | JavaScript for Line of Business Applications | Scoop.it

It's possible to do full text search in Meteor, as long as you're running MongoDB 2.6 (which is included in Meteor 1.0.4 or higher). Earlier versions of MongoDB did not support text search well.

Before you can do a search, you need to build a text index. This is a data structure that lets MongoDB perform text searches incredibly quickly. Whenever data is inserted or removed from the indexed collection, MongoDB updates the corresponding index.

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

How to communicate between React components

How to communicate between React components | JavaScript for Line of Business Applications | Scoop.it

How to communicate between React components ? That’s a good question, and there are multiple answers. That depends of the relationship between the components, and then, that depends on what you prefer.

I am not talking about data-stores, data-adapters or this kind of data-helpers that gets data from somewhere that you need to dispatch to your components, I’m really just talking about communication between React components only.


There are 3 possible relationships:

owner to ownee (parent to child)
ownee to owner (child to parent)
they are not related

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

Porting an Angular 2.0 App to Aurelia

Porting an Angular 2.0 App to Aurelia | JavaScript for Line of Business Applications | Scoop.it

Recently, Joe Eames had a nice PluralSight webinar demonstrating some of the features of Angular 2.0. We thought "Wouldn't it be cool to see the same app built with Aurelia?" It seemed like a good opportunity to show what we feel makes Aurelia so easy-to-use and efficient.

The Rules

In order to ensure that this is an even and accurate comparison, we set some ground rules:

  1. The code should be a direct port unless there is a blaring issue or error in the source.
  2. The code should use all of the same variables and names in order to avoid confusion.
  3. We'll use the standard Aurelia skeleton as our starting point.
more...
No comment yet.
Scoop.it!

Isomorphic apps = normal React+FRP apps

Isomorphic apps = normal React+FRP apps | JavaScript for Line of Business Applications | Scoop.it

Isomorphic apps are almost like “normal” apps when creating them with the FRP. Because the FRP encourages you to always pass the entire state object to the rendering function, nothing prevents you to do the same in the backend as well.

If you have read other tutorials you may already know that React has a “backend-compatible” function called renderToString. It behaves exactly like render but doesn’t call componentDidMount and returns the rendered HTML as a string instead of placing it into a DOM node. Component & model in → HTML out. Couldn’t be simpler?

Well… actually, it could be. There are two gotchas you should know before trying to use renderToString:

  1. Your backend must understand JSX syntax
  2. Your front-end modules must be CommonJS compatible
more...
No comment yet.
Scoop.it!

BangJS - use Bacon.js in an Angular context

BangJS -  use Bacon.js in an Angular context | JavaScript for Line of Business Applications | Scoop.it

BangJS is Bacon-flavored Angular. Program watertight web app user interface behavior with AngularJS and Bacon.js.

Enjoy everything that’s good about functional reactive programming with all the benefits of a mature and vibrant front-end framework ecosystem.

BangJS offers you the tools to take this challenge head on:

  • make support for asynchronous logic the default;
  • focus on your business logic instead of managing state;
  • keep your code maintainable and scalable due to inherent composability.
more...
No comment yet.
Scoop.it!

Optimistic UI with Meteor

Optimistic UI with Meteor | JavaScript for Line of Business Applications | Scoop.it
In this post we'll look at the collection of technologies that Meteor provides to enable 'Optimistic UI' updating.
more...
No comment yet.
Scoop.it!

Building a Twitter App Using AngularJS

Building a Twitter App Using AngularJS | JavaScript for Line of Business Applications | Scoop.it
Preetish Panda teaches you how to create a basic Twitter app using AngularJS, The app includes a search feature to search a term in the user's timeline.
more...
No comment yet.
Scoop.it!

A concise and accurate JavaScript tutorial

A concise and accurate JavaScript tutorial | JavaScript for Line of Business Applications | Scoop.it
A concise and accurate JavaScript tutorial/notes written for those entering the JavaScript world for the first time but already have experience with other languages
more...
No comment yet.
Scoop.it!

Setup Webpack on an ES6 React app with SASS

Setup Webpack on an ES6 React app with SASS | JavaScript for Line of Business Applications | Scoop.it
Webpack is really a great JavaScript bundler, allowing to turn messy and numerous JavaScript into a single minified and optimized script. Yet, we missed a good getting started tutorial. Here is one...
more...
No comment yet.
Scoop.it!

JSCS: JavaScript Code Style checker

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

JSCS is a code style linter for programmatically enforcing your style guide. You can configure JSCS for your project in detail using over 90 validation rules, including presets from popular style guides like jQuery, Airbnb, Google, and more.

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

SkateJS - WebComponent library with syntactic-sugar for binding behaviour

SkateJS - WebComponent library with syntactic-sugar for binding behaviour | JavaScript for Line of Business Applications | Scoop.it

Skate is a web component library that is focused on being a tiny, performant, syntactic-sugar for binding behaviour to custom and existing elements without ever having to worry about when your element is inserted into the DOM. It uses the Custom Element spec as a guideline and adds some features on top of it.

There are some things to consider when building a web component that aren't quite obvious at first. Things like having compound components; ones that have parents and children that are all components and are supposed to interact with each other. There's also some gotcha's when working with polyfilled components vs native web components.

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

Choose ES6 modules Today!

Choose ES6 modules Today! | JavaScript for Line of Business Applications | Scoop.it
Cody Lindley explains why you should ditch non-standard JavaScript module formats and move to the ECMAScript 6 module format with examples.

By using jspm.io you can make use of the official JavaScript module control system (and its syntax) today – all while not having to wait for older modules to be re-written or having to limit yourself to one particular module format or package manager. In other words, you shouldn’t have to care from where a package comes and in what format it’s being provided.

The ideal, and yes we have arrived, is to just use ES6 modules and let a tool like jspm.io sort out all of the ugly details as it pertains to non-es6 modules from multiple endpoints. Not to mention, by using jspm (and a ES6 transpiler like traceur or Babel) you get most everything that ES6 offers, not just modules. Writing ES6 code in your ES6 modules sounds good, right!

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

Javascript MVC Frameworks: Your Choice is Your Future

Javascript MVC Frameworks: Your Choice is Your Future | JavaScript for Line of Business Applications | Scoop.it

Not surprisingly, given the popularity of the MVC pattern, there are a number of adherent JS frameworks to choose from. Angular JSEmber, andBackbone are among the most popular, and will be the focus of this article.

Your choice here can drastically affect your team’s ability to meet deadlines and maintain your project in the future. Each of these frameworks will give you a set of tools for writing code that follows the separation of concerns ideology. For the most part, they each have thriving online communities that offer support and tutorials to developers.

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

plainJS - The Vanilla JavaScript Repository

plainJS - The Vanilla JavaScript Repository | JavaScript for Line of Business Applications | Scoop.it
Vanilla JavaScript for writing powerful web applications without jQuery.

Writing common and rather simple JavaScript functions for a website can nowadays be easily done in plain JS. There's no real gain from jQuery, although syntax is typically slightly shorter. However, that comes with the price of downloading and parsing a huge library. Yet, when writing complex JavaScript tools, such as image editors or charting libraries, both the dependency upon and the lowerer speed of jQuery are real drawbacks. Therefore, such code is mostly written in pure JavaScript. Again, no need for jQuery.

Jan Hesse's insight:

http://plainjs.com/javascript/

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

Integrating External APIs into your Meteor.js Application

Integrating External APIs into your Meteor.js Application | JavaScript for Line of Business Applications | Scoop.it

Meteor itself does not rely on REST APIs, but it can easily access data from other services. This article is an excerpt from the book Meteor in Action and explains how you can integrate third-party data into your applications by accessing RESTful URLs from the server-side.

Many applications rely on external APIs to retrieve data. Getting information regarding your friends from Facebook, looking up the current weather in your area, or simply retrieving an avatar image from another website – there are endless uses for integrating additional data. They all share a common challenge: APIs must be called from the server, but an API usually takes longer than executing the method itself. You need to ensure that the result gets back to the client – even if it takes a couple of seconds. Let’s talk about how to integrate an external API via HTTP.

Based on the IP address of a visitor, you can tell various information about their current location, e.g., coordinates, city or timezone. There is a simple API that takes an IPv4 address and returns all these tidbits as a JSON object. The API is called Telize

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

How to use React & Om to make a Single Page Application (SPA)

How to use React & Om to make a Single Page Application (SPA) | JavaScript for Line of Business Applications | Scoop.it

Clojure is a Lisp-based language that compiles and executes on the JVM. WithClojureScript, Clojure can be cross-compiled to JavaScript. Developing a SPA in a language like ClojureScript allows developers to utilize Clojure’s features like static type safety and immutability when working with large or complex applications. The Om project allows a developer using ClojureScript to interface with React in a client-side application. Let’s get started using React and Om to build a SPA.

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

The Flux Quick Start Guide

The Flux Quick Start Guide | JavaScript for Line of Business Applications | Scoop.it

This article will give you an overview of how to build JavaScript applications with the Flux pattern. It's the minimal amount of material to get you familiar with the core Flux concepts. You should follow along with the accompanying starter kit. You'll need a basic understanding of React and preferably some experience building components. 

more...
No comment yet.