Organizational Research By

Surprising Reserch Topic

using embedding ember js with in codeigniter

using embedding ember js with in codeigniter  using -'javascript,codeigniter,architecture,ember.js'

I am about to start developing a web application using Ember.js as front end technology and Codeigniter at backend.

The issue on which I am struck is how to embed or use ember js with codeigniter. There is a possibility of exposing JSON objects from codeigniter through webservices and use them from ember. But in this case there can be an issue of handling sessions and cookies. I don't know whether it is possible to embed ember into codeigniter and accessing data directly with some technique. I am also searching through net but not getting any exact response.

What exactly technique should be used to embed ember js into codeigniter.


asked Sep 15, 2015 by JesCasner
0 votes

Related Hot Questions

2 Answers

0 votes

Basically, it's the same thing as using any other framework with Ember.js, sorta. The problem is that Codeigniter doesn't have any built in ORM or good PDO drivers. Since it hasn't changed for years and it's still using an older version of PHP, you might have a hard time. There have been some improvements in the PHP library section with the help of Composer (though , it's insanely slow). You can leverage some of the more popular ORMs like Laravel's Eloquent.

A few searches brings this tutorial up:

This will allow you to easily expose JSON objects that come from the database with a nice API. The next thing would be to use Ember Data. By default, Ember Data uses a RESTful API. This is what you need. You would build controllers and models that follow the RESTful convention.

That's basically it. Sessions are all worked out on the server-side. But you can check out these posts explaining things about user authentication:

There isn't much difference between framework integrating with Ember, but codeigniter is one exception. I would suggest using a more modern solution like Laravel 4 which will make it extremely easier to expose a JSON API. You'll have to do some workarounds with Codeigniter.

answered Sep 15, 2015 by SabrinaGardi
0 votes

Create a RESTful CodeIgniter installation... you can find a tutorial here: RESTful CodeIgniter tutorial

Also, you CAN use PDO with CodeIgniter: Codeigniter with PDO

answered Sep 15, 2015 by PhiLUQP