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!

fn.js | A JavaScript library built to encourage a functional programming style & strategy.

fn.js | A JavaScript library built to encourage a functional programming style & strategy. | JavaScript for Line of Business Applications | Scoop.it

fn.js aims to support functional practices over performance or established conventions. In order to guide you on the right path, fn.js internals force avoidance of side effects, object mutation, and function state.

fn.js runs in the Node.js or in the browser using normal script tags or via an AMD loader such as RequireJS. Support for Bower is coming soon.

No comment yet.
Scoop.it!

Ext Direct with NodeJS

The Sencha framework provides a multitude of data connection opportunities to connect a client side application to the server side. The framework introduces a language agnostic technology to access remote server side methods called Ext Direct.

There are several supported server-side environments including PHP, Java, .NET and others however conspicuously missing from the list of server stacks was Node.JS as a backend technology. Some quick research showed a couple of sample implementations utilizing Node.JS, however these examples used older versions of ExtJS and were already a couple of years old. I’ve included some of the articles I used for inspiration while going through this exercise.

I thought it would be an interesting exercise to implement Ext Direct utilizing Node.js and document the experience. To make this interesting I utilized some of the more common modules and node frameworks used in node.js web applications such as Express 3.0 and Sequelize.

There are obviously a ton of alternative yet valid opinions, methods and techniques on how to properly configure or setup a web application so feel free to use this as either an example or inspiration to implement your own Ext Direct application using Node.JS.

No comment yet.
Scoop.it!

User Authentication with Sails.js

User Authentication with Sails.js | JavaScript for Line of Business Applications | Scoop.it

I’m going to start building an example application using Sails and the first step is user authentication. I’m going to be building this as an API, so all of the example will simply use GET and POST requests to the REST API that Sails makes so easy for us. Let’s dive in.

Since what we are trying to do is accomplish user authentication, the first thing we need to do is create our user resource. Since Sails provides us with generators similar to the way Rails works, we can do this with one simple command.

No comment yet.
Scoop.it!

Our Ember.js Toolchain

Our Ember.js Toolchain | JavaScript for Line of Business Applications | Scoop.it

Now that we’ve been working with Ember.js for a while, we wanted to give a quick update on what we found works out for us while working with it, both client and server side. We thought this post would be useful since we initially had some problems finding the right tools but now we really feel we found the right toolchain.

* Client Side
* Organize Code
* Write Tests
* Fake an API
* Server Side
* Render JSON Data
* API Documentation
* Deploy
* Concluding Thoughts


No comment yet.
Scoop.it!

Testing & Tooling in EmberJS

Testing & Tooling in EmberJS | JavaScript for Line of Business Applications | Scoop.it

One of my favorite parts of Ember is how easy it is to test. The framework comes bundled with a system testing framework, and its object model makes unit testing a breeze. Combine all that with a great test runner that has CI integration, and you have a really awesome testing ecosystem for your new app.

This framework allows you to make high-level assertions regarding your applications’ state, mostly by querying and interacting with the DOM through JQuery in a black box fashion. Since the tests are pure JavaScript however, we also get direct access to our running application if needed for testing.

The framework comes bundles with a few simple helpers to do common operations such as clicking a button, filling in a text field, or querying for the presence of a certain DOM element. A typical system test using ember-testing might look like this...

No comment yet.
Scoop.it!

The Three Watch Depths of AngularJS

The Three Watch Depths of AngularJS | JavaScript for Line of Business Applications | Scoop.it

There are three different mechanisms for watching a value on an Angular scope: Reference watches, collection watches, and equality watches. The difference between the three is in the depth in which they watch their values.

Choosing the most appropriate watch mechanism is important, not only because the three mechanisms behave differently, but also because they have very different performance characteristics.

This short article describes the differences between the three watch depths.

No comment yet.
Scoop.it!

Kendo Typescript: DropDownList control with MVVM

Kendo Typescript: DropDownList control with MVVM | JavaScript for Line of Business Applications | Scoop.it

This article give a example of use of it with the WEB drop-down list  from Telerik Kendo. The example made use of typescript to programming the Kendo drop-down list and it uses kendo MVVM to operate the control and a WEB API to get the information from a remote source.

No comment yet.
Scoop.it!

There Is No Magic JavaScript Framework

There Is No Magic JavaScript Framework | JavaScript for Line of Business Applications | Scoop.it
The strongest JavaScript framework/library/utility/shim in a developer’s toolbelt is their brain. There is no perfect [noun|verb|adjective].js that will will magically solve 100% of your apps features with clever engineering.
Vincent Poulain's curator insight, January 24, 2014 7:38 PM

Be smarter to choose javascript framework

Scoop.it!

Javascript: An Exploration of Prototypal Inheritance

Javascript: An Exploration of Prototypal Inheritance | JavaScript for Line of Business Applications | Scoop.it

Eureka! That’s the feeling I had when I finally saw how Object.create could help me in achieving the inheritance-oriented behavior I was after. I’d been reading lots about prototypal inheritance in JS and understood bits and pieces, but it finally started to click recently. Here are some thoughts and (intentionally simplified) explanations that will hopefully help you toward that eureka moment.

Note: This post is a long one and is catered to (intermediate) JS programmers with an understanding of objects, constructors, and a general comfort with the changing contexts of the this value. I couldn’t cover everything, but tried to include details that I felt were relevant to understanding inheritance in JavaScript.

The moral of this discussion is that you have to be aware of the consequences/limitations of the inheritance methods that you choose. If I were to select a trusty, go-to method, it might be Object.create with a borrowed constructor – as that seems the least prone to nasty runtime bugs.

No comment yet.
Scoop.it!

KnockoutJs Presentation

KnockoutJs Presentation | JavaScript for Line of Business Applications | Scoop.it

JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model.

* Pure JavaScript library - works with any server or client-side technology
* Can be added on top of your existing web application without requiring major architectural changes
* Compact - around 13kb after gzipping
* Works on any mainstream browser (IE 6+, Firefox 2+, Chrome, Safari, others)

No comment yet.
Scoop.it!

testardo - A Browser Agnostic JS Web Driver

testardo - A Browser Agnostic JS Web Driver | JavaScript for Line of Business Applications | Scoop.it

a browser and OS agnostic web driver for mobile and desktop

 

Bored to death to swipe around in order to be sure device X still works? If so, give testardo a chance!

testardo is the easiest way to test your local projects with some remote service testing capabilities too. You can be notified if something goes wrong, you can change tests at runtime and have an instant update for all running devices, you can forget SDKs, special software, drivers, patches and fixes ... you create the test with everything you know and need already with the ability to include libraries and utilities at runtime.

testardo will be instantly useful thanks to its status colors on any device display: green for success, yellow if the server is offline, red when there was an error and with shown error info ... as easy as that!

No comment yet.
Scoop.it!

Dependency injection in JavaScript

Dependency injection in JavaScript | JavaScript for Line of Business Applications | Scoop.it

I like the quote that the programming is all about managing complexity. Maybe you've heard that the computer world is a giant construction of abstractions. We simply wrap things and produce new tools over and over again. Just think for a minute. The languages which you use have build-in functionalities and they are probably abstracted functions of other low level operations. It's the same with JavaScript. Sooner or later you need to use abstractions made by other developers. I.e. you depend on someone's other code. I like the dependency-free modules, but that's kinda difficult to achieve. Even if you create those nice black-box liked components you still have a part which combines everything. That's where the dependency injection placed in. The ability to manage the dependencies effectively is absolutely necessary nowadays. This articles sums up my observations on the problem.

No comment yet.
Scoop.it!

Creating Semantic, Reusable Directives in AngularJS

One of the main benefits of Angular is the ability to easily extend HTML with new behaviours through the use of custom directives. Directives allow developers to match markers in the DOM with the intended behaviours.

In this post we’ll cover:
* Why writing semantic and reusable directives is desirable.
* How to build directives on top of semantic HTML elements and attributes.
* How to provide communication between directives via controllers.
* How to provide basic animations using the $animate service.

This post assume you have some experience with Angular directives.

No comment yet.
Scoop.it!

Composing Functions in JavaScript

Composing multiple functions to create more complex ones is a common utility in any programming language. And the ability to construct functions in a way that is easily composable is a true talent, but it really shines with code maintenance and reuse. It’s not uncommon to find huge applications composed of many, much smaller functions. Inspired by this pattern of extremely modular functions, I’ve been slowly migrating my programming style to allow for more composable and reusable functions.

No comment yet.
Scoop.it!

Protected Resources with Sails.js

Protected Resources with Sails.js | JavaScript for Line of Business Applications | Scoop.it

 In this post we will be creating a resource that our user owns and learn how to create access control around that resource. Sails makes it pretty easy to accomplish.

The next thing we need to do is create our Entry resource. This is the resource that is going to represent one day’s journal entry. Thanks to the generate commands provided by Sails.js this is easily accomplished. From your project root, type the following command...

No comment yet.
Scoop.it!

Why I Chose Ember over Angular

I’ve spent a significant amount of time evaluating the different JavaScript frameworks over the past several months.  Like many others, I weighed the pros and cons of both Angular and Ember, finally settling on EmberJS. Making a choice between frameworks is a decision with deep and long-lasting implications, so it’s not one that I take lightly. Attached to the decision are hours of time learning new skills, not just for me but for every developer on my team.  Choosing a framework is choosing a side – you get all the good and all of the bad.

This is in no way an attack on Angular, which is a fantastic framework as well. Rather, this is rather my endorsement of Ember, and why I see it as a better fit for my personal situation.

No comment yet.
Scoop.it!

Promises instead of callbacks in EmberJS

A few weeks ago I built up a very simple identity map to get rid of a bug in highlighting active links. I introduced promises in order to leverage the fact that Ember.js blocks in model hooks until the model is resolved (or rejected).

In this post, I am taking a step back, and converting all the ajax calls that fetch data from and store data to the backend to use promises. I am also going to extract the most basic adapter that exists, just to do away with the repetition in the XHR calls. Once I have these in place, I will able able to build nice features on top of that.

No comment yet.
Scoop.it!

Writing React components as CommonJS modules

Writing React components as CommonJS modules | JavaScript for Line of Business Applications | Scoop.it

One of the libraries gaining interest at the moment is Facebook's React JS library. It mainly concerns itself with "the V in MVC" and encourages developers to break their app into resuable, modular components. The Virtual DOM is a great feature on its own, and I encourage you to investigate React if you haven't yet.

In this post I'll be explaining how your React components can be used as CommonJS modules and then made browser friendly via Grunt. Using React this way (as opposed to Bower, or just downloading the files manually) allows easy re-use of components on the server as well as all the benefits of modularising your code.

No comment yet.
Scoop.it!

AngularJS - ng-conf 2014 - Exclusive

AngularJS - ng-conf 2014 - Exclusive | JavaScript for Line of Business Applications | Scoop.it

No other site has gathered all these slides. We bugged every speaker to get them and we are still fighting to get the 3 missing ones. Hope you enjoy this!

Here we have gathered a mashup of all videos and slides for all sessions at the conference.

NG-CONF was amazing. With lots of best practices, tips, new keywords and homework.

* Opening Keynote
* AngularJS in 20-ish Minutes
* Writing a Massive Angular App
* Going Postal with Angular in Promises
* Deep Dive into Custom Directives
* Progressive Saving
* Rapid Prototyping with Angular & Deployd
* Rich Data Models & Angular
* Filters: Beyond OrderBy and LimitTo
* Awesome Interfaces with AngularJS Animations
* Dependency Injection
* Angular Team Panel
* Angular === Community (Keynote)
* How to use Typescript on your Angular Application and Be Happy
* Building Realtime Apps With Firebase and Angular
* Angular Directives that Scale
* Dart, it’s Angular Too
* Zones
* Angular with Browserify
* Angular + RequireJS & Angular Decorators
* Using AngularJS to create iPhone & Android applications with PhoneGap
* End to End Angular Testing with Protractor
* Using ngModelController to Make Sexy Custom Components
* PhotoHunt
* Angular Performance
* AngularJS ORM
* Ionic Framework, Built on Angular
* Angular + Breeze

Arik Grinstein's curator insight, January 29, 2014 11:07 AM

A must for any angular developer who somehow slept through  the last month :)

Scoop.it!

TypeScript: A New Language for .NET and JavaScript Developers

JavaScript is quite possibly the world's most popular programming language. It's nearly impossible to have a website without it. Despite its wild popularity, JavaScript does play some tricks on unsuspecting developers and sometimes does not work as expected, especially from a C# coder's point of view. It's also easy for JavaScript to run amok throughout a project, especially if it is not organized well, both in files and via patterns. This is where TypeScript comes into the picture. TypeScript works excellently as a shim for C# developers who must write JavaScript. In addition to that, JavaScript developers will enjoy TypeScript's implementations of ES6 proposed features (i.e., classes) that put it on syntax parity with OOP languages. That's not to mention while many hardened JavaScripters out there already know how to do all the things TypeScript provides, it still has much nicer syntax than JavaScript's prototypal way of doing it. (of course, the look of syntax is always an opinion; which is better, vanilla or chocolate?)

TypeScript is not a new language as it is a superset of JavaScript that compiles to plain JavaScript. This isn't "compile" in the traditional sense of the word, but that TypeScript is JavaScript that generates more JavaScript. The TypeScript compiler, tsc.exe, creates the prototypal syntactical code as well as the implementation of classes, namespaces, and types. There are no TypeScript designers in Visual Studio (good) and the JavaScript outputted is generally clean and lightweight.  

- See more at: http://rachelappel.com/typescript-a-new-language-for-.net-and-javascript-developers#sthash.M29wWjSi.dpuf

No comment yet.
Scoop.it!

An Introduction To WebSockets

An Introduction To WebSockets | JavaScript for Line of Business Applications | Scoop.it
In this article, Shwetank Dixit introduces the WebSockets protocol and API, the problem they are designed to solve, and the first few lines of code to get you started enabling your web applications with this technology...

So why do we need WebSockets? What problem are we trying to solve by using them? The answer is easy. We need a better way for web applications running on a client browser to communicate in real time with their servers

WebSockets are a new way for clients to communicate to servers and vice versa, without the overhead of an HTTP protocol. It uses its own protocol, which is defined by the IETF. The latest version is RFC 6455. Previous versions of the protocol proved to have some security issues so while they were implemented in a few browsers like Opera, they were not enabled by default. The newest version of the protocol seems have improved on these issue, and browsers are working on supporting that now.

Apart from having its own protocol, it also has an API which can be used by web applications to open and close connections and to send and receive messages. This is called the WebSockets API and is defined in aW3C Specification.


No comment yet.
Scoop.it!

Testing your frontend JavaScript code using mocha, chai, and sinon

Testing your frontend JavaScript code using mocha, chai, and sinon | JavaScript for Line of Business Applications | Scoop.it

For the 4 past months, I've been working for Mozilla on some big project where such testing strategy was involved. While I wish we could use CasperJSin this perspective, Firefox wasn't supported at the time and we needed to ensure proper compatibility with its JavaScript engine. So we went with usingMocha, Chai and Sinon and they have proven to be a great workflow for us so far.

Mocha is a test framework while Chai is an expectation one. Let's say Mocha setups and describes test suites and Chai provides convenient helpers to perform all kinds of assertions against your JavaScript code.

No comment yet.
Scoop.it!

Prototypes Are Not Classes

Prototypes Are Not Classes | JavaScript for Line of Business Applications | Scoop.it

Many people can and do say that “JavaScript has classes.” As a very rough, hand-wavy way of saying that “JavaScript has things that define the characteristics of one or more objects,” this is true. And many people lead healthy, happy, and productive lives without caring whether this statement is actually true, or a wrong but convenient shorthand.

But it is wrong. JavaScript does not have classes. JavaScript has prototypes, and prototypes are not classes. And understanding why JavaScript’s prototypes are not classes can be helpful for understanding how to “Think in JavaScript” and indeed how to “Think in Objects.”

So let’s go...


No comment yet.
Scoop.it!

Sample ASP.NET MVC4 application showing how to use PolymerJS

Sample ASP.NET MVC4 application showing how to use PolymerJS | JavaScript for Line of Business Applications | Scoop.it

polymermvc - Sample ASP.NET MVC4 application showing how to use Polymer.JS/Bootstrap and Angular.JS to make web components in an MVC4 project.

 

It demonstartes the simple core concepts of creating shadow dom enabled components that are portable from one MVC platform to another, and that rely entirely on HTML5 & Javascript to do thier thing.

The techniques used here require no complex setup's to allow your JS code to be sliced up and only included in the partials thier used in, or anything like that. You'll see that everything is driven directly from plain single view files, using the polymer method of loading these components.

No comment yet.
Scoop.it!

Avoiding anonymous JavaScript functions

Avoiding anonymous JavaScript functions | JavaScript for Line of Business Applications | Scoop.it

Anonymous functions, the art of the callback. I'm going to propose that you never write a callback again using an anonymous function, and I'll sell you the idea now. 

Here's a few reasons why you should stop doing this... anonymous functions:
* Are more difficult to debug
* Cannot be reused
* Cannot be tested easily
* Do not describe the role of the function
* Make code lack structure
* Create messier/unclear code
* Documentation will suffer (things like jsDoc)

No comment yet.