Echo JS 0.11.0

bostrt 2064 days ago. link 4 points
I'm all for creating a separate branch for Echojs but I'm going to play devil's advocate here... Do you have any ideas (like features and design) that will build a big enough case to do something like this? 

A couple [crazy] ideas I have:
 - JavaScript syntax highlighting in comments 
 - Refactor EchoJS to use Node.js on backend. (why not write a JavaScipt news site in JavaScript?)


qawemlilo 2064 days ago. link 3 points
I think the idea of porting the backend to Node.js is awesome. Would definitely contribute.
fcambus 2061 days ago. link 2 points
Telescope is a nice proof of concept, but I wouldn't use it in production, as even the GitHub repository mentions that it still is beta software.

Also, when checking the official demo site [1], pages sometimes take several seconds to display. For this kind of site, I think it's better to generate the pages server-side.

bostrt 2063 days ago. link 1 point
Interesting suggestion. I'm curious to see how something like this would fly with the moderators/owners. I hope they're reading these comments!
mulderp 2060 days ago. link 3 points
ok, this is what I had several weeks ago - - it needs some cleanup, but maybe useful already for someone getting an idea of how Lamernews could look like with a Node.js implementation
fcambus 2059 days ago. link 2 points
Thanks for sharing, this looks interesting! Starred the repository, will try to have a proper look soon.
mulderp 2059 days ago. link 3 points
thanks! this is still very experimental. But translating the Ruby source 1-1 so far went quite well. I am not yet so experienced with express.js. For example, maybe there are some other approaches to the templating. I am mainly experimenting with the Redis/Promisses setup.

Another interest for this would be adding a JS frontend (possibly Backbone driven). Also, it might be interesting to include an requireJS/Asset Pipeline approach.
fcambus 2057 days ago. link 2 points
Tried it after answering your comment, and it could display the news titles from my test instance, so I would say it's a really good start!

Regarding templating, there doesn't seem to be anything viable written in Node which would be similar to Lamer News HTML generator or to Erector :)
mulderp 2057 days ago. link 1 point
Thanks! Good to hear it is working for you.
Yes, my thoughts on templating currently keep it simple from viewpoint of development, not so much for performance issues. But Node is much faster than Ruby too, and maybe someone is already working on a Viagra templating approach for Node :)
fcambus 2056 days ago. link 1 point
That makes sense yes! :) I see you are using EJS templates, they look pretty similar to ERB templates actually, seems like a good choice indeed.
mulderp 2056 days ago. link 1 point
Yes, just got the login/signup routes working. I guess I post here in some days when there is substantial progress. Will be interesting to see a full JavaScript stack for this forum.
mulderp 2060 days ago. link 2 points
Based on the Lamernews source, I did a small proof-of-concept for a backend with Node.js, Redis and Promisses. Haven't time to release it, but I might write a small blog post about what I did so far.
fcambus 2056 days ago. link 2 points
If you have time for a blog post, that would be interesting for sure! Not only from a Lamer News perspective but also regarding porting Ruby code to Node.
mulderp 2060 days ago. link 2 points
if interested, we could have a small mailing list to dicuss a backend for EchoJS with Node:!forum/echojs

Once this is setup, we could also try out something like rendr - shared rendering client/server