Live data from Hacker News

How I built a Hacker News mobile web app, Part 2

cheeaun.com

11–20 of 24 posts

Re: How I built a Hacker News mobile web app, Part 2

#11
Looks great. I love the amount of effort you spent in CSS to make it look native. A couple feedback notes:

1. You might want to add the following to remove the Mobile Safari UI chrome when users add the app to the Home Screen:

2. On the iPad, the clickable regions are a bit awkward. The external link takes up a good 95% of the menu item. The view comments link is (logically) the button, but it's too small relative to the importance of the discussion on HN.

Re: How I built a Hacker News mobile web app, Part 2

#12
"As long as there's no way for me to simulate a built-in browser in a web app, HNmobile will remain being a non-standalone app."

I'm not sure if you had a look at it yet but there is a PhoneGap/Cordova plugin called ChildBrowser that may do what you want here. I can help you getting setup with a PhoneGap project for your app if you want!

"Since it's hosted on another domain, the API supports CORS so that HNmobile can do cross-domain XMLHttpRequests."

Why don't you use JSONP?

Re: How I built a Hacker News mobile web app, Part 2

#13
post #11

Looks great. I love the amount of effort you spent in CSS to make it look native. A couple feedback notes: 1. You might want to add the following to remove the Mobile Safari UI chrome when users add the app to the Home Screen: 2. On the iPad, the clickable regions are a bit awkward. The external link takes up a good 95% of the menu item. The view comments link is (logically) the button, but it's too small relative to…

Regarding 1. The author states that he purposefully did not include the code to remove the chrome and making it a "web app", since all external links opens up in Safari.

Re: How I built a Hacker News mobile web app, Part 2

#14
post #11

Looks great. I love the amount of effort you spent in CSS to make it look native. A couple feedback notes: 1. You might want to add the following to remove the Mobile Safari UI chrome when users add the app to the Home Screen: 2. On the iPad, the clickable regions are a bit awkward. The external link takes up a good 95% of the menu item. The view comments link is (logically) the button, but it's too small relative to…

[deleted]

Re: How I built a Hacker News mobile web app, Part 2

#15

"As long as there's no way for me to simulate a built-in browser in a web app, HNmobile will remain being a non-standalone app." I'm not sure if you had a look at it yet but there is a PhoneGap/Cordova plugin called ChildBrowser that may do what you want here. I can help you getting setup with a PhoneGap project for your app if you want! "Since it's hosted on another domain, the API supports CORS so that HNmobile can…

JSONP is considered by most to be a hack and a security risk. CORS is extremely easy to implement, as it only requires you to send some headers to the browser. For example, in a node app I recently wrote, adding CORS was just a matter of adding these lines:

  var allowCrossDomain = function(req, res, next) {
    aptUtil.log('using cors to allow for cross domain xhr');
    res.header('Access-Control-Allow-Origin', '*'); //any domain can submit requests to us.
    res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
    res.header('Access-Control-Allow-Headers', 'Content-Type');

    next();
  }; app.use(allowCrossDomain);

Re: How I built a Hacker News mobile web app, Part 2

#16
post #9

Earlier quoted context omitted.

I very seriously doubt the OP is trying to pass this off as the "official" Hacker News app. I hate geeky pedantism, but the "the" in this situation may be in reference to this being the only web based hacker news app he knows of.

Then perhaps "My" might have been a better word choice. The title is misleading- This is well plumbed territory. Not that his app isn't neat- The way he emulated a native app is technically interesting. But the presentation as if it were an official app is misleading. Here are two others I happen to have bookmarked. I suspect there are others, as well. http://hn.gethifi.com http://ihackernews.com/

Hello! Here's a friendlier way to say it!

Thanks for the post! I find the write up technically interesting!

You should change the name because there are many other projects called HN Mobile and because none of these are official. Here are other apps called HN Mobile or Hacker News Mobile:

- https://github.com/ctice/hn-mobile

- http://www.newmediacampaigns.com/blog/hacker-news-mobile-fro...

- http://hn.gethifi.com

- http://ihackernews.com

Remember, creating a project and submitting a link to HN isn't personal, just a lot of hard work and luck! Happy Monday!

Re: How I built a Hacker News mobile web app, Part 2

#17
I was also thrown off by the "the HN mobile web app" and thought it was official. I came to the comments to say, "could you please set the viewport on the regular website and save me the need for an app?", which I still want to say, but not to a third-party developer.

But really, that looks great. Love the attention to detail! I like mobile web approaches a lot. And getting that native look and feel seems to be a big reason (sometimes unspoken) why clients don't want to use the browser. Nice to see some effort put into breaking down that barrier.

Re: How I built a Hacker News mobile web app, Part 2

#20
I am planning to build native iOS up using some inspiration from this webapp (with proper credits, of course). I have ~8 HN readers on my iPhone at the moment, and event those who work (not all do), suck for some reason or other so I am using Lim's web app to read HN on my phone but I still want to have it as a native experience.
Post reply on HN