7 ms·
Show HN: Hacker News Mobile - A fast and readable mobile HN website
- JoelSutherland 15y agoI started on this Tuesday after work. Because of some great APIs that are available, it really came together quickly. Most of the credit goes to this one in particular: http://api.ihackernews.com/ http://api.ihackernews.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!
- jbail 15y agoNice work. I work in mobile web and I applaud the simplicity and speed. That said, to really make it snappy, bind to 'touchstart' instead of 'click' --- or implement a 'tap' event. 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.
- JoelSutherland 15y agoWhich phone out of curiosity? I was actually thinking of knocking the font size down a bit! There must be some inconsistency I can fix. 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.
- bgarbiak 15y agoOn iPhone 4 all fonts are ok (please, don't size them down) except for the ones on sliding out, black panels - these are a bit too small.
- jbail 15y agoI'm on an EVO using Dolphin Browser. ...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.
- johnbender 15y agoCurious what issues you had with jqm. We're always looking for feedback.
- johnbender 15y agoYou can steal most of this stuff out of jqm, if you grab the events and vmouse plugins. Month's worth of work to speed up clicks and simplify the way you bind to events in the page. [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 :)
- JoelSutherland 15y agoThanks -- I just made some changes and iOS and Android are now firing on touchstart. Additionally I cut the slide in animation time by 50%. It feels much snappier! I also added a back button so it can more easily be run fullscreen.
- johnbender 15y agokeep in mind touchstart is fired in swipes as well so binding to touchstart only could have unintended consequences. Like I said there's a lot to consider when it comes to solving the click issue on mobile.
- rcfox 15y agoIt would be nice if I could go directly to the comments from the article text. Also, "back" doesn't seem to work on your site from my Blackberry.
- JoelSutherland 15y agoRats. I've tested iOS, Android and WebOS but not Blackberry. Do you have one of the newer ones with a webkit browser? I'll might have to add a back button in the header...it's a shame to have to clutter it up.
- Kique 15y agoI'm using the new webkit browser and the back button works fine for me, as does the rest of the site - great work! Opera mini doesn't work for me though, just stays stuck on Loading. I noticed someone with Android mentioning the same thing so I think it's an Opera specific thing, not BB.
- xal 15y agoReally great. One piece of feedback: Clicking on text works great but you can't use the browser back button to get back to the overview. That means you have to reload the page after every click on text.
- juxta 15y agoihackernews is great but I feel there is many bugs when it comes to comments. I use the Hacker News app for android created by Jazzy Chad which is great but the ihackernews api for comments always fails to load. I wish there was a fix for this.
- sktrdie 15y agoWhere are you hosting your node app? Aren't most node hosting plans kind of expensive?
- deleted 15y ago[deleted]
- genieyclo 15y agoLooks great, I'll try it out. I've been using iHackernews.com for awhile and to my knowledge pretty much every other hacker news app out there uses their api as well. They had a problem where they were always having 502 errors when you clicked on comments for a post for awhile, but this seems to have been fixed in the last couple of weeks or something.
- KrisJordan 15y agoI wrote the server-side portion of this app. It's actually a tiny coffee script program that caches iHN.net's API calls in redis. We cache/proxy the successful responses and toss out the 500s. When a cached copy of the content is available it'll be served immediately from redis. We refresh the cache on-demand in the background. This allows us to buffer out delayed / erroneous 500 errors the iHN API sometimes responds with. 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.
- jrgifford 15y agoImpressive that it's not being overloaded.
- news-yc 15y agoI don't use the iHackerNews API for news:yc. It seemed too unreliable to use a third party service that seemed to keep having issues, and I didn't want user data to go through a third party. But I think it's cool to easily create a HN app without rewriting the scraping.
- genieyclo 15y agoCool, do you scrape with your own tool then? If so, what do you use?
- 15y ago
- trusko 15y agoNice work. Thanks.
- petercooper 15y agoI've been working on a HN-esque design for a non HN site and had taken a similar approach with using favicons as this variant does. I think the icons really help and also assist with identification (of, say, TechCrunch articles.. whether you do or don't want to read them). What do people make of their use in this project?
- Pheter 15y agoI love them! It helps with scanning the front page. Due to the location/fact that it is text/text colour I never look at the URL of an article when looking at the front page on news.ycombinator.com.
- shurane 15y agoHow do you resolve favicons? Browsers are very resilient at finding favicons. Websites can use meta refreshes, variants on <link rel="..."> tags, domain.com/favicon.{ico,png}, gzipped images, and inserting icon elements with javascript. You could also use parent domains if you don't have a favicon for a subdomain. Writing your own favicon-getter is by contrast... kind of annoying.
- simonbrown 15y agoIt's using http://getfavicon.appspot.com/ http://getfavicon.appspot.com/. I assume (by the names of the creators) that it wasn't created specifically for this. It seems when the URL of a post has a hash at the end, the default icon query string isn't used. http://i.imgur.com/pBs2T.png http://i.imgur.com/pBs2T.png
- mikeklaas 15y agoFWIW, you can use google's favicon "service". It isn't official, but as long as you don't hit it too hard, I doubt they mind terribly: http://www.google.com/s2/favicons?domain=techcrunch.com http://www.google.com/s2/favicons?domain=techcrunch.com EDIT: I should point out that the accuracy is poor compared to most browsers.
- 15y ago
- Omnipresent 15y agoReally good work. Would love a blog post breaking down how you went on doing everything.
- JoelSutherland 15y agoI was going to post one concurrently -- but I thought it would be more interesting to see how the server-side cache held up under load. We're grabbing some screens while this is the top post and will include that information. 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.
- Omnipresent 15y agoI would be more interested in seeing how node.js, apis and everything was tied together. Great work!
- thoradam 15y agoWorks great in the stock Android browser, but it's stuck on "Loading" in Opera on Android. Then again . . Opera on Android seems to mess up every other site.
- bgarbiak 15y agoLovely. The only thing missing is a back button placed somewhere inside the page (so it can be used as a full screen app on iPhone).
- crenshaw 15y agoDoesn't work on IE5 mobile. :-) (I did actually try though)
- Raphael 15y agoGreat! Would you please make the Next Page button full width?
- joshka 15y ago... or drop it altogether and use some form of infinite scroll? There was a great solution to this at http://news.ycombinator.com/item?id=2592741 http://news.ycombinator.com/item?id=2592741
- jemeshsu 15y agoSorry I don't get it. Isn't http://ihackernews.com http://ihackernews.com already the mobile version of HN? The site where you get the API.
- _fn 15y agoMy only gripe with http://ihackernews.com http://ihackernews.com is the clickability. My oversized thumbs doesn't play well with the small click target.
- grisha 15y agoVery nice. I read HN from my iPhone a lot, and it's mobile version would be very handy. 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.
- DougWebb 15y agoNice. I created something like this that was text-only back in my Blackberry days, but when I switched to Android and jQueryMobile came out I enhanced my site to its current state: http://webbindustries.com/cgi-bin/myfeeds.cgi http://webbindustries.com/cgi-bin/myfeeds.cgi 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.
- johnbatch 15y agoRats! 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 links EDIT: looks like the same thing happens on ihackernews - http://ihackernews.com/comments/3001808 http://ihackernews.com/comments/3001808 - http://hn.gethifi.com/#/comments/3001808 http://hn.gethifi.com/#/comments/3001808
- JoshTriplett 15y agoLooks impressive. Planning to support logging in and commenting/voting?
- sportsTAKES 15y agoOutstanding -
- cantbecool 15y agoYour site is similar to http://www.icombinator.net/ http://www.icombinator.net/
- ericmsimons 15y agoReally cool! It doesn't work on WP7 though (which doesn't matter too much, because most people don't have a WP7 device)
- JoelSutherland 15y agoIt should work on Mango.
- ericmsimons 15y agoHaven't upgraded yet - will do it now!
- pcj 15y agoYes, works great on Mango. Like others mentioned, please do add the back button :) Personally, I would prefer if comments were directly a link. Not a big fan of the popup.
- mwsherman 15y agoWhat are you using for the “Text” version? RSS or are you parsing the source HTML?
- ga2arch 15y agoyou could try use my hn scraper written in python to overcome the api errors. https://github.com/ga2arch/py-hackernews/blob/master/hn.py 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 =)
- aDemoUzer 15y agoMy skin for HackerNews http://harpb.com/Hack3rNews/ http://harpb.com/Hack3rNews/
- bobbywilson0 15y agoI like this better than both of the native apps I have tried for android. Not only is it a more intuitive UI for me it is also very snappy. Good work.
- windexh8er 15y agoAwesome UI! Was working great and then the API errors started in. This easily replaces all of the crappy Android apps for HN.
- chinatechus 15y agoamazing!
- budu3 15y agoCan I vote on stories?
- akkartik 15y agoNo because they can't make cross-domain ajax calls. And they can't make requests on behalf of very many people on their server without hammering the HN server. Even if they were willing to ask for people's passwords. We thought about this question extensively while building http://hackerstream.com http://hackerstream.com
- sktrdie 15y agoI especially like the textual version of the link. This will be helpful on my mobile device, where I pay for connectivity, loading only what is important is great.