JavaScript for Li...
Follow
Find
416.5K views | +235 today
 
Scoop.it!

Angular.js : Advanced Design Patterns and Best Practices

With a 9 developers team, code organization is mandatory.
more...
Brian Petro's curator insight, July 8, 2013 11:00 PM

Cool presentation for organizing large AngularJS projects.

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!

Replaying bugs with Flux

Replaying bugs with Flux | JavaScript for Line of Business Applications | Scoop.it

It’s important to note that with React with Flux, the application state lives outside of the UI-components, in the store(s). The stores populate their state according to the actions and the UI merely reflects this state. A UI defined with React can be seen as a pure function: given the same input (state), it will always produce the same output (ui).

Flux was inspired by CQRS and Event Sourcing. For those unfamiliar: think think of it as a simple version control system: each action is a commit, all consecutive commits give you the current state.

To record actions in Flux, we need to either extend the dispatcher with this functionality or create a new component which listens to the dispatcher. I’ve published a proof-of-concept on GitHub called FluxRecorder, which does the latter.

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

Reactive ReactJS: improving data flow using reactive streams

Reactive ReactJS: improving data flow using reactive streams | JavaScript for Line of Business Applications | Scoop.it
Many people that use ReactJS as their renderer are using some kind of the
Flux architecture to store data, react to actions and notify components
about changes. After a University project involving Scala and RxJava, I wanted
to use these ideas together with ReactJS views. Besides that I found two things
missing in the Flux architecture:

composing different kinds of data easily
interaction with the server

Of course there are ways to solve this, but perhaps reactive streams can help
ease these shortcomings.
more...
No comment yet.
Scoop.it!

Reusable Chart Components with React And D3

Reusable Chart Components with React And D3 | JavaScript for Line of Business Applications | Scoop.it

The following should be an introduction to combining D3 with React to create reusable chart components. This is not intended to be an introduction into D3 nor React.

D3s approach to data visualization fits well with the React way of building UI components and App structuring. React encourages to figure out how to structure a number of components to enforce a data flow that moves from top down, meaning that lower level components receive data and render it at best and only keep state if needed, but never manipulating any data that might affect the higher up components.

Another strong correlation between the libraries is their respective component lifecycle. D3 has enterupdate and exit.


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

Essence - the essential Material Design Framework

Essence - the essential Material Design Framework | JavaScript for Line of Business Applications | Scoop.it

Essence is a CSS framework that implements the guidelines from Google Material Design Specification using Facebook's react.js library. Use it to easily build super-fast and great looking web & mobile interfaces.

Jan Hesse's insight:

https://github.com/PearlVentures/Essence

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

Best Practices for Component State in React.js

Best Practices for Component State in React.js | JavaScript for Line of Business Applications | Scoop.it

When writing React applications, it’s important to know when and when not to use state in components. In this post, I will review what I consider to be best practices for working with state. TL;DR:

  1. If a component does not own a datum, then that datum should not influence it’s state.
  2. Store the simplest possible values to describe a component’s state.
  3. Leave calculations and conditionals to the render function.

These rules obviously have exceptions and should be violated when appropriate; though if you’re able to follow them most of the time, you will find that your components will be easier to break down, the tests will be easier to write, and the entire application will have fewer bugs. Let’s take a closer look at each of these rules.

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

React.js View State Management Tutorial

React.js View State Management Tutorial | JavaScript for Line of Business Applications | Scoop.it
One of the biggest and most common problems in front-end web development is state management. A developer is constantly focused on keeping the state object in sync with its view and the DOM representation. Users can interact with the application in many ways and it's a big task to provide a clean transition from one view state to another.

We will see how using React JavaScript library can help us reduce application complexity and off-load UI transitions from our application.
more...
No comment yet.
Scoop.it!

We have a problem with promises

We have a problem with promises | JavaScript for Line of Business Applications | Scoop.it

Fellow JavaScripters, it's time to admit it: we have a problem with promises.

No, not with promises themselves. Promises, as defined by the A+ spec, are awesome.

The big problem, which has revealed itself to me over the course of the past year, as I've watched numerous programmers struggle with the PouchDB API and other promise-heavy APIs, is this:

Many of us are using promises without really understanding them.

Some people try to explain promises as a cartoon, or in a very noun-oriented way: "Oh, it's this thing you can pass around that represents an asynchronous value."

I don't find such explanations very helpful. To me, promises are all about code structure and flow. So I think it's better to just go over some common mistakes and show how to fix them. I call these "rookie mistakes" in the sense of, "you're a rookie now, kid, but you'll be a pro soon."

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

Deku: How we built our functional alternative to React

Deku: How we built our functional alternative to React | JavaScript for Line of Business Applications | Scoop.it

Deku is our library for building user interfaces. It supports many of the features you’re familiar with in React but aims to be small and functional. You define your UI as a tree of components and whenever a state change occurs it re-renders the entire tree to patch the DOM using a highly optimized diffing algorithm.

The whole library weighs in at less than 10kb and is easy to follow. It’s also using npm so some of those modules are probably being used elsewhere in your code anyway.

It uses the same concept of components as React. However, we don’t support older browsers, so the codebase is small and component API is almost non-existent. It even supports JSX thanks to Babel.

Jan Hesse's insight:

https://github.com/segmentio/deku

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

Embering on the Shoulders of Giants

Embering on the Shoulders of Giants | JavaScript for Line of Business Applications | Scoop.it

Normally in these screencasts I would show you a bunch of code and teach you how to write code, and if that's what you're looking for there's over 30 other screencasts on this website that can help you do that.

But today, in just 20 minutes (oops, it was 33…), I want to give you a complete overview of Ember in the ecosystem, so I don't have enough time to in the depth in one technology. But I've got just enough time to talk about many technologies, and the philosophy that holds them together.

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

All Videos of ForwardJS 2014

All Videos of ForwardJS 2014 | JavaScript for Line of Business Applications | Scoop.it
Videos from the first ever Forward JS Rally
more...
Arik Grinstein's curator insight, May 19, 12:32 PM

Great Topics. So many interesting things and so little time . Catchup time!

Scoop.it!

Creating your first Angular 2 app: From authentication to calling an API and everything in between

Creating your first Angular 2 app: From authentication to calling an API and everything in between | JavaScript for Line of Business Applications | Scoop.it

Learn how to create a real world angular 2 app using Pipes, Directives, Components, DI, ES6 and much more! We'll implement from Authentication to calling an API and everything in between.

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

Immutability in React

Immutability in React | JavaScript for Line of Business Applications | Scoop.it

In this article Christian Johansen gives you an example of how immutability can be used with React, the well-known library developed by Facebook.

In my previous article I mentioned that tracking changes can be drastically improved because we can short-circuit the expensive diffing algorithm in libraries like React. When you give React some new data, it calls theshouldComponentUpdate() function on all the components. If this function returns false, React won’t diff this component with the existing version, so the library won’t re-render the elements that make the component. This potentially saves a lot of work, and can lead to a massive improvement in performance.

Let’s consider our game. When you reveal a tile, the whole game is rendered over again. However, thanks to our immutable data model, all the tiles that didn’t change will still be the same exact references. These don’t need to be re-rendered, because with immutable data, same reference means no change. To let React know about this detail, we can improve our component wrapper as follows:

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

How to Minify an Ionic Application for Production

How to Minify an Ionic Application for Production | JavaScript for Line of Business Applications | Scoop.it

Minifying code is essentially the process of stripping away everything unnecessary: everything is condensed onto a single line, files are concatenated together, variables are renamed to be shorter and so on. There’s two main reasons you might want to do this:

  1. To reduce the file size of your resulting application and increase performance
  2. Obfuscate your code so that prying eyes can’t obtain your source code (something which is quite possible in PhoneGap applications)

Ionic has no automated process to do this but it’s relatively simple to set up your own process using Gulpand Grunt. A lot of this is based off of this tutorial by Agustin Haller which was tremendously helpful to me. The only problem I had with it though is that it relies on cordova hooks, and if you’re using PhoneGap Build to build your application then you won’t be able to use these.

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

Wildhoney/Maple.js

Wildhoney/Maple.js | JavaScript for Line of Business Applications | Scoop.it
Maple.js is a contemporary React based framework mixing ES6 with Custom Elements, HTML Imports and Shadow DOM. It has in-built support for SASS and JSX, including a Gulp task for vulcanizing your project.

Maple is a seamless module that allows you to organise your React project in terms of webcomponents — with HTML Imports, Shadow DOM, and Custom Elements — allowing you to implement any Flux architecture you choose, and then compile with Mapleify for production.

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

Craft Conference

Craft Conference | JavaScript for Line of Business Applications | Scoop.it
CRAFT is about software craftsmanship, which tools, methods, practices should be part of the toolbox of a modern developer and company, and it is a compass on new technologies, trends. You can learn from the best speakers and practitioners in our community.
more...
No comment yet.
Scoop.it!

Flux in Depth. Overview and Components.

Flux in Depth. Overview and Components. | JavaScript for Line of Business Applications | Scoop.it
This is the first blog post of the series “Flux in Depth”. Is this “yet the another flux tutorial”? What I have seen so far, while researching flux, were mostly “how-to” tutorials (usually with todo applications), which describe the main components of given flux application and the data flow between them. This is definitely useful for getting a high-level overview of how everything works but in reality there are plenty of other things, which should be taken under consideration. In this series of posts I will try to wire theory with practice and state my own solutions of problem I face on daily basis. Since these solutions might not be perfect, I’d really appreciate giving your opinion in the comments section below.
more...
No comment yet.
Scoop.it!

A primer for building Single-Page Applications with React

A primer for building Single-Page Applications with React | JavaScript for Line of Business Applications | Scoop.it

Part 0: Preface
Part 1: Intro to React
Part 2: Harmony aka ES6 aka ES2015
Part 3: Useful Libraries
Part 4: Webpack
Part 5: React Router
Part 6: Flux
Part 7: Testing
Part 8: Rails (Bonus Chapter)

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

Making React and Knockout play nice

Making React and Knockout play nice | JavaScript for Line of Business Applications | Scoop.it

I'd like to talk about how to make the transition between two particular frameworks easier: React.js and Knockout.js

If you have a large project, making the transition all in one big pull request might not be a feasible option. It's important to allow some sort of middle ground where the two code-bases or technologies can play nice with one another.

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

Webcomponents v2

By now, you may have heard a lot of things about Web Components. Some people say it's the promise land, others say it has been oversold.

Although they're not going to solve all your life's problems, they do provide a paradigm shift from the traditional approach of web development.

If you still aren't sure about what exactly is Web Components or even why you should care about it, this session is for you.

In this session Dmitry goes through a brief overview of the Web Component specifications and how they fit in to application development today. 

The talk also covers best practices available to developers to use with Web Components.

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

Announcing Arch - a functional style application framework for React

Announcing Arch - a functional style application framework for React | JavaScript for Line of Business Applications | Scoop.it

Arch is a front-end functional style application framework using React as a UI layer. Arch applications are isomorphic out of the box, including form processing. This means you write your application as if it was client-side only and Arch will manage the server-side portion.

This also means you don’t get any control over the code running server-side, which is a design decision. The theory behind it is that any server-side code you need to run should sit in a separate server application which you talk to over an API.

Jan Hesse's insight:

http://archjs.org

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

Getting started with React

React is an insanely powerful framework by the amazing developers over at Facebook. Implementing a virtual DOM, it allows us to render components super fast whilst removing any unnecessary overhead from DOM operations. React is often said to deal with the "V" out of the MVC architecture, however when you mix this with Flux, you can have a full blown front-end framework that allows you to easily keep your model and view in sync - more on Flux soon.

Jan Hesse's insight:

folloe up:

http://ryanclark.me/getting-started-with-flux/

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

The Transition to Ember 2.0 in Detail

The Transition to Ember 2.0 in Detail | JavaScript for Line of Business Applications | Scoop.it

As we approach the eve of the release of Ember 1.13-beta, it's a good time to talk about the transition plan for those of us who have Ember 1.11 and 1.12 applications.

The Glimmer engine represents the third phase of major performance work on Ember in the past year (preceded by metal-views in 1.8 and HTMLBars in 1.10). Now that it's landed, we're going to move into the next phase of major performance improvements. Expect to see more about that once Ember 2.0 has shipped.

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

Developing a MEAN app with Angular 2.0

Developing a MEAN app with Angular 2.0 | JavaScript for Line of Business Applications | Scoop.it

I know, I know it is too early to be building end to end apps with Angular 2.0.

A MEAN stack app would typically consist of a server layer built with Nodejs & Express – Express being the web framework. MongoDB for data persistence & Angular as the client side MVW framework.

First, we are going to setup an express app, build the REST API to Create, Read, Update & Delete todos and then integrate it with the Angular app.

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

JavaScript Loop Optimization

JavaScript Loop Optimization | JavaScript for Line of Business Applications | Scoop.it
In this video, we'll look at some steps we can take to optimize our for loops so they are as performant as possible. We're going to be doing this through the use of a demo web application, three different browsers with tests, and sample code.
more...
No comment yet.
Scoop.it!

Rust's Ownership model for JavaScript developers

Rust's Ownership model for JavaScript developers | JavaScript for Line of Business Applications | Scoop.it

Rust is an exciting new system programming language by Mozilla. In this post we explore Rust's concept of ownership that enables the language to achieve 100 % memory safety without garbage collection.


Most languages (JavaScript included) use a garbage collector to ensure memory safety.
Well then, what’s the job of a garbage collector anyway? Basically it frees up memory that isn’t used anymore, that is, memory that nothing in the program points to anymore. Traditionally languages that are not memory safe such as C and C++ delegate that work to the developer. As we all know humans aren’t free from failure and so here are some examples of problems that may arise with manual memory management
access to memory that has already been freed
trying to free memory that has already been freed (double free)
not freeing memory at all that rather should have been freed (memory leak)

Rust doesn’t use a garbage collector while still being 100 % memory safe. So how does that work and how does it affect the way we write our code?

more...
No comment yet.