10 ms·
Sorry, but I am going to comment on a technical implementation rather than the content of a site. The site shows blank page without JS enabled. I did not under
by codedokode 10y ago
Sorry, but I am going to comment on a technical implementation rather than the content of a site.
The site shows blank page without JS enabled. I did not understand why one would need one megabyte of minified Javascript to display a list of 10 items. Probably it is because the developers were too busy learning trendy JS frameworks and do not know about HTML and server side page generation (in PHP this could be done much easier without JS frameworks and API).
And to make page load even slower after loading a megabyte of Javascript they make an additional API request to load a list of links. Hey, you could just send this list as a HTML file from the start.
Also it looks like they do not know about HTML <script> tags and encode configuration as a value of a <meta> tag.
The page has small white padding below footer.
- 1945 10y agoEnable gzip
- codedokode 10y agoI can bet uncompressed 10 Kb HTML file still would load faster.
- mamadrood 10y agoThat meta configuration looks like ember.js
- codedokode 10y agoI looked at Ember documentation and saw a tutorial on building a rental site [1] that could be easily implemented without Ember. They should have chosen a better example that would show clear benefints from using complicated JS framework otherwise it just looks like over-engineered solution for a simple problem. Also Ember documentation doesn't give any reasoning why (or when) one should or should not use their framework. But they have a mustache on a front page. [1] https://guides.emberjs.com/v2.9.0/tutorial/ember-cli/ https://guides.emberjs.com/v2.9.0/tutorial/ember-cli/
- hluska 10y agoI've read several of your comments on this thread and, while you do make some good points, you are extremely condescending. So condescending that it is almost impossible for me to read an entire one of your comments. In the wild, yeah, js failovers are a good idea. But this is a show HN...the author had no idea if it would even work and just wanted to get something out. Instead of substantive comments designed to help the author build a better application, you instead choose to go on a failover holy war??? That's not only weak, it's uninteresting and absolutely not helpful.
- static_noise 10y agoThe page should at least display a message like "This page requires JavaScript." and contact details when JavaScript is disabled.
- teekert 10y agoThat footer also does not move in Firefox and stays on top of one of the list items when you scroll down.
- MattBearman 10y agoFair comment that this site doesn't look like it needs a JS framework, but I think it's a little unfair to assume the dev doesn't know about HTML or server side languages. It's more likely that the OP uses this JS framework a lot and knows it well, so it was quicker for them to build it this way.
- rasz_pl 10y agoI would guess said dev made this website because he got fired, and looking at the code you start to understand why.
- Swizec 10y agoI'm someone who builds a lot of SPAs for things that really don't need to be SPAs. The ability to host on gh-pages and to not implement a backend at all seals the deal for me. That said, I try to load a static version of the compiled result as part of the skeleton HTML. Even if it gets overwritten by the SPA afterwards, it makes things look faster.
- codedokode 10y agoStoring and processing data locally in a user's browser without using server API actually can be a valid reason to build a client-side application. But they just use one megabyte of JS code to implement client-side rendering for JSON data received from API. Serving a 10 Kb HTML page is obviously a better solution. I see no single benefit from using complicated JS framework here.
- noxToken 10y agoExperience? Everyone is talking about X, but I've never used it. Perhaps I can build something simple just to dip my toe into X.
- JusticeJuice 10y agoPreach. Static client all the way.
- kejaed 10y agoWould you mind sharing any frameworks you use, specifically wrt ones that work well when hosting on gh-pages? Thanks.
- Swizec 10y agoI like to put things together with React. It's surprisingly good for static-ish landing pages because you can shuffle things around quickly once you have a few basic widgets built. When starting from react-create-app it's also super easy to deploy to gh-pages: npm run deploy It's really beautiful to work with and getting better every week.
- Bladtman 10y ago"The site shows blank page without JS enabled" Oh my goodness, a website that requires a web browser to use! How will we survive..
- Gracana 10y agoApparently we will survive slowly, and with lots of timeouts.
- tokenizerrr 10y ago> The site shows blank page without JS enabled. I did not understand why one would need one megabyte of minified Javascript to display a list of 10 items. It's probably because you opted to disable one of the essential web technologies in your browser. Plenty of websites are written as SPAs nowadays. This is like complaining that pages are black on white because you disabled CSS. Or that you can't see websites at all because you uninstalled your browser.
- mibbiting 10y agoThis is why computers become slower and slower, and people have to upgrade. Because lazy developers make idiotic choices. It's a static list of items. Hardly very efficient to load all that javascript, do a server request, just to display a list is it.
- tokenizerrr 10y agoPerhaps we should be going back to writing websites in assembly.
- the_gastropod 10y agoI don't think this is a fair argument. Writing web pages as single page JS apps is _harder_ than writing them as server-side generated html responses. And in many cases (this one as a great example), the user experience is worse for having done so.
- ddorian43 10y agoSee http://webassembly.org/ http://webassembly.org/ . While not raw assembly, we have to because of the js nonsense. This will ofcourse also increase the jsnonsense, cause now everything will be more efficient so we can put alot more crap.
- tokenizerrr 10y agoI am aware of webassembly, and I'm sure that codedokode would explode if s/he were to notice that a website such as this was written using it. It wouldn't run without JavaScript being enabled, for one.
- joe563323 10y agoThe next and prev button does not work in firefox.
- wjd2030 10y agoB/c they wanted to do it that way and you're nothing but a negative troll spewing what you think is right. Lets have someone critique all your work and criticize everything they disagree with.
- retube 10y agoIt doesn't even load at all in my corp environment. I am guessing the CDN or where ever the framework .js is hosted is blocked by our firewall.
- FatalBaboon 10y agoI have JS enabled but block tracking scripts, and I get a blank page as well.
- fiatjaf 10y agoPerhaps the developers were thinking about expanding the functionalities of the site in a way that server-side rendering can't help them, so they started doing it all in JS anyway. In the future, if the site survives and gets bigger, they will surely think about corner use-cases like yours and work some time in server-side rendering.
- rplnt 10y ago> why one would need one megabyte of minified Javascript to display a list of 10 items Ah, this might explain why it's down.
- bryanrasmussen 10y agoAlthough I will agree this is bad, I am going to probably use a bunch of non-essential stuff to build a personal project because I need to be able to point to having used these technologies. Sometimes bad technologies get used for social reasons.
- bdg 10y agoWhen provided this sort of feedback, filter it through the lens of business value instead.
- sergiotapia 10y agoThis type of comment was already popular 4 years ago. The web changed back then, it changed even more now. Just enable JS.
- flukus 10y agoI wish I'd listened then.
- pragone 10y agoI was wondering why its just a blank, white page when i view it on my ipad. Now i know
- gnu8 10y agoMaybe that's why he's fired.
- acedinlowball 10y agoTo be fair, only idiots browse the internet with JS disabled and expect things to work.