
Ask HN: Simple single page application framework? - p3rry
Is there any super simple single page application framework present, so that even any noob UI Dev can easily get a SPA. 
I have an application where i have 3-4 html pages, there is not much of app logic but still i want to leverage Pros of a SPA without spending much time in gulp, webpack or browserify.
As its a simple webapp, i dont&#x27; want to complicate things with React, Angular, Meteor etc.
======
mikekchar
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.

~~~
p3rry
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.

~~~
mikekchar
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...

------
sgdesign
If you were building a full SPA I'd suggest
[http://vulcanjs.org](http://vulcanjs.org), but if you specifically don't want
to deal with React and Meteor then maybe you need something closer to
[https://github.com/stimulusjs/stimulus](https://github.com/stimulusjs/stimulus)
?

------
dylanhassinger
Vue.js

[https://www.meetup.com/jstl-
meetup/messages/boards/thread/51...](https://www.meetup.com/jstl-
meetup/messages/boards/thread/51377722#\[masked\])

------
yorwba
What are the pros of an SPA you want to leverage?

~~~
p3rry
Its a very basic recharge app. So if its a spa i can give a very smooth ux
without any reloading or anything. Also i was thinking to add service worker
so i can cache assets and giving it a look of a native app (like other pwa)
Basically idea is to create a very minimalist PWA.

