27
Nov 09

Untitled

OK, projects server online again w/ TwitTV and CoffePye goodness! http://ping.fm/Z8mX6


25
Nov 09

Requirements for a Modern Web Development Framework

For the last 2 years or so I have been harping about a Future Web Development Framework and about how Javascript Will Save Us All. And even 2 years before that (4 years ago) I had actually come to the conclusion that Javascript would be the next big language and the one that would invest my time in for the next 10 years (2005-2015).

Aditionally, 2 years ago I hinted at the need and possibility that Javascript should be used at in all of the tiers of aplication development. And 1 year ago, at Codebits, I restated the need for a totally Javascript-based, REST-accessible, JSON-formatted web development framework. I tried to challenge people at Codebits to work in it, but no such luck. I also tried to start developing it but it was a no go: I dont have as much patience for coding as I used to (age is a bitch) and the context for serverside Javascript development just wasnt right (lack of standards, lack of OS API access, etc). And even having some Javascript interpreters (like jslibs which is what I was using at the time) with access to stuff like files and sockets wasnt much of a help: its not very much fun to try and reinvent the wheel writing a webserver from the (socket) ground up.

Well, things have changed a lot in this past year. The ServerJS/CommonJS group has been doing a lot of work on standardising a unified JS API. And there’s been a lot of work done on top of several Javascript interpreters/compilers/VMs (like Spidermonkey, Rhino, V8, etc) to provide for basic system level functionality. Plus a lot of Javascript-based basic blocks have been developed (like Narwhal, Nitro, Node, Awesome, Lawnchair, DjangoDE, PURE, etc) that allows us to get more concrete about what is needed and what can be done.

So its time to once again tell the Lazyweb what I think is needed or (better yet) what I want in a new web development framework that lasts for 10 years. Here goes:

  • I want it to be Javascript based. All of it. No Erlang, Python, Ruby, etc in sight. I want the frontend/View/presentation in Javascript. I want the appserver/Controller/logic in Javascript. I want to program the appserver in Javascript. I want the DBserver/Model/data in Javascript.
  • I want all the Javascript code to be compliant with the CommonJS standards. The code should be portable to any of the existing engines (Spidermonkey, Rhino, V8, flusspferd, Jaxer, Helma, etc) although I would touch anything Java-based with a long pole, so please make it work on Spidermonkey or V8.
  • I want all the data to be JSON formatted and REST-accessible. The data on the database should be stored as JSON data and accessible via REST. The appserver API should be REST-based, accept JSON-formatted parameters and return JSON-formatted results. The templating system should accept JSON-formatted data for rendering the view and make REST JSON-formatted calls to the appserver.

If this isnt clear enough, let me refer some analog components that are written in other languages and what is already available in JS:

  • for the database I want CouchDB but written in Javascript. Awesome or Lawnchair might be starting points. The endpoint would be something like Persevere but without the Java/Rhino dependency. Maybe Pintura is *it*…
  • for the appserver I dont have the right analog. Of course that it must support JSGI. But *the* most important thing: it can not and must not allow the generation of HTML and the return of HTML to the browser/client! All methods/functions should only accept parameters and return results in JSONified format. Maybe NitroJS could be *it*. If it threw away the sucky template format. Completely. No templates on the serverside. No serverside HTML generation. Pure HTML is the new template standard (see below).
  • URL routing should use the object hierarchy on the appserver as default. Explicit URL routing (static or using regexp) would have to be done explicitly.
  • for the presentation layer I want pure HTML+JS. The browser should be the only component responsible for rendering templates. The clientside part of the framework should make all calls to the server using REST/AJAX and providing JSON-formatted parameters. No GET or POST parameters. It should only accept JSON-formatted results. No HTML. Standard HTML is the only templating system needed. Page elements (DIV, SPAN, etc) should have an “id” as an identifier for serverside databinding. If a page has a tag/field with “id=xpto” then that tag/field should be filled with the contents of the “id” key returned from the server in a JSON string. A good starting point would be PURE, but without using “class” as the databinding identifier (“id” should be the standard).
  • I want the appserver to have features that Zope has had for years: I want acquisition (aka prototype-based programming, aka JS object-orientedness). I want a through-the-web management interface. I want ZClasses. I want automatic form generation for classes/objects and an automatic management (CRUD) interface for objects.

So, how’s that? It’s Xmas anyway, so I can ask for whatever I want. Gimme, gimme… Or I can start working on it… Who’s with me? I can be the Main Bitcher, Overall Architect and Project Manager.


25
Nov 09

Untitled

Wired article about healthcare modelling http://ping.fm/j8TxA Congrats to Patrick http://ping.fm/13JWh


25
Nov 09

Blogdot e dAaZ

Andava para aqui às voltas a pôr ficheiros e discos em ordem e fui dar com umas relíquias que me trouxeram algumas recordações…

Aqui há uns anos atrás (2002/2003), depois dos vários trabalhos feitos para terceiros (Telecel, Oni, Cabovisão) pela RVTI, resolvemos lançar dois projectos próprios: o Blogdot e o dAaZ (lê-se “de A a Z”).

O primeiro era um engine de blogs, algo semelhante ao Blogger ou ao WordPress, permitindo a qualquer pessoa criar e gerir o seu próprio blog. O segundo era uma espécie de CMS on-demand, uma mistura de blogspot+flickr+youtube, que permitia a qualquer pessoa criar um site especializado sobre um determinado assunto (ex: jogos.daaz.pt) e colocar e gerir conteudos nesse site.

Tanto um como outro tinham algumas coisas com piada. Tinham por exemplo a possibilidade de se poder editar as CSS do lado do browser, comunicando as alterações ao servidor imediatamente (aka AJAX). Tinham também a inusitada característica de não usarem TABLEs para layout, sendo feitos exclusivamente à força de DIV e CSS. Uma modernice, que até deu para algumas cómicas discussões com os habituais velhos do Restelo. Que hoje devem ser uns zelotas do “tableless”… E tinham para além disso a característica de não serem feitos com HTML standard mas sim com uma linguagem XML que inventámos (à qual chamámos ZML, Zope Markup Language). Podem fazer o View Source das páginas e depois ver a relação com as actuais definições do HTML5.

Sucesso não houve. Em pleno rebentar da bolha dot.com não era a melhor altura para lançar projectos. E as ideias e tecnologias usados provavelmente estavam foram de tempo. Oh well…

Hoje ainda tentei por de pé os sites com os backups que tinha para aqui, mas nada feito. Entre actualizações de sistemas operativos, de linguagens e de bases de dados, é praticamente impossivel fazê-lo sem reescrever montes de linhas de código ou sem replicar os ambientes originais com versões antigas do software de suporte (RedHat, Python 2.1, Zope 2.5, Berkeley DB ‘não me lembro’…). Valhe-nos o archive.org para “mais tarde recordar”. Já não há muito a fazer relativamente ao dominio blogdot.org (taken) mas como tenho a marca registada DAAZ, um dia destes ainda re-registo o daaz.pt…


24
Nov 09

Untitled

“In cities dominated by a few vertically integrated giants, entrepreneurship and innovation get crowded out” #PT http://ping.fm/JoqhN