Live data from Hacker News

Fresh is a new full stack web framework for Deno

deno.com

171–180 of 249 posts

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

#172

For those websites that can use it (like a blog), it seems like static site generation would be better, to cache the database requests? Then you can run in the free tier of Netlify or using GitHub pages, for example. Or to do the opposite, for a single-player website where there aren't any server requests to cache, a client-only website can run offline. Fresh looks good for multi-player websites that are unavoidably…

I similarly wish Fresh did full server side generation. Even Next.JS has a tool to export as a static site. Maybe it will come to Fresh at some point, or maybe it’s there and just not well documented. I’m using NanoJSX with Deno to render JSX on the server and spit the result into a file, but I’m having to write a lot of SSG stuff myself, (like logic to loop over files).

Yeah, for their examples there isn’t even a reason to use dynamic rendering instead of static rendering (pre-build a static site), as the response doesn’t change for different requests. Dynamic rendering only pays of if you do something more complex, like authentication, etc.

But I guess static rendering would go against their mantra of “no build step”, which even currently is actually false, as they need to generate the manifest file.

See also https://news.ycombinator.com/item?id=31723205

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

#173
post #8

> But client-side rendering is expensive; the framework often will ship hundreds of kilobytes of client-side JavaScript to users on each request. These JS bundles often do little more than rendering static content that could just as well have been served as plain HTML. server-side rendering for each request in V8 might be more expensive to host than client side rendering in V8? for a properly-chunked app, hopefully m…

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 optimize as an afterthought. test on crappy hardware, test with huge datasets, test on slow connections, test with asset caching disabled, target 60fps+.

https://betterprogramming.pub/creating-a-web-performance-cul...

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

#174

This looks like something I'd like to try but I don't like JSX (TSX). Is it possible to use Fresh with Vue in place of Preact, and write Vue components that split HTML templates from script and style tags?

Yes, same here. Hate JSX/TSX. Would love to have choice of templating engine so can stick to pure HTML/CSS as much as possible. I still prefer simple template engines like Mustache which respect HTML.

You could use Oak with Eta

https://oakserver.github.io/oak/ https://eta.js.org/

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

#175

Earlier quoted context omitted.

This argument is fuzzy. Your goal shouldn't be replacement just because it's old , but rather, because you actually have a more efficient or easy to understand approach. As far as I can tell, there's a marketing term ("post-unix") but not any concrete ideas backing it. The Ryan Dahl post linked above is equally fuzzy as it seems to just be saying "use an encapsulated runtime for scripting that replaces existing Unix-…

You're over-thinking things. Post-unix clearly just means "something more modern than 70s Unix design". I don't think anyone ever tries to make something newer but not better so that's never a goal.

I'm not over-thinking, I'm asking for a clear definition of what that means. The original comment that kicked off this thread said "what is post unix."

There is a clear-ish definition (not running JavaScript in a Linux container like Docker but running it directly on top of the OS in its own containerized runtime) explained in the linked video that comment was replying to, but no, it's not just "something more modern than 70s Unix design."

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

#176

All the activity around V8 Isolates + "workers" is so cool-- exceptional performance, don't need to think about regions, and CDN-like benefits Shopify's new store-builder thinks this way too: https://github.com/Shopify/hydrogen

The only issue I have with it is that it's a pretty niche application. I think most sites will have a single database probably in a single location, in which case you don't gain anything from edge compute as far as I can tell. Maybe if these things came with some kind of fancy "edge database" it would cover normal use cases, but they never seem to mention that so I assume it doesn't exist.

Single-instance private FaaS (as opposed to multi-instance public FaaS) allow to implement edge databases, assuming there is persistence. Currently only Cloudflare offers this with Durable Objects and the industry seems to not have caught on, maybe not even understood, yet.

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

#177

Earlier quoted context omitted.

I didn’t find a mention id this Fresh framework could also run on Node. In other words: is it relying on anything deno-specific?

Deno and Node are not generally compatible: - their module/packaging systems are totally different - their APIs for interacting with the system are different

How far along is the story of cross compilation for the two ecosystems?

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

#178

Earlier quoted context omitted.

In the case of laravel, I think that having by default a pretty awesome templating system (which even allows for components), a webpack based build system for frontend assets, easy way to serve, cache and bust assets, and a trivially easy way to submit forms and validate user input makes it pretty full stack. Same for Rails, and not event talking about HotWire/LiveWire with might not be considered parts of the framew…

In today's world that's not frontend enough (as much as it pains me to say). You need to ship at least a few MBs of JS to prove you are a real frontend engineer.

haha, lol... So I'm a top 1% dev then :). I have all the megabytes in my frontend.

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

#179
post #57

Earlier quoted context omitted.

Is that kind of a container less capable than just about any client (except embedded of course)? Sorry if it's a stupid question. I'm not familiar with web SSR.

Yes, and if you've got a fairly complex website it's unlikely it could render more than a couple dozen rendered requests per second. If you're not rendering and instead getting them from a cache, that would be different of course.

The question makes no sense and your answer is wildly misleading and inaccurate.

A server is not 'rendering' a website the same way a client does.

A couple of dozen requests a second? In drupal in dev mode maybe but even then... I feel like we need to have a bit of a knowledge reset before spouting supposed info about csr v ssr

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

#180
post #138

Is there any company that is hiring that uses fresh or deno in production?

IIRC Vercel and Netlify edge functions are actually using Deno Deploy. Edit: No, it's only Netlify.

No, Vercel Edge Functions use Cloudflare Workers.

https://news.ycombinator.com/item?id=29003514

Post reply on HN