The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

JavaScript and "serious" programmers

I just read a post at quirksmode.org about how neither server-side nor client-side programmers are well-suited to write AJAX applications:

http://www.quirksmode.org/blog/archives/2005/11/javascript_and_1.html

He said something that got me thinking: Within the JavaScript programming world there's a general lack of knowledge of basic application design principles.

I thought this forum would be a good place to ask that question. Are there truly language-neutral application design principles? Is there a book anybody would recommend on the subject? How can these principles be applied to the world of client-side JavaScript?
greim Send private email
Tuesday, November 29, 2005
 
 
The problem with most of the books on the subject deal with examples in Java or other class-based languages, while Javascript is prototype-based. And *very* many people simply don't know the difference between classes and objects.

Douglas Crockford has quite a lot of interesting thoughts about Javascript as a "serious" programming language: http://www.crockford.com/javascript/index.html
Berislav Lopac Send private email
Tuesday, November 29, 2005
 
 
I'd suggest the pattern book by the Gang of Four. Although all most JS is lacking is some sort of understanding of MVC.
Matthias Winkelmann Send private email
Tuesday, November 29, 2005
 
 
EcmaScript is tricky because it's not quite conventional OO... there are plenty of C++ and Java programmers who are quite at home with design patterns and the like when they're using a statically-typed class-based imperative language, but EcmaScript is dynamically-typed, prototype-based, and has features like closures that take it more than halfway to the functional world.

That's the problem.  It's not that it's a poor language or that the coders are poor coders.  It's just that it can't be programmed as though it were Java, because that's just crying out for disaster.

(Which is why we should all call it EcmaScript, because naming it after Java was the stupidest thing to hit the computer world since Microsoft Bob.)
Iago
Tuesday, November 29, 2005
 
 
The title of this post begs for trouble. "Troll!" Now that I got that out of my system, I don't believe any book or blog can teach you "language neutral". Instead, learn several languages, including JavaScript. don't just cover the surface hacks, dig deep and find out what is possible. Think outside the box. Explore abstract associations. You'll discover what "language neutral" really means for yourself, and no one can teach you that.
Nonymous
Tuesday, November 29, 2005
 
 
Using the word "script" makes people think it's just a hacky little language where you shouldn't care about software engineering.

I was certainly wrong about javascript. It's actually a nice little language.

You are starting to see unit testing, logging, and other frameworks for javascript now. Perhaps the perception will change.

Even using javascript on the server side may be viable in a way I dismissed previously.
son of parnas
Tuesday, November 29, 2005
 
 
"Even using javascript on the server side may be viable in a way I dismissed previously."

Absolutely. If I had time and resources, I would create a server-side Web environment for Javascript along the lines of PHP or Ruby on Rails. There are free interpreters, like SpiderMonkey, and the only such environment I know of is Whitebeam, although I don't like the way it's designed.
Berislav Lopac Send private email
Tuesday, November 29, 2005
 
 
JavaScript is the girl next door. You've known her growing up; you pulled her pigtails and made fun of her braces.

Later you went to the big city and dated other languages but when you come home for the holidays, she's still there. In the meanwhile, she's grown up and looks quite pretty now.
YaYaYa Send private email
Tuesday, November 29, 2005
 
 
Does that make Jave her older sister that you always wanted because she had bigger boobs who is now fat with six kids by different guys?

Perhaps RoR is a ten dollar (censored for reasons of taste)?
Paul Brown Send private email
Tuesday, November 29, 2005
 
 
Guys, this wxamples are *awesome*. I'm still wiping the tears from laughing, and the best thing that it's an excellent analogy.

I'm *so* blogging this. :)
Berislav Lopac Send private email
Tuesday, November 29, 2005
 
 
Actually, traditional ASP did let you write server-side javascript, and the builtin Design Time Controls in MS InterDev were written in JavaScript (primarily because you couldn't do real OO in VBScript at the time.)

If javascript had been positioned as a general purpose language, it would be as popular as python and perl now.  It's a shame that it wasn't.
Grant
Tuesday, November 29, 2005
 
 
Incidently, flowcharts are a pretty language neutral design principle - you either perform an action or you make a binary "yes" or "no" decision.  This sort of simplicity is still very heavily used in process modeling - when you need a procedure to operate nuclear reactors, you really really really want to make sure you've acknowledged all the possibilities.

The problem with JavaScript (and I loved the analogies) is that way back then, it was really difficult to get feedback on exactly what your program was doing, kinda like learning how to unsnap a bra underneath a heavy sweater, while kissing the girl on a dark porch.

It can be done, there are guys very good at it, but it always seemed like there were easier ways to get what you wanted.  :)
Anonymous Coward
Tuesday, November 29, 2005
 
 
> but it always seemed like there were easier ways to get what you wanted. 

Beg or buy?
son of parnas
Tuesday, November 29, 2005
 
 
Actually, RoR is probably the hot 20 year old party chick that moved in next door to your big city apartment. PHP is probably her older, not as hot friend.  I don't know who ASP.NET can be.
J
Tuesday, November 29, 2005
 
 
I'd have to say ASP.NET is the single, middle aged woman who appreciates a pity **** every now and then.  You know the type, when you just want something quick and satisfying, yet you don't want the emotional intanglements.  :)
Anonymous Coward
Tuesday, November 29, 2005
 
 
> I'm *so* blogging this. :)

I want a t-shirt with exactly that text.
Rhys Keepence Send private email
Tuesday, November 29, 2005
 
 
...and C is Mrs Robinson - a bit on the old side, but still hot and you just know that she knows more tricks than a ringmaster's dog.
Paul Brown Send private email
Wednesday, November 30, 2005
 
 
As far as JavaScript on the server is concerned, I've been using it since 1997 (Netscape's servers had SSJS), and still use it for ASP development.
Nick Fitzsimons Send private email
Wednesday, November 30, 2005
 
 
> , I've been using it since 1997 (Netscape's servers had SSJS)

I thought they were nuts. They were just ahead of their time. Though I guess there's no real reason the browser and the server need to have the same language.
son of parnas
Wednesday, November 30, 2005
 
 
LOL ... Guys, all you are really GREAT !! :´´-D
Francesc, from cloudy Barcelona Send private email
Friday, December 02, 2005
 
 
Well....
Lisp is the 80 year old woman who has braces and drank potion of eternal youth in her early 20's while having braces. Who is both the smartest and most beatifull chick physicly otherwice but who has braces, and old looking cloths, and braces. Did I mention that she has braces.
Jouni Osmala Send private email
Friday, December 02, 2005
 
 
(and (when
    (you  (try-to
                (kiss-her 'you cut (your lip)
))))
Mark Send private email
Monday, December 05, 2005
 
 
Forth is the chick who only speaks Hungarian.

Me, I married C++, but I fool around with Visual Basic because she's easy...
HorseFace
Tuesday, December 06, 2005
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz