JavaScript for Line of Business Applications
555.5K views | +31 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...
Scoop.it!

Building a modern bridge between Ember and Rails 5 with JSON API

Building a modern bridge between Ember and Rails 5 with JSON API | JavaScript for Line of Business Applications | Scoop.it

The latest Ember Data has been totally overhauled to follow JSON API.

The plan here is to put them to work. We’ll build a CLI-powered Ember 2.0-ready app step by step, hooked to a Rails 5 API using JSON API. Bleeding edge anyone?

We will create a simple bookstore.

more...
No comment yet.
Scoop.it!

Using JSON Web Tokens to Authenticate JavaScript Front-Ends on Rails

Using JSON Web Tokens to Authenticate JavaScript Front-Ends on Rails | JavaScript for Line of Business Applications | Scoop.it

Since those dark times, a few tools have cropped up and improved the landscape. As I mentioned before, I have recently been working on a project that I wanted to have a stand-alone front-end app for (inb4 single page apps don't work). I wanted to avoid the messes I've encountered with JavaScript-heavy Rails apps and keep Rails as API-centered as possible. Once I had a functioning back-end, I knocked together a rudimentary front-end with React using Bower to manage dependencies and Jekyll to compile it all down to a static page.

more...
No comment yet.
Scoop.it!

Introduction to Emberkit - Ember.js

mber.js and Rails code kit to get your Software as a Service application up and running in no time at all.

Uses Ember.js and Ember Data for the frontend application, and Ruby on Rails for the backend API

more...
No comment yet.
Scoop.it!

Rails + Angular / Rails + Ember

Rails + Angular / Rails + Ember | JavaScript for Line of Business Applications | Scoop.it
In this comparison, Rails expert Fernando Villalobos breaks down the difference between AngularJS and Ember.js when it comes to choosing a JS framework for Rails applications.
more...
No comment yet.
Scoop.it!

S-exps in your browser

S-exps in your browser | JavaScript for Line of Business Applications | Scoop.it

Contents:

* The front end of the pool
Enter ClojureScript
Exit Om
ClojureScript: the bad
Mori + Sweet.js = Ki
JavaScript loaders
Source map support
Macro support and speed
Sprockets dependencies
Shameless plug

more...
No comment yet.
Scoop.it!

The Top Mistakes Developers Make Using Ember & Rails

The Top Mistakes Developers Make Using Ember & Rails | JavaScript for Line of Business Applications | Scoop.it

Ember can be used as a front end to any server-side stack, but today I’m here to discuss how to avoid some common pitfalls when using it with my personal favorite web framework: Ruby on Rails. Though Ember and Rails make a great pair, it’s easy to get a little lost in the early days as you find your way around. Well, I did, anyway. This is your chance to learn from my mistakes so you can get to making your own mistakes a little more quickly.

Shall we begin?

more...
No comment yet.
Scoop.it!

A Rails Enthusiast’s take on MEAN.js

A Rails Enthusiast’s take on MEAN.js | JavaScript for Line of Business Applications | Scoop.it
John looks at AngularJS and the MEAN stack as an alternative to Ruby on Rails as a productive stack for building typical web applications.

To dive into MEAN, what better way for a Rails fan to get up to speed than by following the path of the famous demo, and creating my own blog application with MEAN.js. A more up-to-date version of the Rails blog exercise, without the “Uoooops,” is the Rails getting started guide. Our journey here will mirror this guide and summarize my comparison with Rails.

more...
No comment yet.
Scoop.it!

Benefits of Protractor in a Angular + Rails API application stack

Benefits of Protractor in a Angular + Rails API application stack | JavaScript for Line of Business Applications | Scoop.it

By splitting the development of the frontend and the Rails backend we could distribute the work over two development teams and keep the application as a whole very extensible.

In my opinion this is the best approach when you split your frontend and backend however not everyone shares that opinion. In this blogpost I will cover why we believe that testing the apps separately and thus mocking the API requests is the way to go.

more...
No comment yet.
Scoop.it!

Creating A Metrics Dashboard With Ember.js, Bootstrap, and Rails

Creating A Metrics Dashboard With Ember.js, Bootstrap, and Rails | JavaScript for Line of Business Applications | Scoop.it

Today we’re going to assemble the first pieces of this app by creating a Rails server, an Ember.js App and some basic Bootstrap styling.

We want to be able to expose all of our stats from various internal and third party services with a consistent API so this server will primarily handle authentication and data transformation. This server could just as easily be written in Node.js or any language/framework, but for now we’ll stick with Rails.

Jan Hesse's insight:

Part 1: https://medium.com/p/b11cf922408d

Part 2: https://medium.com/p/82dc33390fdf

Part 3: https://medium.com/p/2f9140df5690

more...
No comment yet.
Scoop.it!

Server-rendered React components in Rails

Server-rendered React components in Rails | JavaScript for Line of Business Applications | Scoop.it

If you render a React component with the same data, it will always return the same result. It makes absolutely no difference whether you do that rendering on the client or the server.

That brings us to the official front end buzzword of 2014: Isomorphic JavaScript.

The Holy Grail. The united UI layer. Serve up real HTML on first page load, then kick off a client side JS app. All without duplicating a single line of UI code.

React makes this really easy if your back end is Node.js:

more...
No comment yet.
Scoop.it!

EmberJS with a Separate Rails API

EmberJS with a Separate Rails API | JavaScript for Line of Business Applications | Scoop.it

We built our API and our JavaScript application as two completely separate applications. We had one repo that held a very basic Rails application with Ember on top and another repo that held the API built in Rails.

There are a lot of front end development tools that will allow you to build an EmberJS application using CoffeeScript, Sass and the other tools that we like to use on projects. After evaluating them we settled on using a basic Rails application instead; primarily for simplicity. The project had a short timeline and we didn't want to have to worry about another tool that we were not familiar with. In the future I would love to try building an Ember UI using a front end tool such as Tapas with Ember but we didn't have any complaints with using Rails in this case and it made our stack a bit simpler to use.

For Ember in our Rails app we used the ember-rails gem. It provides a basic folder structure for your Ember application inside the app/assets/javascripts directory. The directory structure is similar to a Rails application as you can see below...


more...
No comment yet.
Scoop.it!

From Rails to AngularJS

Unfortunately, building a prototype is always the easy part. Doing the whole port has had a bunch of problems I did not take forsee. I put in a proposal outlining the goals and how to reach those goals on December 4'th, 2013. As of writing this, it's February 1'st, 2014, and we have still not managed to remove all of our Rails views.

Thankfully, we made this a progressive transition, which meant we could roll out changes progressively. The basic idea is that we'd convert one page at a time, and push it out to our customers. We weren't exactly perfect on this, and ended up taking a few weeks before we rolled anything out, but as of right now, we're at the point where we can move pages from Rails to AngularJS very easily.

The ultimate goal is to get Rails to just handle our API, and the angular app can handle the console experience; it also means removing all of our assets from Rails.

I'm going to share how our development workflow looks, some of the issues we encountered, and how we solved them.

more...
No comment yet.
Scoop.it!

Ember.js with Ruby on Rails

Ruby on Rails MVC Is Not the Same as Ember.js MVC

One of the most confusing parts for people coming from Rails (or any other backend web application framework) it’s that what Ember.js calls MVC is very different to what other frameworks call MVC.

The following are the steps mention by Yehuda and the components in charge of each in both Ruby on Rails and Ember.js...

Jan Hesse's insight:
  1. Ruby on Rails MVC Is Not the Same as Ember.js MVC.
  2. Getting Started With Ember.js and Ruby on Rails: Ember Appkit Rails.
  3. Building an App for my mom with Ember Appkit Rails..
more...
No comment yet.
Scoop.it!

React.js - A guide for Rails developers

React.js - A guide for Rails developers | JavaScript for Line of Business Applications | Scoop.it
Integrate React.js with Ruby on Rails to build web apps

Summarizing, the application will behave as follows:

  • When the user creates a new record through the horizontal form, it will be appended to the records table
  • The user will be able to inline-edit any existing record
  • Clicking on any Delete button will remove the associated record from the table
  • Adding, editing or removing an existing record will update the amount boxes at the top of the page
more...
No comment yet.
Scoop.it!

How to build an Ember App with Sinatra

How to build an Ember App with Sinatra | JavaScript for Line of Business Applications | Scoop.it

I’ve been less than enamored with Rails lately. It’s not that I don’t love the framework, I’ve just been spending more and more time wanting to build more front-end heavy applications using an MVVM like EmberJS and Rails is just way to much framework for an API-only application. Problem is I still love Ruby and ActiveRecord and I’m honestly not a fan of all the callbacks in Node/Express. Enter Sinatra, or more specifically activerecord-sinatra.

My goal is to convert my Password manager application Passweb from a Rails app to a Sinatra/EmberJS app. This is a fairly simple project with only a few models so it shouldn’t be too hard to replicate in your project.

Jan Hesse's insight:

http://lowbrowcoder.me/2015/03/22/how-to-build-an-ember-app-with-sinatra-part-1/

http://lowbrowcoder.me/2015/03/22/how-to-build-an-ember-app-with-sinatra-part-2/

http://lowbrowcoder.me/2015/03/24/how-to-build-an-ember-app-with-sinatra-part-3/

more...
No comment yet.
Scoop.it!

Rails + Ember.js (with the Ember CLI): Redux, Part 1: The API and CMS with Ruby on Rails

Rails + Ember.js (with the Ember CLI): Redux, Part 1: The API and CMS with Ruby on Rails | JavaScript for Line of Business Applications | Scoop.it

Get this party started. Let's build an API and CMS to expose our data layer to the world.

Ember.js has a gang now. It's got a lot of characters and it could be quite daunting for someone without any knowledge of how the different pieces fit and play along. Some call this Ember's "learning cliff". Ember's "learning cliff" is tough, but it instills a bit of what makes server-side frameworks like Rails so nice...

Jan Hesse's insight:

https://devmynd.com/blog/2014-7-rails-ember-js-with-the-ember-cli-redux-part-2-the-front-end-with-ember-and-the-ember-cli

more...
No comment yet.
Scoop.it!

KnockoutJS and MVVM

KnockoutJS and MVVM (Comes with a sample application) - It's a beginner's guide that discusses about Knockout in particular and MVVM pattern in general. Knockout is a very cool piece of technology that makes your view code less cluttered. This ppt reaches every (not all :-) detail of Knockout. By following this ppt you'll surely be in position to get started with Knockout on your own projects. 

more...
No comment yet.
Scoop.it!

How to Wire Up Ruby on Rails and AngularJS as a Single-Page Application

How to Wire Up Ruby on Rails and AngularJS as a Single-Page Application | JavaScript for Line of Business Applications | Scoop.it

I wrote this tutorial because I had a pretty tough time getting Rails and Angular to talk to each other as an SPA. The best resource I could find out there was Ari Lerner’s Riding Rails with AngularJS. I did find that book very helpful and I thought it was really well-done, but it seems to be a little bit out-of-date by now and I couldn’t just plug in its code and have everything work. I had to do a lot of extra Googling and head-scratching to get all the way there. This tutorial is meant to be a supplement to Ari’s book, not a replacement for it. I definitely recommend buying the book because it really is very helpful.

more...
No comment yet.
Scoop.it!

Rails + Angular / Rails + Ember

Rails + Angular / Rails + Ember | JavaScript for Line of Business Applications | Scoop.it
In this comparison, Rails expert Fernando Villalobos breaks down the difference between AngularJS and Ember.js when it comes to choosing a JS framework for Rails applications.


Contents:

1. Introduction
2. Single-page applications and 'modules'
3. Installation process
4. Project setup
5. Turbolinks
6. CSRF token
7. Consuming a REST API
8. JS minification
9. Summary

more...
No comment yet.
Scoop.it!

Rails and React II: A real use case

Rails and React II: A real use case | JavaScript for Line of Business Applications | Scoop.it

Before continuing, I will like to share a very simple application I have created as the result of what we are going to achieve after finishing this post. It consists of:

  • Person model.
  • HomeController with just one index action, the root route of the application and where the React components render and are in charge of creating search requests and displaying the results to the user.
  • PeopleController which just renders the JSON result of the requested searches.
Jan Hesse's insight:

http://rails-and-react-ii.herokuapp.com/

more...
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
more...
No comment yet.
Scoop.it!

Building an Ember App with Rails

Building an Ember App with Rails | JavaScript for Line of Business Applications | Scoop.it

This series will take us through building and structuring an application with an Ember front-end built with ember-cli and a Ruby on Rails backend. We'll discuss project structure, testing, and deployment to Heroku.

During the course of this series I am going to re-build the Boston Ember website.


  • Getting setup with our tools
  • Setting up our project
  • a typical Qunit test suite with some JSHint tests 
  • Navigation
Jan Hesse's insight:

http://reefpoints.dockyard.com/2014/05/08/building-an-ember-app-with-rails-part-2.html

http://reefpoints.dockyard.com/2014/05/09/building-an-ember-app-with-rails-part-3.html

more...
No comment yet.
Scoop.it!

Ruby on Rails MVC is not the same as Ember.js MVC

Ruby on Rails MVC is not the same as Ember.js MVC | JavaScript for Line of Business Applications | Scoop.it

One of the most confusing parts for people coming from Rails (or any other backend web application framework) it’s that what Ember.js calls MVC is very different to what other frameworks call MVC.

To understand what MVC is in both frameworks I recommend watching Yehuda Katz presentation: A tale of two MVC’s.

Instead of talking about MVC, Yehuda proposes an unified model for GUI programming which is composed by a series of steps and then explains how different frameworks handle each step.

The following are the steps mention by Yehuda and the components in charge of each in both Ruby on Rails and Ember.js...

Jan Hesse's insight:

http://blog.abuiles.com/blog/2014/01/31/getting-started-with-ember-and-ruby-on-rails-using-ember-appkit-rails/

http://blog.abuiles.com/blog/2014/02/07/building-an-app-for-my-mom-with-ember-appkit-rails/

http://blog.abuiles.com/blog/2014/02/21/router-routes-and-templates

http://blog.abuiles.com/blog/2014/04/14/handling-errors-in-ember-dot-js-and-ruby-on-rails/

more...
No comment yet.
Scoop.it!

Building a Single Page Web App with Grails and DurandalJS

With the increasing prevalence of JavaScript and JSON you can pretty much find a lot of framework choices out there that covers both points even if you are a front-end developer primarily knowing only JavaScript. As for me, my roots are in Java server-side development. I do write JS for front-end development but I am not as comfortable to structure and write JS to develop server-side code. If you're like me, then what's the solution?

What're we making? In honor of TodoMVC we are going to build a Todo app which enables us to post a list of things to do. Just simple enough to give a taste of what these frameworks we're choosing are capable of.

Jan Hesse's insight:

http://blog.everyday.web.id/building-a-single-page-web-app-with-grails-and-durandaljs-part-2/

more...
No comment yet.
Scoop.it!

Getting started with Ember.js and Ruby on Rails: Ember Appkit Rails

Getting an Ember project started is really easy thanks to EAK, it already puts the basic structure of our apps so we can focus on what we like the most, developing.
But what if I want to use Ruby on Rails and Ember? How can I get all this stuff to play nicely?.
There are three options:

1. Keep two separate projects, a Rails app (probably using rails-api) and an EAK app.
2. Use the ember-rails which basically puts Ember’s source files in your project and compiles your templates.
3. Use Ember Appkit Rails :).

more...
No comment yet.