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!

Share state between controllers in AngularJS

You start punching out mad code. You set up services, filters, directives and a whole bunch of controllers. It’s all gorgeous. AngularJS makes you write good code. Everything sort of naturally falls into place and even as the code base grows, it never gets unweildy. When you, in brief moments of insanity, try to work against the framework, it prompty punishes you. Not because it is cruel, but to protect you from making architectural mistakes. Monstrosities in unmaintainability. You chant the mantra: “testability, dependency injection, modularity”, and figure it out. You didn’t need to create a class in order to contain that piece of conversion logic, you needed a filter. Everything is right again.

Eventually you end up at the point where one controller needs to talk to another controller. And AngularJS fails you. Now really, this isn’t a failure on AngularJS’s part at all, but rather just a result of keeping all dependencies handled by a DI framework. Your controller has some state, and another controller also wants the same state. This could be a username, a config object, just about anything. Of course, now you see it.You need a service.

No comment yet.
Scoop.it!

Building a tag editor with Ember.js

Building a tag editor with Ember.js | JavaScript for Line of Business Applications | Scoop.it

I’m often still amazed at just how well Ember deals with complexity.

Ember Components are one of many reasons for this, they very neatly allow us to create decoupled views which can be reused throughout our application. Below tag editor component which consists of 30 lines of clean JavaScript. (view the source on jsbin)

No comment yet.
Scoop.it!

JS VM Engineers

JavaScript VM Engineers playlist - talking about the core

No comment yet.
Scoop.it!

AngularJS Directive Design Made Easy

AngularJS Directive Design Made Easy | JavaScript for Line of Business Applications | Scoop.it

Directives make our lives easier when you can reuse them without needing to read or edit the source code. Then we can forget how they work, and just remember what they do.

If you’re coming from a view-centric framework, like Backbone, you may be tempted to separate your application into view-like directive chunks. For example, if you want to display a list of users, you might create a directive that reads $scope.users and prints them all out:

<user-list/>

The user-list directive works. I mean, look how DRY it is! However, contrast it withng-repeat, which handles only the repetition. Which one could be used in more places? What if you need to display users differently in two places?

No comment yet.
Scoop.it!

A Simple Visual Model for Promises

A Simple Visual Model for Promises | JavaScript for Line of Business Applications | Scoop.it

Promises are significantly taking ground as a programming construct for asynchronous systems such as web applications. In its simplest form, a promise represents the state of the result of some future computation.

I was introduced recently to this construct when studying jQuery and AngularJS. At the beginning, I was not able to wrap my head around it. While I understood the basic callback mechanism — allowing to be notified when the computation is finished — I struggled a lot capturing the efficiency with which promises allow to easily compose asynchronous programs.

No comment yet.
Scoop.it!

jTypes - emulate classical inheritance where objects are defined by classes

jTypes - emulate classical inheritance where objects are defined by classes | JavaScript for Line of Business Applications | Scoop.it
jTypes is the most comprehensive and robust JavaScript library for overcoming differential inheritance with prototype-based objects.

 

jTypes will provide you with the ability to develop robust, modular, and scalable application libraries in JavaScript using encapsulation, inheritance, and polymorphism. What exactly does that mean? You know all those keywords from languages such as C++ or C# that you started missing quite badly after you transitioned to JavaScript? You know what we're talking about; all those modifiers of classical inheritance such as virtual, abstract, and override or private, protected, and public that gave you so much more control and freedom with your libraries. Well jTypes lets you use those keywords in JavaScript, so you can develop extremely powerful and robust web applications using the principals of classical inheritance.

No comment yet.
Scoop.it!

A Look Into How Parameters Are Passed In JavaScript

A Look Into How Parameters Are Passed In JavaScript | JavaScript for Line of Business Applications | Scoop.it

I recently came across a question on StackOverflow about how JavaScript handles parameters, if they are passed by value or by reference. There seemed to be a lot of confusion and misinformation about what is actually happening behind the scenes.

TLDR; All arguments are passed by value in JavaScript, however, when dealing with non-primitive datatypes like objects and arrays a variable is created that points to the location of the object memory that is then is passed into the function. This means that changes to the variable inside the function will affect the original object's values. Once the argument is reassigned (e.g. arg = {} ) the variable now has the location of the new object in it so the original variable is no longer changed when the value changes.

No comment yet.
Scoop.it!

Functional Refactoring in JavaScript

Functional Refactoring in JavaScript | JavaScript for Line of Business Applications | Scoop.it

When discussing functional programming we often talk about the machinery, and not the core principles. Functional programming is not about monads, monoids, or zippers. It is primarily about writing programs by composing generic reusable functions. This article is about applying functional thinking when refactoring JavaScript code.

No comment yet.
Scoop.it!

Lucuma - A Web Components library for ClojureScript

Lucuma - A Web Components library for ClojureScript | JavaScript for Line of Business Applications | Scoop.it

At its core lucuma helps with creating custom HTML tag elements (Web Component) encapsulating content, style and logic. It is not a fancy MV* framework and aims at being a thin layer building on top of next generation web standards (mainly Custom Elements and Shadow DOM). 

It also makes the extra effort of being flexible and open to existing ClojureScript standards and libraries.

Lucuma is conceptually similar to polymer, x-tags or Polymer.dart.

No comment yet.
Scoop.it!

7 Tips for new node.js users

7 Tips for new node.js users | JavaScript for Line of Business Applications | Scoop.it

I've been working with node.js almost a year. Here's my tips for new node.js users.

* Make it Named
* Unreference earlier
* No copy
* Careful when involve new modules
* Use async or promise
* Client may be very slow
* Emit when finished, or even later
* Maybe more?

No comment yet.
Scoop.it!

Drag and Drop File Upload with AngularJS

Drag and Drop File Upload with AngularJS | JavaScript for Line of Business Applications | Scoop.it

A reusable AngularJS directive leveraging HTML5 Drag and Drop and the FileReader API.

Directives allow you to create new HTML elements, attributes, classes, or comments that can transform the behavior of the DOM. A better way of thinking about directives is “a way to teach HTML new tricks.” In this example, you will see how to leverage directives to solve a common drag and drop problem that can be reused in the future.

No comment yet.
Scoop.it!

The Big List of D3.js Examples

The Big List of D3.js Examples | JavaScript for Line of Business Applications | Scoop.it

With nearly 1900 entries with links to WebSites or Projects that use, enhance and abstract D3 you might get an idea of its universality...

Scoop.it!

How to Create a Configurable AngularJS Directive

How to Create a Configurable AngularJS Directive | JavaScript for Line of Business Applications | Scoop.it
Creating a directive with AngularJS is easy. Check out how I made one to handle errors effortlessly.

In our CampNG class, we have a section on adding validations and error messages. Having to add a span for each possible validation error is pretty tedious, so I thought I’d have a go at writing a directive to do it. One thing that was interesting about building it was making it configurable. I haven’t seen much info out there about how to do this, so I thought I’d talk about how I did it.

No comment yet.
Scoop.it!

Measuring people time with Meteor

Measuring people time with Meteor | JavaScript for Line of Business Applications | Scoop.it

Kat had a great idea for measuring time people spent in meetings. A cumulative counter that measures time faster the more people that are in them.

The result was Hyperclock, built in meteor, theoretically supporting websockets -but it's hosted (free) on heroku ;-)

I hadn't developed a project in meteor before so I learnt some stuff about it along the way:

*  Where does everything go?

*  Autoupdating

*  Mongo

*  Drawing

*  Save safely

*  Have a go! (maybe)

No comment yet.
Scoop.it!

Unit Testing Best Practices in AngularJS

Unit Testing Best Practices in AngularJS | JavaScript for Line of Business Applications | Scoop.it

What should I be testing and when should I be writing tests?

I think it's essential that you learn to love the feeling of having a water-tight app. One which you know is not going to, you know, suddenly die the moment someone else starts making changes.

It might just be me, but when you've written a nice function, and you've verified it works the way it should, it feels solid. You see green ticks on a command line, all tests passed. BOOM! You've just written some of the most solid, reliable code that's ever been written!

Level 1. Unit TestingLevel 2. Integration Testing

Level 3. Mocking

No comment yet.
Scoop.it!

Axel Rauschmayer: JavaScript inheritance: beyond the basics

After giving a brief overview of JavaScript inheritance basics, this talk delves into advanced topics and answers questions such as the following ones:

* What is the difference between constructor inheritance and instance inheritance?
* What is the property `constructor` about?
* How does the `instanceof` operator really work?
* How does one reference a super-property in JavaScript?
* What is the `__proto__` property? Does it have a future?
* Will JavaScript ever have classes? How would they work?
* How do I implement a type via an object instead of via a constructor function?

No comment yet.
Scoop.it!

Breaking the Ice with AngularUI Utils

Breaking the Ice with AngularUI Utils | JavaScript for Line of Business Applications | Scoop.it

The UI Utils library is a powerful utility package that makes a lot of custom extensions available to your project without needing to reinvent the wheel.
We’ll cover a few notable features that the ui-utils library gives us, including:
* input masking
* custom event handling
* custom formatting
* jQuery passthrough directives
* string inflector
* fragment inclusion based on selectors
* text highlighting
* more…

No comment yet.
Scoop.it!

GeoExt 2 — JavaScript Toolkit for Rich Web Mapping Applications

GeoExt 2 — JavaScript Toolkit for Rich Web Mapping Applications | JavaScript for Line of Business Applications | Scoop.it

A JavaScript Toolkit for Rich Web Mapping Applications based on ExtJS 4. Includes links to examples, API-documentation and tests. GeoExt is Open Source and enables building desktop-like GIS applications through the web. It is a JavaScript framework that combines the GIS functionality of OpenLayers with the user interface of the ExtJS 4 library provided by Sencha. GeoExt can be used just like any other Ext 4 component, and applications making use of GeoExt 2 also profit from Ext JS enhancements like charting, a harmonized API with Sencha Touch and a sophisticated single-file build tool.

No comment yet.
Scoop.it!

Web-based MongoDB admin interface written with Node.js and express

Web-based MongoDB admin interface written with Node.js and express | JavaScript for Line of Business Applications | Scoop.it

Current features:
* Connect to multiple databases
* Connect and authenticate to individual databases
* Authenticate as admin to view all databases
* Database blacklist/whitelist
* View/add/rename/delete collections
* View/add/update/delete documents
* Use BSON data types in documents

Planned features:
* Support for replica set connections
* Web-based command-line interface
* Site authentication
* REST interface

No comment yet.
Scoop.it!

Applicative Programming In JavaScript With lodash.js

Applicative Programming In JavaScript With lodash.js | JavaScript for Line of Business Applications | Scoop.it

n general, applicative programming is the pattern of defining a function that takes a function and then invokes that function for each element in a collection/list. To apply this definition of applicative programming to JavaScript, you will need to know a little something about first-class functions before we dive in. So, let's start there.

JavaScript has first class functions. This means that instances of the Function constructor can go and do anything any value in the language can do because functions in JavaScript are values.

No comment yet.
Scoop.it!

Most Useful JavaScript Tips And Tricks For JavaScript developers

Most Useful JavaScript Tips And Tricks For JavaScript developers | JavaScript for Line of Business Applications | Scoop.it

Here I collected some JavaScript Tips And Tricks and JavaScript Best Practices which can be used in our daily projects or bookmark it for reference purpose.

This includes some useful JavaScript snippets too.

* [] is better than “new Array();”
* Append an array to existing Array in JavaScript
* Check If An Object Is Array in JavaScript
* Truncate array in JavaScript
* JavaScript array to CSV
* Remove array element by Index or value in JavaScript
* Capture browser close Event
* Redirect webpage in JavaScript
* Declare Variables Outside of the For Statement
* Shorten the JavaScript Code snippets
* Conditional Operator in JavaScript
* Use OR (“||”) operator and AND(“&&”) operators in JavaScript

No comment yet.
Scoop.it!

Ember Components – Reusable Building Blocks For Your Application

Ember Components – Reusable Building Blocks For Your Application | JavaScript for Line of Business Applications | Scoop.it

Web components promise to bring reusability and encapsulation to the next version of JavaScript. The bad news is that their power is out of reach until mainstream browsers fully implement the ECMAScript 6 standards that make up web components. Fortunately for Ember.js developers, the power of web components can be leveraged today in the form of Ember components. Ember components share more than a similar name with Web Components, they aim to adhere as closely to the W3C Web Component spec as possible.

In this article, I’ll show you how to use Ember components to build a reusable building block for a scrum card management application. For those of you who have never used Ember before, don’t worry, we’ll also cover some of the basics of Ember.js that you need to know.

No comment yet.
Scoop.it!

Javascript Modules, AMD, and the road ahead.

Javascript Modules, AMD, and the road ahead. | JavaScript for Line of Business Applications | Scoop.it

There are many design patterns used in Javascript and I would recommend taking a look at Javascript Patterns by Stoyan Stefanov for a full introduction to the most widely used patterns. Of the design patterns available, the Module pattern has gotten the most recognition in the past few years thanks in part to the maturation of the module pattern via commonjs as well as the wild success of node.js.

 

The Module Pattern

In a nutshell the module pattern allows you to create code that can expose a public API while safe guarding private variables and methods behind a pseudo blackbox.

 

The future looks bright

We’ve looked at the basic Module pattern and seen how to use it to create some really powerful Javascript. We then took a look at how AMD works and how we could easily change our code to build our modules following the Commonjs specification for asynchronous modules, lastly we took a look at the bleeding edge harmony modules specification. I find that it is easy to see the beauty of where ECMAscript 6 is heading, with respect to modules, when you take a look back at where we’ve already been and how we’ve evolved up to this point.

No comment yet.
Scoop.it!

MVC4 Bootsrap3 Sample project

MVC4 Bootsrap3 Sample project | JavaScript for Line of Business Applications | Scoop.it

MVC4Bootstrap3Sample is an Asp.NET MVC4 project using Bootstrap3 as its theme. To use it download the project file from my Github repository and open the solution in Visual Studio.NET 2012. This repository's bootstrap3 is not added by using Nuget.

No comment yet.
Scoop.it!

ember-autosuggest

ember-autosuggest | JavaScript for Line of Business Applications | Scoop.it
ember-autosuggest will suggest names from a bound list.

This Plug-In will auto-complete or auto-suggest completed search queries for you as you type.

There is very basic keyboard navigation using the up and down keys to scroll up and down the results and enter adds the selection, while hitting escape hides the autocomplete menu.

No comment yet.