Hacker News new | ask | show | jobs
by mikekchar 3044 days ago
I wonder if it might be worth considering not using a framework at all. As much as I'm not a huge jQuery fan, straight HTML with jQuery sounds like it would fit the bill if what you are doing is super simple.

I could leave my recommendation like that, but I'm guessing that it's not all that useful to you. The bit that worries me is the "that even any noob UI Dev can easily get a SPA" part. Now if this is just because you are a noob and you are worried about getting in over your head, I'll cheer you on and tell you not to worry about it too much. Whatever you choose will take you longer than you think and be harder than you thought, but you will eventually figure it out.

However, if you are trying to hire unskilled workers to do the job and are looking for a framework that will allow them to succeed no matter how crap they are... That's very unlikely to succeed no matter what framework you choose.

The thing about programming is that the devil is in the details. Libraries and frameworks are about packing up common bits so that you can avoid repetitive tasks. They don't actually make things "easier" from the perspective of not needing to know what you are doing. Granted, some frameworks pave the way to help you get started, but eventually what you need to do will deviate from the tutorials and you will need to figure out what to do.

Whoever is doing the work needs to have the kind of mindset that allows them to explore what they are doing and seek understanding. If they can do that (and are given the time/opportunity to do that), they can succeed. If not, then they simply will not succeed. Stuff will always be wonky if it even works at all.

This is an order of magnitude more important than your choice of framework. Especially for something simple, it really doesn't matter what you choose (though I applaud the idea of trying to avoid unnecessary dependencies). What matters is if the person doing the work is willing and able to dig to the bottom of what they are doing and understand it.

1 comments

Absolutely, i will even double quote it, "The thing about programming is that the devil is in the details". Actually the problem is that in my workplace we keep on creating few mini apps where i get the html done by any ui dev which usually take 3-4 hours or something. After that sometimes pluging it into a framework takes too much time, even though there are few api calls only. I was wondering if there is any simple SPA framework available where i can just add a simple controller and few routes and voila app is ready.
In the general case, it's not really possible. However in specific cases it is. The key is in the fact that code reduces repetition. If it turns out that you build a lot of really similar SPAs, then you can write code that makes it very quick to churn out those SPAs. The problem is that nobody can write a general tool for that -- you need to think hard about your use cases and optimise the code to churn out those use cases. A good contractor may be able to build such a system. It would be costly up front, but could pay for itself over time -- as long as you get the analysis right and the SPAs really are similar.

This is pretty much how frameworks come into being. No (sane) programmer sets out to build a general purpose framework. Instead they start building code for a particular purpose. The framework is well suited for that purpose. Over time they add more generality to it until it's useful by a wide group of people. But the important thing to understand is that it's always going to be a more or less awkward fit for anything other than the original purpose. There was a great quote I saw somewhere that Rails is the perfect tool if you want to build BandCamp.

It's kind of unfortunate because what you really want is something simple so that you don't need expensive talent to use it. But the only way to get the simple thing is if you have the expensive talent to build it. But that's programming...