Live data from Hacker News

EmberJS Confuses Me

wekeroad.com

131–140 of 142 posts

Re: EmberJS Confuses Me

#131

Yes, I too agree EmberJS always a confusing library, Following are my resaons. 1)They say it follows MVC. Its actually MVC but MVP, if you look closely at the implementation. 2)Controller job is not precisely defined. Example: Even the data validations are done at controller level not a model level So i switched to Backbone.js, which is very flexible library with tons of plugins that can be used when needed. Since im…

> Regarding AngularJS, please use it only if you are new javascript and prefer learning Angular Javascript I'm not sure that's very fair to AngularJS. I gave up on Backbone and Ember because they had too many features, then later I was comparing JavaScript MVC patterns and stumbled across AngularJS which just made sense. If what you mean by 'prefer learning Angular' is you have to understand $scope and $resource, $ht…

Yes that's exactly. you got it right,If you are JS developer, you still need to learn about "understand $scope and $resource, $http etc," features.

If you feel my comment about Angular is completely Unfair, I agree with you and will delete it. But here is my argument.

Why Angular is not Javascript:

1) The code written in Angular javascript gets compiled into javascript.

2) Tough to extend Angular and implement features that are not supported by Angular. Please Try adding new features on your own, then you will feel the pain.

3) Mixing bindings between the markup and script is not a good way to add bindings. Bindings should not be mixed with Markup (Unobtrusive JavaScript).

4) I felt Google is doing the same mistake they did with "GWT". They are not thinking in terms of issues faced by other JS developers, That is why jQuery is still pretty popular (Plugin based approach)

While developing client side app, each requirement is completely different and you really don't need a framework to address all this. But you need libraries like Backbone, jQuery ...etc as per the requirement and backed by open source . This is why, i love Backbone,jQuery ..etc

I worked on 4 applications with each having its own simplicity and complexity that uses Backbone. Never faced any issues, Community is very supportive.

If you have done R&D on JS MVC and like Angular than Backbone JS (Ember JS always confuses me too), Please continue with your work. Because there is always a nicer way of doing things in Client side :).

P.S Here is one of my project in Backbone JS (https://github.com/pradeepin2/bbquiz)

Please share your toughts, Why you prefer Backbone JS over Angular JS ? It will be very helpful.

Re: EmberJS Confuses Me

#132

Yes, I too agree EmberJS always a confusing library, Following are my resaons. 1)They say it follows MVC. Its actually MVC but MVP, if you look closely at the implementation. 2)Controller job is not precisely defined. Example: Even the data validations are done at controller level not a model level So i switched to Backbone.js, which is very flexible library with tons of plugins that can be used when needed. Since im…

Regarding AngularJS, please use it only if you are new javascript and prefer learning Angular Javascript (which is not javascript by the way) :) I am not sure you "know" javascript. If you are saying that there is an Angular version of javascript then you are terribly mistaken. Angular is probably one of the only mainstream framework that stays true to javascript. All other frameworks ( Backbone, Ember etc.. ) are th…

Very funny, LOL :). Answer these simple questions with out googling (Be honest :)) and score 80% to get a reply from me.

1) Is MVC an OOP concept ?

2) Is JS an Classical or Functional language ?

3) How does JS support Closures ?

4) What is Unobtrusive JavaScript and why its so popular ?

5) Is it necessary to add declarations in markup or templates to implement bindings in client side ?

6) Differences between Model Backed View and Markup Driven views ?

7) which should be fat in MVC model or controller ?

8) How does multiple controllers in JS MVC App are controlled?

If you answer these questions and score 80%, you will know what i am talking about.

P.S: If you want some, Come on get some :)

Re: EmberJS Confuses Me

#133
post #115

The only reason is you are in love with AngularJS. I will find someone who really hates angularJS because if we have a lot of validation, it will become a messy of ng-*. So no matter which framework we use, we should talk about real world project. Not simple usage that only exists in trying and testing. Use the framework, you love and you will make it beautiful no matter what :D

At this point, you write a directive. Your directive should be watching your model and adjusting as appropriate, rather than trying to fit everything into the provided.

Re: EmberJS Confuses Me

#134

Earlier quoted context omitted.

> Regarding AngularJS, please use it only if you are new javascript and prefer learning Angular Javascript I'm not sure that's very fair to AngularJS. I gave up on Backbone and Ember because they had too many features, then later I was comparing JavaScript MVC patterns and stumbled across AngularJS which just made sense. If what you mean by 'prefer learning Angular' is you have to understand $scope and $resource, $ht…

Yes that's exactly. you got it right,If you are JS developer, you still need to learn about "understand $scope and $resource, $http etc," features. If you feel my comment about Angular is completely Unfair, I agree with you and will delete it. But here is my argument. Why Angular is not Javascript: 1) The code written in Angular javascript gets compiled into javascript. 2) Tough to extend Angular and implement featur…

> If you feel my comment about Angular is completely Unfair, I agree with you and will delete it. But here is my argument.

I said a little, not completely, but we're all entitled to our opinions, that's why we're here :)

> 1) The code written in Angular javascript gets compiled into javascript.

I don't fully understand this - although I have only been using Angular for a few months - are you talking about my code in my controllers, views, services etc? because it doesn't seem to compile it and I can step through in browser developer tools. Or are you talking about the directives?

> 2) Tough to extend Angular and implement features that are not supported by Angular. Please Try adding new features on your own, then you will feel the pain.

Again, perhaps it's my use case, I haven't tried to add features to AngularJS but treated it as a dumb framework, adding my own libraries to perform localstorage, offline/online sync, custom view transitions etc. What have you had difficulty implementing?

> 3) Mixing bindings between the markup and script is not a good way to add bindings. Bindings should not be mixed with Markup (Unobtrusive JavaScript).

I agree with you here, however unless you're entirely building the DOM from scratch in JavaScript, you're probably going to work with HTML/CSS templating developers. I feel Angular gets the balance right of extending the templates with directives while not making the HTML generation completely opaque.

> 4) I felt Google is doing the same mistake they did with "GWT". They are not thinking in terms of issues faced by other JS developers, That is why jQuery is still pretty popular (Plugin based approach)

Maybe they are, however jQuery solved the problem of writing one set of JavaScript code which ran on all browsers, even though they all used different syntax (remember the old XHR JS?).

I see a lot of people use jQuery in a hamfisted attempt to modify the DOM without considering Layout/Reflow cycles and then they complain that their pages are clunky and slow to use.

I have an issue with client-side template engines which use handlebars/some other syntax because it's yet another templating engine that HTML developers have to learn, rather than just ... using HTML, which is already a standard.

> I worked on 4 applications with each having its own simplicity and complexity that uses Backbone. Never faced any issues, Community is very supportive.

I think that's great! It would be a very boring world if we were all the same.

> If you have done R&D on JS MVC and like Angular than Backbone JS (Ember JS always confuses me too), Please continue with your work. Because there is always a nicer way of doing things in Client side :).

I swore off writing frameworks a long time ago! :) There are a lot of people much cleverer than I, working on them, plus I much prefer working in the UI/DB area.

> P.S Here is one of my project in Backbone JS (https://github.com/pradeepin2/bbquiz)

Looks good. I think you may have a character encoding issue on one of the questions (it was the rearrange the letters one) I was getting ? ? letters in Chrome on my Mac (UK).

> Please share your toughts, Why you prefer Backbone JS over Angular JS ? It will be very helpful.

Today, I prefer Angular to all the other frameworks, but like I said I don't _want_ a massive library, I just want the routings/DOM manipulation to be handled for me and I can do the rest!

Having said that, if a new project came in tomorrow which was a perfect fit for what Backbone or Batman does, I would go for it. The right tool for the right job!

If Angular was to become a massive framework, I would probably ditch it or just use the parts I need.

I enjoy these discussions, especially when other people know more about a different library than I.

Re: EmberJS Confuses Me

#135

Earlier quoted context omitted.

Regarding AngularJS, please use it only if you are new javascript and prefer learning Angular Javascript (which is not javascript by the way) :) I am not sure you "know" javascript. If you are saying that there is an Angular version of javascript then you are terribly mistaken. Angular is probably one of the only mainstream framework that stays true to javascript. All other frameworks ( Backbone, Ember etc.. ) are th…

Before berating other people's knowledge, you should probably make sure that what you are saying is infallible. So with that I ask you: Do you realise that JS is an object oriented language? Prototypes are a means for inheritance (i.e. reuse of code), just as classes are in more traditional languages - it does not mean JS is not OO. My interpretation of the GP comment is that he means angular to JS is like jQuery to…

Uh, you were the one who suggested JS wasn't OOP-oriented. It's all JS to me. jQuery is just a function that's spits out adapter/decorator objects. Just as Angular, Knockout, Backbone, Ember, etc... are all just bloatworks that miss one critical point. We already had the V and the C pretty well covered. They're throwing a big veil of abstraction over one that was already there and worked fine. It's like webforms all over again only this time we're trying to pretend the client-side isn't already what it is rather than not there at all. And while yes, IMO, we should think of web apps as two separate apps, the client-side's concerns are localized enough that it's kind of silly to try and apply MVC to it (not that what any of this stuff does can really be called MVC or MV-whatever anyway). What is it with modern developers wanting frameworks to be the answer before they understood the question in the question in the first place? How do you even write this stuff without starting to feel a lot silly about the fact that you're just duplicating effort? Because at some point they all have to bind with the mechanisms already in place to bind to their own bindings and that's just stupid.

Re: EmberJS Confuses Me

#136

> Ember is explicitly not about "desktop apps". That's actually why Ember broke off from Sproutcore. Ember is very opinionatedly focused on building web applications that are native to the web and stick to web conventions. This may be the issue. I think most of us never really wanted to build web applications, but we were forced to do so due to browser and framework limitations. We really just wanted to build the bes…

Most of whom? I came up in JS on the client-side. Nothing has been more frustrating over the years than watching all of the inflexible bloat and tightly coupled BS people have been piling on to the client-side in order to pretend it was something that it is not. Web forms sucked ass. Everything Java tried to do to pretend the client-side wasn't there has left massive legacy potholes all over the web. Just deal with the thing as it is already and learn something new. You're a programmer for chrissakes. I might indulge in writing OS apps with webkit but I don't try to add a server to the process if it's just a local desktop app in order to make it more like what I'm used to. HTML, CSS and JS properly applied are doing 4/5ths of what these frameworks are pointlessly reinventing. All you have to do is learn them properly. The rest, keeping data loosely coupled, is basic 'duh' OOP. All the stuff that's already there works surprisingly well if you actually give it a chance. Or have you not noticed that web technology solutions are spreading like wildfire into other domains or that we can implement and modify GUIs using client-side-web-technology a lot faster than desktop OS UI developers have ever been able to? FFS, they don't deliver on that desire because it's proven time and time again to be a complete waste of time to try to.

Re: EmberJS Confuses Me

#137

Earlier quoted context omitted.

> Regarding AngularJS, please use it only if you are new javascript and prefer learning Angular Javascript I'm not sure that's very fair to AngularJS. I gave up on Backbone and Ember because they had too many features, then later I was comparing JavaScript MVC patterns and stumbled across AngularJS which just made sense. If what you mean by 'prefer learning Angular' is you have to understand $scope and $resource, $ht…

Yes that's exactly. you got it right,If you are JS developer, you still need to learn about "understand $scope and $resource, $http etc," features. If you feel my comment about Angular is completely Unfair, I agree with you and will delete it. But here is my argument. Why Angular is not Javascript: 1) The code written in Angular javascript gets compiled into javascript. 2) Tough to extend Angular and implement featur…

I've only looked at it but I know people who are into it and I'm not aware of Angular compiling anything. There's this crap they do with the "DOM-compiling" or whatever but that has little to do with rewriting JS or compiling AFAIK. That's just Google engineers wanting to feel like they have their big boy pants on when they talk about their JS framework.

Re: EmberJS Confuses Me

#138

Earlier quoted context omitted.

Before berating other people's knowledge, you should probably make sure that what you are saying is infallible. So with that I ask you: Do you realise that JS is an object oriented language? Prototypes are a means for inheritance (i.e. reuse of code), just as classes are in more traditional languages - it does not mean JS is not OO. My interpretation of the GP comment is that he means angular to JS is like jQuery to…

Uh, you were the one who suggested JS wasn't OOP-oriented. It's all JS to me. jQuery is just a function that's spits out adapter/decorator objects. Just as Angular, Knockout, Backbone, Ember, etc... are all just bloatworks that miss one critical point. We already had the V and the C pretty well covered. They're throwing a big veil of abstraction over one that was already there and worked fine. It's like webforms all…

Are you replying to the correct person? I quite clearly stated JS was OO, whilst the GP clearly says that MV* frameworks "create an illusion of OOP".

If you're not convinced of the benefits of MV* frameworks on the client, please write a complex client-side app with vanilla JS and share what you learnt.

I'm being sincere there - I've tried, and I quickly started drowning in sea of boiler plate code I'd rather not have to write. Not that it's not fun to write some of that stuff, but I'd rather be delivering value. And what happens when I create a second app? Hmm seems there's lot of similar boiler plate stuff, why don't I just abstract that into a framewo.. oh wait

Re: EmberJS Confuses Me

#139
post #122
post #105

Earlier quoted context omitted.

SEO.

Not only SEO. If you need to build a webapp that is also a web page (eg: blog, wiki, cms) -- you want a rich client, but also relatively plain pages -- and ideally you want to share code/templates where it makes sense.

Also to improve "bootup time", from request to usable: server-rendered templates can be cached, can provide at least visible content before javascript even has to run and can use beefy servers & the like. At that point the client "only" has to do the events binding wiring and it's done.

Re: EmberJS Confuses Me

#140

Earlier quoted context omitted.

Yes that's exactly. you got it right,If you are JS developer, you still need to learn about "understand $scope and $resource, $http etc," features. If you feel my comment about Angular is completely Unfair, I agree with you and will delete it. But here is my argument. Why Angular is not Javascript: 1) The code written in Angular javascript gets compiled into javascript. 2) Tough to extend Angular and implement featur…

I've only looked at it but I know people who are into it and I'm not aware of Angular compiling anything. There's this crap they do with the "DOM-compiling" or whatever but that has little to do with rewriting JS or compiling AFAIK. That's just Google engineers wanting to feel like they have their big boy pants on when they talk about their JS framework.

Yeah, I know this. You wouldn't be able to step through your code in browser dev tools otherwise.

The DOM manipulation stuff is one of the features which sold me on Angular. I love the idea that everything renders itself then responds to a single redraw event fired on the DOM so that reflow happens once rather than the hideous way many people use jQuery to do things like:

var div = $('div').appendTo('.home'); var ul = $('ul').appendTo(div); $('li').appendTo(ul);

Well done, each time you're causing layout.

Post reply on HN