News for hackers. Stuff that matters.
Re:Knockout v3.0.0 released by jbigelow76 on Friday October 25, 2013 @02:36PM (#6613598)
Concerning #3, I've only done one small project with Knockout and I used jQuery for ajax calls, what would you suggest in lieu of it. I'm trying to decide between KO and Angular for a larger project.
Re:Knockout v3.0.0 released by shawkinaw on Friday October 25, 2013 @06:50PM (#6615210)
I've used both and I would highly, HIGHLY recommend Angular over Knockout, especially for a large project. Angular is very modular and lets you separate your concerns nicely, while with KO I basically ended up with one mega-JS file and one mega-HTML file with a lot of ugly inline templates.

That being said, my KO education is not as good, so it's highly possible that I made design mistakes that made the project more painful than necessary. Nevertheless, I don't hesitate to recommend Angular; I normally dislike web development but Angular is quite a lot of fun to use.

Re:Knockout v3.0.0 released by ibrahima on Friday October 25, 2013 @07:44PM (#6615462)
I think the blessing and curse of Knockout as compared to a more complete framework like AngularJS is that it's incredibly easy to get started and doesn't force you into any sort of structure, but at the same time if you're not forced into a structure it's pretty easy to go down the "one mega JS file" route. I felt like AngularJS is more annoying to get started with because you have to follow its conventions but in return it gives you a nice structure to organize your code.

I also personally prefer how Angular doesn't force you to use getters or setters, although it does involve more "magic" behind the scenes stuff which can be confusing.

Re:Knockout v3.0.0 released by integricho on Saturday October 26, 2013 @03:55AM (#6616723)
It's also not fair to compare angular to knockout, check out durandal, now that's a full blown framework built over knockout and requirejs, and can match any needs.
Re:Knockout v3.0.0 released by GundersenMarius on Friday October 25, 2013 @05:09PM (#6614659)
I looked at the source code for jQuery Ajax, and saw that it is basically a wrapper for the xmlhttprequest object. So I made my own wrapper, one where I don't have to specify the same parameters every time.

But the solution we use is something completely different which is hard to explain in a single post. It is based on CQRS and provides not only a way to communicate with the server, but validation of parameters. This works very well with Knockout observables, since you can create an object once and then execute it multiple times, when the observables have changed.