4 ms·
> Say no to the heavy frontend solutions such as React, Vue, Svelte, Angular I get the author is looking for some integration with Django and server-rendered H
by pier25 3y ago
> Say no to the heavy frontend solutions such as React, Vue, Svelte, Angular
I get the author is looking for some integration with Django and server-rendered HTML but Svelte is definitely not heavy and v5 is going to produce even less JS code.
- paulddraper 3y agoSvelte had it's own language and compiler.
- pier25 3y agoIt has a compiler, yes, but if you know HTML and JS you already know like 99% of the language.
- willsmith72 3y agoI wanna know more about what's "heavy" and what's not, and why choose lighter solutions over heavier. Are we talking purely bytes? Popularity? Typical codebase size? Browser performance? And whichever it is, why are we prioritising it?
- paulddraper 3y agoHeavy as in "conceptually heavy" -- complex, steep learning curve, extra build steps, bringing in non-Django paradigms. I.e. looking for solutions that "render HTML in Django, and use Javascript to enhance the server-rendred [sic] HTML." HTMX is the most popular solution.
- em-bee 3y ago"conceptually heavy" -- complex, steep learning curve, extra build steps, bringing in non-Django paradigms which i think is, for the most part an exaggeration. if someone feels that learning a new framework is heavy and has a steep learning curve, then either they are juniors that need more practice and experience, or they have never tried learning a second framework, or they have become lazy. (but here i'd also like to blame employers that don't give their developers time to learn new stuff)
- aragilar 3y agoOr simply what integrates well with an existing framework. The "lightweight" examples given allow for non-JS templating on the backend (in this case Python, but the article looks at other non-JS languages), whereas other frameworks require build steps/"SSR" and effectively require a REST or other API framework.
- em-bee 3y agosee my comment here for a response: https://news.ycombinator.com/item?id=39157910 https://news.ycombinator.com/item?id=39157910 btw, i use frontend frameworks without bundlers/build steps, but load then statically straight into the browser. that may seem a bit wasteful, but it dramatically simplifies the maintenance needs for a site, guaranteeing that the site will keep running and be maintainable for the forseeable future.
- deleted 3y ago[deleted]
- Vinnl 3y agoI imagine it's not so much about learning curve, but about the number of concepts to keep in mind while working on your code. If an application has lots of client-side state (and the framework to support that), for example, that means you have a whole additional lifecycle of your code to reason about. Whereas if it at most sets a disabled attribute on a button, that's conceptually a whole lot lighter.
- agumonkey 3y ago> the number of concepts to keep in mind while working on your code. And most importantly, the amount of fragile ad-hoc, potentially abandonned "concepts". I have a very different feeling when I grind hard to learn about physics or maths compared to IT solutions. The latter almost always feel empty and very temporary, which causes fatigue to rise way faster.
- em-bee 3y agoIf an application has lots of client-side state, for example, that means you have a whole additional lifecycle of your code to reason about. not really, because you no longer need to track that state in the backend. the backend can be reduced to data storage and business logic calculations. the cases where you need track some state in both frontend and backend should be rare. from my experience all the UI code is moved from the backend to the frontend. it's not being duplicated. duplication of code can happen during a transition, but it should be temporary
- pier25 3y agoI assumed size which is probably what most people would associate with "heavy".
- PrimeMcFly 3y ago> I wanna know more I want to know more. Let's try to maintain a high level of writing and communication here.
- AlexeyBelov 3y ago> Let's Let us.
- PrimeMcFly 3y agoContractions are proper English. Your "correction" is not one. Nice try though.
- ttymck 3y agoDefine heavy
- mcintyre1994 3y agoI thought Vue was in that lighter space where you can easily add it to a server side app too. Last I hacked on Livebook they were using it for the more complex front end widgets for example, and that’s primarily a Phoenix Liveview app.
- whizzter 3y agoYeah, Vue is my go-to lightweight option and while using Vue with pre-build steps adds a bit of complexity you can also use Vue without any build steps(95% of my Vue usage). And then putting something like Phoenix liveview,etc into the lightweight category, really feels like putting things in categories via rumors or smth.