How do we beat AngularJS in the developers mindset?

I’d just like to say (completely off topic): after I said I hated ruby/rails, I remembered that people usually love what they hate. I took the plunge and several days in … I do in fact love it. Wow, I can’t believe I just said that.

1 Like

I do like both Ember and Angular, but I would like to see a little less bias towards Angular for every use case. I have noticed that in my day talks that Ember is brought up more because of IE8. It would be great if I can point to people that are new or on the fence something that entices them to use Ember. So far what I have tried to show usually ends up with more questions, making them have doubts.

My colleagues all consider Ember as some framework used by product companies. The ember website calls ember as a framework for ‘ambitious applications’.

My job is writing what I consider disposable mobile web apps for the enterprise(I honestly don’t see them using it beyond 16 months). There isn’t any information on Ember’s usage in the Enterprise. Im not even sure if Ember is suitable for mobile apps with less than 5 pages. Its hard to convince senior devs to consider Ember. We end up always having to go with Angular or Backbone + Marionette and Sencha Touch at times.

People tend to see Ember as a really advanced framework and need a considerable investment in time to learn. Its ok if you get to work with it for at least 1 year but not when you need to work on different stacks every 3-6 months.

My suggestions,

  1. Create a book like https://github.com/addyosmani/backbone-fundamentals. So the book can always be updated. Better than printed books I guess.

  2. Create some learning materials for some of the new concepts introduced by Ember like the run loop. Some thing thats dumbed down a lot for inexperienced developers.

  3. Market the framework for ‘less ambitious apps’.

1 Like

If you make the investment to learn ember, I promise your development time will be Much Faster than angular or backbone. At least in my experience. But an online updated book would be epic.

I’ve watched this topic with interest and the word “test” appears only once. This is the entire reason I simply can’t use Ember - it doesn’t seem designed for testing. By which I mean, that I cannot see how to use TDD to drive the development of an Ember app, especially when Ember Data is involved. Stack Overflow is filled with out-of-date info and everything I’ve tried from the official docs to here to random blog posts—testing just doesn’t work. I fee like I would need to have very deep knowledge of the framework to not only interpret the errors I’m seeing, but to know how to write a test in the first place. Acquiring this knowledge will be difficult and time-consuming.

I don’t mind tweak-and-reload for messing around at home, but as a software professional, I can’t ship untested code, and I cannot rely on selenium-type tests as they are incredibly brittle, very flaky, and quite slow.

I hate to complain without a proposed solution, but since no one has mentioned testing or TDD in this post, I wanted to provide this perspective.

4 Likes

Ember is very suited to testing. There is a guide on the website along with the massive test suite ember itself uses which you can look to for examples. I have never had a problem in this regard building fully TDD ember apps. Ember Data has a fixture adapter built in to allow easy testing, although I personally prefer to use jQuery mockjax for more realistic test cases. Where in particular are you having these problems?

2 Likes

I apologize for not having more specifics, but the stuff in the guide just didn’t work at all. Configuring the fixture adapter in my test environment didn’t didn’t work, either. Also note the “the framework has tests” isn’t the same thing as “the framework is designed for testing”. Here are things I was trying to test that I couldn’t even figure out how to get started:

  • create controller, feed it data, assert routing
  • create a model that uses ember data, seed it and verify that its composite attributes were correct
  • simulate error from server, assert that it’s handled appropriately by my code

If I had to guess, the main source of my problems was that ember data makes things async that would not be were I just using regular models, and the test harness didn’t seem to be able to deal with that. I tried many different techniques based on blog posts and internet searches and none worked. This is a total guess, because the feedback I get is—in typical JavaScript fashion—misleading or unhelpful.

To step back a bit, take a look at the Angular tutorial. Ever step of the way, you learn about one part of the framework and then you see how to test that code. It’s clear that they framework was designed to encourage testing, and it’s treated as a first-class concept. Also, compare to Rails - Rails provides a very sophisticated DSL for creating an application, but each concept is easily testable, due to direct support from the framework. Imagine trying to figure out how to test a Rails controller without ActionController::TestCase. That’s what testing Ember feels like to me.

Perhaps Ember does have testing as a first-class concept and was designed as such. I can’t say, because not borne out in any of the documentation or tutorials, and I haven’t seen a consistent narrative about how to do it.

I wasn’t saying one implied the other, even though both are true. I was pointing out that there is a huge set of examples of testing ember code that you can draw from if you wish.

This is definitely a documentation issue, because I have found ember very amenable to TDD and had none of the problems you describe. The large reliance on dependency injection makes it very easy to precisely setup tests, and the test helpers described in the testing guide allow very easy testing in the presence of async. In short, I’ve had pretty much the opposite experience to you have.

I have also not found any problems configuring the fixture adapter or following the testing guide - if you follow it and it doesn’t work, I urge you to file a bug report (GitHub - emberjs/website: Source for emberjs.com) and the guide will be fixed.

These things are very easy to do and work great. I think we just need to improve the docs.

Could you point to any example of testing some of the things I’ve outlined? The stuff in the testing guide a) is for integration tests only and b) didn’t work for me. The only production tests I’ve seen—in Discourse—don’t work for me because they are not using Ember Data (insomuch as exactly replicating what they did in my codebase didn’t work).

Again, I apologize for not having specific error messages, but typically “didn’t work” means “my code was clearly not executed, yet I got no error” or “undefined is not a function, with no stack trace”.

But, to come back to the topic of this thread, the value proposition here is questionable, even in the best case. My best hope of an outcome to issues around testing and TDD is that you point me to something I didn’t find via Google that also happens to work for me. With something like Angular, this is an issue I know I won’t have to fight with, and one less point of friction not just to getting started, but also to fielding a production application.

3 Likes

This reminds me of trying to learn piano after knowing the guitar for a decade. The simplest things can be frustrating when you know how to do it on the other realm.

I’m new to the community, but already impressed with the foresight of the framework, the Getting Started guides on the site, and the examples in the community. But…

To me, it seems like Ember has changed so quickly, that much of what I find online I worry is out of date, or have no idea if they represent best practices or if it’s just someone hacking together a solution. If the great content could be curated and linked as an officially-approved set of examples, along with status per revisions, reviews per conventions, etc. that would increase the level of confidence that developers could have when spending the time to understand and adapt them.

I am primarily a Rails guy, and the JS I’ve had to hack together in the past made me cringe even then. I’m so happy to see a framework that’s developed by JS experts, so I know I won’t stray. I personally like the Rails examples, but maybe something like todomvc.com done using Ember but on different backends, with different contributors focusing on their favorite backends. Or better yet, maybe a blog app, something with more of the boilerplate that we’re all going to need in our apps.

That said, I’m building my first ember app and am amazed how nicely it works, just a little frustrated that it takes me so long to find that one line of code that brings so much functionality to life.

Hello!

I am a Angular.JS dev but I think I can share my point of view.

First, please, stop that silly behavior of trying to trash Angular when possible. I don’t say it in a wrong way, but I am tired of jokes about interpolations, scopes, transclusion and stuff like that. This concrete thread is based on opinions of how to make Ember better, not to point what sucks in angular. The idea is making ember strong by its own, not by criticizing the competence. Or even maybe not thinking about angular as a competence at all or even ignoring that Angular exist can help (I say this in all my seriousness).

Said that, I have my opinions of what I heard on the internet (I am very neutral, I like everything).

More articles/doc/whatever about Ember in other platforms. People seems to be moving more toward node and less toward Rails. We have a lot of tutorials in angular with node in the title. That could help you too. And if that tutorials includes ember data on it, much much better.

The problem with beta tutorials now broken can be resolved with… more articles. You need people willing to write about ember, and better if is not hello world anymore. Component articles, more complex view, model tips and tricks… (The cookbook was a awesome idea btw).

The steep curve, meh, I don’t think anybody is afraid to learn, but I agree that more doc always help (what I just said in the last paragraph).

Books like the one by @joachimhs are awesome options (I bought it a couple of months back, I promise I will read it also :P).

I think that the thing that Angular is backed by Google is stupid. I mean, I have a lot of angular dev friends and except the core devs, none are paid by Google nor using Angular because of Google. Google support is good for the core devs that gets paid for work on it, but I think that Ember is at the same level that Angular, just different (not wrong or good, just different).

Companies wanting to do Ember work. That is harder, if Angular sounds more in the Internet, they will prefer it. If you could get your community to make more stuff, that will help a lot.

Said that, please keep the hard work, Ember is awesome :slight_smile:

7 Likes

Going through this thread, I’m seeing a lot of people asking for more docs. The community has been putting a lot of effort into the Guides, but we can always do better.

Where are the gaps?

Where should we focus on?

What are the Guides missing?

Hi @bakura I totally understand what you mean with the feeling of ember giving away the feeling of being too tied to rails. And I think that was true especially at the beginning but I am working with Laravel + Ember.js and especially the latest app we are working on has turned out to be a breeze due to this very library:

https://github.com/rtablada/eloquent-ember

I am still not a 100% happy with the complete workflow, but we are there 95% and for the next project we’ll be at 100%. What I think is so awesome about ember, once you actually get to understand it, really complex things can just be 5 lines of code and you know which places they belong to (though the question does sometimes pose, should this be now in the router or the controller, but that’s never been a really big deal once you understand it a bit more.)

1 Like

@tarasm First of all, I have to say I love the guide section, this is usually my number one place to go, but over the last week I have seen two common scenarios that could be included imo. One is showing the ActiveModelAdapter and how it changes the expected JSON response. I only found that by coincidence. Maybe another JSON example how ember-data expects multiple models (http://emberjs.com/guides/models/connecting-to-an-http-server/ only shows it for one model), which I think would be especially useful for beginners.

And what I just did a couple of days ago, implementing a ‘Load more…’ button using store.filter, which after going through a couple of threads as well as the API turned actually out to be surprisingly simple.

I would also be more than happy to provide some help.

Oh and one thing I am just thinking about, that could be really useful, a site how to integrate ember/ember-data with other non-rails frameworks. It doesn’t have to be something highly complex, but maybe just links to libraries or project-templates that make it easy to integrate ember-data for example with Laravel, Node.js, etc.

Thanks for showing me how you do it in Laravel. I definitely took a more complex approach in ZF2 :D. But yes, it definitely works.

I really feel the same about Ember, especially coming from ZF2 which is a framework that is entirely based on configuration rather than convention (it gives you sooo much flexibility but also a tons of config file to write). The nice thing is that using Ember gives me some idea that I could bring to ZF2 to make it easier to use :).

@GlobeCoder if the sprint for Ember 1.0 is any indicator, then we should see a lot of this kind of documentation be prepared when Ember Data reaches 1.0. In the mean time, there are some resources that are available in unofficial capacity. TRANSITION.md is very helpful in showing how to customize Ember Data. This app example from Yehuda Katz is helpful in general description of how to think about the application.

Most of the people in Ember community write about what they know. Unfortunately, I don’t know many people who are using PHP or even Python for that matter. If anyone has experience with getting both to work together, I’m sure the community would appreciate if they share their knowledge.

1 Like

I’m seeing a lot of gaps regarding syntax and helpers which are available in Ember but not explained in the Guides. A good example came up this morning, when @alexspeller showed us some code including property brace expansion. We said, “cool, but WTF is this?” and he linked us to the release notes announcement… which is cool and all, but not documentation.

@flashesofpanic do you have any other examples helpers/syntax that could use documentation?

1 Like

I’m very new to Ember and went through the whole Angular vs. Ember dilemma stated here. In the end after trying out both there was something about Ember that just made me smile when I was able to get it to do what I wanted (as everyone mentioned there was and still is a very steep learning curve). I developed an App 5 months ago to get my hands dirty with Ember, I just went back to it today to start a new project and see what I did and I have no problem understanding the layout of my application (this would have never happened in the past without Ember where my code would have made no sense to me 5 months later). I previously used JavascriptMVC fairly extensively (prior to that was just plain old jQuery and my own organization), prior to that was PHP using CodeIgnitor. I’ll try to keep it very short and to the point:

  1. Getting Started Guide needs a Non-Ember Data example The official “Getting Started” guide makes heavy use of Ember Data, but Ember Data (by your own admission) is not production ready. The guide needs to include the following:
  1. *** Advertise the JSON API *** I just stumbled across the JSON API spec and it gave me a warm fuzzy about where the Ember Data folks are trying to go. This should be front and center in the Ember Data docs. JSON:API — Latest Specification (v1.0). (Apologies if it is front and center but I never saw it previously). (It seems like this might not be advertised since the RESTAdapter is not actually using the JSON API??).

  2. *** Too much Rails Emphasis especially with Ember Data *** I’ve never used Rails (currently use Node.js) and just seeing Rails, Rails, Rails everywhere makes you feel like you aren’t supposed to use Ember if you don’t use Rails (I know this isn’t true but I’m pretty sure it still makes people feel that way)

  3. *** Incorrect Legacy Info/Docs *** Can’t really fix this but there are lots of old blog posts for old versions of Ember that are just wrong and don’t work (this has gotten much better over the last 5 months since Ember hit 1.0.0). I think you just have to wait this out until the old stuff goes away in google searches.

  4. *** Way more Examples of Integration with Front End Frameworks *** It’s very confusing to know how to integrate extremely popular front end frameworks (Bootstrap, JqueryUI, Jquery Plugins, Foundation etc. etc.) and is probably one of the first stumbling blocks for people. There should be official documentation on best practices with lots of examples.

  5. *** Ember Cookbook is Great, Make it Bigger *** The hardest thing with Ember for new people is never knowing if what you’re doing is “right”. I always have this feeling that maybe I’m not using the framework properly because it’s so different from other things I’ve used. I really like the cookbook in the official guide because if I see it there I can assume it’s being done the “Ember Way”. In addition, the cookbook examples are short and sweet so they are easy to go through and/or find what I need. Maybe make it easier to suggest a recipe topic that someone else can create. Right now this is being done with a pull request?? Seems a little much just to submit a few lines of text asking for a recipe.

4 Likes