What language I would like to program net applications in?

What should be the language for the web? Many people will swear it is php. It's best features are immediacy and the fact that it does not look scary, initially at least. Loads of libraries as well. Some will say ruby - not sure about that, never really used it. I - don't know.

Programing the network should be seamless. This means that the hard things should have obvious solutions transparent in the language constructs. For example a web gnome druid like code snippet shouldn't look far harder than:

druid (step1 step2 step3 step4)

The webserver coming with plt is a good example for this style of implementation - here is a snippet:


.....................
      (send/suspend (step1 "page 1"))
      (send/suspend (step2 "page 2"))
      (send/suspend (step3 "page 3"))
      (send/suspend (step4 "page 4"))
      (send/finish `(html (p "That's the end.")))
.....................

stepX is a procedure which parses the input and provides some response.

Another often occurring pattern in web software is creating url languages - for example in drupal, node/123 is "show node with id 123" "taxonomy/term/2+3+4/feed" is "display all terms in taxonomy categories with terms 2, 3 or 4 rss feed in rss feed format". The idea is similar to other URL encoded RPC schemes. The advantages are that this is a simple, extendable human and robot friendly way of describing a resource or procedure. It has some SEO benefits as well. In order to exploit this I would need a dynamically reconfigurable dispatcher, something like:


..............
(on ("node" number . rest) (node number rest))
..............

Separation of concerns is an often mentioned mantra in web applicalications design. It usually means separating the presentation and logic - it makes sence, most of the top programmers have, lets say, a strange taste. Designers usually are struggling enough with the technical details of html, let alone everything else. But a procedure in a web application might output to a web page. This is usually solved using templates. Html intermixed with code is bad, ugly, unfriendly to both coder and designer. Ideas taglibs, tal, etc... come to the resque. XML is not the only language on the net. So we would need a general way of introducing templates to the "output", without the need of recompilation. For example a "front page" definition like:


(page 
   (block left-content)
   (block right-content)
   (block related-ideas)
   (block navigation))

Represents the programmer's idea of what is on a page, the designer's view is a corresponding xhtml template, the mapping should be transparent and obvious.

I wish I can have a proper orthogonal language, i.e. all "important data" is safe - we can't loose it. It's stored in a db, network, whatever. How hard is it to have automated storage for:


(node
  (id 1212)
  (title "something of a taitle")
  (body "Lorem ipsum ......")
  (tags 
    (vocabulary 111  (1212 121 999))))

Most web applications use databases (mpredominantly sql, but other exmaples exhist) for persistance. The typical usage is really primitive - get me an object or objects with these ids or these properties. There is one to one mapping with array and hashe usage. It should be possible to eliminate all explicit sql usage for persisting data. That can be done by overloading assignments, and implementing a pesistance strategy.

Ability to exchange content, i.e data and their definitions is getting more and more important. Support for dynamic type creation and metaprogramming in general would be good.

Security should never be forgotten. The ability to cage parts of a process is a must.

Powered by Drupal, an open source content management system