Hacker News new | past | comments | ask | show | jobs | submit login

I've found that using the same class name for styling and attaching behaviors to be dangerous... refactor the styling and lose the functionality, or break the tests, or disable the analytics.

I'm glad that backbone and jQuery apps are in my rear view mirror at this point.




The reason why you're finding this dangerous is because you've coupled your class names too closely with your style. Class names should describe what the content is about, and so if the class names change, that implies that the content itself is different.




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

Search: