Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not liking all that html/js mixed together in every single example...

Each to their own! :-)



Hi there, that's actually something I like about Agility, but I will soon add support for HTML templates outside of JS objects.

PS: You can already skip in-object CSS.


I'm interested in your preference for HTML in JavaScript, what is your rationale?


First, I don't have to keep looking for ids/classes across multiple files when I'm maintaining/modifying an object. This makes maintaining an object that much easier.

Also, because Agility allows me to refer to the root element of a view as the selector "&", I don't have to worry about maintaining that additional id/class. This becomes especially useful when you have many MVC objects (as most projects do), each with their own root element. Suddenly you have eliminated dozens of unnecessary ids/classes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: