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

Scaling Isomorphic Javascript Code

Scaling Isomorphic Javascript Code | JavaScript for Line of Business Applications | Scoop.it

Design patterns are the bread and butter of application development. They encapsulate and outline the concerns of the application and the environment of the in which it exists. Between the browser and the server these concerns can vary widely:
* Is the view ephemeral (e.g. on the server) or long-lived (e.g. in the browser)?
* Is the view reusable across different use-cases or scenarios?
* Should the view be annotated with application-specific tags or markup?
* Where should the bulk of the business logic reside? (in the model? in the controller?)
* How is the application state persisted or accessed?
Lets explore some of the existing patterns and how they answer these questions:
* Model-View-Controller
* Model2
* Model-View Presenter and Model-View-ViewModel
* Modern Javascript Implementations
* Real-time Implications
* tl;dr? Introducing Resource-View-Presenter
* Conclusion

No comment yet.
Scoop.it!

Cubism.js - Time Series Visualization

Cubism.js - Time Series Visualization | JavaScript for Line of Business Applications | Scoop.it

Cubism.js is a D3 plugin for visualizing time series. Use Cubism to construct better realtime dashboards, pulling data from Graphite, Cube and other sources. 

Cubism fetches time series data incrementally: after the initial display, Cubism reduces server load by polling only the most recent values. Cubism renders incrementally, too, using Canvas to shift charts one pixel to the left. This approach lets Cubism scale easily to hundreds of metrics updating every ten seconds! Despite asynchronous fetching, rendering is synchronized so that charts update simultaneously, further improving performance and readability.

Cubism also scales in terms of perception: small multiples aligned by time facilitate rapid comparison. Cubism’s horizon charts make better use of vertical space than standard area charts, allowing you to see many more metrics at-a-glance and increasing the likelihood of discovery.

Scoop.it!

Tips for using window in JavaScript

Tips for using window in JavaScript | JavaScript for Line of Business Applications | Scoop.it

In web browsers, window refers to an object that contains the global variables. This blog post explains how it works and when to use it.

* The global object and window
* Use cases for window
* The future of global variables
* Conclusion


We have seen several use cases for window. But you can normally achieve the same result by treating a global variable as a variable and not as a property of window. This is the recommended way of doing it, because your code becomes slightly more flexible and because the global scope will become less used in the future.

No comment yet.
Scoop.it!

restangular - AngularJS service to handle Rest API Restful Resources properly and easily

restangular - AngularJS service to handle Rest API Restful Resources properly and easily | JavaScript for Line of Business Applications | Scoop.it

Restangular is an AngularJS service that simplifies common GET, DELETE, and UPDATE requests with a minimum of client code. It's a perfect fit for any WebApp that consumes data from a RESTful API.

Restangular has several features that distinguish it from $resource:
* It uses promises.
* You can use this in $routeProvider.resolve.
* It doesn't have all those $resource bugs.
* It supports all HTTP methods.
* It supports ETag out of the box.
* It supports self linking elements.
* You don't have to create one $resource object per request.
* You don't have to write or remember ANY URL.
* It supports nested RestFUL resources.
* Restangular lets you create your own methods.
* Support for wrapped responses.
* You can build your own URLs with Restangular objects easily.

No comment yet.
Scoop.it!

An AngularJS Test Pyramid

An AngularJS Test Pyramid | JavaScript for Line of Business Applications | Scoop.it

As a team with a strong taste for automated testing we focused from the beginning on how to test our Angular app. In this post we want to describe our different types of tests and how they form a Test Pyramid.

Level 4: Selenium Tests.
Level 3: E2E (Scenario) Tests.
Level 2: Directive Tests.
Level 1: Unit Tests.

For each kind of test, we will explain the following aspects:

* Purpose: What’s the idea behind this type of tests. When to use and what is being tested (the scope of the test). Principles how to write the test.
* Implementation: How does it look like in source code. Examples, technical issues.
* Our experience: Reflection about our specific experience. Some heuristic data.

Ehab Roufail's curator insight, October 7, 2013 12:29 PM

Very similar approach to what we are adopting and have adopted recently.

Scoop.it!

Knockout.js Query Builder

Knockout.js Query Builder | JavaScript for Line of Business Applications | Scoop.it

On my current project we are in need of a dynamic query-building user interface. In non-geek terms, that means a web page that allows a user to specify fields, constraints, and values that evaluate to some kind of query or expression. Alright that was still a geeky explanation... but if you're reading this then the geek-speak is probably appropriate for you. But I digress...

This little UI is all about the data structure you want the UI to represent. If you can plan the data structure, you can throw the UI on top of it. There may be specific theories and methods on how to properly represent a logical query like this, but I'm not following any particular approach here.

My data structure is as follows:

* Condition - a unit of logic that defines a field, comparison operator, and value (e.g. Color equals 'Black', Quantity is greater than two, etc).

* Group - contains an array of Conditions and Groups, and specifies whether to perform a logical-AND or a logical-OR on all items in the array.


No comment yet.
Scoop.it!

Required JavaScript Reading

Required JavaScript Reading | JavaScript for Line of Business Applications | Scoop.it

I’m asked regularly about books and online resources to get up to speed on JavaScript. Seems like everyone wants to get in on the JS action and with good reason; it’s a great language to know if you’re interested in exciting career opportunities. It’s also pretty fun to play with.

 

With JavaScript’s increased popularity, the number of books, blogs and tutorials about the language have grown exponentially and while I can’t possibly know all of them, I’ve found some gems which I really like and would like to share those with you.

 

* Books

* Freebies

* Blogs

* Taking a Class

* Getting Help

No comment yet.
Scoop.it!

The Future of AngularJS

The Future of AngularJS | JavaScript for Line of Business Applications | Scoop.it

Brian Ford shows the use of ES6 Modules and Web Components used by templates in AngularJS. Also it is shown how object.Observe could replace $apply.

No comment yet.
Scoop.it!

angular-growl :: growl-like notifications for angularJS projects

angular-growl :: growl-like notifications for angularJS projects | JavaScript for Line of Business Applications | Scoop.it

growl like notifications for angularJS projects, using bootstrap alert classes

No comment yet.
Scoop.it!

angular-gettext :: Super-simple translation support for Angular.JS

angular-gettext :: Super-simple translation support for Angular.JS | JavaScript for Line of Business Applications | Scoop.it

Angular-gettext let's you focus on developing your application. Just write everything in English and annotate which parts should be translated. The tools do the rest.

Marking a string as translatable is as simple as adding an attribute:

<a href="/" translate>Home</a>

No need to maintain translation codes or magic values, that just causes headaches!

 

Not every language works like English. Did you know that Polish uses three plural forms? Or that Irish uses five? No worries, angular-gettext handles all of this for you. Just provide a plural string where needed.

<span translate translate-n="count" translate-plural="There are {{count}} messages">There is {{count}} message</a>

The span above will always show a correctly pluralized message, even if the language uses wildly different pluralization rules.

A full list of supported languages (over 130) can be found here.

No comment yet.
Scoop.it!

CRUD example app without Ember Data

CRUD example app without Ember Data | JavaScript for Line of Business Applications | Scoop.it

Ember Data is one of the most ambitious undertakings in recent JavaScript history. It carries the promise of a persistance library that makes it easy to build large browser applications that interact with diverse APIs. Ember Data is evolving quickly as the Ember Core Team experiments and iterates the library to create a generalized solution that will work for many use cases. These changes introduce code with kinks that haven't been ironed out yet. When using Ember Data developers often find themselves digging into the library in order to find where the problem originates.

Digging into Ember Data source code is easier for experienced Ember developers who are familiar with Ember Data's history and Ember community. For a beginner who is building a small browser app this can be extremely frustrating because it's difficult to find the source of the problem. Innevitably beginners waste days trying to figure out how to get their apps to make simple requests to their non conventional APIs.

This article was written as an alternative to that experience. The goal of this article is to help you undestand Ember architecture and allow you to build simple apps without relying on Ember Data.

There will come a day when Ember Data is a rock solid library that is easier to use than writing your own AJAX requests. Until that day, I recommend learning Ember architecture and rolling out your own persistance layer. This will give you the added bonus of understanding how Ember Data ties into Ember and what problems it's trying to solve for you.

This articles walks you through creating a CRUD app without Ember Data to give you a better understanding of Ember architecture.

No comment yet.
Scoop.it!

Climbing the d3.js Visualisation Stack

Climbing the d3.js Visualisation Stack | JavaScript for Line of Business Applications | Scoop.it

Despite the growing number of books and tutorials that are springing up around the library, such as Data-Driven Documents, Defined on the Data Driven Journalism site, creating even the simplest charts using d3.js out of the box can prove a major challenge to those of us who aren’t fluent in writing Javascript or manipulating the DOM (whatever that means!;-) - See more at:

Help is at hand, though, in the form of several libraries that build on top of d3.js to provide a rather more direct path between getting your data into a web page and displaying it. Here are a few of the ones I’ve come across:...

No comment yet.
Scoop.it!

dimple - A simple charting API for d3 data visualisations

dimple - A simple charting API for d3 data visualisations | JavaScript for Line of Business Applications | Scoop.it

An object-oriented API allowing you to create flexible axis-based charts using d3.js. The intention of this project is to allow analysts who are not necessarily expert JavaScript programmers to create standard (and some not-so-standard) business analytics.

The API will also expose the core d3 objects where possible so that as users gain confidence they can extend the base functionality in whatever way they wish.

No comment yet.
Scoop.it!

Getting Started with a Javascript Framework - MeteorJS

I am writing about Meteor to help promote the framework and the open source community around the Meteor project.

Another quick note before kicking off these writings is to also clarify that these writings will not teach you how to write HTML, CSS or Javascript. The examples I plan on providing are to be considered as proofs of concept and in most cases - not taken for production code. If you find use or purpose for snippets found here - please feel free to take ahold of them and bend them to your will!

With those bits out of the way lets get started.

The first step to getting started with Meteor is to understand why we would even want to use Meteor, or frankly anything, as a Javascript framework. I have the wonderful opportunity to work and collaborate with many awesome developers - and all of us at one time have had issue’s with scaling web applications effectively due to poor, or sometimes just no, Javascript code structure.

No comment yet.
Scoop.it!

Testable & Tested Client-side Code

Testable & Tested Client-side Code | JavaScript for Line of Business Applications | Scoop.it

Testing (i.e. linting, unit tests, integration testing etc..) client-side code is not done as commonly as it should be. The reason it is so commonly not done, besides lack of know-how, is that it is presupposed that it will take time away from other more productive development tasks.

This fallacious notion is, of course, wrong. The repeatable successes in software engineering based on testable (i.e. modular, loosely coupled, small, simple units of code) and tested code has proven again and again to be a time-saver and part of creating maintainable and understandable code. At a minimum, if code is not unit tested it is only a matter of time before it is burnt down and re-written, or abandoned altogether because it becomes unmaintainable and incomprehensible.

In this article, I am going to defend and talk about testing client-side code. It is my intention that the information in this article will give those among us who do not test, the desire and some initial testing knowledge to test, along with the ability to defend its necessity from any agent that might deter testing.

No comment yet.
Scoop.it!

Functional Programming Using JavaScript

Functional Programming Using JavaScript | JavaScript for Line of Business Applications | Scoop.it

Programmers use different techniques to achieve abstraction and hide complexity e.g Object Oriented techniques does exactly that. They do so because programs grow at fast pace and they quickly become complex. Humans are intelligent but they can handle complexity to a particular level. So basically Functional programming is also used to hide complexity of programs using functions.

Here the word “functions” is important because you will be hiding complexity using functions. Now I will explain some important functional programming concepts. First you need to understand what’s Function Application?

In some pure functional languages, there’s no concept of function call. We actually apply a function to data instead of calling it. In JavaScript you can actually both call or apply a function. Let me give an example of that...

No comment yet.
Scoop.it!

AngularJS + TypeScript : Controllers, Best Practice

Guidance around how you can write your Controllers when using AngularJS with TypeScript. 

--Things covered-- 
Dependency Injection 0:42 with minification 1:18
Using Class Members instead of Scope properties has following advantages: 
-Advantage: Class members : 3:50
-Advantage: Designer/Developer interaction contract 4:30 
-Advantage: Overcomming Scope inheritance 5:34
Summary 7:55

No comment yet.
Scoop.it!

Ember JS & SEO - How to easily implement SEO friendly URLs in 3 steps

Ember JS & SEO - How to easily implement SEO friendly URLs in 3 steps | JavaScript for Line of Business Applications | Scoop.it

This post is a follow up to my previous post about SEO and getting your App crawled. A very important topic of SEO are URLs, as they have a big impact on your ranking by the various search engines. Therefore you will want to create custom URLs in your app. In this blog post we will have a look at how to implement custom URLs this with 3 easy steps. At the end i will show you a shortcut that allows you to skip the steps 2 and 3 and do it with 1 step! I will provide JSBins for you to play around with both approaches.

This are the 3 steps towards your custom URLs:

* Modify the mapping in your router and add dynamic segments to customize your URL.

* Implement the serialize method to create an URL representation of your models.

* Implement the model method to convert a URL into a model again. This is needed when a user enters your App via URL, e.g. a user hits refresh or someone shares a link to your page.

No comment yet.
Scoop.it!

Compose, don't inherit (not a lot anyway).

Compose, don't inherit (not a lot anyway). | JavaScript for Line of Business Applications | Scoop.it

Lately I've seen a lot about JavaScript Inheritance and in particular different github projects that allow you to do inheritance in a certain way. Most of these solutions are about trying to use some form of classical inheritance and with good reason. If you're used to any other language then that is probably what you learned and so it makes sense. Also there can be performance gains as using a "class" means you won't be mutating an object's signature and as such a JavaScript runtime can make optimizations for that "type".

There are also some good articles about what JavaScript inheritance is really about and if you only read one, make sure to read Kyle Simpsons: JS Objects.

But do we really need long inheritance chains where we link up lots of objects and have lookups going up a chain? As JavaScript is so flexible can we learn things from Functional and Aspect Oriented styles of programming? I think we can.

No comment yet.
Scoop.it!

JavaScript Performance Tips

In this tip, I have tried to capture the common design and coding mistakes JavaScript developers tend to make. The intended audience for this article is JavaScript beginners with a few years of programming experience.

Over the years, I have observed how web based Enterprise/Consumer software is designed, developed and tested. One common trait in all of these applications is the usage of JavaScript. More often than not, developers either overlook or are ignorant about JavaScript performance. This is partly because these days, the machines are mostly high end and the browsers with their ever improving script engines have to some extent camouflaged the performance aspect. So developers are not penalized for writing bad JavaScript. Nevertheless if developers follow certain discipline while coding JavaScript, they'll definitely notice that their app will improve in terms of performance and maintainability.

No comment yet.
Scoop.it!

Advanced Testing and Debugging in AngularJS

Advanced Testing and Debugging in AngularJS | JavaScript for Line of Business Applications | Scoop.it
Learn to test, debug and prepare the test code on your AngularJS application like a Pro using Jasmine unit testing and Protractor integration testing

AngularJS is becoming immensely popular and mainstream which means that there is a lot of AngularJS code out there that is being tested or is yet to be tested. And now that you're well on your way to test like a pro, thanks to the abundance of articles, tutorials, books and material out there on AngularJS testing & development, testing should be a mandatory process of your web development workflow.

Full-Spectrum testing with AngularJS & Karma taught us how to test certain areas of your AngularJS application, but how do we test efficiently? How do we debug a problem down the root cause? How do we skip tests, set breakpoints, and professionally mock-out our test components so that we can catch hidden bugs and unexpected scenarios? How far can and should we go with Unit & E2E testing? What else should we consider. Well lets take adeeper dive into testing in AngularJS and expand our minds by learning how to become a professional front-end tester.

Table of Contents:
* Presentation Slides + Video
* What to test and what not to test
* Preparing your test environment with Karma & Grunt
* Write tests as you go
* So when do you do your testing?
* Module & Inject Breakdown
* Powerful Mocking Strategies
* Sync' and Async' testing
* Skipping and Filtering tests
* Echoing data back to screen
* Using Breakpoints
* Writing Efficient Tests
* Testing older browsers
* Invest into preparing a CI environment
* Feedback Please!

No comment yet.
Scoop.it!

How to create a Directive in AngularJS (simply)

How to create a Directive in AngularJS (simply) | JavaScript for Line of Business Applications | Scoop.it

When you first hear about AngularJS Directives, they appear magic in the 'omg what is going on here' way. As a newcomer to AngularJS, the idea of extending HTML with your own elements seems foreign, or a callback to IE6. Without mastering directives, you'll limit the potential of your AngularJS apps -- not cool.

It doesn't have to be this way: you can create Directives to reuse code and make templates easier for you (and future-you) to understand. You'll think of Directives as creating a DSL in HTML, and become a Wizard of unimaginable power! Ok, maybe not, but you will write easier reading code, and code that's easier to reuse.

All you need is that one example that turns the lightbulb on. Let's take an example from AngulaRails, and create a <multi-avatar> HTML element that displays a user's image, but with some requirements:

* If the user has a facebook-id, we want to use the Facebook image.

* If the user has a github username, we want to use Github's shiny avatar service.

* Otherwise, use Gravatar with the user's email.

No comment yet.
Scoop.it!

Ember.js and Google Analytics

Ember.js and Google Analytics | JavaScript for Line of Business Applications | Scoop.it

Single Page Javascript Applications and specifically Ember.js applications don’t always expose the right information to Google Analytics. Usually you’ll see 100% traffic to / and nothing else.

What I wanted to be able to see what areas of the site people were using in real time. A bit of searching led to various solutions withthis post having the most upto date solution. Working in Ember you quickly become wary of older solutions posted and start filtering search results based on time. Hopefully now that 1.0 is out the correct solutions will start bubbling to the top of Google searches.

To make your Ember.js application more visible to Google Analytics you need to expose the value of your application state. I’m using the hash scheme (eg #/album) so whatever is after the hash in the url shows where a person is in the application.

No comment yet.
Scoop.it!

ng-trans.css - plug-and-play transition for AngularJS

ng-trans.css is some transitions made for AngularJS.

You need AngularJS 1.2 with ngAnimate.

No comment yet.
Scoop.it!

xCharts :: a D3-based library for building custom charts and graphs

xCharts :: a D3-based library for building custom charts and graphs | JavaScript for Line of Business Applications | Scoop.it

xCharts is a JavaScript library for building beautiful and custom data-driven chart visualizations for the web using D3.js. Using HTML, CSS, and SVG, xCharts are designed to be dynamic, fluid, and open to integrations and customization.

No comment yet.