DEV Community

Cover image for Fresh: The Next-Gen JavaScript Web Framework

Fresh: The Next-Gen JavaScript Web Framework

Harsh Singh on July 04, 2022

Three days ago, Deno announced their new full stack web framework called Fresh. The framework looks great. It has a shiny new home page with clea...
Collapse
 
miketalbot profile image
Mike Talbot ⭐

Seems good for building some apps, but the lack of embedded interactive components inside other interactive components would mean that most projects I work on would not be right for it, at least yet. Very interesting though.

Collapse
 
harshhhdev profile image
Harsh Singh

That is true, and I think that'll be the main hinderance in the way of using this at scale. However I think it's still pushing innovation further regardless. The 'no build step' is something new and innovative I hadn't seen before, am interested to see how this pushes other frameworks such as Remix or Next.js.

Collapse
 
miketalbot profile image
Mike Talbot ⭐

Agreed, there are several things here which are very interesting.

Collapse
 
pyrsmk profile image
Aurélien Delogu

Ah. You can't have a tree of interactive components? This is weird.

Collapse
 
miketalbot profile image
Mike Talbot ⭐

Passing props to islands is supported, but only if the props are JSON serializable. This means that you can only pass primitive types, plain objects, and arrays. It is currently not possible to pass complex objects like Date, custom classes, or functions. This means that it is not possible to pass children to an island, as children are VNodes, which are not serializable.

It is also not supported to nest islands within other islands.

This part of the documentation is what I was referring to.

Thread Thread
 
pyrsmk profile image
Aurélien Delogu • Edited

Indeed, I forgot that part. This is quite limited then.

edit: just changed my mind, ahah

Collapse
 
harshhhdev profile image
Harsh Singh

There's a directory inside of Fresh for interactive components, I'm pretty sure you can have a tree of interactive components. Don't quote me on it though.

Collapse
 
n3m3s7s profile image
Fabio Politi

I know it is very minimalistic and hilarious... But basically we have moved backwards 10/20 years to PHP/Ruby where everything is/was SSR :D

BTW: very interesting and great article, I like the way you have "hydrated" the text with a lot of useful links!

Collapse
 
brianmcbride profile image
Brian McBride

I blame it on Next.js Overall, it is a good framework. I have no problems with Next.js as a codebase.

Vercel is a company that needs to sell a product, however. Since they are selling servers - the profit is to market the value of SSR and how easy it is to deploy to the Vercel platform.

While there are valid reasons for SSR. Static generation and data fetching via API patterns can offer the same performance and more flexibility (like as in building an offline-first "PWA" app)

Collapse
 
harshhhdev profile image
Harsh Singh

I would love for Vercel to become better and improve their pricing along with add support for something such as custom serverless functions like AWS Lambda in runtimes other than Node.js -- regardless, Next.js has pretty good compatibility with things such as AWS Lambda or even Netlify.

Collapse
 
harshhhdev profile image
Harsh Singh

Yeah -- I think it's not a good idea to make EVERYTHING server-side rendered for sure. I like how Next.js allows us to do a hybrid mix of both 😄

...and thank you! Glad you enjoyed.

Collapse
 
oxharris profile image
Oxford Harrison

This shares much of the core principles of the upcoming Webflo framework: SSR, zero build step, minimal-or-zero JS, etc.

But Webflo is taking a plunge to be a bit ahead of its time - none of the regular UI framework, just the use of native DOM APIs - both existing and proposed!

Overall goal is broad and far-reaching: demonstrate how, in addition to existing native APIs, some new proposals in this space fit together for some "futuristic" web-native approach to modern development!

I work on Webflo BTW

Collapse
 
harshhhdev profile image
Harsh Singh

What you're building is very interesting. Just check it out, gave it a star. It looks very cool. Keep up the good work.

Collapse
 
oxharris profile image
Oxford Harrison

You got me excited! Thanks for your kinds words!

Curious to see how everything evolves!

Collapse
 
shshank profile image
Shshank

Seems interesting, but will face issues while scaling, thanks for sharing.

Collapse
 
morzaram0 profile image
Chris King

What scaling issues will it face?

Collapse
 
harshhhdev profile image
Harsh Singh

I personally think that if every page is server-side rendered, it's not a good idea in the long-term.

Thread Thread
 
morzaram0 profile image
Chris King

How does server side rendering prevent scalability? What difference is it to return json as compared to spitting out an HTML page?

Thread Thread
 
harshhhdev profile image
Harsh Singh

Universal server side rendering is almost always a bad idea. I suggest you give this article a read: hyperbeam.com/blog/universal-rende...

Collapse
 
mdmarufsarker profile image
Md. Maruf Sarker

Thanks for this awesome explaination

Collapse
 
harshhhdev profile image
Harsh Singh

No problem. Thank you for reading.

Collapse
 
lucasfpnt profile image
Lucas ferreira

Wow! I liked it. Thanks for your post.

Collapse
 
harshhhdev profile image
Harsh Singh • Edited

Thanks for reading it :)

Collapse
 
ceoshikhar profile image
Shikhar

Introduce tech that was used 10-20 years ago and call it "Next-Gen" because the current gen has no idea about the old tech. Kudos.

Collapse
 
igortrindade profile image
Igor Trindade

Nuxt(3) already did the server+client side rendering what they call universal rendering and it works pretty well until now...

Collapse
 
harshhhdev profile image
Harsh Singh

Cool. I'm interested to see how it'll play out for Fresh.

Collapse
 
mhbaando profile image
Kamaal Abshir

This is really an interesting article, Fresh sounds interesting and promising frame work.

Collapse
 
harshhhdev profile image
Harsh Singh

I think it's in a very early stage right now, although there is some cool innovation that it's come out with such as the 'no build step'

Collapse
 
manuelholar profile image
Teminijesu Olaleye

Hmmmmmm... sounds amusing
Well does it work alongside Node.js or it's a different entity entirely

Collapse
 
harshhhdev profile image
Harsh Singh

I believe it's a different thing entirely, especially considering that Deno was meant to be a replacement for Node.js.

Collapse
 
topninja profile image
Michael

Thanks for your article
I make a decision to learn about Deno, Fresh while I read this article.
Thanks again, bro

Collapse
 
harshhhdev profile image
Harsh Singh

You're welcome. I'm glad this article helped you make the decision.

Collapse
 
610470416 profile image
NotFound404

I don't see a web framework.

Collapse
 
harshhhdev profile image
Harsh Singh

Not sure what you mean 😄

image