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

Ionic Framework, Angularjs & PhoneGap Build- The Awesome Threesome!

Ionic Framework, Angularjs & PhoneGap Build- The Awesome Threesome! | JavaScript for Line of Business Applications | Scoop.it

This is a getting started post on Ionic Framework & deploying the started template to PhoneGap Build.

When I read this article, I was pretty convinced that jQuery mobile is really killing PhoneGap & its abilities. jQuery mobile is actually awesome with its cross browser support & loading pages via Ajax, yada yada yada. But yes this is an overkill for a mobile app. We know what we are dealing with when we develop a hybrid app for a mobile. So why not use a user interface framework that will have only patches wrt mobile browsers!?


Contents:

* Introductions
* Set up Ionic
* Scaffold our First Ionic app
* Build & Test locally
* PhoneGap Build the app
* Troubleshooting

No comment yet.
Scoop.it!

Creating Asynchronous Alerts, Prompts, And Confirms In AngularJS

Creating Asynchronous Alerts, Prompts, And Confirms In AngularJS | JavaScript for Line of Business Applications | Scoop.it

When you first get into JavaScript, using the native alert(), prompt(), and confirm() methods feels comfortable because they are "blocking" actions. This means that when those methods execute, the world stops and your code pauses until the user responds. The problem with this is that as user interfaces (UIs) get more complex and more richly designed, you often have to move to some sort of non-blocking form of these methods (such as Bootstrap modals). This can be a difficult transition. As such, I thought it would be a fun exercise to create promise-driven, non-blocking versions of alert(), prompt(), and confirm() in AngularJS so as to force an asynchronous mindset from the get-go.

No comment yet.
Scoop.it!

SailsJS Services: write more reusable code and clean up your controllers

SailsJS Services: write more reusable code and clean up your controllers | JavaScript for Line of Business Applications | Scoop.it

SailsJS Services are pieces of reusable code that can be shared by your controllers. Your business logic should live in your Service (and not in your controller!). I know I am stepping on egg shells here, but unfortunately many web frameworks have bastarized the definition of models (the "M" in "MVC") and limited it only to where database stuff happens. However by definition Models are much more than your Data Access Layer. 

No comment yet.
Scoop.it!

Working with Modules in Angular.js

Working with Modules in Angular.js | JavaScript for Line of Business Applications | Scoop.it

We can think of a module as a container for the different parts of our app – controllers, services, filters, directives, etc. Angular JS supports modules, using which we can divide the JavaScript code involved in our application. Creating modules not only helps separating the code into individual concerns but also improves unit-testability. The modules can be easily replaced by some mocks while unit testing Angular controllers.Every module should have a name, which is specified in the first parameter. Second parameter to module function is an array, which may contain names of other modules or services. If the module doesn’t depend on anything, the array can be left blank. 

No comment yet.
Scoop.it!

Deploying first SailsJS node.js app to DigitalOcean using Dokku on Mac

Deploying first SailsJS node.js app to DigitalOcean using Dokku on Mac | JavaScript for Line of Business Applications | Scoop.it

Here’s a (very) quick and dirty overview of the steps. Follow everything below in order and you should have your node.js app (optionally running SailsJS) deployed on a dokku server on DigitalOcean within a few minutes.

No comment yet.
Scoop.it!

Unit test SailsJS with Mocha and generate code coverage with Istanbul

Unit test SailsJS with Mocha and generate code coverage with Istanbul | JavaScript for Line of Business Applications | Scoop.it

Unit testing JavaScript is easy they said. It only takes a few seconds they said.

And they were right for the most part! Well, maybe seconds is an exaggeration but we can definitely achieve this with very few minutes

So you fired up your first hello world app using SailsJS, it was super simple and you started wondering if testing your app would be as simple. Soon after you realized this was not the case and much like everything else related to testing in JavaScript there is not just one right answer.

Perhaps you may have much more experience with SailsJS and have way gone beyond the hello world phase and now is time to make sure your application is reliable. Unit testing is part of the solution when it comes to code reliability.

No comment yet.
Scoop.it!

AngularJS Form Validation

AngularJS Form Validation | JavaScript for Line of Business Applications | Scoop.it

Today we’ll be looking at at the ways that Angular helps us do form validations. We’ll be talking more on forms using Angular.

We’ll focus on client side validation and using the built in Angular form properties.

Angular provides properties on forms that help us validate them. They give us various information about a form or its inputs and are applied to a form and inputs.

No comment yet.
Scoop.it!

Shaping up with Angular.js - free codeschool course

Shaping up with Angular.js - free codeschool course | JavaScript for Line of Business Applications | Scoop.it

Learn to build an application using Angular.js

WHAT YOU'LL LEARN IN THIS COURSE

Level 1: Flatlander's Gem Store
Level 2: Built-in Directives
Level 3: Forms
Level 4: Custom Directives
Level 5: Services

No comment yet.
Scoop.it!

Content Management System written with sails.js

Content Management System written with sails.js | JavaScript for Line of Business Applications | Scoop.it
cms-on-sails - CMS written with sails.js -- primarily used for my personal site
No comment yet.
Scoop.it!

Unit Testing Ember.js: Handlebars Helpers

Unit Testing Ember.js: Handlebars Helpers | JavaScript for Line of Business Applications | Scoop.it

After some research and evaluation, plus past familiarity, we decided to go with the Mocha test runner with the Expect.js assertion library. Since we were already using it in other areas, and we like the way that it integrates with Grunt to allow running tests from the command line via Grunt task, it was a no brainer.

Before we take a look at testing custom Handlebars Helpers, why not download the Github repo for this (and future) article.

No comment yet.
Scoop.it!

Using media queries in JavaScript (AbsurdJS edition)

Using media queries in JavaScript (AbsurdJS edition) | JavaScript for Line of Business Applications | Scoop.it

If you believe in responsive design you probably use a lot of media queries. That's a CSS feature which gives us the power to add something like if statements. We are able to apply rules only if the current page meets certain conditions. In this article I'll show you how I use media queries in JavaScript.

We all know how it works. We type the media query and every rule define in it is applied to the page only if the conditions are valid.

No comment yet.
Scoop.it!

How about a NoSQL database for your front-end?!

How about a NoSQL database for your front-end?! | JavaScript for Line of Business Applications | Scoop.it

In my working on various front-end systems over the years, one thing that I have continually found painful is trying to manage data. Shoving it in some random location, calling the server relentlessly, keeping state where I need not, storing it in DOM — gross. And as web applications continually get beefier and users expect more responsive, awesome interactivity, the front-end has had to take on more of the workload in working with data. Thanks to HTML5 we have the rather awesome localStorage, but I, personally, find the API to not be really ultra sweet, and what they do give us seems a little under powered, IMHO. I also find that this is not an uncommon issue and in managing data on the front-end numerous developers end up creating a bunch of boiler plate and state management all over their code and it gets messy, painful to look at, and even more painful to manage.

No comment yet.
Scoop.it!

Writing Node.js Modules Video Tutorial

In this course, Jack Franklin will teach you how to build NodeJS modules, both for your own internal, as well as for others to make use of. You'll learn how to structure Node modules, use npm, manage module dependencies, and so much more.

No comment yet.
Scoop.it!

Knockout-Kendo.js - a set of Knockout.js bindings for Kendo UI

Knockout-Kendo.js - a set of Knockout.js bindings for Kendo UI | JavaScript for Line of Business Applications | Scoop.it

A project to create a complete and robust set of Knockout.js bindings for the Kendo UI widgets.

Knockout.js is an open source library that supports declarative data binding, dependency tracking, and automatic UI updates.

Kendo UI, by Telerik, provides fast, clean, and configurable HTML5 UI widgets as part of a jQuery-based framework to support modern web development.

No comment yet.
Scoop.it!

Object Oriented Javascript

Object Oriented Javascript | JavaScript for Line of Business Applications | Scoop.it

If you are reading this I’d like to assume you know what Javascript is and the fact that it’s object oriented, what not many people know though is how to do the most common object oriented “things” in Javascript, such as inheritance, private functions and such.

The fact that Javascript is prototype based and not class based is what makes it hard to get into for most programmers. If you come from Java, PHP, C#, C++, Python, Ruby or pretty much any language you’ll find objects in Javascript are a bit unique, and they certainly are but in a good way!


* Prototypes
* Constructor Functions
* Encapsulation
* Inheritance
* Static vs Instance
* Abstracting it up a bit
* Conclusion

No comment yet.
Scoop.it!

Unit testing Sails JS: How to mock SailsJS Services in Controllers

Unit testing Sails JS: How to mock SailsJS Services in Controllers | JavaScript for Line of Business Applications | Scoop.it

Let's suppose you wrote a SailsJS Controller and a SailsJS Service. You got them to work together, and now you want to mock the service while testing your controller.

The problem is that SailsJS magically injects Services -- and Models, and everything else -- into the Controller, making it difficult to simply call HelloController.index() without lifting SailsJS. We need the dependencies to be in place (otherwise we will get a bunch of ugly undefined is not a function kind of errors.

Fortunately, lifting SailsJS in code is almost as easy as running sails lift on your command line, and that is exactly what we are going to do in order run our tests.

No comment yet.
Scoop.it!

Gremlins.js - Monkey testing library for web apps and Node.js

Gremlins.js - Monkey testing library for web apps and Node.js | JavaScript for Line of Business Applications | Scoop.it

Gremlins.js simulates random user actions: gremlins click anywhere in the window, enter random data in forms, or move the mouse over elements that don't expect it. Their goal: triggering JavaScript errors, or making the application fail. If gremlins can't break an application, congrats! The application is robust enough to be released to real users.

No comment yet.
Scoop.it!

Sails.js Social Auth example with Passport and MongoDB

Sails.js Social Auth example with Passport and MongoDB | JavaScript for Line of Business Applications | Scoop.it

Authenticate via PassportJS using Facebook or Google+ or GitHub Accounts

No comment yet.
Scoop.it!

6 Months with WebRTC - UseCases

Presentation by Arin Sime, David Alfaro, and Mariana Lopez at the HTML5DevConf May 2014 in San Francisco. Overview of WebRTC and then what we learned in our first 6 months of using it to build a webinar tool.


By visiting webinar.agilityfeat.com in your mobile Chrome browser, you will be able to rate slides in real time and see your votes cast on the screen, as well as make comments and send them to the presentation screen in real time. You will also see the current slide displayed on your mobile device, and kept in synch with our main screen. Again, this all works best in Chrome for the moment. 


Would you like to learn how to write the code we've demonstrated? Check out our book Building Real Time Web Applications. It will walk you through all of this step by step.


Want to dig into the code more? We're keeping a public repository on github that you are welcome to check out: https://github.com/asime/confdemo

Jan Hesse's insight:

http://agilityfeat.com/cs

No comment yet.
Scoop.it!

Using Resolve In AngularJS Routes

Using Resolve In AngularJS Routes | JavaScript for Line of Business Applications | Scoop.it

In a previous post about testing I mentioned that route resolves can make authoring unit tests for a controller easier. Resolves can also help the user experience.

A resolve is a property you can attach to a route in both ngRoute and the more robust UI router. A resolve contains one or more promises that must resolve successfully before the route will change. This means you can wait for data to become available before showing a view, and simplify the initialization of the model inside a controller because the initial data is given to the controller instead of the controller needing to go out and fetch the data.

As an example, let’s use the following simple service which uses $q to simulate the async work required to fetch some data.

No comment yet.
Scoop.it!

Unit testing With Qunit (Part 1)

Unit testing With Qunit (Part 1) | JavaScript for Line of Business Applications | Scoop.it

Unit testing is really the painkiller pill that must be used by every developer depending on the technology or language he used to work with.
Now imagine that you write a unit test for every function or a couple of tests for every features of your software. So any new modification of your code that may lead to a bug or regression will be found and detected on the fly.

In my case, I have to find the best unit testing framework and what I mean by the best is: easy to use, easy to understand and easy to configure. Almost every Unit testing framework provide the minimum features I was looking for, I can give the example of Mocha, Jasmine and Qunit.

Jan Hesse's insight:

Part 2: http://naimhamadi.wordpress.com/2014/05/11/javascript-tdd-using-qunit-and-karma/

No comment yet.
Scoop.it!

The Good, The Bad, and The Ugly of Sails.js, Realtime JavaScript MVC Framework

The Good, The Bad, and The Ugly of Sails.js, Realtime JavaScript MVC Framework | JavaScript for Line of Business Applications | Scoop.it

 I stumbled across Sails.js, the new kid on the block. It seemed very promising and addressed some issues that I had with Derby and with Meteor. Namely, both of those frameworks seem very tightly coupled from the client to the server and I wanted something that would provide more flexibility while still allowing me to develop rapidly. So, I decided to begin prototyping out my new side project in Sails and naturally I developed a variety of opinions to rant about. Enjoy.

No comment yet.
Scoop.it!

Ember.js Recipes: On-Demand Record Details with Ember-Data

A common source of frustration in Ember-Data is the inability to load partial records. You probably have a model in your application that only needs a small subset of its attributes serialized in the index response, but which has details that are either data-heavy or expensive to compute, so you’d rather only return them as needed.

No comment yet.
Scoop.it!

Keep Your Single-page Application Codebase Separate

Keep Your Single-page Application Codebase Separate | JavaScript for Line of Business Applications | Scoop.it

These days, we believe in a principle that guides our whole approach to building modern applications: Build a REST API backend, then treat your Single Page Application just like any other client, with a separate codebase and separate server.

This blog post explains, at a high level, how our server architecture looks, and the reasoning behind it.

No comment yet.
Scoop.it!

Creating a simple CRUD HTTP API using KoaJS

In this screencast I'm creating a very basic CRUD Api using Koa Js. I have created a couple of tests that we use to see how the API is supposed to be used and that drives us through the screencast. 
We will also talk very shortly about generators, a new feature in Javascript that is coming soon and that KoaJs is using extensively.

No comment yet.