Jan 10

The Flash vs JS/Canvas discussion

Some months ago:

“mvalente: Pq Flash vai morrer: acessibilidade, UI diferente, SEO, -speed. E pq js+css faz tudo”

“mvalente: Nao discuto :)… Em 5 anos o Flash vai estar no mm “nicho” em q estao as Java applets (ie. +- nulo)”

“mvalente: Who needs AIR, Flash, Silverlight, JavaFX and other crap JS + Canvas, baby”

Feel free to search for Flash in my twitter archive (starts in March 2007 ends in February 2009; I dont chat on twitter anymore)

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.

Aug 09

You Aint Seen Me… … rawight?

Aug 09



Aug 09

O Poder da Internet

“O poder da Internet deve servir o Mundo”

Não serve nem deve servir. A Internet serve o individuo, transfere poder das organizações e do colectivo para o individuo. Uma afirmação colectivista e socialista cuja consequência lógica é a submissão da Internet a uma qualquer entidade supranacional (ONU? EU?) e a retirada de direitos digitais aos cidadãos (confidencialidade, anonimidade, privacidade).

“A tecnologia não resolve problemas, as pessoas resolvem problemas.”

Precisamente. Pessoas. Possivelmente agregadas em grupos por vontade própria. O que não resolve problemas: colectivos impostos, partidos e políticos, entidades supranacionais e supraindividuo.

“Os políticos do presente e do futuro têm de orquestrar a inteligência colectiva.”

Não têm nada. A inteligência colectiva orquestra-se a si própria. A inteligência colectiva de uma colónia de formigas não é orquestrada por ninguém. A inteligência colectiva de um cérebro também não, não é preciso ninguém a orquestrar os neurónios.

“Devem impor-se pela confiança. O seu desígnio não é um conceito de justiça meramente formal, mas o desenvolvimento das capacidades para que cada um atinja o seu potencial.”

Cá está. Mais uma das várias afirmações que trai o tom geral da entrevista, um tom de descentralização, poder distribuido, capacidade dos individuos. No fundo, no fundo, as pessoas e cidadãos são umas bestas que precisam que os politicos se imponham e lhes orquestrem a vidinha para que possam atingir o seu potencial.

Para além do discurso bonito, é uma agenda compreensivel para quem representa não só uma multinacional mas também o poder politico (um partido).

Em tudo o resto é uma boa entrevista.