DEV Community

Discussion on: Technology stack for one-page one-function web app?

Collapse
 
domysee profile image
Dominik Weber • Edited

This highly depends on the one-function you want to do, and what is needed to do it.

Is it something that can be done entirely on the client-side?

Then I'd create a static web page, with some JS. Depending on the complexity of the task, I'd either do it in vanilla JS, or add React or Vue.

Is it something where interaction with a server is necessary?

There are many options to create web pages on the server, e.g. Asp.Net Core, Ruby on Rails, Java (not sure which framework to recommend, since I've never really developed with it), and many more.

I'd pick the one I'm most comfortable with, which is Asp.Net Core.

Then, depending on the complexity of the page, I'd think about including some JS code, but only if it is really necessary. Here, as in the first option, it depends on the task if I'd include a framework like React or Vue or Angular (or any other out there).

The next question is, if you need to have a data store. Here again, pick the simplest one possible. If you can get away with CSV files, great, use them.

To summarize, I'd use the simplest stack possible, which I'm familiar with.

But, small projects are also great learning opportunities. So maybe you want to ignore the above advice to learn something new, which is completely ok.

At last, to give you an example of what I did with one of my side-projects:

IsMyDependencySafe is also one-page, one-function, and allows visitors to search for projects and view their security vulnerabilities (if they have any).

For this I created an Asp.Net Core api, because I was familiar with it. As database I use ElasticSearch, because I know it and it is optimized for full-text search, which makes it a better choice than traditional databases. For the website, I used React, to get more familiar with the whole ecosystem (including Webpack, babel and so on).