I am of the opinion that there is no longer a need for server side templating languages and that they only serve to complicate the technology stack. With REST services, Javascript, CSS and HTML the technology stack for web development has become significantly simplified due to the fact that it is once again digestible. A designer can know HTML and CSS and provide designer services without having to know the intricaci…
I think a lot more people will start considering this possibility seriously the day Google announces it parses Javascript.
Why node.js disappoints me
51–60 of 92 posts
Re: Why node.js disappoints me
#52The first step to fixing this is getting good implementations of CommonJS modules in the browser. JavaScript needs a module system (no, tags are not good enough) and CommonJS is the closest thing we have to a standard that can be added to existing environments.
Also important for interoperability is making sure people don't use proprietary extensions to CommonJS modules, which Node unfortunately has plenty of.
Re: Why node.js disappoints me
#53For example, Pyjamas just got a kickstart in development (again) and released a compiler that can target both javascript and GTK from a single codebase. It also incorporates a JSON-RPC client, effectively abstracting out backend calls into what appear to be normal Python methods in the source.
My idea was to couple Pyjamas as an alternative front-end to normal template packages. You could theoretically write your entire application, UI code and all, in normal Python. The UI code would be heavily coupled to your backend code as if there were no seperation between the two. Once compiled to the javascript target, the interface should work just as well without any notice from you, the humble developer (making calls over JSON-RPC).
Check out my fork of Pylons on bitbucket to see how I've made wsgi apps speak json-rpc. It's a start. The problem right now is that I've heard many people moan that Pyjamas (and even GWT for that matter) do not spit out the best js. Something that could use improvement over time (and something I think will as long as there are interested developers). Either way, the next step is to write a paster template plugin to setup a project for using Pyjamas and a distribute pluging to add a compilation step to the build process.
Re: Why node.js disappoints me
#54CoffeeScript ( http://coffeescript.org ) is my attempt to solve this exact problem. Take the parts of JavaScript that work well, fix the broken areas (statements-vs-expressions, variable scoping, difficult prototype chains), add features (like the array comprehensions mentioned in the article) ... and compile it all to lowest-common-denominator JavaScript that runs just as fast as the JS-you-would-have-written-yourse…
Re: Why node.js disappoints me
#55I'll probably get downvoted (again) for tooting my own horn, but I am developing a JavaScript framework to definitively solve the JavaScript templating problem. http://www.jaxscript.com Here's a screencast version of a presentation I did for a local user group: http://vimeo.com/15127654 The technology works, it's really, really solid. I think all server-side template languages are going to be obsolete a lot faster th…
Re: Why node.js disappoints me
#56Weblocks and Parenscript and CL-WHO and hu.dwim.perec and I write code in only one language too.
Use Lisp for its strengths, and other technologies for theirs. Server side CL, client side jQuery, Postgres on the backend, and your choice of caches, proxies and middle-ware in between.
I have tried nearly every other combination of New Thing and Hyped Awesome, and came to this conclusion: don't do everything yourself, and don't use technologies others are not investing big $ in. Anyone can push something to github and launch a nice tryfoo.org site, that doesn't mean you should use it.
FWIW, I am migrating my entire web toolchain to the JVM and intend to start writing servlets in Lisp. Let Big Business be my R&D bitch. JVM is good enough, and it's posh.
Re: Why node.js disappoints me
#57This is why Yahoo has been working on using YUI3 in Node to offer an API layer that works both in the browser and the server. (http://www.yuiblog.com/blog/2010/04/09/node-js-yui-3-dom-man...)
The latest demos of this have Expressjs being used to render using a YUI3 based templating (http://express.davglass.com/).
Re: Why node.js disappoints me
#58CoffeeScript ( http://coffeescript.org ) is my attempt to solve this exact problem. Take the parts of JavaScript that work well, fix the broken areas (statements-vs-expressions, variable scoping, difficult prototype chains), add features (like the array comprehensions mentioned in the article) ... and compile it all to lowest-common-denominator JavaScript that runs just as fast as the JS-you-would-have-written-yourse…
Also, I can't read the first paragraph of text, as the toolbar is hovering over it.
Re: Why node.js disappoints me
#59CoffeeScript ( http://coffeescript.org ) is my attempt to solve this exact problem. Take the parts of JavaScript that work well, fix the broken areas (statements-vs-expressions, variable scoping, difficult prototype chains), add features (like the array comprehensions mentioned in the article) ... and compile it all to lowest-common-denominator JavaScript that runs just as fast as the JS-you-would-have-written-yourse…
I like CoffeeScript, but what does it have to do with Eric's complaints? It does nothing to prevent people from duplicating effort or tying libraries to a specific environment.
Instead of coding in one language, we're actually coding
in two. One is the subset JavaScript that can be run in
all browsers, and another is the set of JavaScript that
can be run by Node.
He's not talking about features specific to the Node API, but to features present in V8 that are lacking in older versions of JScript, effectively. A lot of Node libraries use features like Array#forEach, Object.create, Array#indexOf, Function#bind, making libraries unusable in the browser, even when they should be able to run perfectly well there.CoffeeScript doesn't prevent you from using implementation-specific features if you want to, but provides in-language alternatives to all of the things listed above, in a cross-browser fashion.
Objective-J works in the same way, doesn't it? It's possible to write Objective-J code that is tied to a particular runtime, but if you write in the regular style, you won't have any cross-browser trouble.
Re: Why node.js disappoints me
#60I'll probably get downvoted (again) for tooting my own horn, but I am developing a JavaScript framework to definitively solve the JavaScript templating problem. http://www.jaxscript.com Here's a screencast version of a presentation I did for a local user group: http://vimeo.com/15127654 The technology works, it's really, really solid. I think all server-side template languages are going to be obsolete a lot faster th…
Interesting idea. A few comments: - It would be nice to see some more detail on your page. Writing stuff down might help with ideas too. - The video is too laboured. Too slow. I lasted 9 minutes, and was very interested, but that was as long as I could last. You need to script video fairly tightly to hold folk's attention. You can get away with more space when live, but it doesn't translate to video. There's a reason…