Friday, September 18, 2009

To return to a theme I started many years ago, I commented on this excellent article about why web-site development has got so damned hard. (And remember when we all thought of web-apps as lighter and simpler than desktop apps? What happened?)

Anyway, here's my comment.

I think the problem is less the multiplicity of programming languages, than our insistence that we should always be separating our languages in different places.

This goes against the basic tenets of cohesion and coupling. We cluster unrelated activities together because they happen to have the same syntactic sugar, while separating tightly-coupled activities because half of them happen on the client and the other on the server. Why the hell should this implementation detail have to be reflected in our architecture?

What I'd like, controversially, is to be able to mix-and-match the languages within the same source file, grouping together the python, javascript, html and sql that actually has to work together in one place. I have no trouble dropping into regular expressions or similar DSLs from inside my main code, why should dropping into a layout or query language be different?

2 comments:

Unknown said...

If you switch to just using Javascript your problem will be solved, it can all be in the same file - Javascript+css+html

Either loose the Python or build standard server backends that support javascript development.

This might of course not be wehat you wasnt to hear ;-)

Regards
Al

Unknown said...

Or if you just can't leave Python maybe this will help wean you off it ;-)