Show HN: Hacker News Mobile - A fast and readable mobile HN website
hn.gethifi.com
hn.gethifi.com
It's all JS/client-side templating. Ask any questions if you have them. It works great as a Shortcut app on the iPhone.
edit: Lots of requests for a back button -- I'll be sure to add that!
Also, I might go a couple font sizes larger. It's readable, but small on my phone.
All in all though, it's pretty nice. It's a good example of what mobile web can do and showcases the power of client side development when you have an API to support it.
It's fast because I didn't both with a mobile web framework. I've found those (especially jQuery mobile with its DOM caching) to perform horribly. This should scroll as quickly and smoothly as your phone can.
...and you're totally right about jQuery Mobile causing suckage. I used it for a couple features and I'm now ripping it out in favor of a little handrolled solution I built. I even replaced the jQuery core library with XUI because it's even smaller has most of the goodies I use 99% of the time.
For everything XUI doesn't have, I really like XUI.extends in its simplicity better than the jQuery plugin architecture. Super easy to add whatever else you need.
Performance is night and day better now.
[edit] jbail means to say there's a 200ms (or so) delay from touchstart to when click is fired in mobile browsers. He's obviously relatively experienced with mobile web dev :)
I also added a back button so it can more easily be run fullscreen.
Also, "back" doesn't seem to work on your site from my Blackberry.
I'll might have to add a back button in the header...it's a shame to have to clutter it up.
This is running on a 256mb Ubuntu virtual server and it's overkill for both processor and memory. Kind of neat watching the story climb HN (currently #4) and watching `top` without being able to tell anything is happening on the server at all: 0,0,0,0%user,100%idle -- a testament to the light weight beauty of node,redis,nginx.
Writing your own favicon-getter is by contrast... kind of annoying.
It seems when the URL of a post has a hash at the end, the default icon query string isn't used.
http://www.google.com/s2/favicons?domain=techcrunch.com
EDIT: I should point out that the accuracy is poor compared to most browsers.
However, using this, I quickly realised that original design has some advantages (though, maybe it is just habit issues). Usually I scan frontpage fast for new highrated entries to read first, and having 10 entries on screen in time is more suited for this. With 4 it's just another experience. I feel that I need more time to find something interesting.
Maybe you can improve this, for example, indicating rating with color or size of rating digits.
Rats! There has been an Error. This application depends on a number of external APIs, sometimes they don't always work. When this happens, your best bet is to reload.
Happens on a few of the comment linksEDIT: looks like the same thing happens on ihackernews - http://ihackernews.com/comments/3001808 - http://hn.gethifi.com/#/comments/3001808
It's old school: perl mirroring the RSS feed and writing out simple html markup for jQueryMobile to format. It supports a bunch of other feeds too (I used to read more than just HN this way) and it switches to a nice multi-column format on larger devices.
Personally, I would prefer if comments were directly a link. Not a big fan of the popup.
The client-side bit of the post will be interesting mostly in that it's not interesting. By keeping things basic, this was easy and performs well.
https://github.com/ga2arch/py-hackernews/blob/master/hn.py ( it's not good code, but it does its job, i have successfully run it for 48+ hours with no crash ( at least the previous revision :D ))
if you need help just send me an email =)
Awesome work =)
We thought about this question extensively while building http://hackerstream.com