HN user

korynunn

107 karma
Posts14
Comments42
View on HN

No this is my module that I've used to build enterprise apps with.

I've used both for years, feel free to critique fastn when you've tried it for a week.

You already know what your life costs (per year). What your life is costing in real time is the interesting bit.

PS: I'm the most Anglo-Saxon Aussie you've seen, I just wanted to make use of the 'now.sh' domain.

Using crel as a comparison:

var input = crel('input', {type:'email'});

vs:

var wrapper = document.createElement('div'); wrapper.innerHTML = '<input type="email">'; var input = wrapper.children[0];

- Most screen readers handle DOM updates just fine.

- I'm defining a web-app as something that feels like an application, not a website. If you are making a news site, fastn probably isn't the way to render everything. You can however just use fastn enhanced functionality, since it isn't a framework, just a tool to make chunks of UI.

- on average, 99% of users have JavaScript installed. As above, if your target audience is `literally everyone`, sure, fastn probably isn't the way to go. Having been a library developer for nearly a decade now, I am intimately aware that different browsers have differences. Fastn should work the same on all modern browsers, and if you find any bugs, let me know and I'll fix them :).

- Delays from loading additional files will be negligible. Not sure how to back that statement up tho ¯\_(ツ)_/¯

- As mentioned, rendering a fastn app on the client is very fast, faster than serving an equivalent page from ASP.net for example, even in a 1:1 race. The issue with server-side templating is that there is one server rendering N requests, whereas with client-side rendering, the N clients are doing the heavy (actually pretty light) lifting.

- I spend an enormous chunk of my time doing performance analysis and improvements. Have a look at recent commits to fastn or enti (the databinding module) and you will see quite a few commits with "performance" in them. We have non-trivial applications using fastn that perform at extremely acceptable speed (hundreds of fields, with live validation, across multiple tabs, renders in around 150ms)

- My work PC is only a few times faster than my Nexus 5. Btw, the homepage renders in 1.2s(~500ms JS) on my phone.

I hope you do give it a go. Fastn isn't a tool for every job, that's the point, it's just a tool. It's up to the developer to decide if it is appropriate.

It has been developed mostly with cordova apps in mind (and yes, they have been made with it, and are quite snappy), where abandoning HTML is actually really nice. It makes writing apps more like how you would do it native, in code, not a markup language.

Accessibility: Screen readers read DOM, not HTML. As long as you produce good DOM, screen readers will work fine.

Privacy (JS off): You can't make a complex web-app without JavaScript, and statistically speaking, everyone has it on always.

Performance: This can be measured in may ways.

- Server time: fastn is just static files, so server time is negligible.

- Transport time: fastn apps are often smaller than the DOM they produce, so server-side rendering the content first would only slow down load times. The trivial example app is 31KB, a large AWS-like application at work is about 40KB.

- Initialisation time: fastn is very fast. On my old slow work PC, the homepage loads 165ms after page ready, and its about a 700ms wait from hitting the refresh button, to everything being shown.

But then, judging by your "paper to cardboard" comment, you aren't here to discuss pros 'n cons :)

I've had this criticism many times in the past, but after doing exclusively JS rendered DOM for about 5 years now, I personally could never go back.

I write large-scale web front-ends as my day-job, they used a number of tools, but the one thing in common is the HTML-free approach. It creates much more manageable codebases, encourages reusability, allows for easy composition, and massive flexibility.

You mention that you "don't touch it" due to decades of experience. Have a look at the example app (https://github.com/KoryNunn/fastn/blob/gh-pages/example/) as an example of app structure. Yes, it's a trivial example, but it's not really that different to the non-trivial apps I build at work.

Maybe it's time to give it a go again?

This is absolutely true, for fairly simple sites like news sites and forums, HTML is great. For building applications it is tedious. The web platform is amazing for applications, when you don't treat the web like a piece of paper.

True, perhaps a better description would be that HTML is a sibling to XML.

Whether HTML was intended for humans or not, it isn't in my opinion a particularly nice way to develop applications. Don't get me wrong, I love web applications, but writing them with HTML isn't a requirement.