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

How easy is it to hack JavaScript in a browser?

How easy is it to hack JavaScript in a browser? | JavaScript for Line of Business Applications | Scoop.it
Breaking down the possibilities of breaking in.

My question has to do with JavaScript security.

Imagine an auth system where you're using a JavaScript framework like Backbone or AngularJS, and you need secure endpoints. That's not a problem, as the server always has the last word and will check if you're authorized to do what you want.

But what if you need a little security without involving the server? Is that possible?

For example, say you've got a client-side routing system and you want a concrete route to be protected for logged-in users. So you ping the server asking if you're allowed to visit protected routes and you go on. The problem is that when you ping the server, you store the response in a variable, so the next time you go to a private route, it will check that if you're already logged in (no ping to the server), and depending on the response it will go or not.

How easy is for a user to modify that variable and get access?

No comment yet.
Scoop.it!

How to build a large Angular.js application

How to build a large Angular.js application | JavaScript for Line of Business Applications | Scoop.it

Angular.js is built from the ground up with testing in mind. In our opinion this makes Angular different from all other frameworks out there. It is the reason we chose it.

This testability is due to the feature set of Angular and the tooling available. Feature wise,dependency injection (DI), modules, directives, data binding, and the internal event loop all work together to create a testable architecture.

Angular maintains its own event loop outside the browser event loop to do dirty checking and make sure data is in sync. It will check all known objects for changes on every loop tick. This is done asynchronously. Because this loop is maintained by Angular, you can flush the queue of any outstanding request or pending change at any time, meaning you can test async code in a synchronous manner.

The test runner Karma, makes testing directives exceptionally easy. It transparently loads your templates as scripts and exposes them as Angular modules. You can use the same concept to package your app for production.

No comment yet.
Scoop.it!

Node.JS Course Slides

Node.JS Course Slides | JavaScript for Line of Business Applications | Scoop.it

Writing server side code in JavaScript is easier than ever with Node.JS. Combined with MongoDB, you can build a full featured server and database for your application on the cloud in the same programming language you know and love.

In this course we learn Node.JS from the ground up, starting with the basic Node.JS capabilities, and moving on to web applications using express framework. We later continue to talk about data storage in the popular and simple NoSQL database: MongoDB.

Course Duration: 2 Days (16 Hours).

No comment yet.
Scoop.it!

High-Quality JavaScript Code

JavaScript code is becoming ever more complex. How can we ensure a high level of code quality?

Some associated examples at: https://github.com/dennisodell/High-Quality-JavaScript-Code

No comment yet.
Scoop.it!

Toward Modern Web Apps with ECMAScript 6

Toward Modern Web Apps with ECMAScript 6 | JavaScript for Line of Business Applications | Scoop.it

It is often said that “Code is written once but read many times”. In fact, many of us who spend countless hours in the code review process realize how important it is to have clear and unambiguous code. In addition, crystal clear syntax makes it easy for a new team member to understand the code and to avoid common pitfalls. ...

Another common pitfall for beginners is the fact that variables have function scope instead of block scope. If someone is already used to other “curly-brace” programming languages, this scope difference can come as a shock. In addition to that, variable hoisting confuses the situation even further: a variable may exist in a scope although it has not been initialized.

No comment yet.
Scoop.it!

An Introduction to Writing Your Own JavaScript Compatibility Shims

We've talked in several past issues about the need to use compatibility shims to get newer features of JavaScript ported back into older browsers. Today we're going to talk about how those shims work and how you can write your own.

We are going to create a shim for the previously discussed Array#map, which is not available in IE8 and below.

Perhaps the most important part of writing a compatibility shim is using feature detection to ensure that we don't accidentally overwrite the map method in a modern browser.

Now if you load that code up in IE8 and below, you should have a functional (if incomplete) mapmethod where it was completely missing before.

No comment yet.
Scoop.it!

Building a RESTful Application With PHP & MongoDB - Part 2

Building a RESTful Application With PHP & MongoDB - Part 2 | JavaScript for Line of Business Applications | Scoop.it

In this tut, we are gonna see how the API stuffs does it work and return backs the response to our blog tut.

So, What are the things we gonna see...

  • What the heck is REST & Why we need to use?
  • Building our Application as RESTFul Service using PHP Slim Framework and storing in MongoDB.
  • Sending back the Response to our AngularJS


Now, you have the idea what is REST thing, the ingredients to make our application are,
  1. PHP Framework, Slim Framework will do (since your app is not that big)
  2. To store our data, we choose Mongo (Read here for more intel)
No comment yet.
Scoop.it!

Building a RESTful Application With PHP & MongoDB - Part 1

Building a RESTful Application With PHP & MongoDB - Part 1 | JavaScript for Line of Business Applications | Scoop.it

So, What are the things we gonna see...

  • Updated structuring for AngularJS
  • Making an RESTFUL API Call
  • Use of AngularJs Resource
The example tutorial is simple 'yet another blog' stuff, now we are only going to see how to make the API call only and nothing else. (need to go slowly)

Sometime ago, we have learned how to automate stuffs with the help of Yeoman and GruntJs. But, in growing application, we need to properly place certain files in certain places so we can jump to files easily(With the help of Sublime Of course!). 

No comment yet.
Scoop.it!

JavaScript: The Real Bad Parts

WHAT'S BAD BUT NOT SO BAD?

from Bad Parts: Appendix B - JavaScript: The Good Parts

  • with
  • eval
  • void
  • type coersion
  • continue/switch

How often do these issues come up?

how many with bugs have you wrangled?


6 DIFFERENT WAYS TO SET THIS
  • "method" call
  • baseless function call
  • using call
  • using apply
  • constructor with new
  • bind
  • => fat arrow
No comment yet.
Scoop.it!

Knockout Tutorial - Part 1

Knockout Tutorial - Part 1 | JavaScript for Line of Business Applications | Scoop.it

In this series, we would learn about knockout.js and its integration with other client side technologies. In Part 1, we would cover the following :

  • What is Knockout (KO)
  • MVVM Pattern
  • Scenario

What we are going to cover here:

  • Problem Statement
  • Implementation without Knockout
  • Implementation with Knockout
No comment yet.
Scoop.it!

JavaScript Data Binding with Knockout.js

JavaScript Data Binding with Knockout.js | JavaScript for Line of Business Applications | Scoop.it

In this article, I'm going to look at the JavaScript data-binding library Knockout.js. I'll expand on my previous article by removing the external templating library and using Knockout to bind and render the data.

One important thing to point out is that I won't be touching the server-side code at all. One goal of my previous article was to expose my application's functionality as raw data -- JSON data, to be precise. By removing the use of partial views (which are data + presentation combined), my options for how I work with the data have increased enormously. Last time, I used EJS (Embedded JavaScript). Today, I'll use Knockout. In the future, who knows? But the important point is that because of my architecture, I have options.

No comment yet.
Scoop.it!

Ember.js - Creating computed properties at runtime

Ember.js - Creating computed properties at runtime | JavaScript for Line of Business Applications | Scoop.it

I came across an interesting problem not so long and that I think is worthy of a post as I could not find anything meaningful about it online when I came across the problem.

I wanted to create a computed property for each state that would update as deals are created. I wanted to do this but there was a problem. The deals states are not static and are in fact created by the user and as such, not known until runtime. The only way to create a computed property for each state was to do it at runtime.

I did a quick google but nothing came back so I had a look at the ember tests to see how they were testing computed properties and came across examples like this...

No comment yet.
Scoop.it!

Creating a Solr HTML element with AngularJS!

Creating a Solr  HTML element with AngularJS! | JavaScript for Line of Business Applications | Scoop.it

Currently one of my favorite things about AngularJS is the ability to create your own custom HTML tags. For instance, in a prototype I’m building, I just used AngularJS to create a new element which loads up a set of search results and displays them on the page. Let’s take a look at how this works.

I love that AngularJS has totally nailed the model-view-controller pattern. Usually when someone says they’re using a MVC-based framework I enjoy asking them what that means and how their framework fulfills the MVC pattern. I guess I’m sadistic, but I like hearing them mumble and sputter as they try to answer the question.

Monitis's curator insight, August 17, 2013 4:36 AM

AngularJS seems getting more popular, it is a framework maintained by Google

Scoop.it!

Zza! Single page application for ordering pizzas built on the MEAN stack with Breeze.js

Zza! Single page application for ordering pizzas built on the MEAN stack with Breeze.js | JavaScript for Line of Business Applications | Scoop.it

Zza! is a single page application for ordering pizzas, salads and drinks.

This is the 100% JavaScript version of Zza! written for Node.js running Express with a MongoDB database.

It's built on the BMEAN stack:


Breeze   client-side data modeling and data accessMongo   server-side document-oriented databaseExpress   server-side web application framework on nodeAngular   client-side presentation frameworkNode   server-side platform for web applications


Breeze works well with Microsoft technologies as we've demonstrated many times. It also works well outside the Microsoft ecosystem. To drive that point home, this sample has ...

no C#
no ASP.NET
no Web API
no IIS
no Entity Framework
no SQL Server
No comment yet.
Scoop.it!

Build a Complete MVC Web Site With ExpressJS

Build a Complete MVC Web Site With ExpressJS | JavaScript for Line of Business Applications | Scoop.it

In this article we’ll be building a complete website with a front-facing client side, as well as a control panel for managing the site’s content. As you may guess, the final working version of the application contains a lot of different files. I wrote this tutorial step by step, following the development process, but I didn’t include every single file, as that would make this a very long and boring read. However, the source code is available on GitHub and I strongly recommend that you take a look.

No comment yet.
Scoop.it!

Angular.js: Layouts and Sections

Angular.js: Layouts and Sections | JavaScript for Line of Business Applications | Scoop.it

Implementing a layout/sections concept in Angular

Coming from an ASP.NET MVC background, one of the concepts I found myself missing was that of "sections". A solution I came up with was to use two custom directives:

  • octo-placeholder designates an area on the parent layout where content will be placed
  • octo-section designates content that will be added to the parent layout
No comment yet.
Scoop.it!

Conditioner.js • Frizz free, environment-aware, javascript modules.

Conditioner automatically loads and unloads modules based on the state of their surroundings. You define the required state, conditioner takes it from there.

Modules are loaded separate from each other preventing them from getting into fights. Conditioner exposes an API that allows for structured peace negotiations between modules.

No comment yet.
Scoop.it!

AngularJS Missing Directives: Focus & Blur Part 2

AngularJS Missing Directives: Focus & Blur Part 2 | JavaScript for Line of Business Applications | Scoop.it

In the first part of this series about supporting focus and blur events I elected to follow the template in the AngularJS source code for event directives. This proved to be quite insightful as the AngularJS team just released 1.2.0rc1 which now supports these events natively in the same manner. This means you can just drop in the new version, remove the custom directives and any dependencies on these directives should still work! Check it out for yourself!

But to illustrate this point even further, lets continue with a previous discussion from the first part of this series. Namely the discussion about which adverb should be used for these event directives, "on" or "while". In the first part the directives used the "on" approach for each event. But this doesn't mean we still can't support "while". In fact, we already did in the original example by using both "on" events and storing the state in a scoped variable, focused.

No comment yet.
Scoop.it!

AngularJS Missing Directives: Focus & Blur

AngularJS Missing Directives: Focus & Blur | JavaScript for Line of Business Applications | Scoop.it

While that list is pretty extensive there are two glaring omissions, namely blur and focus events. Luckily these can be easily added as you will see below.

Since there is nothing uniquely special about these two events compared to the list above, we can use the AngularJS source code as a template for adding two directives to support these events. The bonus for doing that is extrapolating and slightly modifying the code for our goals is quick and painless. Lesson to be learned: always look to the source for tips and guidance.

First, a note discussing this approach. I have read various development threads discussing how a focus and/or a blur directive should work. The main debate seems to boil down to a disagreement between essentially adverbs. Specifically 'on' and 'while'. The latter assigns a state indicator that can be monitored to determine if an element is currently blurred or focused. The former, which is the approach the following example will use, follows the native browser event listeners for firing when an event occurs.

No comment yet.
Scoop.it!

Test-Driven Development with TypeScript

Test-Driven Development with TypeScript | JavaScript for Line of Business Applications | Scoop.it
Set up a TDD environment for test applications by choosing and integrating a toolset that works with Visual Studio. It's not a completely satisfying solution, but it's enough to start building an application.

But, to do TDD with TypeScript, I need two tools: one for creating tests and one for running those tests. Currently, out of the box, Visual Studio supplies neither of those tools for TypeScript. To begin with, TypeScript doesn't define classes in the same sense that C# or Visual Basic do. You can't, for instance, reference a TypeScript object from C# or Visual Basic code. At the very least, this means I have to write my test code in JavaScript. I'd prefer, of course, to write my test code in TypeScript.

No comment yet.
Scoop.it!

Single Page Web Applications: JavaScript End-to-End (The Hard Stuff)

Today, we have the Single Page Application. Most web apps are now in the browsers themselves, and the web is becoming fluid, comfortable, and accessible from any device.

In this talk from HTML5 Dev Conf 3, Josh Powell and Mike Mikowski of snaplogic, teach you their SPA design approach, and then start exploring new techniques like structured JavaScript and responsive design. They also cover server-side JavaScript, NoSQL data stores, and new JavaScript frameworks.

No comment yet.
Scoop.it!

Ditching jQuery for Vanilla JS

Ditching jQuery for Vanilla JS | JavaScript for Line of Business Applications | Scoop.it

One of the benefits of a framework like jQuery is that it smooths out all of the weird browser inconsistencies you might run into. But, all that abstraction and extra code adds a lot of weight and latency to a site.

Rather than trying to provide the same level of functionality for older browsers, I took a progressive enhancement approach to development. Older and less capable browsers get a basic experience. Newer browsers that support modern APIs get an enhanced one.

To be clear, I’m not advocating dropping support for older and less capable browsers. They still have access to all of the content. They just don’t always get the same layout or extra features.

No comment yet.
Scoop.it!

Ground Javascript Framework

Ground Javascript Framework | JavaScript for Line of Business Applications | Scoop.it

Create advanced web applications based on the latest technologies using a logical and light-weight framework. Built to provide seamless realtime client-server synchronization and complete offline support.

In ground, most of the application logic is moved from the server to the client, whereas the server acts mostly as an scalable, efficient distributed storage and synchronization controller.

It includes also some rather useful features such as a hierarchical routing system, an undo/redo manager, property and declarative bindings, reference counting and automatic synchronization between clients and servers. It is design to always deliver high performance and low memory consumption.

Ground is written in Typescript, for modularity and stability and is suitable for both javascript and typescript projects.


No comment yet.
Scoop.it!

MEAN SEO - Judo.js node module for static content creation

After implementing my own solution for creating snapshots, I decided to create a node.js module to help others out too.  Judo.js is a node module which is meant to help users generate sitemaps & HTML snapshots for their sites.  The basic idea is that you describe your URLs via a configuration object to Judo and it will take care of the creation part.  Some of the nice features of Judo is that you can configure the freshness of the snapshots per URL.  This makes sense when you have a lot of URLs for your site.  You may only want some snapshots to be re-generated monthly, but maybe others need to be re-generated daily.  Another nice feature of Judo is that you can have it generate one snapshot for a given URL, but then generate multiple HTML snapshot files from it.  This can help save time when you have duplicate URLs pointing to the same content.

No comment yet.
Scoop.it!

Cross-Browser Asynchronous JavaScript Script Loading

Learn how to asynchronously load a JavaScript file and set up a reliable success handler.

While it is perfectly normal to have one or more JavaScript tags in your markup as prerequisites to your code, there may be situations in which you want to avoid this.

My philosophy is: my script provides a certain “chunk” of functionality. Whatever external resources my script depends on are my script’s problem and will be handled accordingly. As often as possible, I’d like the consumer to simply choose to use or not use my script.

No comment yet.