Echo JS 0.11.0

<~>
bevacqua 1701 days ago.
I think it's about time EchoJS gets its own repository so we can submit pull requests and maybe even help implement features or simply design changes.

Thoughts?

bostrt 1700 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 1700 days ago. link 3 points
I think the idea of porting the backend to Node.js is awesome. Would definitely contribute.
fcambus 1698 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.

[1] http://demo.telesc.pe/
bostrt 1700 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 1696 days ago. link 3 points
ok, this is what I had several weeks ago - https://github.com/mulderp/echojs - 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 1696 days ago. link 2 points
Thanks for sharing, this looks interesting! Starred the repository, will try to have a proper look soon.
mulderp 1696 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 1694 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 1693 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 1693 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 1693 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 1696 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 1693 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 1696 days ago. link 2 points
if interested, we could have a small mailing list to dicuss a backend for EchoJS with Node: https://groups.google.com/forum/#!forum/echojs

Once this is setup, we could also try out something like rendr - shared rendering client/server
bevacqua 1699 days ago. link 3 points
Even for the smallest stuff, like adding an alternative meta tag with the RSS feed.

Not sure I agree with the idea of spending time porting it to another language, but we could definitely collaborate on the kind of features we want.

Once we have a repo we could create an issue where we all pitch in commenting which features we'd like to see in EJ and figure out together which ones are worth implementing.
mulderp 1688 days ago. link 2 points
I think there would be a number of advantages to have a full-stack JavaScript stack:

 - frontend guys could improve rendering and UX
 - there are not so many Node/Full-Stack JavaScript apps out there that others could study
 - the performance is just a lot better
 - upgrades and maintenance are easier to do with npm I would say
fcambus 1698 days ago. link 2 points
That's a difficult question, and I'm still unsure of what to do regarding this topic.

Lamer News has served Echo JS well for the last two years, it's pretty solid and works as intended. Unfortunately, the development is stalled as Antirez is obviously focused on Redis. For bugfixes and small patches, I think it would be better to commit them to the original repository, so other sites running Lamer News would benefit from the changes as well.

After two years though, I have to say my experience with running Ruby applications in production has not been that great, managing Ruby versions and gem dependencies has been painful. I've been thinking a few times about porting the code to another language, and for the record there is a Perl port of Lamer News so it has been done before. Now, though, not sure there is an immediate benefit in doing this. Another option might be to build something new on top of the API, generating pages server-side using the existing API, and completing/enhancing the API if required.

To be honest I would not change much to the actual implementation though, and stay as close as HN as possible.

At the moment, what I would really like to add is a way to view all the latest comments on a site wide level in order to encourage discussions.

What features do you have in mind?
arnorhs 1697 days ago. link 3 points
There are a few features that would be nice:
- Pagination (or infinite scroll) of the front page
- Top stories of the past week/month reddit style, for people who don't visit that often
- I'd personally like markdown or more formatting in comments, so you could actually discuss code. And then possibly using a non-monospaced font for the text body
- I also wonder if you could do something to make the loading of the detail page (comments page) faster using ajax or (gulp) have a SPA type of scenario (though this might be driven more by the want to have a js-centered website, more dynamic for its own sake, as opposed to knowing that that would actually make anything better)

Off the top of my head. If I have more ideas/arguments I can add them.

Thanks for making this site btw. I think it's great
fallanic 1696 days ago. link 3 points
I agree with the first 3 points.

I think the 4th one is less of a priority for now, but it will probably be a good idea as soon as people will start posting source code in comments.

Thanks for the ideas, and feel free to share if you have some more ;)
fcambus 1696 days ago. link 2 points
Some interesting suggestions indeed, thanks for your input. I believe front page pagination should be a top priority, and switching to a non-monospaced font for the comments as well.

Regarding the later, I really like Open Sans [1] these days. Does anyone have advices or suggestions regarding typefaces?

[1] http://en.wikipedia.org/wiki/Open_Sans