JavaScript for Line of Business Applications
606.5K 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!

Testing Angular.js

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

As an Angular.js developer, I want to test my code, so that I can feel reasonably good about it. This sounds like a "User Story" in Scrum but it's more of a developer quest. So in this blog we will look at ways to test our Angular.js code.

Let's see what we need -

We need to write unit tests for our

* Controllers

* Services

* Directives

* Filters

We need to write end-to-end tests so that we can be sure everything is working well together

No comment yet.
Scoop.it!

AngularJS : unit tests and end to end tests

AngularJS : unit tests and end to end tests | JavaScript for Line of Business Applications | Scoop.it

If there is one feature compared to other JS framework that make AngularJS better, it is the ability to implement tests. This is normal I would say since the framework was developed by integrating this fundamental aspect at the beginning.

But AngularJS is not magic either, as anyone who has implemented tests know, it is important to think its code for testing. You have to be careful not using objects or methods without knowing whether they will be easily testable. For example, a controller, if in one of the calls are made there is DOM access via jQuery for example, this code immediately become complex to test.
Unfortunately, current tools do not allow us to make TDD as easily than with Java, when I writing a test the IDE will propose the creation of classes and methods. However, nothing prevents it.

No comment yet.
Scoop.it!

Ember.js Mobile: Responsive Swipe/Push Menu Navigation

Facebook-style left-swipe menu navs are pretty common in native apps these days and I wanted to quickly run through one approach to achieve this with responsive CSS and ember swipe gestures. 

I looked around at different CSS approaches and ended up choosing one similar to Mary Lou’s approach in this great article.

Let’s get started, shall we?

No comment yet.
Scoop.it!

Playing with Ember.js and Devise

Playing with Ember.js and Devise | JavaScript for Line of Business Applications | Scoop.it
Authentication is a very important in most applications, in Ember that is also the case. Here we take a look on how to achieve it with the help of devise.

First thing we implemented was authentication. This is a very simple problem with several solutions. We want to use devise. A very simple one is to rely on the devise’s engine and just make it a separate part of the app, after that you render the user’s session JSON on a metatag and parse it in ember. There is a very nice tutorial on how to do that by Alexander Zaytsev here.

Alternatively you can implement all the interface yourself and have a truly single page application, and it is not that hard. First thing you have to do is turn devise into an API by creating a few controllers. I am just going to show sign-up and login here.

No comment yet.
Scoop.it!

Working with Shadow DOM

Working with Shadow DOM | JavaScript for Line of Business Applications | Scoop.it

As developers we often need to create widgets for interfaces that make it easier to accomplish certain tasks. These might be sliders for controlling video playback, calendar pickers for selecting dates or any other number of other useful widgets. The problem that we face when creating these widgets is how to manageencapsulation.

The widgets that we write are often reused on a number of other pages, but how do we make sure that none of the code on those pages will interfere with code used to build the widget itself. This problem of creating a boundary between the widgtet code you wrote and the code that will consume your widget is something that Web Components aims to solve.

No comment yet.
Scoop.it!

Knockout.js - Filtering, Sorting, and Paging

Knockout.js is fantastic! Maybe I missed it but it appears to be missing flexible filtering, sorting, and pagination of its grids. This is a summary of my attempt at creating this functionality which has been working out amazingly well for my purposes.

No comment yet.
Scoop.it!

Installing and Running node.js applications within IIS on Windows - Are you mad?

Installing and Running node.js applications within IIS on Windows - Are you mad? | JavaScript for Line of Business Applications | Scoop.it

Some folks on our team have been working on making node.js work awesomely on Windows. There's a few questions you might have.

Tomasz Janczuk is working on the iisnode project lately. You might think that Windows and node don't belong together. "That's just wrong! What are they thinking? I thought IIS was all about .NET?" Well, you may recall I spoke at CodeMash a few years back on IIS7 and PHP and did a screencast showing how IIS7, PHP and FastCGI could push many thousands of requests a second. The IIS folks, the Windows folks, the Azure folks, want to make sure everything runs well on Windows. Remember, we sell Windows, so it's good if it does many things well. ;)

No comment yet.
Scoop.it!

Integrating a JS Build Process Into MSBuild in Visual Studio 2012 Express

Integrating a JS Build Process Into MSBuild in Visual Studio 2012 Express | JavaScript for Line of Business Applications | Scoop.it

I’ve been working with ASP and ASP.NET for about ten years now, starting with ASP classic and settling on .NET 2.0 as my favorite. My new year resolution this year (2013) was to upgrade my .NET work to .NET 4.0 using Visual Studio 2012 Express and really get to grips with MSBuild, so that I can concatenate and minify my JavaScript files as part of the normal build process of a .NET project, in Visual Studio.

I wanted a non-trivial project to demonstrate this process, because I find the devil is in the details. I have often faithfully followed an overly-simple tutorial or introduction to an unfamiliar subject, then discovered that the tutorial did not prepare me for when you want to do something even slightly difficult. So, in this tutorial we’ll be attempting to marry Knockout.js and jQuery UI. We will also be using a JSON file with a hierarchy of data to define a menu.

No comment yet.
Scoop.it!

OOP is Not Your Hammer

OOP is Not Your Hammer | JavaScript for Line of Business Applications | Scoop.it

Let’s look at a simple ecommerce site. Let’s say we have a page that displays a product and has an order form with an “Add to cart” button, as well as a widget that allows the user to specify a quantity to purchase.

This app would be pretty simple to design. One approach would be to create three components:

* A model that embodies a shopping cart item and has properties such as productId and quantity.* One or more views that display the product and the order form.* A controller that coordinates the transaction.

You probably recognize this as a typical MVC-like pattern. There are lots of variations on MVC and a never-ending list of implementations.

However, MVC is not the problem. Product Management is. They now want you to display alive shopping cart in the right-hand margin of the page. The live shopping cart must show a list of all of the items in the cart, including the one being added, as well as recalculate the shipping costs, taxes, and the grand total.

No comment yet.
Scoop.it!

Using Windows 8 design guidelines to build an ExtJS application

Using Windows 8 design guidelines to build an ExtJS application | JavaScript for Line of Business Applications | Scoop.it

The design language surrounding the new user interface introduced by Windows 8 and the Windows Phone operating system is a huge change from the old WIMP (Windows, Icons, Mouse and Pointer) style of interface. There has been a huge shift in user interface design since the introduction of touch interfaces on devices.

This design language is not perfect and has a garnered a lot of criticism from some very established usability experts.

There are however some very interesting use cases in the Enterprise however, which I believe can greatly benefit from the new flat design offered by Metro/Windows 8 – in particular applications in the CRM/ERP space. I’ve seen many CRM and ERP implementations over the last decade which frankly were terrible.

Jan Hesse's insight:

there is much more interesting stuff on this blog

No comment yet.
Scoop.it!

Ember.JS: How to handle invalid URLs

Ember.JS: How to handle invalid URLs | JavaScript for Line of Business Applications | Scoop.it

There’s a lot of documentation for the new Ember Router. However, I found that no one was talking about how to handle the “*” route in Ember, i.e. the routes that don’t match anything.

I first tried to look at the ApplicationRoute but that didn’t seem to throw anything. Ember just sits there with a lovely blank page!

No comment yet.
Scoop.it!

What Is This Thing Called Generators?

It looks like generators are actually going to make it into Javascript, and it has landed in V8. This is so exciting! Lately it's been all the rage. But what is it? With this post I'll do my best to explain at a basic level what it is.

At its simplest form, a generator represents a sequence of values - essentially it is an iterator. In fact, the interface of a generator object is a just an iterator for which you'd keep calling next() on it until it runs out of values. What makes a generator special is the way you write it ...

No comment yet.
Scoop.it!

Object Playground: The Definitive Guide to Object-Oriented JavaScript

Object Playground: The Definitive Guide to Object-Oriented JavaScript | JavaScript for Line of Business Applications | Scoop.it

The site gives you a video to understand prototypal inheritance in JavaScript. It shows a lot of different ways to create classes and subclasses and tells you which to use. Furthermore ther is an interactive Object graph which can visualize your javascript objects and how they relate following the prototype chain.

No comment yet.
Scoop.it!

Why does Angular.js rock?

Why does Angular.js rock? | JavaScript for Line of Business Applications | Scoop.it

Let’s see if we can discover why :)

I could spend all the day writing sentences of why you should try Angular.js in your new project, but I feel it that would be better if we see it in action.

* Data binding and scopes

* Directives

* Filters

* Services


No comment yet.
Scoop.it!

Bindr - A small JavaScript dependency injection framework

Bindr - A small JavaScript dependency injection framework | JavaScript for Line of Business Applications | Scoop.it

Dependency injection is a software pattern that helps increase the testability of a given class by removing hard coded references to its dependencies.

Dependency injection allows for a small bit of configuration that says, 'When a class needs a dependency named x, create an instance of y'.

Another nice feature of bindr is its use in AMD projects with Require.js.

No comment yet.
Scoop.it!

Ember vs Angular - Templates

Ember vs Angular - Templates | JavaScript for Line of Business Applications | Scoop.it

My least favourite part in Angular is their templating syntax. Angular uses plain HTML with custom DOM attributes attributes for control flow (ng-hide, ng-show, ng-repeat). Whereas Ember uses Handlebars which supports more familiar control flow statements (if, else, each). Personally I prefer the Ember approach as it’s similar to most templating languages I have used (erb, haml, etc) and it’s easier for my CPU (aka brain) to scan and parse.

Lets look at a couple of examples.

No comment yet.
Scoop.it!

Reusable D3 charts with Ember.js Components

Reusable D3 charts with Ember.js Components | JavaScript for Line of Business Applications | Scoop.it

 recently read a good article called D3.js in Angular.js Directive from DashingD3 and thought it would be interesting to recreate the example using Ember.js components.

Here’s how I created the example using an Ember.js component...

I’d like to propose that using Ember.js Components is one of the best ways to encapsulate reusable charts. Ember accomplishes the same thing as Mike’s example, but it feels more natural and less complex doing it in Ember because getter and setter methods are a fundamental part of Ember.

No comment yet.
Scoop.it!

Backbone web apps - design & architecture

This is a talk i gave at Javascript Israel Meetup about applying front end architecture with backbone.js on my open source project Echoes Player - http://echotu.be

No comment yet.
Scoop.it!

JavaScript UI Library Design

JavaScript UI Library Design | JavaScript for Line of Business Applications | Scoop.it

Yes, most websites use jQuery these days (including all of Coursera), but it'd be better if there was a standard way to write UI libraries that did not depend on any libraries, and the UI library would only bring the libraries in that it truly needed. Plus, some of the best plugins are dependent on jQuery UI, since it includes the widget factory and offers features like draggable/sortable, and jQuery UI is a heavy addition to an app that isn't otherwise using it. It's also often difficult to use the jQuery UI JS without the CSS and its subsequent look & feel.

After trying to write some custom Coursera UI widgets as jQuery plugins, we decided that it might be more useful for us to start over and figure out how to architect our UI libraries for everything that we wanted out of them. We wanted many of the things that developers want in jQuery plugins, like customization and events, but we also wanted zero dependencies, AMD-compatibility, designer-friendly declarative usage, and more. 

No comment yet.
Scoop.it!

NoFlo | Flow-Based Programming for JavaScript

NoFlo | Flow-Based Programming for JavaScript | JavaScript for Line of Business Applications | Scoop.it

NoFlo is a JavaScript implementation of Flow-Based Programming (FBP). Separating the control flow of software from the actual software logic. Helping you organize large applications easier than traditional OOP paradigms, especially when importing and modifying large data sets.

The MIT-licensed NoFlo library can either be used to run full flow-based applications or as a library for making complex workflows or asynchronous processes more manageable. It can also be used as an Extract, Transform, Load (ETL) tool in business applications.

NoFlo has been written in CoffeeScript for simplicity.


Jan Hesse's insight:

side-note: the modules you create will be Event-Based Components (EBC) 

steve's curator insight, May 11, 2014 3:59 PM

Intrigued! Will be testing this out very soon.

Scoop.it!

7 JavaScript Basics Many Developers Aren't Using (Properly)

7 JavaScript Basics Many Developers Aren't Using (Properly) | JavaScript for Line of Business Applications | Scoop.it

JavaScript, at its base, is a simple language that we continue to evolve with intelligent, flexible patterns.  We've used those patterns in JavaScript frameworks which fuel our web applications today.  Lost in JavaScript framework usage, which many new developers are thrust right into, are some of the very useful JavaScript techniques that make basic tasks possible.  Here are seven of those basics ...

No comment yet.
Scoop.it!

Testing Strategies for AngularJS

Testing Strategies for AngularJS | JavaScript for Line of Business Applications | Scoop.it

This screencast by David Mosher will walk you through low- and high-frequency testing strategies for AngularJS. It will also show an example of how use these strategies to write tests with Protractor, Testem, and Jasmine. 

No comment yet.
Scoop.it!

Ember & Bootstrap Modals

Modals & Ember are a tricky thing. They are tricky for a few reasons. 1) there is an animation involved, 2) they may be inserted into the DOM in a number of ways, 3) Each use case is different. The first question is: do you need a route for it or not? How about an outlet? Or is it contained inside another view? Is it part some large flow? All these questions have their own answers which creates a unique scenario. This means there is no standard way to do it right now.

No comment yet.
Scoop.it!

A Closer Look at Generators Without Promises

A Closer Look at Generators Without Promises | JavaScript for Line of Business Applications | Scoop.it

My solution focused on various ways of combining Q promises with JavaScript generators to write async code in a synchronous style.

It turns out there's been a lot of successful experimentation with combining raw callback-based async code with generators, ignoring promises completely.

Why is it even worth pursuing? One of the biggest concerns I hear about is performance of promises, which honestly is really strange to me because we're using this inherently to work with I/O-bottlenecked apps, most likely across machines. I can't imagine that it's easy for promises to become the bottleneck. However, apparently some people have had problems with it (when you scale big enough), so it is true that promises have a performance and memory hit.

Another, possibly more salient, reason is that the cognitive space of promises is quite large. It has the feeling of "buying in" to a completely different paradigm, and hardly any node modules use them. Additionally, if we look at all of the non-promise but generator-based async libraries, they are tiny and it's so incredibly clear what's going on and how they interact with the normal callback-based functions.

I decided to write another post and give the non-promise but generator-based libraries another shot. This won't be as in-depth as my previous article, but let's see what other experimentation is going on in the node world.

No comment yet.
Scoop.it!

Performance Testing Views in Ember.js

I've been working on performance tuning an Ember.js app recently and one of the tricks I learned while hunting through ember.js - the go-to for Ember developers when they need to figure something out - is how to time the rendering of handlebars views. I am going to show a couple of code snippets, and then I am out - this post is going to be short and sweet.

No comment yet.