JavaScript for Line of Business Applications
606.6K views | +9 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!

Twitter + GeoJSON + d3.js + Rob Ford = Fun with data visualizations

As a citizen of Toronto, the past few weeks (and months) have been interesting to say the least. Our mayor, Rob Ford, has made headlines for his various lewd remarks, football follies, and drunken stupors. With an election coming up in 2014, I was curious as to how the rest of Toronto felt about our mayor.

 

The Task

Collect data from Twitter, making sure we only use tweets from people in Toronto. Plot those tweets on an electoral map of Toronto’s wards, colour coding the wards based on how they voted in the 2010 Mayoral Election.


The Tools

* Repustate’s API (for data mining Twitter and extracting sentiment, of course!)

* Shapefiles for the City of Toronto including boundaries for the wards

* GDAL

* d3.js

* jQuery

Jan Hesse's insight:

Using Twitter, GeoJSON (via GDAL) and d3 to visualize data about Rob Ford

No comment yet.
Scoop.it!

Why does JavaScript need a style guide?

Why does JavaScript need a style guide? | JavaScript for Line of Business Applications | Scoop.it

Let’s say you start an e-commerce site.

Your first engineer is Picasso during his blue period. Your codebase quickly becomes filled with Picasso blue period javascript files. He paints you a javascript shopping cart without a problem. He’s done it a million times before. But this is his best one. It’s his masterpiece. And very blue.

Your second engineer is Salvador Dali. He shows up on his first day with a camera, a single paintbrush, a silly mustache, and starts contributing some crazy surrealist javascript files.

This influences Picasso as they work together and Picasso starts switching things up and begins adding cubism files to the codebase. The codebase is so new that Picasso and Dali can continue adding new files at any time with no harm, because there is no maintenance when it’s just two engineers adding new functionality. No one is stepping on each other’s toes. There’s enough paint for everyone.

Then you hire Monet and he comes in and leaves his impression on everything.

No comment yet.
Scoop.it!

Numeral.js - A javascript library for formatting and manipulating numbers.

Numbers can be formatted to look like currency, percentages, times, or even plain old numbers with decimal places, thousands, and abbreviations.

Numeral.js, while less complex, was inspired by and heavily borrowed from Moment.js

No comment yet.
Scoop.it!

AngularJS–Part 1, Feedback

AngularJS–Part 1, Feedback | JavaScript for Line of Business Applications | Scoop.it

This is a series of posts to describe our approach to slowly migrate a Silverlight based client of a huge and complex LOB  to an HTML5/CSS3/JavaScript based client. These posts report on the lessons learnt and are meant to be used as a reference for our development teams. The first part of this series can be found here.

To my own surprise I already got a lot of interesting feedback to my first introductory post in the series. Instead of replying directly to the individual comments I prefer to write a specific blog post and reason a bit about my motivation.

I want to take a minute and reflect on some of the comments. I allow myself to paraphrase some of the comments

Jan Hesse's insight:

http://lostechies.com/gabrielschenker/2013/12/09/angularjspart-2-the-controller/

http://lostechies.com/gabrielschenker/2013/12/10/angularjspart-3-inheritance/

http://lostechies.com/gabrielschenker/2013/12/12/angularjspart-4-accessing-server-side-resources/

http://lostechies.com/gabrielschenker/2013/12/17/angularjspart-5-pushing-data-to-the-server/

http://lostechies.com/gabrielschenker/2013/12/28/angularjspart-6-templates/

http://lostechies.com/gabrielschenker/2013/12/30/angularjspart-7-getting-ready-to-test/

http://lostechies.com/gabrielschenker/2013/12/30/angularjspart-8-more-choice-when-testing/

http://lostechies.com/gabrielschenker/2014/01/14/angularjspart-9-values-and-constants/

http://lostechies.com/gabrielschenker/2014/01/20/angluarjspart-10-intermezzo/

http://lostechies.com/gabrielschenker/2014/02/04/angularjspart-11-promises/

http://lostechies.com/gabrielschenker/2014/02/11/angularjspart-12-multi-language-support/

http://lostechies.com/gabrielschenker/2014/02/26/angular-jspart-13-services/

http://lostechies.com/gabrielschenker/2014/04/18/angular-jspart-14-end-to-end-tests/

http://lostechies.com/gabrielschenker/2014/04/21/angularjspart-15-end-to-end-tests-and-mocking/

No comment yet.
Scoop.it!

Lazy.js - Like Underscore, but lazier

Lazy.js - Like Underscore, but lazier | JavaScript for Line of Business Applications | Scoop.it

Lazy.js is a utility library for JavaScript, similar to Underscore and Lo-Dash but with one important difference: lazy evaluation (also known as deferred execution). This can translate to superior performance in many cases, especially when dealing with large arrays and/or "chaining" together multiple methods. For simple cases (map, filter, etc.) on small arrays, Lazy's performance should be similar to Underscore or Lo-Dash.

The following chart illustrates the performance of Lazy.js versus Underscore and Lo-Dash for several common operations using arrays with 10 elements each on Chrome:

No comment yet.
Scoop.it!

Functional JavaScript in action

Recently came across a blog post about a JavaScript function to convert state names to abbreviations (or vice versa) and realized that it's an excellent topic to present the power that can be had from functional programming in JavaScript.

The premise of the article is that the author needed a function that when given a state name or abbreviation would return the opposite. The author went about it by first finding a PHP function that does the same, then simply converted the code over to JavaScript. While this method surely works for the purpose needed, it also illustrates how powerful functional programming techniques could be used instead which will produce the same result, but also have some reusable code.

No comment yet.
Scoop.it!

Understanding {{this}} scoping in Ember Handlebars {{each}} blocks

Understanding {{this}} scoping in Ember Handlebars {{each}} blocks | JavaScript for Line of Business Applications | Scoop.it
One of the more confusing parts of using Ember is understanding how {{this}} is scoped within an {{each}} block in your templates. The reason this can be so confusing is because the scope of the block can change depending on what you are iterating over and how your controller is set up. I will cover the three main use cases and discuss what {{this}} resolves to in each.

* Case 1: {{#each model}}

* Case 2: {{#each person in model}}

* Case 3: {{#each controller}} with itemController

No comment yet.
Scoop.it!

The RESTFulness of Single Page Applications

The RESTFulness of Single Page Applications | JavaScript for Line of Business Applications | Scoop.it

The frequent pairing of Single Page Applications and RESTful APIs goes well beyond the fact that both have become popular buzzwords. While the architectural styles of REST and Single Page Applications (SPAs) do not depend on each other in principle, it would be difficult to imagine either succeeding without the other in regard to the development of web applications

The reliance of SPAs on REST is perhaps the most immediately apparent. To retrieve and manipulate data, SPAs need to make a great many calls to a server using means other than the traditional pattern of page refreshes. SOAP web services have long been and remain an option. And, indeed, the JavaScript XMLHttpRequest object can return data in a wide variety of formats. However, crafting large, complex SOAP requests and parsing their XML-based results in JavaScript is both complex and error-prone. Building a useful JavaScript library for SOAP generally means making it specific to a single SOAP API. As a web developer, I tend to avoid making SOAP requests from JavaScript, instead making such calls form server-side code and sending the results to the browser through some other mechanism.

In contrast, making calls to RESTful APIs and parsing the JSON-formatted results is a pleasure. jQuery makes it all trivial. And while each SOAP API must be learned anew, RESTful APIs tend to be intuitive and predictable. As a practical matter, RESTful APIs have made the notion of an SPA feasible to a great many more development teams.

No comment yet.
Scoop.it!

The CARB stack: Coffee + Angular + Rails + Bower

AngularJS is a great way to build modern web apps and this affects Rails programmers. The combination of both is an excellent choice: Build your single-page app in Angular and let it communicate via JSON with your Rails-API backend (btw, this is exactly what we did forpalava). However, you might ask yourself, what the best way to combine Angular and Rails is. Should you use the JavaScript tools world (grunt, yoeman, etc.) or should you prefer the Ruby tools (thor, sprockets)?

Of course, this decision depends on you and your background. For me, the answer is clear: I want to stay in Ruby land. I am familiar with it and it works very well. Why should I throw the tools away for the same functionality, just because they are built in JavaScript? Don’t get me wrong, you should try out yoeman for a new angular project, it is fantastic. But nevertheless.. I like the Ruby stack. The CARB stack.

No comment yet.
Scoop.it!

Message Queues, Background Processing and the End of the Monolithic App

Message Queues, Background Processing and the End of the Monolithic App | JavaScript for Line of Business Applications | Scoop.it

Platform as a Service has transformed the use of cloud infrastructure and drastically increased cloud adoption for common types of applications, but apps are becoming more complex. There are more interfaces, greater expectations on response times, increasing connections to other systems, and lots more processing around each event. The next shift in cloud development will be less about building monolithic apps and more about creating highly scalable and adaptive systems.

Don’t get us wrong, developers are not going to go around calling themselves systems engineers any time soon but at the scale and capabilities that the cloud enables, the title is not too far from the truth.

No comment yet.
Scoop.it!

Insights from Using Ember.js in the Field

Insights from Using Ember.js in the Field | JavaScript for Line of Business Applications | Scoop.it
Stefan Fochler shares best practices on using Ember.js to master the needs of real-world web applications, discussing what worked well and what didn't.
No comment yet.
Scoop.it!

Angular/Jasmine Testing

Angular/Jasmine Testing | JavaScript for Line of Business Applications | Scoop.it

16) Angular/Jasmie, ngModelController and $parsers
A special episode by viewer request. How do you test $parsers, $formatters or otherwise in your Angular directives?

15) Angular/Jasmine, Inherited Directive Testing
Episode 15 in our Angular/Jasmine unit testing series. Testing directives that directly inherit from their parent (either directive or controller).

14) Angular/Jasmine, Inherited Controller Testing
Episode 14 in our series on Angular JS testing with Jasmine. Testing controllers that inherit $scope methods and properties from other controllers.

13) Angular/Jasmine, Testing Service Calls W/ Spies
Episode 13 in our Angular/Jasmine testing series. This episode shows how to setup service tests with spies.

12) Angular/Jasmine, Re-Tooling Configurations
Episode 12 of our Angular / Jasmine testing series. Re-tooling your Angular configuration for easier and more standardized testability.

11) Angular/Jasmine, Spying on Factories
Episode 11 in our Angular JS / Jasmine unit testing series. Using jasmine spies, specifically on Angular factories.

10) Angular/Jasmine, Testing Event Listeners
Episode 10 of our Angular JS Jasmine testing series. Testing event listeners in controllers and elsewhere. We welcome your feedback and requests.

9) Angular/Jasmine, Testing Watchers
Episode 9 of our Angular/Jasmine testing series. Testing scope watch methods in controllers and elsewhere. We are very thankful for your comments and requests.

8) Angular/Jasmine, Testing Directives W/ External Templates
Episode 8 in our Angular/Jasmine series. The configuration and testing approach for directives with external templates. Please leave feedback.

7) Angular/Jasmine, Directive Testing Part I
Episode 7 in our series on Angular/Jasmine testing. This is part I of testing directives. For more info on this, you should also check out: http://egghead.io/lessons/angularjs-unit-testin…

6) Angular/Jasmine, Filter Testing
Episode 6 in our Angular JS Jasmine unit testing series. This episode is about testing filters outside of the DOM.

5) Angular/Jasmine, Factory Testing
Episode 5 of our Angular Jasmine unit testing series. Testing factories and values.

3) Angular/Jasmine, Controller Testing
Episode 3 in our Angular Jasmine testing series. Testing controllers and methods on the $scope.

4) Angular/Jasmine, Controller Testing ('this' methods)
Episode 4 in our Angular Jasmine testing series. Testing instance methods on controllers, as supported by Angular 1.2.

2) Angular/Jasmine, Bower
Episode 2 in our Angular JS Jasmine unit testing series. Loading third party libraries with bower.

1) Angular/Jasmine, Setup
The first of our Angular Jasmine testing series. A video about how to setup your Angular testing environment.

No comment yet.
Scoop.it!

JavaScript Performance Techniques

This talk presents a number of ways on when to use jQuery and how you can write efficient code with an emphasis on performance. It covers important techniques like event delegation and lazy evaluation, the how-to’s on being cognizant of performance factors and speed gains from various code enhancements. Presentation Slides »

This talk presents a number of ways on when to use jQuery and how you can write efficient code with an emphasis on performance. It covers important techniques like event delegation and lazy evaluation, the how-to’s on being cognizant of performance factors and speed gains from various code enhancements.

No comment yet.
Scoop.it!

Bookshelf - An ORM for JavaScript

“We want to be able to ask questions to our data, without predefining the way we structure our data” - an argument for “No”-SQL, put forward in this very nice talk on ElasticSearch by Shay Banon.

Still, today we often use SQL, and it is required that you predefine your schema or structure your data beforehand. This means to query data, you must add and remove attributes from a schema, define how data is connected (or how data can be joined) to run actual queries.

And if you want to do this with Node.js, you often were left alone with your RDBMS backend. Not anymore, since thanks to Tim Griesser, there are a number of fresh ideas for working with data in Node.js. Let’s have a look at Knex and Bookshelf.

Knex is a promissing wrapper for SQL in JavaScript. With Knex, we quickly can connect to a MySQL, Postgres or SQLite database.

No comment yet.
Scoop.it!

reSRC · List of Free Programming Books

reSRC · List of Free Programming Books | JavaScript for Line of Business Applications | Scoop.it

* Algorithms & Datastructures
* Theoretical Computer Science
* Operating systems
* Database
* Networking
* Compiler Design
* Programming Paradigms
* Parallel Programming
* Software Architecture
* Open Source Ecosystem
* Information Retrieval
* Datamining
* Machine Learning
* Mathematics
* Misc
* Web Performance
* MOOC
* Professional Development
* Security

No comment yet.
Scoop.it!

Ember Reusable Components and Widgets

Ember Reusable Components and Widgets | JavaScript for Line of Business Applications | Scoop.it
Sergey Bolshchikov discusses building complex UIs with Ember.js by combining Handlebars templates and Ember.View.
No comment yet.
Scoop.it!

Deconstructing AngularJS Injector

Deconstructing AngularJS Injector | JavaScript for Line of Business Applications | Scoop.it

I’ve been doing some stuff with AngularJS and one of the key ideas is dependency injection. Here’s a deconstruction of injector.js which contains all the functions and classes for dependency injection.

The biggest problem I have with dynamically typed languages is that there are no type hints written out. With AngularJS’s implementation of dependency injection, the dependencies are passed around as the first items in a list followed by the function which dependencies on them. Instead of talking about them as functions (which have no dependency) or arrays where the last item is a function or calling it “array notation”, it would be helpful to create a type that represents them. Not a class, but a type. This would give it a name and make it easier to refer to.

Alternatively, contracts could be written for functions and methods that would state how to make a valid call to a function.

No comment yet.
Scoop.it!

Getting to the Content You Want, Faster in IE11 - Page Prediction, Preload, and Prefetch

Getting to the Content You Want, Faster in IE11 - Page Prediction, Preload, and Prefetch | JavaScript for Line of Business Applications | Scoop.it

Internet Explorer 11 helps overcome the effects of network latency, making every day browsing feel fast and responsive without hurting battery life, CPU, network bandwidth, or memory. Network latency is a problem that holds back Web performance, even though we enjoy more bandwidth now than ever before. IE11 reduces the effects of network latency by downloading and preloading pages and Web resources in the background, downloading multiple resources in parallel using the SPDY/3 protocol, and prioritizing downloads of the most important resources on the page.

 

Page Prediction, preload (also called prerender), and prefetch in IE11 give the browser a head start in downloading and rendering the next page or downloading resources for the next page. For common browsing patterns, pages are pre-emptively fetched and even constructed in the background in a hidden tab so they appear instantly when you click on that link. These techniques speed up things you commonly do on the Web, such as searching, reading articles, browsing photos, and so on, making them feel like browsing local content.

No comment yet.
Scoop.it!

Thinking About ECMAScript 5 Parts

Thinking About ECMAScript 5 Parts | JavaScript for Line of Business Applications | Scoop.it

The ECMAScript Language Specification Edition 5.1 (i.e. ES5 or ECMAScript 5) was finalized in June 2011 (drafted 2009) and the first browser to fully support the specification was Firefox 4, released on April 20th 2011.

2014 is around the corner and my in-depth ES5 implementation knowledge remains rather rough. The reality is, I have not yet had the luxury of working on a project full-time that did not require ie8 support, which, as you might know, does not run an ES5 scripting engine. Before you cry shim, I've personally chosen to avoid a comprehensive shim for ES5 given the caveats. The caveats in this instance scare the pee out of me.

No comment yet.
Scoop.it!

ES6 modules and EmberJS : a taste of the future

ES6 modules and EmberJS : a taste of the future | JavaScript for Line of Business Applications | Scoop.it

A quick walk throught the fresh ES6 modules spec coupled with the front MVC framework EmberJS.

The ES.current as we know it doesn’t feature a standardized module system, you cannot require some fragment of code inside another fragment of code and use it while being inside a namespace (and not a global). AMD and CommonJS came along and proposed two impressive yet incompatible solutions to let developers use modules (AMD is mostly used in the browser, while CommonJS is more used server-side). The new ES6 modules spec aims at solving this module problem and also let ES6 modules transpile to both AMD and CommonJS as a polyfill.

The ES6 modules spec is done and will not change before the ES6 specs release, we can now use it and feel safe about the new semantic we learn.

Jan Hesse's insight:

http://thau.me/2013/12/es6-modules-and-emberjs-a-taste-of-the-future-part-2/

No comment yet.
Scoop.it!

BACN – A Recipe for Fast and Open Mobile Application Development

BACN – A Recipe for Fast and Open Mobile Application Development | JavaScript for Line of Business Applications | Scoop.it

At the Google Developer Live Presentation in October, we introduced BACN as an extension of MEAN (MongoDB, Express, AngularJS, and Node) for enterprise mobile app development. The developer community is increasingly adopting MEAN for building rich web applications because of its speed and ease of use.  We are introducing a similar stack for mobile applications called BACN:Bootstrap, AngularJS, Cordova, and Node.

We chose these components for mobile web and hybrid applications because of their rich feature set and because they are in best-of-breed in:

* Ease of use

* Developer community adoption

* Enterprise familiarity

* Leveraging JavaScript on both front-end and back-end


On the front end, AngularJS provides an MVC (model-view-controller) framework for single-page web applications. Bootstrap as the UI framework adds mobile features such as built-in responsive layouts. Cordova provides native device functionality such as access to contacts list and camera.

No comment yet.
Scoop.it!

Consuming RESTful Resources with AngularJS

REST:

* separates back- and frontend

* Easily integrate data in (web) apps

* Easily replace (web) app

* Third party access

* Data purity


AngularJS - $resource:

Good: Creates resource object to interact with RESTful resources

Bad: Doesnt handle sub resources, requires full url in each object, Doesnt support all REST methods, Limited options

No comment yet.
Scoop.it!

Fibers, Event Loop and Meteor

Fibers, Event Loop and Meteor | JavaScript for Line of Business Applications | Scoop.it

Meteor’s use of Fibers allows it to do many great things. In fact, Meteor’s popularity may be a direct result of its use of Fibers, though you wouldn’t know it without a deep understanding of Meteor’s internals.

It’s a bit hard to understand how Fibers works, and how it relates to Meteor. But once you do, you’ll have a better understanding of how Meteor works internally.

Meteor is built on top of Node.js, so we can’t forget the Event Loop. Node.js runs on a single thread, and thanks to the Event Loop and event-driven programming, program execution isn’t blocked by I/O activities (network and disk, mainly). Instead, we provide a callback function that is run after the I/O completes, and the rest of the program continues to run.

No comment yet.
Scoop.it!

Test-driven SPA development

Testing is hard to get right. There are several ways to shoot yourself in the foot. Testing an SPA (single page application) adds its own idiosyncrasies and complexities. Utilizing well known patterns and practices and avoiding common pitfalls, it is possible to create a fast, maintainable test-driven development process.

This post explains theory behind how to write good unit tests and delves into writing a real world test case with code and full working examples. It uses Durandaljs, but the concepts are applicable to all single page applications.

No comment yet.
Scoop.it!

JavaScript: Taking Off the Training Wheels

JavaScript: Taking Off the Training Wheels | JavaScript for Line of Business Applications | Scoop.it

JavaScript is the third pillar of front-end web development. Of those pillars, it is both the most powerful and the most complex, so it’s understandable that when 24 ways asked, “What one thing do you wish you had more time to learn about?”, a number of you answered “JavaScript!”

This article aims to help you feel happy writing JavaScript, and maybe even without libraries like jQuery. I can’t comprehensively explain JavaScript itself without writing a book, but I hope this serves as a springboard from which you can jump to other great resources.

No comment yet.