HNHacker News
TopNewBestAskShowJobs

thekingshorses

305 karma · joined June 12, 2012

http://hn.premii.com - Hacker News Webapp (Mobile + Desktop)

http://reddit.premii.com - Reddit Webapp (Mobile + Desktop) - no tracking - fast - works in congnito

http://premii.com

submissionscomments
thekingshorses··on The “Web Application” Myth
I know google is experimenting but I have never seen any JS rendered page in the google search result.

My mobile hacker news client http://hn.premii.com/ ranks top on Google but not because of the content. Content is not indexed by Google.

thekingshorses··on The “Web Application” Myth
> it would be interesting to learn what lead to over 400,000 lines of CSS in over 2000 files for an actually not that complex site in the first place

This is so common. Lot of time, they use CSS to change the design of the module, which is how it should be. But when they revert the look of the module, instead of deleting CSS, they add new rules to overwrite existing CSS. Which leads to specificity fight and !important.

At my previous job, site was rendering on server. It was old, and we wanted to redesign it. I wanted to keep rendering on the server. CTO and VP wanted to build Angular site because everyone is moving to Angular and its easy to find Angular developers. Company's 30+% of new visitors comes through SEO.

thekingshorses··on In search of the perfect JavaScript framework
I like the direction author is going. I have used similar methodology designing my applications (for mobile), simple, micro libraries, one way data binding.

http://hn.premii.com/

http://reddit.premii.com/

* I have bunch of helper functions (UI and non-UI). Each function define in its own file and independent (easy to unit test). Personal library like jQuery but not a jQuery replacement.

* App is route based. One route to many controllers. Each controller is a page/screen on mobile.

* There is only one model (API) that interface with 3rd party library. API layer talks to 3rd party library to get data or gets data from server directly, caches data, etc. Provides sync (Cached data) and async (Cached data or fresh from server) interface to controllers.

* There is a app class or I call it a page manager. Responsible for managing pages like ordering, loading, unloading etc (Kind of big and complex 200+ lines of logic).

- Decides which page to animate in which direction on mobile (Loading new page or going back).

- Order of pages (Back button)

- Passes events to its controllers

- Decides which pages to keep in DOM, and which to remove.

--- If you go from homepage to comments to profile page, all pages are in DOM.

--- When you go back to comments page from profile page, profile page will be destroyed and controller will be notified. Same happens when you go from comments to home page.

--- If you go to same comments page again, it will be loaded as a new page.

* Controller:

- Each controller may have multiple CSS and templates

- Controller uses its template to render

- Using sync API to get data to renders page.

- If sync API returns no data, renders empty page with loading, and makes async API call.

- Controller are idle when transitioning (animating) from one page to another on mobile. (Very important for smooth animation)

- Simple but fat controllers

- Controller handles events, UI logic

- Self cleaning so that browser can collect garbage when necessary

I package app using node/gulp. Anything that is not specific to page/app related, it becomes part of a helper library. Each app has its own model (Data layer), and controllers. I use micro templates, precompile using node for faster performance.

thekingshorses··on Missing the Point of Server-side Rendered JavaScript Apps
Whatever architecture you use, it all depends on your requirements. Example: If SEO is important, build server side rendering. Period.

Just make sure you provide best user experience possible.

Author claims Bustle is one of the good JS rendered site. If you scroll down http://www.bustle.com/ and click on the item, and if you use back button, you won't be at the same position. This is one of the biggest problem with JS rendered site.

Now compare this to reddit.com. It works great without client side rendering, and not have any issues that most client side rendering sites has.

I am not oppose to JS only app. Problem is, it is hard to build a good JS only app. I do build client only apps.

Hacker news: http://hn.premii.com/

Reddit: http://reddit.premii.com/

thekingshorses··on The problem with Angular
Did you ever compare gzipped JSON that you are sending vs gzipped rendered HTML using the same JSON blob?

You will be surprised that difference between the two will be less than 1%.

thekingshorses··on What's new in CSS Selectors 4
:shame:
thekingshorses··on What's new in CSS Selectors 4
Where exactly one uses nth-selector other than to style first/last and even/odd items?

We are using nth-selector to style icon for nav items, which IMO is a wrong way of styling nav items.

There are some good CSS <del>selector</del> properties like position sticky but not available in most browsers :(

thekingshorses··on Show HN: New Hacker News web client
There is no API to login/comment.

I have web client http://hn.premii.com/ that uses new APIs (No login).

iOS client https://itunes.apple.com/us/app/hacker-news-yc/id713733435 where you can login and upvote.

thekingshorses··on Show HN: New Hacker News web client
Try http://hn.premii.com/ or download ios/android client http://hn.premii.com/about/
thekingshorses··on Revisiting the “Cookieless Domain” Recommendation
try http://hn.premii.com/ - Even though it relies on 3rd party for data (backend), it loads quickly.

If you have a control over backend, you can optimize it further.

thekingshorses··on Show HN: Collapse HN Comments
http://hn.premii.com/

- You can collapse threads (children and parents).

- Use keyboard shortcuts (j-next / k-prev / x-collapse+next)

- Light/Dark Theme

thekingshorses··on Show HN: Hacker News iOS client using the new official API
This will be updated soon - https://play.google.com/store/apps/details?id=com.premii.hn

Its ready, but update will remove upvoting. So trying to figure out how to keep upvoting with the new API.

thekingshorses··on Hacker News API
I added upvoting stories and comments feature to my ios/android app few weeks ago. And thinking about adding commenting.

http://hn.premii.com/about

Now I will have to remove that. Please keep current version of the YC site on a different subdomain.

thekingshorses··on Show HN: Hacker News Redesign
Even though I have implemented http://hn.premii.com/, I think current YC is much better. It should be more mobile friendly and remove tables for better accessibility. And also provide APIs so people don't have to scrap for alternate behavior.
thekingshorses··on First they came for the Whistleblowers, and I did not speak out
Cached:

http://hn.premii.com/#/article/7993426/first-they-came-for-t...

thekingshorses··on Hybrid sweet spot: Native navigation, web content
I started working on this but no time.

http://dn.premii.com/ - Designer News For mobile. Lot of animations and works on Android, Safari on iOS and IE10+ on WP8.

thekingshorses··on Hybrid sweet spot: Native navigation, web content
User's don't care if you use native or HTML5 as long as you get them what they need.

One of the major problem with HTML5 is not HTML5/JS but how you we are trying to use those. We want to use all the libraries and frameworks. Backbone, AngularJS, bootstrap are good but using those on mobile will slow down your app. Also there is this mentality that you can only have good interaction if you build 100% client side rendering.

Everyone thinks that rendering on client will be faster as we are only sending JSON and html templates are cached. They should do compare and see if JSON that they are sending is really lighter then rendered HTML. Most of the time I found that after gzip, HTML is smaller compare to JSON.

Browser wise, Android is lagging behind when it comes to transitions. Its getting better but still not good as Safari or IE on WP8. Also Samsung is always uses wrong version of android browser. Even on galaxy S4, they screwed up big time (Browser on S3 was better than S4).

I build hacker news mobile client using HTML5, and I do have 4.5 star ratings on the both app stores.

https://play.google.com/store/apps/details?id=com.premii.hn

https://itunes.apple.com/us/app/hacker-news-yc/id713733435

or Try it on your browser

http://hn.premii.com/

thekingshorses··on How to: code JavaScript using Twitter bootstrap best practices
This reduces size after uglifying.

  (function(window, $, otherGlobal) {  
     $ = window.jQuery;
     otherGlobal = window.otherGlobal;

     //code here
  })(window);
thekingshorses··on Ask HN:When will html 5 become the standard for mobile apps?
That's not true at all. My app is mostly HTML5 and it is in the iOS app store and Android play store.

http://hn.premii.com/about/

> Did you know that only a year ago it was possible tu create a native app with basically two features: push notifications and a webview. Inside the webview you could run your web app. Now appstores reject these type of apps, they require x% of the code base/features to be native (I believe x is changing, maybe is 50 now?).

thekingshorses··on Realistic rain drops in JS
You can try it out my hacker news web app for mobile. http://hn.premii.com

Source code at http://github.com/premii/hn Or This is another awesome HN app. Scroll down to bottom for source code. http://hackerwebapp.com/

thekingshorses··on iOS 7.1 Mobile Safari Minimal UI
I use it at http://hn.premii.com/

I can't believe they didn't tested orientation change with minimal-ui.

Also, in landscape mode, you loose top ~30px area. If you tap there, it will show safari chrome, and your app won't receive tap.

thekingshorses··on Show HN: I open-sourced my web app alternative to Illustrator
Nice. I have been thinking about building a web app similar to sketch (http://www.bohemiancoding.com/sketch/). This is pretty good.
thekingshorses··on Countries Where Windows Phone Outsells The iPhone
IE browser on the wp8 is good, but wp8 as a platform sucks. So many features are not supported or has issues when rendering HTML5 app on wp8 platform.

My HN mobile client works fine on WP8/IE, but so many hacks required to work as an HTML5 WP8 app.

thekingshorses··on Interviewing as a Front-End Engineer in San Francisco
This guy hired me based on my FE skills even though I didn't had any development experience. It was my first job as a FE engineer.

I won't be able to get a job based on algorithm/standard CS interview questions.

thekingshorses··on oDesk to merge with Elance
Bolivia
thekingshorses··on An HTML/CSS/JS code editor in 230+ bytes
Why do you want to include a huge library if only use is to check if page is ready?

Extra HTTP request has more overhead then few inline bytes.

if you put that code at bottom, you won't need jQuery to know if page is ready, and won't need extra HTTP request.

thekingshorses··on An HTML/CSS/JS code editor in 230+ bytes
You shouldn't use jQuery, inline CSS and inline JS right before closing </body> tag.
thekingshorses··on Google is building Chrome apps support for Android and iOS
Hacker news mobile client:

http://hn.premii.com/

https://itunes.apple.com/us/app/hacker-news-yc/id713733435

https://play.google.com/store/apps/details?id=com.premii.hn

thekingshorses··on First Tizen tablet ships to developers
Amazon ported chromium browser to kindle fire and allowing developers to submit webapps. It will act like native app. User can download webapps from app store just like native apps. Webapps will use chromium instead of android browser. http://developer.amazon.com/webapps

New chrome beta on Android allows webapps to be added to your home screen like iOS, but on android it is more usable and functional than iOS.

Try my app on chrome beta on Android: http://hn.premii.com/

I don't think HTML5 and webapps are going away.

thekingshorses··on An unofficial alternative to the HN interface
You can try this on your mobile browser: http://hn.premii.com/

or

iOS: https://itunes.apple.com/us/app/hacker-news-yc/id713733435

Android: https://play.google.com/store/apps/details?id=com.premii.hn

← PreviousPage 4 of 7Next →