Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ember.js & REST API

Tags:

From all the various examples of Ember.js, I have not been able to figure out if there is a default method in Ember.js to do REST AJAX calls. Many examples build their own interfaces for CRUD operations. I even tried to sift through the code to find any reference to AJAX calls but came up with nothing.

So, my question is, is there a default implementation of REST API in Ember.js. If yes, how do I use it? Also if, for a specific application, I want to build custom CRUD methods, where do I plug these into Ember.js?

like image 716
Nilesh C Avatar asked Dec 24 '11 06:12

Nilesh C


People also ask

What is Ember JS used for?

Ember. js is a productive, battle-tested JavaScript framework for building modern web applications. It includes everything you need to build rich UIs that work on any device.

Is Ember JS frontend or backend?

AngularJS and Ember. js are designed to be backend agnostic. It's a good rule to keep the back-end independent since the front-end is seeing a lot more growth.

Do people still use Ember JS?

Ember has been an enabler of great productivity for many teams for almost a decade and I'm sure it's going to continue to be that. It's changed and improved a lot since its first release and is now in better shape than ever with its Octane edition.

Is Ember JS any good?

Ember. js is considered ideal for long-term projects, single-page apps, web apps that have native features, apps that need a Python-like environment, and apps that have a complicated functionality integration.


2 Answers

It seems that Ember Data is what you are looking for. It is part of emberjs organiztion in GitHub.

like image 94
hectorsq Avatar answered Nov 15 '22 03:11

hectorsq


[2014-02-18: Deprecated - I no longer support ember-rest because it is overly simplistic, and would recommend using ember-data for most ember projects. Check out the Ember guides for an overview of ember-data as well as this example project ]

While learning Ember, I decided to create a very simple Ember REST library. I also wrote an example Rails CRUD app.

My goals were to keep this project as simple as possible, while still including error handling and validation. Ember REST is certainly much leaner than Ember Data and Ember Resource, and I hope you'll find the code well commented and accessible.

like image 20
Dan Gebhardt Avatar answered Nov 15 '22 01:11

Dan Gebhardt