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

A Gentle Intro to Monads in JavaScript

A Gentle Intro to Monads in JavaScript | JavaScript for Line of Business Applications | Scoop.it

Monads: they're incredibly useful, and also maybe a little intimidating. Beginner functional programmers often cringe when they hear the term. JavaScript legend Douglas Crockford once said that monads are cursed – that once you understand monads for yourself you lose the ability to explain them to others. In the programming language F#, monads are called “computational expressions” mostly so people aren’t scared away.

But I think all this fear and mysticism around the dreaded “M-word” need not be so. So in this post, I’m going to attempt to put a small crack in the curse, not by attempting to explain all of monad theory in general, but instead by thoroughly diving into a concrete example of a monad in a specific language: the Maybe monad in JavaScript[1].

If you’ve been putting off learning about monads – or maybe have never even heard of them until now – then this post is for you. It will provide just enough material to give you a sense of what monads are and what they can do. From there you should have a solid stepping off point from which you can jump into reading something like this without trepidation.

No comment yet.
Scoop.it!

Crumbl – A tiny JavaScript framework

Crumbl – A tiny JavaScript framework | JavaScript for Line of Business Applications | Scoop.it
A tiny JavaScript framework that respects the separation of content, presentation and logic.

Like a lot of developers, I feel guilty sending a huge JavaScript payload to the user just to have a collapsable list somewhere on the website. jQuery is one hell of a framework and I always loved using it, but 9 out of 10 websites I used it for didn’t even use 10% of what jQuery is capable of. Users are loading the other 90% of jQuery for no good reason.


I needed to make it up to the internet and so I wrote Crumbl. Crumbl has all the methods I needed in those 9 out of 10 websites and was written with two big ideas in mind:

1. It had to follow jQuery’s way of writing JavaScript to make the transition for developers accustomed to jQuery as smooth as possible. This means, using the dollar sign notation to invoke Crumbl, using the same name and syntax for most methods and being able to chain functions together for fast coding.

2. It could only contain JavaScript-exclusive functionality. CSS methods, animation methods and the like have all been left out: predefined CSS classes and CSS3 animations can fully replace them.

The result is a nice, lightweight JavaScript base for your average website. Great to support all your simple website scripting like modal pop-ups, tabs, lightboxes, showcases and responsive navigations.


Mickael Ruau's curator insight, November 3, 2013 7:10 AM

I needed to make it up to the internet and so I wrote Crumbl. Crumbl has all the methods I needed in those 9 out of 10 websites and was written with two big ideas in mind:

1. It had to follow jQuery’s way of writing JavaScript to make the transition for developers accustomed to jQuery as smooth as possible. This means, using the dollar sign notation to invoke Crumbl, using the same name and syntax for most methods and being able to chain functions together for fast coding.

2. It could only contain JavaScript-exclusive functionality. CSS methods, animation methods and the like have all been left out: predefined CSS classes and CSS3 animations can fully replace them.

The result is a nice, lightweight JavaScript base for your average website. Great to support all your simple website scripting like modal pop-ups, tabs, lightboxes, showcases and responsive navigations.

 

Scoop.it!

NodeJS: the good parts? A skeptic’s view

NodeJS: the good parts? A skeptic’s view | JavaScript for Line of Business Applications | Scoop.it

JavaScript used to be confined to the browser. But these days, it’s becoming increasingly popular in server-side applications in the form of Node.js. Node.js provides event-driven, non-blocking I/O model that supposedly makes it easy to build scalable network application. In this talk you will learn about the consequences of combining the event-driven programming model with a prototype-based, weakly typed, dynamic language. We will share our perspective as a server-side Java developer who wasn’t entirely happy about JavaScript in the browser, let alone on the server. You will learn how to use Node.js effectively in modern, polyglot applications.

No comment yet.
Scoop.it!

Creating A Rails-Style Flash Object With Ember.js

Creating A Rails-Style Flash Object With Ember.js | JavaScript for Line of Business Applications | Scoop.it

If you've used Rails for a while you'll be familiar with flash messages. Flash objects provide a way to temporarily store information to recall later (usually on the next page render). This can be really useful for performing an action in a controller and then setting a feedback message to show the user during the next action.

We've done a lot of work with Ember.js lately, and we needed this functionality to feedback model saves to the user. There are already a wide variety of solutions out there, including the awesome Growl-esque notifications byAaron Haurwitz, but for one of our smaller projects we wanted something simpler.

We're already using Foundation for it's excellent grid system, so we wanted to re-purpose the alert component into Ember.js flash object.

No comment yet.
Scoop.it!

Will Meteor kill Rails? I don’t know, but Phusion Passenger open sources Meteor support

Will Meteor kill Rails? I don’t know, but Phusion Passenger open sources Meteor support | JavaScript for Line of Business Applications | Scoop.it

For those who haven’t heard of Meteor yet: it is a hip new Javascript platform for developing web apps. It’s quite an innovation compared to “traditional” web frameworks: you develop in a single codebase and the code almost magically works in both the browser and the server. The platform also synchronizes data automatically across all connected clients by using long polling, WebSockets etc. It’s definitely worth checking out.

Whatever the result will be, the Phusion Passenger application server will be around to help you simplify your deployments and keeping your systems running smoothly.

Phusion Passenger takes a lot of complexity out of deploying Meteor, and adds powerful enterprise-grade features that are useful in production. It also makes it administering Meteor apps much easier. It has already done this for Ruby, Python and Node.js and is being used by high-profile companies such as Apple, Pixar, New York Times, AirBnB, Juniper etc.

Here are some of the benefits that Phusion Passenger gives you...


No comment yet.
Scoop.it!

ember-oauth2: using OAuth 2.0 Implicit Grant flow (Client-Side Flow) with Ember.js

ember-oauth2: using OAuth 2.0 Implicit Grant flow (Client-Side Flow) with Ember.js | JavaScript for Line of Business Applications | Scoop.it

This creates an OAuth 2.0 Ember object class for handling authentication with OAuth 2.0 providers.

Ember-OAuth2 uses localStorae for saving the tokens, localStorage is supported in Firefox 3.5+, Safari 4+, IE8+, and Chrome.

The configuration object allows you to also customize the prefix for the state and token that are stored in the browsers localStorage. The default value for the state prefix is state and the default for token is token. Using the previous example you can customize the prefixes by doing the following.

No comment yet.
Scoop.it!

Single page web application built with Rails 4

Single page web application built with Rails 4 | JavaScript for Line of Business Applications | Scoop.it

The goal of this example is to build a single page application using the AJ-part of AJAX and the web frameworkRuby on Rails.

The result should be a small application providing the functionality to track time on tasks grouped by projects. It should create and delete tasks and projects without a full page reload. Tracked time per task is definied with one or many logs having a start and stoptime. Also there have to be those web-2.0-ish flashing elements when entities are being created, updated or deleted. The tutorial guides through the minimal steps setting up such an application and does not feature a path to a secure and production ready application.

No comment yet.
Scoop.it!

2013: The year of JavaScript

One thing I often see developers talking about online is their JavaScript 'Aha' moment, that is when the language really started making sense in their head.

I would describe what I have had in the last 12 months as less of an 'aha moment' and more of a series of interconnected realisations culminating in what I can only describe as an explosion of information in my brain.

This time last year I thought I had a pretty good grasp of JavaScript. I really didn't. What I could do was use jQuery to manipulate the DOM fairly well. I was selecting like a boss but I had no true understanding of the library itself or how it worked.

I always 'knew' that 'everything is an object' in JavaScript because that is what I'd read all over the internet, but I didn't really understand what that meant and how it could be used to my advantage.

Today things are very different for me. I understand and use OOP JavaScript on a daily basis. I understand how inheritance and prototypes work. I recognise the importance of modularisation. I understand the significance of the global object/namespace and the dangers associated with it. I've thrown jQuery to the wind. I've worked on hand-coded application frameworks. I've helped build fully fledged web applications. I can now take any JavaScript library, read it, and actually understand what is going on under the hood. I use server-side JavaScript. I know how to use Chrome devtools to its real potential. I could go on, really.

No comment yet.
Scoop.it!

Perpetuating terrible JavaScript practices

Perpetuating terrible JavaScript practices | JavaScript for Line of Business Applications | Scoop.it

There is a huge movement of teaching people to code. Great startups like Codecademy, Codecombat, Codewars and many, many more use the web to teach people how to build things for the web, how to grasp the concepts and logic of code and how to write it. On the other side of the coin we have implementation guides that ride roughshod over everything we learned in all the recent years we used web technologies for the sake of writing a very “easy to understand” hello world example or “keep the code short”. This is not helping, all it does is perpetuate the prejudice that the web is not a professional environment to work in and instead it is OK just to copy and paste something and change some function names as long as the browser understands it.

We got into a world of copying and pasting solutions that work without caring at all about the effects they might have. This is unfortunate, seeing how JavaScript has become a first class language.

 

* Use the wrong element, then make it work?
* Add an ID, then you can access it easily?
* Everybody in line
* Goldfish code
* Unnecessary shifting of classes
* To conclude

No comment yet.
Scoop.it!

Create an Angular App in Seconds with Hot Towel

Create an Angular App in Seconds with Hot Towel | JavaScript for Line of Business Applications | Scoop.it

Looking for an easy way to kick-start your Angular app development in under a minute? Now you can with HotTowel.Angular, a free NuGet package (and soon to become a Bower package too). What do you get? Let’s take a look …

No comment yet.
Scoop.it!

Keypoint: PhoneGap-Based HTML Slide Decks

Keypoint: PhoneGap-Based HTML Slide Decks | JavaScript for Line of Business Applications | Scoop.it

I’ve been using HTML slides instead of Keynote or Powerpoint for a while now. Since I’m doing a lot of PhoneGap/Cordova presentations, it also occurred to me some time ago that I could go one step further and package my HTML slide decks as PhoneGap applications. That way, I can demonstrate the PhoneGap APIs within my presentation, instead of constantly switching back and forth between my presentation and a demo app: My slides are the demo app.

To enable this, I built a simple presentation micro-framework that I called Keypoint. Keypoint uses Matteo Spinelli’s SwipeView as the swipable container. It is resource-conscious and fast, with only three slides in the DOM at any given time.

Because it is a Web application, you can also run your presentation in a browser on your laptop and navigate with the arrow keys. You’ll just not be able to use the PhoneGap specific capabilities.

No comment yet.
Scoop.it!

Bind, Call and Apply in JavaScript

You see, most well written code will instantly tell you what it does. With some experience in functional JavaScript, and having read both Functional JavaScript and JavaScript Allongé (both amazing books), I had no problem reading it. But explain it (and why one would even care about doing it) to someone with no experience in functional programming?

I decided to work my way through it, with simple examples and lots of comments. This was the result...

No comment yet.
Scoop.it!

Ember.js: Marking Links as Active

Ember.js: Marking Links as Active | JavaScript for Line of Business Applications | Scoop.it

Ember.js is a client-side application framework. One of its core principles is that the URL should drive the design of the application. Consequently, the router and helpers related to routing have a very rich API.

In this post, I’m going to show how Ember creates markup for links that can be used to indicate whether or not they are active.

t is often required to make links that point to the current route look differently. A classic example would be a navigation bar where the link to the current page would be grayed out.

Ember.js takes care of this by adding an active class to the link if the route it points to is equal to one of the currently active routes. Both the Bootstrap and the Zurb Foundation frameworks modify the look of active links, and so app developers coming to Ember.js working with one of those frameworks have a magic moment. Their current links are marked visually without them having had to do anything.

No comment yet.
Scoop.it!

HTML5: The Platform Of Perception And Assumptions

HTML5: The Platform Of Perception And Assumptions | JavaScript for Line of Business Applications | Scoop.it
Introducing The HTML5 Mobile Challenge

We created the HTML5 Mobile Challenge to put perceptions about HTML5 and mobile to the test. Not just a blanket generalization, but a hands on experiment so we could start with the raw senses and move up to the truth. We gave savvy developers two seemingly identical applications, and asked them to advise us on which one was native, and which one was a hybrid application running in a browser.

The proof is in the video. Once you tell someone that an app is native or hybrid, they make immediate assumptions about it based on their perceptions. Even when there is no native application at all.

Introducing Cuteness

In order to be able to challenge perceptions, we first had to find out if the rumors about HTML5 were true. Could we build a mobile app with HTML5 that was indistinguishable from native? We've heard a lot about how it couldn't be done, so we decided to find out for ourselves.

Over the last few months, we put our money where our mouth was - on HTML5. We sat down, designed an app, and began to build it using our own tools and the HTML5 platform. The result was a demo app called “Cuteness”.

Cuteness is a Reddit reader (so named because it only allows you to read the 'aww’' subreddit) which aims to take a hard look at some of the most tenuous areas of the mobile web.

No comment yet.
Scoop.it!

BackboneORM - A polystore ORM for Node.js and the browser

BackboneORM - A polystore ORM for Node.js and the browser | JavaScript for Line of Business Applications | Scoop.it

BackboneORM was designed to provide a consistent, polystore ORM across Node.js and the browser.
It was inspired by other great software and provides:
* Node.js-style callbacks and streams for a familiar asynchronous programming style
* MongoDB-like query language to easily slice-and-dice your data
* a REST controller enabling browser search bar queries and an optional paging format like CouchDB

 

Other great things:
* it provides a JSON-rendering DSL
* it solves the dreaded Node.js circular dependencies problem for related models
* it is compatible with Knockback.js
* it parses ISO8601 dates automatically
* BackboneMongo provides a CouchDB-like '_rev' versioning solution
* BackboneREST provides authorization middleware hooks and emits REST events

No comment yet.
Scoop.it!

Open Source EmberJS Component from Addepar

Open Source EmberJS Component from Addepar | JavaScript for Line of Business Applications | Scoop.it

* Ember Table: allows you to render very large data sets by only rendering the rows that are being displayed.
It is written as an ember component with an API that is easy to understand and extend.

* Ember Widgets: a component library which includes easy to extend components such as select, popover, modal, carousel, and accordion. This library is built on bootstrap 3.0 CSS and represents our ideas about component best practices.

* Ember Charts: a charting library built with d3.js framework. It includes time series, bar, pie, and scatter charts which are easy to extend and modify. The out-of-the-box behavior these chart components represents our thoughts on best practices in chart interactivity and presentation.

No comment yet.
Scoop.it!

Creating A RequireJS Service For AngularJS Applications

Ben Nadel demonstrates how to use RequireJS inside an AngularJS application by calling the $apply() methods alerting AngularJS to any relevant changes.

As far as AngularJS is concerned, everything "happens" inside of the $apply / $digest lifecycle. This is the period in which AngularJS performs its "dirty checking" of the $scope data, which may or may not precipitate the invocation of various watchers and data-bindings. As such, if your code doesn't trigger an $apply / $digest, AngularJS doesn't know that your code has changed anything.

When you load RequireJS modules, RequireJS loads the target JavaScript files asynchronously before invoking your callbacks asynchronously. This asynchronous nature means that your RequireJS callbacks will be invoked outside of the AngularJS lifecycle. As such, you have to explicitly call $scope.$apply() within your callbacks so that AngularJS will propagate your asynchronous changes throughout the rest of the application.

No comment yet.
Scoop.it!

Getting chatty with Meteor.js

Getting chatty with Meteor.js | JavaScript for Line of Business Applications | Scoop.it

Meteor is a full-stack application platform which lets you write everything with JavaScript, because y’know…yay JavaScript.

My aim, by the end of this article, is for you to be able to build, not a Hello World app, not a Todo app, but drumroll …a Realtime Chat App. Cool, huh!?


So, firstly the HTML. We break our UI up into logical components. With this chat app, we only really need two sections; an area to input your messages and an area to view everyone’s messages. We then create templates for those two areas; one called “input” and one called “messages”.

A Meteor app is split into two parts; Server and Client. Any JavaScript files that you put into the _server folder isn’t piped down to the browser. For organisation, you can, if you want, put all your other JavaScript files into a _client folder. However feel free to leave them in the root folder of your application.

The first line in our JavaScript file is Messages = new Meteor.Collection("Messages");, this tells Meteor to grab the Messages MongoDB collection or create a fresh one.


No comment yet.
Scoop.it!

Rapid chrome app development with angular

Rapid chrome app development with angular | JavaScript for Line of Business Applications | Scoop.it

The Chrome web browser is Google’s custom browser. Not only is it incredibly speedy and on the bleeding edge of web development, it is at the forefront of delivering web experiences both on and off the web.

Chrome Apps are embedded applications that run within the web browser, but are intended on delivering a native app feel. Since they run within Chrome itself, they are written in HTML5, javascript, CSS3, and have access to native-like capabilities that true web applications do not.

Chrome apps have access to the Chrome API and services and can provide a integrated desktop-like experiences to the user.

One more interesting differentiation between Chrome apps and webapps is that they always load locally, so they show up immediately, rather than waiting for the network to fully download the components. This greatly improves the performance and our user’s experience with running our apps.

In this article, we’ll walk through how to create an advanced Chrome application using Angular.

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
In this guest blog post by Andy Shora you will learn about Unit and Integration Testing Best Practices in AngularJS. What should you be testing and when should you be writing tests? Read more!
No comment yet.
Scoop.it!

Optimizing AngularJS: 1200ms to 35ms

Optimizing AngularJS: 1200ms to 35ms | JavaScript for Line of Business Applications | Scoop.it

A single-page application architecture promised to unlock the backend’s blazing performance, so we began searching for an appropriate framework, and identified AngularJS as a promising candidate. Following the “fail fast” principle, we began with our toughest challenge, the log view.

 

This is a real acid test for an application framework. The user can click on any word to search for related log messages, so there may be thousands of clickable elements on the page; yet we want instantaneous response for paging through the log. We were already prefetching the next page of log data, so the user interface update was the bottleneck. A straightforward AngularJS implementation of the log view took 1.2 seconds to advance to the next page, but with some careful optimizations we were able to reduce that to 35 milliseconds. These optimizations proved to be useful in other parts of the application, and fit in well with the AngularJS philosophy, though we had to break few rules to implement them. In this article, we’ll discuss the techniques we used.

No comment yet.
Scoop.it!

[JSConf EU 2013 in Berlin] videos of all those talks

[JSConf EU 2013 in Berlin] videos of all those talks | JavaScript for Line of Business Applications | Scoop.it

JSConf EU, the labour-of-love conference for the JS community in Europe. Let the moving images speak for themselves:

* Nat Duca: Advanced Jank Busting in Chrome
* Shubhie Panicker: CSS module system in Google+
* Nic da Costa: A Symphony Of Sound, Gone Mobile
* Natalia Berdys: The web experience in the autistic spectrum
* Christian Kvalheim: Lessons from 4 Years of writing the driver for MongoDB
* Martin Kleppe: 1024+ Seconds of JS Wizardry
* Forrest Oliphant: vj.js: design for hackability and data flow programming in the browser
* Forbes Lindesay: Promises and Generators: control flow utopia
* Vince Allen: Creating natural simulations in a web browser
* Michal Biniek: HTML5 audio sprites – Holy Grail or Programmers Hell
* Julian Viereck: Reimplement RegExp in JavaScript
* Alex Feyerke: I have a Dreamcode: Build Apps, not Backends
* Martin Boßlet: Javascript Crypto. Ugly duckling with good reason?
* Astrid Bin: Sagascript - JS at the forefront of emerging storytelling
* Marius Gundersen: A comparison of the two-way binding in AngularJS, EmberJS and KnockoutJS
* Jon Bretman: Ask not what JavaScript can do for you
* Hannah Donovan: Sometimes You Need to Draw Animals
* Brendan Eich: JS Responsibilities
* Peter Flynn and Kevin Dangoor: Building Live HTML and Omniscient Debuggers in Brackets
* Pete Hunt: React: Rethinking best practices
* Sara Chipps: Hardware is Stupid Simple
* Domenic Denicola: The Extensible Web: JavaScript All the Way Down
* Addy Osmani: Plight Of The Butterfly - Everything You Wanted To Know About Object.observe()
* Patrick Dubroy: Parsing, Compiling, and Static Metaprogramming
* Joel Dart: People, The Good Parts
* Anette Bergo: Out with the keyboard!
* Tom Dale: Stop Breaking the Web
* Soledad Penadés: Four to the floor JavaScript
* Tim Park: Pointing Forward
* Mike West: Towards a post-XSS world.
* Loreena Lee and John McCutchan: Effectively Managing Memory At Gmail Scale
* Adam Baldwin: Security First
* Pam Selle: For the next generation: JavaScript education for a better JavaScript
* Jan Krutisch: JavaScript Patterns For Contemporary Dance Music
* Hannes Payer: Speed is awesome, but low latency is sublime
* Martha Girdler: The JavaScript Interpreter, Interpreted
* Bartek Szopka: Everything you never wanted to know about JavaScript numbers (and you didn't know you could ask)
* Allen Pike: native.js: JavaScript in your native apps


No comment yet.
Scoop.it!

TrifleJS - Automated Browser Testing with IE based on PhantomJS

TrifleJS - Automated Browser Testing with IE based on PhantomJS | JavaScript for Line of Business Applications | Scoop.it

A headless Internet Explorer browser using the .NET WebBrowser Class with a Javascript API running on the V8 JavaScript engine.

The API is coded as a port of PhantomJS. Basically, if you have used phantom before then you already know how to use TrifleJS.

Emil Mądry's curator insight, November 10, 2013 7:38 AM

Most of more demanding users uses browsers other than IE, but in most of the corporations IE even outdated 6 & 7 are still in use so even if our page looks great on webkit it doesn't mean it's bugfree on IE. (well, you can bet, that something will look not that good as you wish for).

Here's article to help testers and developers in struggle against IE

Scoop.it!

Querying ASP.NET Web API OData using Breeze JS

Querying ASP.NET Web API OData using Breeze JS | JavaScript for Line of Business Applications | Scoop.it

A few days back I blogged about the query options supported by ASP.NET Web API OData. Though we get a number of options to query data from clients through REST-based URLs, building the URLs at runtime is not an easy task. One of the very popular ways to call services from rich JavaScript applications is through jQuery AJAX. While jQuery AJAX abstracts the pain of dealing with browser and configuring parameters, it expects an absolute URL. Writing a set of fixed URLs can be easy, but in larger applications we will have a number of scenarios where we need to build most part of an OData URL based on decisions. We can’t inspect any of the URLs unless a request is sent to them. It would be good to have an abstraction that generates the queries for us. 

Breeze JS is the right library in such case. Breeze is built with OData query standards. But it is not limited to querying OData. Breeze can manage complex object graphs, cache data, query cached local objects, save complex objects to server, and perform validations and more. Breeze solves all the problems that one might face while working with data in rich JavaScript applications. In this post, we will see how Breeze simplifies querying OData services. 

No comment yet.
Scoop.it!

AngularJS - Unit Testing - Controllers

AngularJS - Unit Testing - Controllers | JavaScript for Line of Business Applications | Scoop.it

Since Controllers carry the "business logic" of your Angular application, they're probably the single most important thing to unit test in your Application. I've run across a few tutorials on this subject, but most of them cover only the simplest scenarios. I'm going to try to add some slightly more complicated stuff in to my controller and test it, just to show examples. As I think of new examples as time goes on, I'll try to add those too.

The recommended tool for testing Angular is Jasmine. You can, of course, use any unit testing tool you like, but for this blog entry, we'll be using Jasmine. To get started with Jasmine they have some really well annotated code on their site as a tutorial of sorts.

Jan Hesse's insight:

also in his blog:

* AngularJS Unit Testing Services

* AngularJS Unit Testing Directives

Arik Ben-Dov's curator insight, November 2, 2014 8:44 AM

Check also the ones on Directives and Services