AngularJS vs Ember

Tags: #<Tag:0x00007f52bfbe8930> #<Tag:0x00007f52bfbe87f0>

#141

Everywhere I see people saying, you are doing it wrong. No one tells what is correct btw.


#142

i mean really...how one sided of you. where did being objective go? you can implement any feature into angular of ember or whatsoever , which actually makes it flexible more than other frameworks. i like ember too, but i feel like it's gonna be like rails soon, boring...


#143

As someone who has looked only cursorially at Angular, Ember and Backbone, I can't say that this convinces me one way or another. It sounds like a lot of "I've written in Ember, here's why I like it better" which is cool and all, but offers no real guidance. Each of them offers something to a particular point of view for how to develop my app, but it's still a struggle to know what p.o.v. to use for an app. I suppose I'm at the point of this journey that I have to learn everything to know what to do.


#144

"For my simple apps I just use something generic like "$scope.main", doesn't need to be more complicated than that."

That sounds like you're substituting rootScope with $scope.main. Doesn't that make it impossible/difficult to do unit testing? Personally I would prefer storing persistant data into services, but each his way I guess :)


#145

Hahah great fun there.


#146

You're not alone... just thinking back 12 months makes me shiver....

#jquery #spaghetti #mess


#147

Hey, I need help.
I am working with SQL Server 2008, MVC.NET 4.0 and EF4.0 for a Single Page Application.

I have a form that has multiple dropdownlists (say 5).
The dropdown gets populated using LINQ query from the database. It returns the list as "items"

Now in the Front-end I am populating the values in the dropdownlists using ng-model="item.projectId"

Now when I submit the form, its quite obvious that the projectId will
be posted to the server due to the double-binding nature of ng-model
directive.

I want to get the selected (user selects while filling up the form)
values collectively (possibly into an array ) and send it to the
controller.cs file where there an array to consume those values and
store that in the table. Can anybody give me tips on this?


#148

One of my *VERY* favorite things is when people point out that others' opinions are opinions, as if they weren't already aware of that. It's as if you're confused.

For example, if I say, "That dog is awesome!", I don't need to append the phrase "in my humble opinion" to the end of the sentence. Simply stating that the dog is awesome implies that it is *MY OPINION* that the dog is awesome. Please, for the love of god, use your brain next time... before you speak.

That said, I think Angular looks pretty good, and I'll steer clear of Ember for now, simply based on the fact that Angular has about 2 times the following, meaning it will move and change more quickly, and ultimately shape the landscape.


#149

I've read so much meaningful information here.
As someone who's considering starting out with Angular & Ember both,
what would be the best place to start learning from scratch, that incorporates Best Practices ?
Thank You :)


#150

....anyway using AngularJS in teams is amazing. We all love it! : )


#151

100% agree with you man!


#152

Its my first time that i want to try JavaScript mvc frameworks. I worked with so many server side mvc frameworks like cakephp, zend and laravel. But i'm confused here. Seriously is mvc framework means something else here?!
I'm locking for a frameworks that clearly separate models, views and controllers. And i want to create my models by simply extending model object (the same about views and controllers).
So can anyone give me a hint that what is really different here and what my framework of choice should be?
thank you so much


#153

I hate it when JS frameworks make me extend some horrible Model base class. The fact that Angularjs allows Plain Old JS Objects objects as my model is a terrific advantage. And you do know that JS properties can be computed right with ECMASCRIPT 5 getters and setters, right ?. This way you are leverage the syntax and support of the defined language that everyone knows as opposed to narrow framework language. In other worlds, your statement: "AngularJS, functions have to be specifically demarcated." is factually incorrect.


#154

This is ridiculous! I'd use lodash instead of underscore.

:)


#155

Possibly using a pre-1.0 version was the mistake here, as it normally would be :)


#156

You suck (sorry, but you don´t understand). Learn more angularjs, angularjs sucks too, in fact anything, if the developer doesn't know how to play with it.


#157

I'm guessing you know Amber. But I can not say the same about AngularJS.

You should use $scope.$watch()
linkTo is easily implementable with $cacheFactory


#158

"What if the same Room object instance existed in multiple controllers? You’d have to have the $watch in everycontroller which would mean a lot of unnecessary recalculations. Good luck debugging issues if you take that approach! Talk about a maintenance nightmare!"

--well at times you would like to use events!


#159

function SomeCtrl($scope) {
$scope.countries = ['can', 'usa', 'fra', 'jap'];
$scope.user = {name: "Evil Trout"};
$scope.age = 34;

// Our template now can render {{age}}, {{user.name}} and a list of countries!
}

$scope is generally a view model and not model, as its only a instance which is a glue between controller and view.

you can change it to something like this:

// countries user and age could be factory object or models if you say
function SomeCtrl($scope, countries, user, age) {
$scope.countries = countries;
$scope.user = user;
$scope.age = age;

// Our template now can render {{age}}, {{user.name}} and a list of countries!
}


#160

I know angular looks simple at first but when you deep dive you will encounter so many jargon like injector, parser, compiler, factory, provider, transclude and what not.

I would say that Yes, angular is clean but before learning it you need to first stop thinking about DOM and browser principals because all that are managed by angular.