Hacker News new | past | comments | ask | show | jobs | submit login

>From a Library to a Framework

What I liked about Vue was that it was a simple view library. Yeah, there it goes.

There seems to be a hatred towards simple tools in our generation that I can't fathom




I reject that it's specific to "our generation". The people who made the monumental balls of complexity that Java is known for certainly aren't part of "my generation" at least. And we have contemporaries who embrace simplicity in significant and impactful ways.


Java and Java ecosystem are an interesting case. Looking back over the last 15 or so years of Java most orgs went through massively over complicated setups like EJB containers to slightly better spring (GWT probably deserves a mention), to much better spring boot, and now to smaller, saner frameworks such as javeline or micronaut. The language itself is leagues and bounds ahead of what it once was in java 7 and before. And of course, the all consuming drive to use every conceivable design pattern is not in style any longer.

Generation has nothing to do with it, but trends have everything to do with complexity and constant change.


The new hipster shit of overcomplexity is putting every code snippet into a micro service, or just skip microservice and deploy everything as AWS lambda functions. Hype-driven development is a tradition.


I did a lot of development with Java in those days and virtually every Java package that mattered was a library, not a framework, and if anything the reason everything was so complex was because it was so configurable and pluggable, making it easy to use that with this and a little of something else without having to decide on a "framework".


Those people will make monumental balls of complexity regardless of the technology, that is what enteprise architecture is all about.

Every generation has a couple of people earning their bread as enterprise architect.


I mean, you don't have to use pretty much any of the listed "framework" components. They've just transitioned to official core support. You can just use the base Vue view library if you like, and plug in what bits you want from there. Maybe you don't want a router or vuex (hell, with provide/inject in Vue 3, you kinda don't even need it), so just... don't use them. And it remains very simple.

There's no hatred here, I really think you're projecting.


the simplicity of tools falls apart when you need to increase the number of your tools as your problems become complex. Because when the number of simple tools increases the defining feature is the complexity of interaction of your tools rather than how individually simple they are.

And that's why frameworks exist. Because people want their overall environment to be simple (by means of having a properly integrated system) rather than individually simple tools.

This is effectively just systems theory 101. The complexity of a system is the result of the interaction of its parts, not just the sum of its parts taken in isolation.


I think you can see this in practice with larger React projects. While React itself is more or less small and simple, all pieces you need for a large application together are no longer simple or small. Angular on the other hand is disliked by some for its "over complexity", but it just brings (and integrates!) all the tools you have to pick up and wire on you own with a small tool like React. That is not meant to be a rating, I just wanted to point out that sometimes the reasoning (and the hate) doesn't make sense.


I recommend checking out Alpine.js which looks and feel like Vue 1. They don't have any ambition to be anything more than that.

https://alpinejs.dev/


Alpine actually uses the Vue reactivity model under the hood.

I like the idea of it but for what I work on the CSP non-compliance is a deal breaker (their CSP compatible build is not ready and you lose most of the alpine benefits).

https://alpinejs.dev/advanced/csp

I think that Stimulus JS offers many of the same benefits and provides a nice abstraction for making one 'element' contain multiple behaviours.

https://stimulus.hotwired.dev/



Can attest to how great petite-vue is, which we used to build ServiceStack's new API Explorer:

https://docs.servicestack.net/api-explorer

Originally we started out with VanillaJS & hand-rolled MVC pattern however the productivity slowed as the App was getting larger, switching to petite-vue was a major productivity boost giving us a productive reactive UI, ability to componentize our App into modular components & resulted in the fastest UI we've seen in a client UI.


> What I liked about Vue was that it was a simple view library.

My go to for that would be lit-html. It's part of googles Lit thing, but lit-html is un-ashamedly just a view library. All it does is render dynamic html on the client side in 3.2kb.

https://lit.dev/docs/libraries/standalone-templates/


Maybe this is also related to the tendency to consider abandonware software which is not continuously updated. Imho sometime a piece of software should be simply considered completed, especially in the case of libraries and frameworks.

For who is looking around for a simpler but effective alternative to Vue I'd recommend Svelte:

https://svelte.dev/


A couple years ago people were recommending Vue as an effective alternative to React's complexity.

Then Vue itself became complex.

Now people recommend Svelte as an effective alternative to Vue's complexity.

Will Svelte remain simple?

It's not hard to see this constant cycle of "simplicity -> people need more -> complexity -> let's jump ship" if you're a web developer with more than a few winters. Every time there's a new simple library around the corner that makes reality so much easier to deal with, but it's mostly just hype speak and this simplicity never lasts for long.


It looks like Svelte is already getting more complex and more framework-like ... Time to look for the next hot thing! Svelte is on its way out!


Simple tools are simple because they don’t do as much as complex ones. A bicycle is more simple than a car. Sometimes you need a car.

Having said that, Vue has always been a framework and that’s what I liked about it. It’s analogous to Django in so many ways.


But bicycles don't stop existing because they become cars. In computing there is this bad habit of over-designing everything, so that in the end you don't have any simple things left.


You aren’t wrong, and frankly I am dismayed at the new API in Vue 3. It does feel like a downgrade in structure for a dubious gain.

But framework and complex are not synonymous. I like well designed frameworks that let me get shit done without getting in the way. Vue is pretty close to that. Django is very close to that. If I could have Vue 2.x supporter permanently I would be happy. It lacked native forms support but router and VueX made it nearly perfect.


> But framework and complex are not synonymous.

In practice they absolutely are. The average project using a popular batteries-included framework uses a fraction of it's functionality. Composing smaller libraries will always result in less lines of code running in production. Usually by an order of magnitude.


In practice, why does that matter? When you go to a restaurant you order one entree but they offer a dozen. Does this bother you?


You can still just use Vue as a runtime view library and leave it at that – no build step, state management, routing, etc. It's not a bad way to work if you have a smaller project; I've done so myself more than once.

React has more mind-share and there are libraries for every feature imaginable, basically. But there is (or at least has been, historically) a lot of churn and fragmentation that is not suitable for all projects.

Angular and Ember sit at the other end of the spectrum – maybe you have all features nicely integrated but it can be hard to adapt such a big tool into a small, legacy, or otherwise non-standard project.

I think Vue occupies a nice middle ground here. There is a limited number of official libraries that more or less evolve together and cover most of what you need. But it's still totally feasible to just use the core runtime and call it a day if you don't need routing, state management, etc.


What are people's "go to" stacks these days for quickly spinning up a decent CRUD app? Still some flavor of Express + Vue/React?


Express + React. JS and Mongo if it’s just a proof of concept, TS and Postgres if it has some small chance of becoming a real app one day. Zustand is my favourite simple state management solution, and it’s not too hard to swap it for Redux Toolkit later on.

If I was building something where the Django Admin Panel could be a huge advantage I’d use DRF instead, but overall for most small projects I like it less than Express.

Front End bloat doesn’t really matter when you’re just trying to get a prototype done as fast as possible.


I have landed on the TALL stack for building my homespun apps with minimum faffing around.

Especially with the components feature offered by Laravel’s Blade it usually takes a while before I really start reaching for JS.


It is interesting point that blade's component feature is inspired by Vue.


I use Django and HTMX now for home projects these days.

I do server-rendered React with Restify in my day job, but I don’t really need the complexity of a full frontend framework for my fun projects.


Java and .NET MVC stacks, with a sprinkle of vanilaJS.

If it has to be PWA style, Angular.


There's petite-vue if you don't want the whole stack.

https://github.com/vuejs/petite-vue


Waiting for the inevitable petite-vue-slim


Hatred is a very strong word. There's a new simple view library made every week at this point. Look at the popular ones, look at their source code, and pick one that fits your needs. Just because it's not on the front page of hacker news doesn't mean it's not a great option for your use case.


> There seems to be a hatred towards simple tools in our generation that I can't fathom

I have people bothering me about when things will be done. Something not great that plays nicely is preferable to something great that requires configuration in these scenarios.


I upgraded our app from Vue 2 to 3 and I have no idea what this means in practice. I think they were talking more about how the Vue team curated their codebase, not the developer experience.


I recently inherited a Vue/Nuxt headless website. It is grossly over-architected and a nightmare to manage. Things that are simple in html, like an <a> tag, are implemented in complex and inconsistent ways across the site. This site doesn't have any real interactivity and headless GraphQL and Vue are a giant waste of time and hurt site performance. In this case it wasn't hatred of the complex but I think just chasing shiny things and maybe project complexity for the sake of bill padding.


Sounds like you’ve inherited a VueStorefront project.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: