DEV Community

Lautaro Suarez
Lautaro Suarez

Posted on

Island architecture, should you use it?

Introduction

Lately i've been researching about island architecture and how some people say it's the future for javascript "0kb", but is it the future? is javascript "0kb" even possible? Well i would try to answer this questions here and explain a little about it and what i have discovered after my research on it.

What is island architecture?

I will try to introduce you with island architecture even though i'm not a expert on the field.
What island architecture is trying to achieve is basically avoid having enormous chunks of javascript in every render but instead having isolated by the components that actually need javascript such as buttons, etc.
For instance, let's say we have a navBar with a title and then a little button that if you click it will send you a notification.
The navbar since it's stateless it will be static server renderer and the button will have it's own script since its interactive and after an action it will be rehydrated to be updated.
And this is basically island architecture but it's probably not the best explanation so i will leave a link where i found the best explanation explanation.

Is it the future?

Well yes and no, let me elaborate.
I think that is the future for specific cases, since in apps where you have literally all stateful components is not useful neither recommended to use it, an example would a social media where there is basically no static components. However i think this type of architecture could be really helpful on ecommerce's and blog's for example where it will give a better performance for it and will a provide a better experience for the user.

Is javascript "0kb" possible?

Short answer: no.
Why i think that is not possible? Well several of reasons, first of all, why did we start even using javascript? Ask yourself that.
We started using it for big websites where state is a really important thing, to provide things that can probably can be achieve without it but at what cost?
So, no i don't think is possible at least not yet, but i would love to know your opinion about it.

Conclusion

I would encourage you to do your research about it and the other possibilities out there. I hope this was useFul and if you have any questions you can drop a comment and i would try to help you out.

Cheers, Lautaro.

Top comments (0)