# Ember controller - what is it?

**URL:** <https://discuss.emberjs.com/t/ember-controller-what-is-it/10756>\
**Category:** Uncategorized\
**Created:** [May 23, 2016, 8:27am UTC](https://discuss.emberjs.com/t/ember-controller-what-is-it/10756 "2016-05-23T08:27:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jobsboris27](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jobsboris27/32/12385_2.png) [@jobsboris27](https://discuss.emberjs.com/u/jobsboris27)\
**Post date:** [May 23, 2016, 8:27am UTC](https://discuss.emberjs.com/t/ember-controller-what-is-it/10756/1 "2016-05-23T08:27:02Z")

</div>

I came in a new project, where people using Ember - 2.4.5 I worked in previous jobs in react.

How you are using controller, what is that? Guide in official site Ember generates more questions…

---

<div class="post-metadata">

**Author:** ![emberigniter](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@emberigniter](https://discuss.emberjs.com/u/emberigniter)\
**Post date:** [May 23, 2016, 8:34am UTC](https://discuss.emberjs.com/t/ember-controller-what-is-it/10756/2 "2016-05-23T08:34:49Z")

</div>

Basically, it is the Javascript behind a template. Any properties you use in your template, are the controller’s.

Components also have a template and a Javascript file: the idea is the same.

I voiced numerous times my desire for the concept of “controller” to be eliminated from Ember because it’s barely needed anymore and a source of confusion with beginners. Thank you for confirming my suspicion.

You may be interested in this: [http://emberigniter.com/should-we-use-controllers-ember-2.0/](http://emberigniter.com/should-we-use-controllers-ember-2.0/)

---

<div class="post-metadata">

**Author:** ![jobsboris27](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jobsboris27/32/12385_2.png) [@jobsboris27](https://discuss.emberjs.com/u/jobsboris27)\
**Post date:** [May 23, 2016, 9:26am UTC](https://discuss.emberjs.com/t/ember-controller-what-is-it/10756/3 "2016-05-23T09:26:13Z")

</div>

> Components also have a template and a Javascript file: the idea is the same. I can create in componen.js custom logic for my component?

---

<div class="post-metadata">

**Author:** ![spectras](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@spectras](https://discuss.emberjs.com/u/spectras)\
**Post date:** [May 23, 2016, 9:39am UTC](https://discuss.emberjs.com/t/ember-controller-what-is-it/10756/4 "2016-05-23T09:39:02Z")

</div>

Basically, controllers are dead. They are an empty shell that only exists for legacy reasons, and you should not bother with them in a new project.

If your template uses any properties / state, they should be extracted into a component, and the template then just instanciates that component.

---

<div class="post-metadata">

**Author:** ![efx](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/efx/32/17920_2.png) [@efx](https://discuss.emberjs.com/u/efx)\
**Post date:** [June 16, 2016, 3:58pm UTC](https://discuss.emberjs.com/t/ember-controller-what-is-it/10756/5 "2016-06-16T15:58:09Z")

</div>

@spectras Controllers are still used/recommended for some things:

1. The guides still recommend using controllers for query parameters: [Query Parameters - Routing - Ember Guides](https://guides.emberjs.com/v2.6.0/routing/query-params/)
2. searching for ‘controllers dead’ on the slack channel: [Slack](https://embercommunity.slack.com/archives/-help/p1465063860000210)
3. Folks in that channel link to this article to explain more: [Controllers are dead; Long live Controllers](https://locks.svbtle.com/controllers-are-dead-long-life-controllers). @jobsboris27 that article provides a fairly concise summary.

It seems components will subsume aspects of controllers behavior. (TLDR ‘routeable components’ [rfcs/0000-routeable-components.md at routeable-components · ef4/rfcs · GitHub](https://github.com/ef4/rfcs/blob/routeable-components/active/0000-routeable-components.md)) IMHO asking here and in slack provides the most clarity on how controllers fit in the Ember 2.X programming model.
