Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ember.js backend setup

Tags:

ember.js

I'm currently wrapping my head around Ember.js and converting a previously written PHP application, that application made use of of mysql database and some basic PHP code to display results. There was a whole bunch of javascript to create interactions, but all that code quickly became unusable.

I have most of my frontend stuff done in Ember.js and started thinking about how I should get started with the backend. There's not that much data involved, uses can request data, create new data, change data or delete data.

There would be a small part where I would like to get data in real time.

I've looked around on the web, but since it's all relatively new, there's not that much information out there.

like image 685
woutr_be Avatar asked Mar 22 '23 02:03

woutr_be


1 Answers

I would recommend implementing a RESTful API in PHP and hooking your frontend up with that API. You can use your ember code to handle all user interaction, and then when some actual data needs to be changed send a request to your backend.

I have made apps in the past using this strategy with a Laravel backend which makes it very simple to set up RESTful interactions.

You can read about Ember + REST here: http://emberjs.com/guides/models/the-rest-adapter/

like image 188
berrberr Avatar answered Mar 30 '23 17:03

berrberr