The problem is that people don't bitch enough (or barely at all, really) about the flaws of HTML and CSS, and rather just run with the insane decisions that are made. We get a huge "design" industry that has grown up creating one-off widgets, layouts and UI metaphors, and ignores many of the best lessons from thick client applications.
Why does the separation of the html and javascript matter to you? I can see the CSS being separate, at the very least for style reuse, but why keep the functionality of a widget off in a separate file, tied only to a widget by class or id? I don't make a conceptual distinction between the button's markup and what the button does, and I want to be able to look at a button in a file and understand what the hell clicking on it makes happen. Moving the code away from the definition of the button is obfuscation, except to designers who can't stand to see a bit of javascript in their HTML.
If you don't subscribe to the logic and end-user benefits of progressive enhancement, there are probably many things about HTML+CSS+JavaScript that you don't like.
However, what are the arguments for what you are asking for besides easier short-term development practices? And, as said above, there's nothing stopping you from building your webpages that way (especially a “widget” that is self-contained). It works that way as well. How does this make HTML+CSS+JavaScript broken? If anything it is very resilient to different coding practices.
Comments
The problem is that people don't bitch enough (or barely at all, really) about the flaws of HTML and CSS, and rather just run with the insane decisions that are made. We get a huge "design" industry that has grown up creating one-off widgets, layouts and UI metaphors, and ignores many of the best lessons from thick client applications.
Why does the separation of the html and javascript matter to you? I can see the CSS being separate, at the very least for style reuse, but why keep the functionality of a widget off in a separate file, tied only to a widget by class or id? I don't make a conceptual distinction between the button's markup and what the button does, and I want to be able to look at a button in a file and understand what the hell clicking on it makes happen. Moving the code away from the definition of the button is obfuscation, except to designers who can't stand to see a bit of javascript in their HTML.
If you don't subscribe to the logic and end-user benefits of progressive enhancement, there are probably many things about HTML+CSS+JavaScript that you don't like.
However, what are the arguments for what you are asking for besides easier short-term development practices? And, as said above, there's nothing stopping you from building your webpages that way (especially a “widget” that is self-contained). It works that way as well. How does this make HTML+CSS+JavaScript broken? If anything it is very resilient to different coding practices.