JavaScript for Line of Business Applications
596.1K views | +0 today
Follow
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

Current selected tag: 'Sails.js'. Clear
Scoop.it!

Uploading a file in Sails

Uploading a file in Sails | JavaScript for Line of Business Applications | Scoop.it

Here is a new tutorial in the Sails and Angular Series. Actually i was thinking about writing a tutorial on loading effects during Sails Angular API calls . This will be handled in next tutorials.To keep you engaged today we will see how an upload function can be created in Sails.

No comment yet.
Scoop.it!

An Introduction to Sails.js

An Introduction to Sails.js | JavaScript for Line of Business Applications | Scoop.it

MVC Structure
* Storage agnostic models
* Blueprint based controllers
* Controllers are just Express Middleware
* Server side views are rendered based on the controller

No comment yet.
Scoop.it!

Sails.js Intro

An introduction to the Sails.js web framework for Node.js
Scoop.it!

Ducktyping SailsJS Core for Background Tasks via Kue

Ducktyping SailsJS Core for Background Tasks via Kue | JavaScript for Line of Business Applications | Scoop.it

My application needed to do some long running tasks, and I didn’t to block the current request/response and wait for them to finish. My application is built ontop of the SailsJS library which meant that I could use one of the many express.js libraries that add support for background tasks.

No comment yet.
Scoop.it!

Sails.js Model Validation

Sails.js Model Validation | JavaScript for Line of Business Applications | Scoop.it

What is ORM? How Sails.js attributes validation works? How to validate Array size and Uniqueness in Sails.js? If you have any one of those questions. Read on.

No comment yet.
Scoop.it!

How to Unit Test a Sails.js Model Without Lifting Sails

How to Unit Test a Sails.js Model Without Lifting Sails | JavaScript for Line of Business Applications | Scoop.it

As a quick follow-up to the previous post about creating a traditional MVC-style Web API using Sails.js, I did get some questions around how to test models in Sails, especially those that have instance methods and override their Waterline lifecycle callbacks, such as afterCreate and afterUpdate.  This post is for you guys!

No comment yet.
Scoop.it!

Working With Data in Sails.js

Working With Data in Sails.js | JavaScript for Line of Business Applications | Scoop.it

Sails.js is an up and coming Node.js framework, with a focus on freedom and smart defaults. In this article we'll take a look at some of the data features Sails provides out-of-the-box, for easily making complex apps.

Sails was created for production, it's not trying to feed you a new syntax or platform, it's a solid base, meant for creating 'client-work' with speed. The contrast may be subtle, but there are a few distinct differences.

No comment yet.
Scoop.it!

Ten Reasons To Get Your Custom Web Application Sailing

Ten Reasons To Get Your Custom Web Application Sailing | JavaScript for Line of Business Applications | Scoop.it

Let me introduce you to something called SailsJS, a Node framework built on top of Express. Yes, it’s a framework on top of a framework, like my Sunday pancake stack. This may sound like overkill, but Express is really a microframework in that it only provides very basic functionality for your app. SailsJS adds extended functionality to get your app running off the ground quickly. Getting hungry?

No comment yet.
Scoop.it!

Json Web Tokens: Examples

Imagine a web app. You browse it and you decide you want to register yourself. Then you put your credentials on a login form. The web page will send you a token via JSON. What can you do with that token? In that concrete app, you can access your user profile, your messages or even add new friends.

The same fact applies: You can access your profile but not others profiles (Imagining they are private) and you can’t certainly remove friends from your partner account :P

Now that we have an idea of how JWT works, let’s see it from a more technique perspective.

A JWToken is self-contained, so when we create one, it will have all the necessary pieces needed inside of it. What are those pieces? A token is divided in 3 parts:

  • A header
  • A payload
  • A signature
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!

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!

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!

REST API Development with Sails.js

REST API Development with Sails.js | JavaScript for Line of Business Applications | Scoop.it

One of the things that Sails.js provides us, among many other, is the REST API development easily and quickly. For this reason, I consider that Sails.js is a very important tool in the software stack.

In this article I had planned to write some sections to explain how to develop an API with Sails.js, but as the process is so easy and so fast I’m going to explain it in only one section. Running solely a couple of commands and writing solely a line of code we will be able to develop the same API that we developed in the article API REST Development with MongoDB, NodeJS and Express, but with more features...

No comment yet.
Scoop.it!

Creating An Application With Sails, Angular and Require.js

Creating An Application With Sails, Angular and Require.js | JavaScript for Line of Business Applications | Scoop.it

There are a lot of really good client-side and server-side JavaScript frameworks popping up, but there are not many in-depth articles on how they fit together. This series will look at a very specific stack and how it can be used to create an application.


Here is what we will cover:

* Starting The Sails Project
* Sails Server-Side Views
* Adding dependencies
* Angular Controllers
* Sails Models
* Syncing With The Server

No comment yet.
Scoop.it!

Bulding Realtime Web Application With Sails and Angular

Bulding Realtime Web Application With Sails and Angular | JavaScript for Line of Business Applications | Scoop.it

This is the first tutorial on creating an application with Sails JS and Angular JS. So let us get into the topic . There are two big thinks which we should notice . We have selected Sails as well as Angular, why? This will be briefed in coming tutorials :) .

No comment yet.
Scoop.it!

Tutorial: Easy authentication for Sails.js apps

Tutorial: Easy authentication for Sails.js apps | JavaScript for Line of Business Applications | Scoop.it
Learn how to quickly setup Twitter, Facebook or local authentication for your Sails.js app using Passport.js and sails-generate-auth.
No comment yet.
Scoop.it!

Ember.js + Sails.js + PostgreSQL - An end-to-end technology-chain that enables rapid web application development in a RESTful fashion

Intention behind chaining technologies like Ember.js + Sails.js +PostgreSQL is to foster the below best practices in our end-to-end web application development (i.e. both client-side & server-side development).

Best Practices
Ember.js goodies [Client-side]
  • Single-Page Application (SPA) on the client-side for improved user-experience
  • MVC pattern that structure’s + manage’s interaction between the client-side software artifacts
  • Convention-Over-Configuration to achieve productivity & understandability during development/maintenance phases
Sails.js goodies [Server-side]
  • RESTful architectural style for piping CRUD operation between client-side calls & server-side persisted datasets
  • Convention-Over-Configuration to achieve productivity & understandability during development/maintenance phases
PostgreSQL goodies [Server-side]
  • ORDBMS, so as to harness its technological maturity & operational performance

By focusing on the above goodies, our goal in this blog-post is to primarily showcase technical details on how to chain such technologies together and at the same time introduce you to the rapid web application development that are highly maintainable.

Jan Hesse's insight:

Part2: http://restfulwebapplessonsvision.blogspot.fr/2014/06/part-2-emberjs-sailsjs-postgresql-end.html

No comment yet.
Scoop.it!

An angular service to bind scope models to sailsjs models thru socket

An angular service to bind scope models to sailsjs models thru socket | JavaScript for Line of Business Applications | Scoop.it

An AngularJS service to bind Angular models with sailsjs backend models using socket.io.

What it does:

  • Creates the model inside the $scope for you.
  • Retrieves the model data from the backend using socket.
  • Watches for changes made by the user in the UI and updates the backend immediately.
  • Watches for changes made in the backend and updates the UI immediately.
No comment yet.
Scoop.it!

Boilerplate for AngularJS + Sails.js

Boilerplate for AngularJS + Sails.js | JavaScript for Line of Business Applications | Scoop.it

Modern web applications has separated front- and backend sides to use. This boilerplate present one way to make your application which have fully separated back- and frontend sides.

Main goals of this boilerplate
  • Separate back- and frontend development
  • Light frontend application
  • Authenticate with backend (possible multiple ways: local, github, twitter, etc.)
  • Power of AngularJS + WebSockets
  • Simple examples how to use these
No comment yet.
Scoop.it!

Debugging in SailsJS

Debugging in SailsJS | JavaScript for Line of Business Applications | Scoop.it

So you decided to learn SailsJS. Yay, a new framework! Crap, I don’t know anything! You’re excited and scared. It’s like having sex for the first time. Is there a book on this? There is.
Brand spanking new, updated, Sails documentation.
Well, let me tell you a couple of things that took me a couple of days to figure out because I’m new to Node and Sails.

No comment yet.
Scoop.it!

RFID-based Asset Tracking with Node.js and MongoDB

RFID-based Asset Tracking with Node.js and MongoDB | JavaScript for Line of Business Applications | Scoop.it

As the title states, we are going to discuss how to build an RFID-based asset tracking system using popular open source tools like Node.js and MongoDB. For the sake of simplicity, let’s start with a very basic model of a system addressing only a general concern of getting some information from RFID hardware and putting it in the database. Of course, in real life we would have to think about many details and additional components to take into account security, bandwidth consumption, monitoring, etc., but let us forget about it all for now and get back to these aspects in our future posts.

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!

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!

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.