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

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: