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

TypeScript: An Alternative to JavaScript

TypeScript: An Alternative to JavaScript | JavaScript for Line of Business Applications | Scoop.it

JavaScript is a nice language but it does not offer static type checking and object oriented programming. There are ways to simulate object oriented behavior but still there is no in-built way. Hence things gets really complicated while developing large scale applications in JavaScript.

To deal with this situation, developers have come up with new languages which offer more functionality and features but they still get compiled into JavaScript only. So, you can develop applications and games in languages other than JavaScript but they will still run on web browsers as the compiled output will be a JavaScript only.

Several languages have been built upon JavaScript including some famous ones like coffee script, type script, Dart, etc. In this blog, we will talk about TypeScript.

No comment yet.
Scoop.it!

Compare Durandal to Angular, Not Knockout to Angular

Compare Durandal to Angular, Not Knockout to Angular | JavaScript for Line of Business Applications | Scoop.it

Odds are you have been asked recently: “How does KnockoutJS compare to AngularJS?” There seems to be a lot of attempts to compare these two awesome libraries. We can certainly compare them, but will this really get you where you want to go?

If you hear this question, ask “why” the person is asking it. If s/he wants a JavaScript/HTML based presentation framework then suggest that you compare Durandal to Angular. Why? Because Knockout is at heart a data-binding library, while Angular and Durandal are presentation frameworks. This is a hugely important concept to grasp, so let’s break down what’s at the heart of these questions and how Knockout, Durandal and Angular approach them. But let’s be clear: Knockout rocks. Durandal rocks. Angular rocks.

No comment yet.
Scoop.it!

Use Node.js to Extract Data from the Web for Fun and Profit

Use Node.js to Extract Data from the Web for Fun and Profit | JavaScript for Line of Business Applications | Scoop.it

I have a guilty pleasure. I admit it… I really like Node.js. Node.js is a framework for writing Javascript applications outside of a web browser. In the spirit of Atwood’s Law, it has a number of powerful facilites for writing networked applications. Not only can you use Node.js to build server-side webserver/websocket code, but I’ve found that I like to use it for my random scripting needs. So I set off looking at what web scraping libraries were available for Node.js and found Cheerio. Cheerio is a library for Node.js that allows you to (with no browser required) construct a DOM out of a given piece of HTML and do jquery-like CSS queries on it. Brilliant! Given the advent of CSS and CSS driven styling… What is just about the only organizing factor within web pages out in the wild?… Well CSS of course. These days folks more often than not use CSS classes to style various structural aspects of their web pages. 

No comment yet.
Scoop.it!

A Palatable Javascript Pattern

A Palatable Javascript Pattern | JavaScript for Line of Business Applications | Scoop.it
I don’t always write raw Javascript, but when I do I use this pattern to make it less painful.

Love the language, or hate it – I don’t think it’s debatable that its mechanisms for defining abstract data types are a bit… incoherent. This isn’t necessarily anyone’s fault; we know that the core of the language was bung out under duress and time pressure. But what we have to work with is a mishmash of dictionary types, an unfinished prototype system, a little bit of a Smalltalk/Java class system, and this behavior that not even a mother could love.

When I’m writing large amounts of code to run in the browser, I tend to approach the problem with higher level tools – GWT, JSX, TypeScript, Dart, Closure, and so forth. I personally find that I need a type checker to manage large projects (especially with a team), and at certain scales an optimizing compiler becomes indispensible. And for very simple scripts, simple Javascript with just dictionaries and functions is perfectly serviceable. But what about those occasions where you either can’t use a compiler (e.g., because you’re writing code for someone who doesn’t want to integrate it into their build system), or it’s too painful to be worth the effort (e.g., medium-sized Chrome extensions)?

When I find myself in this situation, I fall back to a pattern that I find takes a lot of the pain out of raw Javascript. I feel it gives me just the right set of abstractions to keep the code from turning into a creeping spaghetti monster, without much boilerplate, and that eliminates a few very difficult-to-avoid Javascript errors. The following is a simple, contrived example that should get the rough idea across. You may note that it derives to a certain extent from what’s come to be known as the Crockford Pattern, though I’ve extended it a bit.

No comment yet.
Scoop.it!

Kickstart Your AngularJS Development with Yeoman, Grunt and Bower

Kickstart Your AngularJS Development with Yeoman, Grunt and Bower | JavaScript for Line of Business Applications | Scoop.it

Whether you love or hate it, there’s no denying that AngularJS is the framework on every developer’s lips. It may not be for everybody, but AngularJS has a quirky, efficient and powerful feature set. Couple that with a few useful development tools like Yeoman, Grunt and Bower and you’ve got yourself an incredibly fast rapid prototyping process.

 

This AngularJS tutorial will cover:

* Generating a bare bones AngularJS app with Yeoman

* Using Grunt to speed up development and help perform repetitive tasks

* Using Bower to add third party plugins/frameworks

* Making minor changes to your AngularJS app

No comment yet.
Scoop.it!

Testing an Ember Application: Integration and Unit tests

Testing an Ember Application: Integration and Unit tests | JavaScript for Line of Business Applications | Scoop.it

The PeepCode Ordr app is an excellent video tutorial for learning Ember.js and also a great example of a browser application for writing tests in JavaScript. Learning Ember.js is a task in itself, learning to test an Ember.js comes with an equal level of challenge. This article is a collection of observations for an exercise in testing a non-trivial Ember.js application, specifically the Ordr app code from the PeepCode tutorial Fire up Ember.js video.

These comments on testing are based on a exercise with a group of hackers from the Ember-SC meetup group in Southern California. Drew, Scott, Ty and myself spent some time trying out various ways to test an Ember Application.

The journey went something like this…

* Try Jasmine because we love BDD

* Try Mocha because it’s newer and it’s used with Konacha

* Try QUnit because it may be better with async tests then the above and the Ember.js project uses it anyway

* Wow Ember.js has testing helpers in the ember-testing package, lets rewrite the integration tests

* Try Pavlov since is provides BDD style spec runner on top of QUnit

* Just use TDD QUnit test runner

In getting started with the exercise we talked and asked…

* What is important in testing an app built with Ember.js?

* Because the Ember.js framework has solid test coverage for the API it provides, is the main gap making sure an application’s compontents or modules work together?

* The underlying behavior of the framework features and API should just work, what should we not test?

* Unit tests are needed, but it would be great to have integration tests that run super fast in a JavaScript runner.

* Perhaps integration or end-to-end testing is the main objective for our exercise.

No comment yet.
Scoop.it!

AngularJS + Cloud Endpoints: A Recipe for Building Modern Web Applications

AngularJS + Cloud Endpoints: A Recipe for Building Modern Web Applications | JavaScript for Line of Business Applications | Scoop.it

This paper provides best practices and guidance to web developers who are interested in AngularJS or other client-side MVC technologies and want to optimize their server backend for these technologies. You will learn how to leverage AngularJS with Google Cloud Platform and, in particular, Google Cloud Endpoints, a technology that let developers expose their backend APIs of Google App Engine applications through service-based API, instantly with simple annotations.

Google Cloud Endpoints makes it easy to build a server-side API and encapsulate the backend boilerplate logic. Incorporating the Google Cloud Endpoints JavaScript client library into AngularJS is so straightforward that you can write a single line of code to call server logic and a callback function to update model properties with the result.

The intended audience for this paper is Java developers with some experience with App Engine and a basic knowledge of JavaScript. Links to the AngularJS and Cloud Endpoint web sites with reference guides are provided in another section and troubleshooting tips are provided in the Appendix. If this is your first time writing Java applications for App Engine,the Getting Started pages on the App Engine site provides a good introduction.

No comment yet.
Scoop.it!

AngularJS Masonry Directive

AngularJS Masonry Directive | JavaScript for Line of Business Applications | Scoop.it

A directive to use Masonry with AngularJS.

You have to include the masonry attribute on the element holding the bricks. The bricks are registered at the directive through the masonry-brick CSS classname.

The directive uses imagesloaded to determine when all images within the masonry-brick have been loaded and adds the loaded CSS class to to the element, so you can add custom styles and prevent ghosting effects.


No comment yet.
Scoop.it!

JavaScript + Other Languages

JavaScript + Other Languages | JavaScript for Line of Business Applications | Scoop.it

JAVASCRIPT IS GREAT:

Runs in all browsers

Familiar syntax

Dynamic typing

OTHER LANGUAGES ARE GREAT TOO:

Existing code

Developer tools

Static typing

MIXING LANGUAGES:

When useful, gives you the best parts of multiple languages

GOING THROUGH JAVASCRIPT:

Might seem like an odd solution

But replacing JavaScript with anything else would slow down the web

Adding another virtual machine (VM) alongside JavaScript is complicated (cross-VM GC, etc.)

Consensus to standardize any such change would be very hard

 

No comment yet.
Scoop.it!

RealTime Charts With Wijmo & KnockoutJS

RealTime Charts With Wijmo & KnockoutJS | JavaScript for Line of Business Applications | Scoop.it

Most web-developers know about KnockoutJS, and I hope that most of them have heard about (or used) the amazing stuff that Wijmo delivers. If you do not know about Wijmo, here a short summary…

The goal with this post/tutorial is (as stated above) to create a Wijmo line-chart and make it alive with some real-time data. To have some data to display I will just randomize some numbers server-side.

NOTE: If you want to implement a working example your self, now is the time to create a new Visual Studio project (MVC3/MVC4) and add a default.html to the root of the project.

No comment yet.
Scoop.it!

Essential JavaScript Namespacing Patterns

Essential JavaScript Namespacing Patterns | JavaScript for Line of Business Applications | Scoop.it

In this post, I'll be discussing both intermediate and advanced patterns and approaches for namespacing in JavaScript. We're going to begin with the latter as I believe many of my readers have some prior experience in this area. If however you're new to namespacing with the language and would like to learn more about some of the fundamentals, please feel free to skip to the section titled 'namespacing fundamentals' to continue reading.

* What is namespacing?
* Advanced namespacing patterns
* Automating nested namespacing
* Dependency declaration pattern
* Deep object extension
* Namespacing Fundamentals
* Conclusions

MasterKom Indonesia's curator insight, August 23, 2013 8:30 AM

One of the best ways to not leave any backlinks footprints is to build backlinks from many sources.http://bit.ly/12vdoOU

Scoop.it!

An Absolute Beginner's Guide to Node.js

An Absolute Beginner's Guide to Node.js | JavaScript for Line of Business Applications | Scoop.it

There's no shortage of Node.js tutorials out there, but most of them cover specific use cases or topics that only apply when you've already got Node up and running. I see comments every once and awhile that sound something like, "I've downloaded Node, now what?" This tutorial answers that question and explains how to get started from the very beginning.

No comment yet.
Scoop.it!

AngularJS Code Snippets for Visual Studio

AngularJS Code Snippets for Visual Studio | JavaScript for Line of Business Applications | Scoop.it

Controllers, services and directives are some of the core features in AngularJS where you’ll end up writing a lot of your code. So why not reduce the friction and keep them consistent?

There is a lot of value in using consistent patterns in code. When I find myself using one, I create snippets to help me stick with the pattern. When the pattern evolves, I change the snippets to evolve with them. Recently I found myself using a similar pattern for create Angular controllers, factories/services and directives. So it just made sense to create Visual Studio snippets for each of them and share them.

No comment yet.
Scoop.it!

Instant Search with Solr and AngularJS

Instant Search with Solr and AngularJS | JavaScript for Line of Business Applications | Scoop.it

Previously, we gave an example of a super simple search results widget that utilized jsonp and AngularJS. Since then, we’ve polished our Angular skills quite a bit. Enough so, that I was able to throw together this instant search widget, in less than an hour. Angular truly is an amazing UI tool.

Below is the source for the widget (and here it is on github and jsfiddle). Like our previous example, we use Angular directives to create a custom HTML element. Unlike our previous example, we’ve allowed some interactivity with a simple input tag. Enjoy!

No comment yet.
Scoop.it!

Web Tracing Framework by Google

Web Tracing Framework by Google | JavaScript for Line of Business Applications | Scoop.it

Rich tools for instrumenting, analyzing, and visualizing web apps.
Make your app jank-free at 60fps! Squeeze every drop of performance out of your code.

* Rich Tracing
Choose what methods to trace and add custom data to each event. Track asynchronous flows and actions.

* Slick Visualization
Smoothly dig through millions of events in an awesome UI. See patterns and understand your code like never before.

* Extensible Framework
Write extensions to capture more data or visualize it in new ways. Write small node.js scripts to process traces and pull out useful data.

* Canvas & WebGL
Capture and replay HTML5 <canvas> and WebGL content. Write tools to analyze and test your drawing.

* Track Memory Usage
Find every byte allocated by every function via heap tracking. See not just the what but when and who of every allocation.

* Remotely Trace Android
Grab captures and analyze pages running on Chrome for Android using a simple remote controller.


No comment yet.
Scoop.it!

Protecting objects in JavaScript

Protecting objects in JavaScript | JavaScript for Line of Business Applications | Scoop.it

This blog post is a quick refresher of how objects can be protected in JavaScript. There are three levels of protection:

Preventing extensions is the weakest level,sealing is stronger,freezing is strongest.
No comment yet.
Scoop.it!

Exploring HTML Imports

Exploring HTML Imports | JavaScript for Line of Business Applications | Scoop.it

Web Components have come a long way in the past few months and one of the technologies that I’m most interested in is HTML Imports (or “imports”, for short). Imports allow you to load additional documents into your page without having to write a bunch of ajax. This is great for Custom Elements where you might want to import a suite of new tags. I spent the day playing with imports and thought it would be useful to write up my progress.

No comment yet.
Scoop.it!

Does everyone hate MongoDB?

Does everyone hate MongoDB? | JavaScript for Line of Business Applications | Scoop.it

A technical look at the reason why MongoDB sucks, why I'm migrating from MongoDB and goodbye MongoDB community posts. Is everyone leaving MongoDB?

For a guaranteed surge of traffic and to hit the Hacker News homepage, all you need to do is write about why you hate MongoDB and/or migrated to some other database. We’ve been using it to power our server monitoring service, Server Density, for over 3 years now and so with experience, many of the problems cited in these posts seem like basic mistakes in deployment and understanding.

No comment yet.
Scoop.it!

Modular AngularJS App Design

Modular AngularJS App Design | JavaScript for Line of Business Applications | Scoop.it
Organize your Angular app into modules for code reusability

I am a sucker for modules. Something about bundling a set of functionality and display logic into a module that can be easily redistributed for many apps makes my skin tingle. So when I saw that “modules” were a big part of the AngularJS methodology, I was super excited to try it out. I quickly realized however, that most of the examples online used one module for the entire application, which didn’t seem all that modular to me.

Scoop.it!

Abide – observable object properties in Javascript using Ember-style syntax

Abide – observable object properties in Javascript using Ember-style syntax | JavaScript for Line of Business Applications | Scoop.it

I have just released abide – a small library I’ve been working on for the last few days. Inspired by Ember.JS observables, it provides a mechanism for auto-updating object properties and auto-triggering object methods based on updates made to other properties within the object.

Internally, Object.defineProperty is used to define getters and setters for all specified properties. The setters internally contain logic for notifying dependent properties if the value has changed.

No comment yet.
Scoop.it!

Using Grunt to Simplify Build Processes

Using Grunt to Simplify Build Processes | JavaScript for Line of Business Applications | Scoop.it

Here are some of the things we wanted to do originally:
* Preprocess the index.html template
This lets us distinguish between builds for different platforms. E.g. Android vs. iOS vs. Web
* Compile the templates into a single template file
Less requests means faster load times. The single most important load time to minimize is the first one.
* Minify the CSS and JS
Both are interpreted languages which parse and run faster when there’s less characters to be parsed.
* Lint the existing codebase for semantic gotchas
A standard software engineering practice that catches subtle kinks in the code before they get out of hand.
* Run shell tasks as build phases
Handy for moving files around or further automation during intermediary stages of a build process.
* Connect to the PhoneGap Build system
We used this system in the early stages of the app to keep things relatively uniform across Android and iOS platforms.

No comment yet.
Scoop.it!

JavaScript for Designers - An Intro to JS Terms and Concepts

JavaScript for Designers - An Intro to JS Terms and Concepts | JavaScript for Line of Business Applications | Scoop.it

a humble 115 slides about JS and its programming patterns in a practical context

No comment yet.
Scoop.it!

NETEYE Activity Indicator directive for angularJS

NETEYE Activity Indicator directive for angularJS | JavaScript for Line of Business Applications | Scoop.it

Part of the KoLite tools created by John Papa for knockoutJS was the activity indicator. The nice thing about it (as it claims) is that it supports starting IE 6.0 (ughhhh….) For those who don’t have the luxury of developing for modern browsers ONLY  (i.e. CSS3 animations), this utility is very appealing. 

No comment yet.
Scoop.it!

(better) Authentication in ember.js

(better) Authentication in ember.js | JavaScript for Line of Business Applications | Scoop.it

The basic approach is still the same as in our initial implementation - we have a /session route in our Rails app that the client POSTs its credentials to and if those are valid gets back an authentication tokentogether with an id that identifies the user’s account on the server side.

This data is stored in a "session" object on the client side (while technically there is no session in this stateless authentication mechanism, I still call it session in absence of an idea for a better name). The authentication token is then sent in a header with every request the client makes.

* The client "session"
* Logging in
* Logging out
* Authenticated routes

No comment yet.
Scoop.it!

Custom Elements - A Web Components Gallery for Modern Web Apps

Most popular elements:

* github - Web Component wrapper for @mdo's GitHub button using Polymer

* gravatar - Web Component wrapper for Gravatar using Polymer

* youtube - Web Component wrapper for Youtube's player using Polymer

No comment yet.