Which tool should I use to build a simple dynamic website in 2020?
- Password-protected login to hide every single page behind
- A single sqlite database with possibly a single table (maybe a second single-line table to store my login + pw-hash + salt)
- A single page to upload stuff to the database. Some kind of asynchronous JS instead of HTML forms may be preferred.
- A single page that always shows the same database query
- Very infrequent access to the site (not more than once per day)
- There's basically zero chance that this would grow to something bigger. Maybe just extend the site functionality to allow my wife to also use it, and maybe find a way to interact with it from command line on Linux (but probably by doing HTTPS requests).
I did something like this with PHP back in 2007, but I know PHP is not very recommended. I worry that trying to learn a whole framework like Ruby on Rails or Django may be overkill. I really like Ruby as a programming language (although I never used RoR), so sticking with it would be cool, but Dreamhost says I should avoid it since it uses use too much memory and I'm on a shared plan. I also have some experience with cgi-bin in python, but I'm also told cgi-bin should be avoided just like PHP. I'm also aware that I could use some sort of server-side javascript, but there are a trillion frameworks to choose from.
What would you use today? What would you recommend?
15 comments
[ 2.0 ms ] story [ 30.0 ms ] threadOr, as far as that goes, for something as simple as what you're talking about, I don't see any particular reason not to just use PHP if you already know it.
If I were building this for myself, my first instinct would be to use Groovy + Grails, but if memory was a limiting factor, given that JVM apps can be a bit memory intensive, I'd probably go with either Python or PHP.
[1]: https://flask.palletsprojects.com/en/1.1.x/
One key feature Wapp is that identical code can be run as
+ CGI from Apache
+ SCGI from Nginx
+ As its own stand-alone webserver
So, for development work on your desktop you run it as a standalone webserver. It even pops up its root page in your webbrowser automatically when you launch it. Then, once you get things working there, you "scp" the one small source-code file that implements your application up into a CGI-enabled directory of you server, and is just works.
But maybe PHP is indeed the right choice. Right now I am kinda considering Ruby with CGI.
Very good setup that will solve your problems relatively fast and can be running for years without much maintenance.
There is no point of using anything else to do webpages. These technologies are tested and tried and works. Tons of documentation.
Ignore ideas that says you need to use fancy modern technologies, that is what has ruined the web and web development.
What is important is to follow best practices and web standards and that is true regardless of what technology you choose.
I wrote an easy guide on how to do it in half an hour, targeted at people new to web dev: https://medium.com/@smuzani/setting-up-a-mobile-backend-serv...
The nice thing with Parse is not just that it handles password hashing, roles, and access. Queries are easy, and will give you the results neatly. Client side queries are not secure, but you could host the code on Node.js, or use PHP.
The dashboard is quite sexy and works well on mobile too, which is one of the main reasons I like it.
I would recommend you use whatever you are most comfortable with since what you are describing is build-able in nearly any language/framework.
Without getting into what the personal use case is ... what you are describing could possibly be done with something like Google Sheets? It sounds like overkill to use a full on hosted custom built solution when it is 1-2 users updating a single table of rows of some kind of data.
If this is a personal use case and you want to learn a framework/language for web development then that's different.
I am considering maybe learning Rails. I just worry if it would be too overkill or too complex for it.
I am also considering just using Ruby with CGI.
In my first two weeks here I wrote an interactive ticket system and analytics tool in vanilla JavaScript. It is highly modular and easy to extend. It uses the same 2 SQL queries on every page load, but this page is frequently accessed. The tool was necessary, because the thing it replaced was garbage.