Date: 2007-03-13 18:42:00
a plethora of languages

I'm writing a little web app to manage my todo list. The plethora of distinctly different languages required to successfully create such a "web 2.0" application is astounding:

Insufficient fluency in any of these languages is likely to render your application unworkable, or at least insecure or poorly performing. In the nascent state of my current app, all of these languages are embedded at some level or other in one single source file. How did we get here? Is this the future of web development? How can this be made better?

I was going to point out my oldschool nature, and I still resist CSS. But the only thing I really leave out is the javascript. Mostly.
Yeah, I'm as oldschool as anybody. See my home page for example. But I also like to mess with new technologies to try to understand them better, especially if it looks like they're going to stick around for a while!
This is what happens when you try to put all of the content of internet into an intermittent connection based port 80 infrastructure while supporting a lot of specialized/legacy languages.

I'm not sure what the basis of all of those languages is, but I suspect a large percent are C based underneath the covers (like Perl). Why don't people make/use better C/C++ libraries to emulate the functionality given by these other languages while maintaining the full power of C/C++? My personal opinion is that the languages are getting too dumbed down and specialized to meet the needs of any "script kiddie" that wants to program in 1 hour or less.

* Managed C/C++ code
* C/C++ security model/sandbox

I think C/C++ already has the libraries to do just about everything else those listed languages do (and probably what I listed as Ideas as well, but I'm not familiar with that part unless you count C# which may be the answer eh?).

My other pet peeve is that there needs to be better browser interoperability and a standards body with the power to drive features being demanded in a way that makes sense instead of tacking on features to the side in an ugly/unstructured way.
There are two huge things that make Python fundamentally different from C++: (1) garbage collection, and (2) dynamic typing. Yes, the Python system is ultimately implemented in C, but you can't get the real benefits of Python from C/C++ code just by calling the Python libraries.

While it is true that anything you can do on a computer, you can write in C or C++, it's just not always the best idea in terms of programmer productivity and greater compatibility. Even if you wanted to implement the functionality provided by Javascript in C++, you couldn't, because none of the browsers out there support C++ as a web page scripting language.

If we wind the clock back a decade or so and presume that C++ was chosen as the browser scripting language, there would have had to have been some kind of managed environment in which it would run, or you'd have crashing and security problems galore. Oh wait, Microsoft tried that and it was called ActiveX.

Finally, I was playing fast and loose with the term "language" in my post; some of those I listed are markup languages like HTML, CSS, and XML. There's not really an option to replace those with C/C++, it's a different application. One would still need to master a content markup language, a presentation markup language, and an on-the-wire data representation language in order to implement a user-facing distributed system. What alternative is there?
Garbage collection: Most programmers can handle their own garbage, if not, maybe they should look into another line of work. STL really helps here in a round about way.

Dynamic typing: This just makes things more difficult to maintain (especially by other people) IMO.

All of these scripting languages seem geared for a quick and dirty, relatively short, and basically unmaintainable project (end of gross overgeneralization). Of course that isn't always true... I believe Nugget writes the most C-like Perl I've ever seen which does seem very maintainable.

If C++ could be run like managed code and had the security sandbox properly implemented (original two bullets), I think it would be an easy replacement for things like Javascript. ActiveX didn't really have either of those two characteristics; just browser support.

I agree with the HTML, CSS and XML. All of that information can of course (and maybe should?) be represented completely in XML. If XML is here to stay, lets just make XML browsers and tightly define the XML schema needed.

Again, I think the problem is that noone has the ability to mandate a strict definition of how various architectures are implemented and the ability to enforce interoperability.
Managing a to-do list seems do-able without Javascript, XML and SQL. At a pinch you could even lose the CSS. Your Python code handles browser input and emits HTML, storing data in CSV files (or whatever format's convenient). Now you only need to know Python and HTML.

It's the "web 2.0" part that's leading you astray. ;~)
Yes, it's certainly possible to do this with late-90s technology but I'm also doing this as a learning exercise. I already know how each of those technologies works individually, but I want to put them together into a system that I'm going to actually use.

I also want to add multiuser features (probably easier with a real database) and not have to worry about data backup (because I already have my PostgreSQL system all backed up).
Have you looked at something like Rails? It seems to hid a lot of the other language work.

Of course the problem with that is it's inviting trouble... I see a lot of people that end up pounding a database because their favorite abstraction tool is being stupid.
I thought about Rails, but I'm not sure how much effort that would free up. I haven't actually tried to use Rails, so I don't know exactly what it would do for me. As far as I know, it makes the easy things trivial and the hard things possible. But, it does a lot of abstraction hiding to accomplish that and at this point I'm not really prepared to build a system with stuff I don't understand. :)
BTW, might be of interest to you...
...I don't have a problem with it.
Greg Hewgill <>