Live data from Hacker News

Fresh is a new full stack web framework for Deno

deno.com

221–230 of 249 posts

Re: Fresh is a new full stack web framework for Deno

#221
post #183
post #91

Earlier quoted context omitted.

I've worked in e-commerce for a while and have heard similar stated from time to time and seemed like someone was trying to fit a linear line over what's almost certainly an s-curve distribution. At lower latencies no one is going to leave your site because it takes 1200ms instead of 1000ms to fully load a page. But at some point almost everyone is going to leave your site rather than wait. I also find these stats re…

Also, this can make me bounce: ,,payment failed, please start again with an empty shopping cart''. It happens on quite many webshops.

I guess that's not really performance, but I agree that UX is one of those things that can subtlety annoy someone enough that they'll just give up and go elsewhere. That's a pretty extreme example, but even simple things like asking the user for too much information over too many pages at checkout can dramatically increase bounce rate. If a user can't land on your site, find what they're looking for then checkout within a few minutes, something is wrong.

On payment failures, an interesting solution an ecommerce I used to work for came up with was just to place the order on payment failure. They figured it was better just to send out an email after the fact asking them to try again and if that failed they could call and take the payment over the phone if need be. We targeted an older demographic and sold fairly pricey products though. I guess that model wouldn't work so well if you're selling $10 tshirts. I believe Amazon does something similar. I know they've sent me emails in the past letting me know my payment failed after placing an order.

Re: Fresh is a new full stack web framework for Deno

#222

Earlier quoted context omitted.

thx for your comment, as i said i might get all wrong. Still think PHP template engines like Twig are well designed and make you highly productive. Personally, I feel JSX is a code smell, as it mixes UI snippets with code. But this is maybe my old school software engineering attitude. I am just waiting for the next OSCommerce package written in JSX...

> mixes UI snippets with code You can never really avoid it unless you only use HTML. Templates are code. I think JSX is nicer because it's fully featured and the same syntax as regular JS, not a subset limited template language

I haven't used Twig, but have used other PHP templating engines. Scope is the big deal for me. JSX has actual scoping (it's just JavaScript), function calls, etc. PHP templates have one scope, even when you enter an included sub template.

Laravel released template components in version 7, but I haven't been able to try them yet and I'm hoping they'll improve things.

Re: Fresh is a new full stack web framework for Deno

#224
`deno run -A`

So we're giving up on "it's more secure"?

EDIT: I'm actually a real fan of Deno, but that was never because of its security promises. Security is both technical and cultural, and I think cases like this suggest that while the technical side was always shaky, the cultural side is just as weak. If first-party material promotes the idea of running scripts with `-A`, then that's the direction the community will be led.

Re: Fresh is a new full stack web framework for Deno

#225

Earlier quoted context omitted.

CSR is expensive, because you lose customers over bad performance (measurably), and you can not scale the client. You can however scale the server.

modern JS runtimes are extremely fast on all hardware that's not a 2000-era phone or an embedded micro-controller with 4MB ram. if your CSR is slow on a modern client, then that same JS code will bring your server to its knees when you simply migrate it to an equivalent V8-powered JS backend. scaling the server will not solve this; you just have to write fast JS code and pay attention when you write it, not merely op…

> that same JS code will bring your server to its knees when you simply migrate it to an equivalent V8-powered JS backend.

It's not the same because on the server you usually have some form of caching, and the V8 engine will have already JIT'd that code as well.

Re: Fresh is a new full stack web framework for Deno

#226
The issue I have is, if I understand correctly, you need to go to the server for everything. Their sauce is of course that server is close, maybe 10ms away. But it needs to be online, and so do you.

If most things interactive on your site need a round trip BEFORE the interactivity (e.g. a Like button) then this is OK.

However if you are writing a web app which does a lot of stuff offline and there is no reason for it to not work offline then this is an issue.

Where it is a bit sucky is something like clicking an expand button, and needing a network request for basically setting a {display:'block'} style on an element.

I might be strawman-ing a bit there because you would probably chuck in a tiny JS script to do that one job and not religiously follow "no JS".

But I am sure there are good examples of wanting offline capability.

However this is not a showstopper: This model is great for some things, bad for others. It is a welcome new choice in the palette of web dev options.

I imagine it might be premature optimization for many sites though, given that it is a trade off.

If you care about minimal JS to the client, another approach might be to use https://svelte.dev/. I have not tried it, but I am curious.

Re: Fresh is a new full stack web framework for Deno

#227

The issue I have is, if I understand correctly, you need to go to the server for everything. Their sauce is of course that server is close, maybe 10ms away. But it needs to be online, and so do you. If most things interactive on your site need a round trip BEFORE the interactivity (e.g. a Like button) then this is OK. However if you are writing a web app which does a lot of stuff offline and there is no reason for it…

That's exactly the island in Fresh does. Use Island for interactivity

Re: Fresh is a new full stack web framework for Deno

#228

In 2007 I was writing websites that were mostly rendered on a server, with JavaScript used selectively in some places for interactivity I remember writing at the time that moving everything to the client was solving one problem (poor encapsulation of JavaScript-powered front-end components) with another (needlessly rendering everything on the client) The industry moved toward CSR anyway, and I had to learn it to cont…

I'm guessing it's a bit of a pendulum, this is seen in so many areas of human society. We move in a direction and someone says "we ought to move in the complete opposite way" and so we do, then after some time it is clear this new approach isn't working out and we come back to the other side of the pendulum.

With time, of course, it is likely that we end up in an equilibrium at the middle. In reality, we don't know what we like and what we don't like until we experience it.

Re: Fresh is a new full stack web framework for Deno

#229

In 2007 I was writing websites that were mostly rendered on a server, with JavaScript used selectively in some places for interactivity I remember writing at the time that moving everything to the client was solving one problem (poor encapsulation of JavaScript-powered front-end components) with another (needlessly rendering everything on the client) The industry moved toward CSR anyway, and I had to learn it to cont…

I just thought of a possible reason. Maybe because the internet is generally much faster and lower latency these days? So rendering on a server can provide a good UX today, but it couldn't in 2007? Was "the edge" such a prominent concept back then? I honestly don't know if this is a good explanation or not, I have no data at hand to prove it, but I think it makes sense.

Re: Fresh is a new full stack web framework for Deno

#230

`deno run -A` So we're giving up on "it's more secure"? EDIT: I'm actually a real fan of Deno, but that was never because of its security promises. Security is both technical and cultural, and I think cases like this suggest that while the technical side was always shaky, the cultural side is just as weak. If first-party material promotes the idea of running scripts with `-A`, then that's the direction the community…

Security makes more sense for deno when your host your app in serverless v8 hosting environments like deno. They don't even have a way to specify all permissions. v8 isolates are the new cool thing in serverless hosting especially with wasm providing way to run c/rust code on v8. We have to see how this will pan out compared to containers.
Post reply on HN