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

10 Reasons Web Developers Should Learn Angular

10 Reasons Web Developers Should Learn Angular | JavaScript for Line of Business Applications | Scoop.it

There is no doubt that AngularJS – the self-proclaimed “superheroic JavaScript framework” – is gaining traction. I’ll refer to it frequently as just “Angular” in this post. I’ve had the privilege on working on an enterprise web application with a large team (almost 10 developers, soon growing to over 20) using Angular for over half of a year now. What’s even more interesting is that we started with a more traditional MVC/SPA approach using pure JavaScript and KnockoutJS before we switched over to using the power-packed combination of TypeScript and Angular. It’s important to note that we added comprehensive testing using Jasmine but overall the team agrees the combination of technologies has increased our quality and efficiency: we are seeing far fewer bugs and delivering features far more quickly. 

If you are familiar with Angular, this post may give you some ideas to think about you hadn’t encountered before. If you know Angular and are trying to justify its adoption at your company or on your project, this post can provide you with some background information that may help. If you have no idea what Angular is, read on because I’ll share why it’s so powerful and then point you to resources that will get you up to speed, quickly. 


I can only assume other organizations are seeing positive results after adopting Angular. According to Google Trends the popularity of AngularJS (blue) compared to KnockoutJS (red) and “Single Page Applications” (yellow) is exploding. 

No comment yet.
Scoop.it!

Choosing a JavaScript MVC Framework

Choosing a JavaScript MVC Framework | JavaScript for Line of Business Applications | Scoop.it

So you love the way single-page apps like Gmail and Trello feel, but aren’t sure where to start.  Maybe your JavaScript code has become disorganized enough that you are convinced to try one of the numerous  JavaScript MVC libraries/frameworks on your next project but aren’t sure which one to choose.  I’m writing  a book on single-page apps so I’ve pretty much “read the internet” on the topic.  I’ll attempt to provide some not so obvious insights to help you make your decision.

The frameworks discussed are the ones with the most traction at present AngularJS, Backbone, Ember, and Knockout.  Batman, CANjs, Meteor, and Spine are also mentioned but not covered in-depth.

Each project is examined from several different perspectives including community, leadership, maturity, size, dependencies, interoperability, inspiration, philosophy, and features.

No comment yet.
Scoop.it!

Vega: A Visualization Grammar

Vega: A Visualization Grammar | JavaScript for Line of Business Applications | Scoop.it
Vega is a visualization grammar, a declarative format for creating, saving and sharing visualization designs.
With Vega you can describe data visualizations in a JSON format, and generate interactive views using either HTML5 Canvas or SVG.
No comment yet.
Scoop.it!

L20n: JavaScript Localization Framework From Mozilla

L20n: JavaScript Localization Framework From Mozilla | JavaScript for Line of Business Applications | Scoop.it
L20n is an open source, JavaScript localization framework from Mozilla. It is designed to be very expressive along with several features such as adapting to Screen sizes, good separation of concerns, graceful handling of pluralization, support for default when there are multiple variants, and more.

Below are some interesting features of L20n -
* Expressiveness - L20n has support for interpolations (to build more complex entities), pluralizations, handling of grammatical cases, having multiple variants of the same entity, and so on, which combine to create a very expressive format.
* Responsiveness to screen sizes - you can name various screen sizes and then have different variants of the entities targeted for these specific screen sizes
* Good separation of concerns - localization related complexities can be isolated in the language under consideration without affecting other languages used in the app or even the app source code.
* Non-blocking, secure API in addition to the ability to bind HTML elements to make them localizable

No comment yet.
Scoop.it!

Managing Bower components with Grunt

Managing Bower components with Grunt | JavaScript for Line of Business Applications | Scoop.it

Originally it took me a while to get on board with using Bower as part of my main development workflow. My biggest gripe was the way it handled repositories that were missing a bower.json file to configure ignored files etc.
In that scenario the whole repository is installed into the bower_components folder and although there are two sides to it, checking that fluff into my Git repository doesn't feel right. That is of course, until Grunt came along.

Like most of life's problems, Grunt can help.
The process goes a little like this:
* Instructing Git (or your chosen VCS) to ignore the bower_components folder
* Checking for and installing any updated packages
* Copying the required files across into a directory that gets checked in to the VCS

By selectively copying files this way our repository can be kept free from test folders, READMEs and other cruft.

If you then needed to update jQuery to the latest version all it would require is changing the version number in the bower.json (or by installing it on the CLI), running the Grunt task and then committing the updated files to the repository. No manual downloads or file copying required.

No comment yet.
Scoop.it!

Writing third-party Javascript

Writing third-party Javascript | JavaScript for Line of Business Applications | Scoop.it

Our goal was to provide a library to our customers that is modular, lightweight and supports browsers from IE8.

It is common sense. Your growing codebase will be harder and harder to maintain it, period. But if you have modules created for one purpose and one purpose only, and they are covered with tests your life will be happier.

No comment yet.
Scoop.it!

Nightwatch.js - Javascript End-to-End tests in Node.js which run against a Selenium server

Nightwatch.js - Javascript End-to-End tests in Node.js which run against a Selenium server | JavaScript for Line of Business Applications | Scoop.it

Nightwatch.js is an easy to use Node.js based End-to-End (E2E) testing solution for browser based apps and websites.

It uses the powerful Selenium WebDriver API to perform commands and assertions on DOM elements.

 

* Simple but powerful syntax which enables you to write tests very quickly, using only Javascript and CSS selectors. No need to initialize other objects and classes, you only need to write the test specs.
* Built-in command-line test runner which enables you to run the tests either altogether, by group or single.
* Manages the Selenium server automatically; can be disabled if Selenium runs on another machine.
* Continous Integration support: JUnit XML reporting is built-in so you can integrate your tests in your build process with systems suchs as Hudson or Teamcity.
* Use CSS selectors or Xpath to locate and verify elements on the page or execute commands.
* Easy to extend if you need to implement your own commands specific to your application.

No comment yet.
Scoop.it!

Demo SPA App for ASP.NET Web API 2 and AngularJS

In my previous post, I have announced SocialGoal, a reference web app for ASP.NET MVC 5 and EF 6 Code First. Today, I am announce the release of a demo single page application (SPA) for ASP.NET Web API 2 and AngularJS. 

The current version is an early first drop of the application, which we will continuously refactor, and later we will provide guidance for developing real-world client-side JavaScript apps and SPAs, including unit testing, task automation and performance optimizations.

The app is built with following technologies:

* ASP.NET Web API 2

* EF 6 Code First

* AutoMapper

* Autofac

* Semantic UI

* AngularJS 1.1.5

No comment yet.
Scoop.it!

Grunt vs Gulp - Beyond the Numbers

Grunt vs Gulp - Beyond the Numbers | JavaScript for Line of Business Applications | Scoop.it

And so the evolution of front-end development continues with Gulp, the new build system that has already garnered praise amongst many web developers.

After spending some time reading the docs and playing around with Gulp, I’ve finally decided to test its adoption in an existing project that currently uses Grunt. From what I’ve seen so far, Gulp is blazingly fast when compared to Grunt for similar tasks.

Let’s dig a bit deeper though, and get a little understanding of the differences between Grunt and Gulp, beyond superficial speed comparisons.

In this post we’ll cover:

* A shallow dive into Gulp, and how it compares with Grunt.

* Things to consider when choosing between the two tools.

Goran Peoski's curator insight, February 2, 2014 6:18 AM
gulp.js - the streaming build system
Scoop.it!

Six Things You Might Not Know About Promises

Promises are a simple concept, and even if you haven’t had a chance to use them, you may have already read up on them. They are a valuable construct that enables asynchronous code to be structured in a more readable fasion, rather than as a mess of nested anonymous functions. This article touches on six things that you might not know about promises.

Before diving into the list, here is a quick reminder of what JavaScript promises look like...

 

1. then() Returns a Forked Promise
2. Callbacks Should Pass Results
3. Only Exceptions From Previous Levels are Caught
4. Errors Can Be Recovered From
5. Promises Can Be Paused
6. Resolved Promises Don’t Execute Immediately

No comment yet.
Scoop.it!

React.js in pure JavaScript - Deep explanation for newbies

React.js in pure JavaScript - Deep explanation for newbies | JavaScript for Line of Business Applications | Scoop.it

As you might now react.js is a framework to create user interfaces in a web context. What is special about this? Is amazingly fast! (and supports server-side rendering) But has a downside, which requires you to change the way you think about web interfaces (see above).

There are a lot of tutorials about react.js but almost none, or very hard to find, in pure JavaScript. They all use the react.js special syntax. But I don't want to have another javascript pre-processor between each code change so this is the main reason.

The most complicated part of understanding react.js was how exatly the arguments passed in the components, and which ones can change and which can't...

No comment yet.
Scoop.it!

Play Framework and Facebook's React library

Play Framework and Facebook's React library | JavaScript for Line of Business Applications | Scoop.it

Over the holidays I have discovered Facebook’s React, an interesting library for generating reactive user interfaces. I wanted to try it out in a real-world application, which reminded of one I still had running as a demo: sse-chat, a little chat application I wrote last summer for learning how to make Play Framework and AngularJS cooperate in a very basic way. So I thought, why not rewrite the client side using React, offering the exact same functionality as the AngularJS version. Both are available at the same time in the new version, with no changes to the backend code, except for the added route as both versions can be accessed in parallel.

The contraint of making it behave exactly like the AngularJS version was a great exercise and it really only took an afternoon to complete. Touching the existing demo version also had me notice that the live version of it had been up for like 4 months or so, without any trouble. I have the same experience with my BirdWatch application. Kudos to the Play Framework developers for that, and same for Akka, which provides the supervised Actor architecture presumably enabling such reliable server systems.

No comment yet.
Scoop.it!

Testing JavaScript with QUnit

In this session, we will take a look at how to use QUnit to write unit tests for your JavaScript code.

High-level agenda:

Introduction to QUnit

Code Coverage using BlanketJS

Mocking AJAX using MockJax

Automating unit tests using GruntJS

No comment yet.
Scoop.it!

JavaScript Tutorial for Beginners

Learn JavaScript programming from scratch and fast. This web development series focuses on client side JavaScript from the client-server model. The first part of the series teaches basic software development concepts, such as variables, data types, logical operations, functions, classes, etc. Later you will learn how to program DOM scripting, cookies, sessions, and other advanced HTML5 techniques. The apps and examples shown will be executed in the best modern web browser I know: Google Chrome. However, you can follow along with your favorite browser, be it Firefox, Internet Explorer, Opera, or even Safari.

Once you become an expert JavaScript programmer, you'll be able to develop 2D games from scratch. That's right! Web development is that awesome. Just keep in mind that the Java language is not at all related to, or the same thing as EcmaScript, even though they share similar names.

Scoop.it!

Using External Templates with Knockout.js

Using External Templates with Knockout.js | JavaScript for Line of Business Applications | Scoop.it

When building a web application with Knockout.js, working with more than a handful of templates is a common occurrence. As the number of templates in your application grows, adding additional script tags for these templates becomes a pain point and a maintenance issue. As an alternative, having less templates by using control-flow bindings (if, with, and foreach) in larger blocks of markup is also not an ideal solution, as it does not promote reuse and has the same maintenance concerns. A better technique is to move each template’s markup into individual files.


Why External Templates?
Defining templates in external files has a number of advantages:

* Files with an html extension and normal markup are generally handled better by most editors than trying to edit markup inside of a script tag.
* You have more encouragement to create reusable templates, as the pain of adding and maintaining more script tags is removed.
* The purpose and focus of smaller, more modular files is easier to ascertain.
* You have less potential for merge conflicts than when using a single large file, since you will have a better chance to work in separate files.

No comment yet.
Scoop.it!

Tracking changes to complex viewmodels with Knockout.JS Part 2 - Primitive Arrays

Tracking changes to complex viewmodels with Knockout.JS Part 2 - Primitive Arrays | JavaScript for Line of Business Applications | Scoop.it

In this second part, I’ll go through how we extended this initial approach so we could track changes to array elements as well as regular observables. If you haven’t already, I suggest you have a read of part one as many of the examples build on code from the first post.


For the purposes of this post we are only considering ‘Primitive’ arrays… these are arrays of values such as strings and numbers, as opposed to complex objects with properties of their own. Previously we created an extender that allows us to apply change tracking to a given observable, and we’re using the same approach here...

No comment yet.
Scoop.it!

ExtJS Single Page Application (SPA) Tutoral

ExtJS Single Page Application (SPA) Tutoral | JavaScript for Line of Business Applications | Scoop.it
I recently put together a tutorial on how to use ExtJS to create a Single Page Application (SPA).
It heavily leverages the MVC architecture inside of ExtJS to get everything working.
I'd appreciate any feedback to help make it better.

Part 1 - Overall Structure
Part 2- Code Overview
Part 3 - Grid Controller
Part 4 - Grid View
Part 5 - Popup Controller
Part 6 - Wrap-up
No comment yet.
Scoop.it!

Machine Learning in Javascript

I love machine learning algorithms. I’ve taught classes and seminars and given talks on ML. The subject is fascinating to me, but like all skills fascination simply isn’t enough. To get good at something, you need to practice!

Through this series of articles, I’ll teach you the fundamental machine learning algorithms using Javascript — not Python or Octave — as the example language. Originally I intended to write these articles in a variety of languages (PHP, JS, Perl, C, Ruby), but decided to stick with Javascript for the following reasons:

  • If you’re a web developer you probably already know JS, regardless of your backend expertise.
  • Javascript has JSFiddle, a great tool that lets me embed executable Javascript right in my posts (hard to do that with C or Perl!)
  • Several people asked me to stick to just one language.

While I’ll be writing these articles with Javascript in mind, please re-write the examples in your language of choice as homework! Practice is how you get better, and writing the same algorithm several times in different languages really helps you understand the paradigms better.

No comment yet.
Scoop.it!

TypeScript: To Be or Not To Be

TypeScript: To Be or Not To Be | JavaScript for Line of Business Applications | Scoop.it

Let me start by saying that Microsoft wins the overall dev productivity competition hands down. Visual Studio is an absolutely top-notch, amazing IDE, and there really is nothing that can compete with it in the overall category. On top of that, Microsoft has produced some top shelf Web dev tooling over the years. There really is no doubt about that, but there is always room for improvement.

The Web, in particular, presents a very challenging, wild-west environment for tooling. The technologies in themselves don’t lend themselves well to that, and there are all sorts of hacks and workarounds to address the problem, including some produced by Microsoft. To be a guru in Web dev requires mastery of so many different moving pieces and nuances, multiple, not-very-well-defined languages, innumerable libraries and frameworks, and a vast number of potential runtime environments. It’s a hard egg to crack when it comes to productivity tools, not to mention just general dev productivity, defined as time spent actively producing value-adding software assets.

No comment yet.
Scoop.it!

polyglot.me - Consistent cheat sheets!

CodeSnippets for the basic programming in various languages side by side.

No comment yet.
Scoop.it!

Cleaning up promises with yield

Last time we cleaned up callback hell with yield but callbacks in the design which I was talking about are not all that common these days, especially if you're working in the browser. When you're in the browser there's a good chance you're going to be working with Promises, and more accurately Promise/A+.

If you're unfamiliar with Promises, it's a specification which is states that you have an object which exposes a then method which will either fulfill or reject some operation. You've probably come across it with AJAX requests...

No comment yet.
Scoop.it!

Grunt.js: Custom Tasks

Grunt.js: Custom Tasks | JavaScript for Line of Business Applications | Scoop.it

Previously, I talked about some tips and tricks I use with Grunt.js. If you haven't heard of Grunt.js you may want to check out my article on the basics of grunt. This time I want to wrap things up by talking about custom tasks in grunt. While there are a lot of great plugins for grunt sometimes you need something custom, lucky for us grunt makes it easy for us to define our own tasks.

 

Grunt.js provides two types of tasks: Basic Tasks and Multi-Tasks. Basic Tasks are little more than a named javascript function you can run from the command line. Multi-Tasks are what most plugins provide, you provide a namespace and code to run those tasks, then the user creates instances of that tasks by placing options under a config object of the same name.

No comment yet.
Scoop.it!

Understanding JavaScript's Function.prototype.bind()

Understanding JavaScript's Function.prototype.bind() | JavaScript for Line of Business Applications | Scoop.it

Function binding is most probably your least concern when beginning with JavaScript, but when you realize that you need a solution to the problem of how to keep the context of this within another function, then you might not realize that what you actually need isFunction.prototype.bind().

The first time you hit upon the problem, you might be inclined to set this to a variable that you can reference when you change context. Many people opt for self, _this or sometimes context as a variable name. They’re all usable and nothing is wrong with doing that, but there is a better, dedicated way.

No comment yet.
Scoop.it!

Scala.js and ReactJS - Why would someone want Scala on the client?

Scala.js and ReactJS - Why would someone want Scala on the client? | JavaScript for Line of Business Applications | Scoop.it

In this article I will present a simple reactive web application using Scala.js and ReactJS on the client side. It is based on sse-chat, an application I initially wrote for demonstrating the usage of AngularJS with Play Framework. I then rewrote the client for an article about using ReactJS on the client side. In the latest version now, there is an additional client that connects to the same server and utilizes Scala.js for building the web client. I recently gave a talk about this at Ping Conference in Budapest, check it out if you’re interested. I discovered ReactJS through David Nolen’s blog and his excellent OM library, which combines ReactJS with ClojureScript. His second article on Om also inspired me to try out an undo functionality with the immutable data structures that Scala.js has to offer. 

No comment yet.
Scoop.it!

Rich Web UIs with Knockout.js

Knockout.js helps you to build sophisticated, dynamic web UIs, by providing a clean Model-View-ViewModel (MVVM) architecture and a powerfully expressive system of declarative bindings. In this demo-filled session, Knockout's creator Steve Sanderson will quickly show how you can get started with this popular JavaScript library.

No comment yet.