>multiple programming/scripting languages to learn
>external dependencies: packages, api's, services, saas
Should be simple and resilient, can last for a long time.
Doesn't require a lot of maintenance, large multiskilled teams, or dependency on services or API's that have a tendency to deprecate or disappear. Something which is not easy to compromise or hack.
Is it a stupid question? The closest I can think of is a static site generator with some kind of self-hosted database but I'm not aware of any.
Thanks
If you are already fluent in Python, use Django. PHP; Laravel? Etc. The benefit of using the “best” CRUD tool (if there even is one) is far less than the cost of learning a new language these days.
When Rails first came out, it was so much better than anything else that it was worth it to learn Ruby just to use that toolchain. Nowadays, the gap has closed for the simple use-case.
You can run Django/Rails & Postgres on Heroku with approximately zero infra burden. I still have a trivial app I last touched ten years ago and it’s still up and serving traffic.
I believe it’s a brilliant tool for building internal CRUD type db apps.
Knowing how to use the admin framework well is basically a developer super power.
You won’t need any external libraries, it has brilliant docs and important tools like database migrations are built in.
It literally takes you less than an hour to create a realistic usable CRUD app (that would take you at least a few days in the traditional way) without learning anything new. Generate a DSL (a Resource) and add one line per field.
Avo knows how to read and display in a rich way, handle creating/updating records using your already in place validations, add associations in a giffy and one-liner file uploads. If the provided fileds are not enough you can create your own. The Rails developer can forget about building a front-ned for their admin panel/back-office area.
When you need to break out from the CRUD, Avo makes it easy using regular Rails code and erb templates.
Maintenance you say? There's no real maintenance here. You don't generate any templates for your CRUD interface, but write declarative code with plenty of options to create the best experience for your users. Avo is beautifully packaged away and will not pollute your app with business files (only configuration files). Everything is abstracted away in the background so you get easy-updates by running one simple `gem update avo` command.
Large teams will move in a uniform way building the same UI all throughout the app.
You can just do:
bin/rails generate scaffold Car title:string amount:integer
and it will generate code to support all CRUD operations (model, views, controller) for Car with the two attributes title and amount.I can also be deployed without any K8s, Docker ... (but I recommend at least an Ansible set up so you can migrate the hosting easy between providers)
You can directly deploy it simply to a machine with Nginx and PostgreSQL.
If you want to be "cloud native" (or whatever cool name now is) in the future, you can later recompile it with graalvm [3] and produce a single, static binary, like cool kids these days does with golang and rust.
Whe first thing that comes to mind i Notion, which is a true no-code alternative if you want to build internal CRUD apps.
The next step would be to use a managed backend and a no-code frontend. For backend you can use services like Firebase [1], Nhost [2], or Supabase [3].
For frontend you can use something like Retool [4].
[2] https://nhost.io/ - Discloser: I'm the co-founder of Nhost
It has been my go-to web framework for the better part of a decade and I continue to be impressed with it. "The web framework for perfectionists with deadlines" tagline is quite apt, as it has the highest combo of power and developer efficiency of any framework I've come across even today.
It is Python, which gives you the entirety of the Python ecosystem including all of the data science stuff and a bunch of Django-specific extras if you need them.
With the recent crop of Javascript-less tools like HTMX and AlpineJS you can do most things without any Javascript at all. Bootstrap or Tailwind both work great for CSS.
I still find the database ORM to be one of the most pleasant ways to interface with a datastore, and the migrations system usually makes database changes pretty easy. Can work with Postgres, Sqlite, mySql and a few others.
It has basically zero external dependencies besides one or two tiny ones.
I've been pleased with how easy it has been to keep Django upgraded. It feels like relatively little has changed in a backwards incompatible way compared to some of the frontend churn I've experienced.
It's widely used, and so it is relatively easy to find people who can work on a Django codebase compared to something more obscure. Django embraces convention over configuration, so if you've worked on one Django codebase you can probably work on another.
The documentation is excellent, and since it is widespread there is a huge amount of learning materials, articles, and Stackoverflow questions around.
Django has 16 years worth of work put into it and is extremely well tested. It implements a lot of the security things I have no interest in trying myself, like password hashing, sanitizing, etc.
Unless your requirements call for extreme performance needs or massively big data, Django can probably handle your workload just fine.
You can get pretty far with the base framework, and then if you need something else, consult the massive list of extras: https://awesomedjango.org/
Happy to answer any Django questions. Cheers
If you need something similar to a website or a store, the easiest option is to go with something like Wix (for websites) or Shopify for a store.
If you need something that's similar to a website but with a tad more complexity or with the potential to add more complexity, a good option might be a hosted WordPress site. You can start with something simple ad add a lot of comlexity via plugins or via writing your own code.
If you're looking for something fully custom, that's really not like anything else, then the easiest might be a low-code no-code tool. Haven't used many myself but that's often a good option.
Finally, if all of that fails, and assuming you need a web app (and not a desktop or mobile app), then you probably should use something like Django with Python or a similar framework for building an app, while keeping the HTML inline (as opposed to a separate React codebase or similar). Use whatever tools you know best to do this. IF you don't know anything, use whatever's the most similar to stuff you already know. (E.g. do you know Python? Use Django. Know Rails? Use Ruby).
This solution is still fairly easy, but also not exactly great for growth. My default these days is usually to start with a backend that's only there to provide an API, and a separate JS-based frontend. That's a lot more work, but most things end up there fairly quickly so usually worth just starting there.
Its hard to build anything non-trivial with a gui without involving a few languages these days.
You can package your .NET server as completely self contained and run it on anything, just need a web browser.
Edit: python might get you close with a simple html framework.
Since you'll be running JavaScript in the browser, it also uses Node.js for the backend. This allows you to use the same code for validation, business logic, etc, and it specifically has multiple patterns to encourage this.
It's all one bundle that you run locally (or on one machine in production, or two if you want to split out the DB, which I'd recommend). By default, it uses Docker to run locally, but I've included instructions to run it on bare-metal, if you choose. For subscriptions, I use Stripe, but I mean you gotta use _someone_ for that, and I found their API to be easiest to work with, and thus modify.
I specifically built it so that I wouldn't have to keep re-creating the wheel when I wanted to try out a new SaaS idea as just one person, so it should work just fine for someone who doesn't want to require a team, but it should also work well for people who do want to scale to teams: one of the core components is that you break up work into "features" which are directories that repeat the common subdirectories (api, lib, ui) and make it easy to keep commonly-used code together.
Full docs are available publicly on the site, and if you have any questions, I'm more than happy to answer!
If it is a business application, you probably shouldn't build a CRUD app, at least not the way that's commonly understood. Stick with me for a minute.
First off, you must never delete business data (except per GDPR, retention policies, or other legal requirements). I'm sure someone will pipe in with a contrived use case where you would want to, but in general you must not. Soft-deletes, sure. Hard deletes with immutable history, also ok. Generally the popular frameworks will not help you here.
Second, realize that an update is logically equivalent to a delete followed by an insert (under the hood, Postgres implements `update` precisely thus). So per the above, you should think twice about updates. As with deletes, an immutable history can make updates safe. Alternatively, you can use append-only versioning with a current version pointer. Again, the frameworks are just not going to help you here.
So out of CRUD that leaves just CR that are fully safe, and those are the easiest parts.
I'm sure most folks will think this is ridiculous but that's because "building business software" is 1) not taught in school, 2) considered hopelessly boring, and therefore 3) not valued by developers. Nevertheless, it's generally, y'know, our job. Good business software must keep records. It must track when things happened, who did them, and so on. The typical approach to CRUD, as exemplified by all the frameworks suggested in other comments, does not keep such records, and therefore produces software that is unfit for its purpose.
One common objection will be that you don't need these things, or don't know that you need these things, at the beginning of a project. Yes you do! Imagine telling the IRS "oh I didn't keep very good records this year, after all my business is just getting started". Record-keeping needs to be treated as a hard, non-negotiable requirement for all business software.
Using the CRUD-app-building framework in which you are competent.
Beyond toy apps there are no shortcuts without that competence but there are plenty of prospective frameworks to develop it in, as evidenced by the other comments.
For simple stuff I am a big believer in building backends with tools like Strapi, it's hard to beat for MVP
For more customized stuff I do believe Rails is still the safest choice in terms of ease of use, docs, learning resources, community, available libraries and integrations, etc. etc. Close 2nd/3rd probably something like Django or Express.js based stuff.
For more complex stuff my weapon of choice is Elixir/Phoenix/LiveView - hard to beat for actual web projects that need to handle some traffic. I am actually close to believing that there's probably nothing better suited for web projects than Erlang BEAM.
It's not a no-code solution, but the shallow learning curve will allow you to get up to speed in no time.
At least half of HN will recoil in horror, but PHP was designed for web programming and nothing else. The standard library will have almost everything you need. Deployment is easier than many other languages. It can be as simple as uploading your PHP files to a folder located on your hosting provider.
"Something which is not easy to compromise or hack."
Well, this is dependent on the skill of the programmer and takes time to learn. The alternative is to pull in external dependencies i.e a framework that tackles security issues like authentication, database access etc. But learning to use a framework will also be a time sink (but less time-consuming that building from scratch).
"The closest I can think of is a static site generator with some kind of self-hosted database but I'm not aware of any."
Static Site Generators (SSG) do not use databases and would not be suitable for a dynamic CRUD app. Even a 'simple' task such as signing-in to your CRUD app (if needed) is not possible with a SSG unless you plug in an external dependency.
Remember, if you go down the low-code or no-code tool approach you'll always be tied to the low-code platform who will host your CRUD app.
You can pick a framework if you're comfortable with mix of frontend and backend (rails, django etc)
If you are more on backend, pick say react in frontend and your choice of language in backend and write monolith. Have a database if needed. Avoid cache completely (You don't need to scale or make it performant). Infact you can use file based db (eg: bolt) and add Pg/Mongo/Sql later.
My usual setup is,
1. Go for backend, react frontend
2. Deployed backend in free-tier GCP VM
3. Deployed frontend in Netlify/Heroku
4. Use free pg database in Heroku
Avoid self provisioning as much as possible if you don't need the control.If it's for Indiehacker project, would suggest to not build it right away, use nocode platform or template to setup landing page, validate and do things.
I made it because I was tired of spending months designing beautiful interfaces, only to realize I was only 30% done with building a full app -- it was exhausting.
So I thought of a simpler way to create a dynamic app: treat HTML as a data structure.
---
Here's how to use it:
Tag your HTML elements as editable and/or containing data.
The syntax for this is simple:
I am an editable page title
This gets converted into: { "pageTitle": "I am an editable page title" }
---Based on just some HTML templates marked up in this way, you'll get a full application with user accounts baked in -- where each user can edit their own copy of the HTML templates you made, filling it with their own data.
It's a super-fast way of building an application with multiple users, when all you have is some HTML and CSS. And it only requires learning ~8 custom attributes to build some pretty powerful apps [1]
---
Here's how it works behind the scenes:
1. The framework scans through the page, converting nested HTML into nested JSON data
2. The framework saves this JSON data to the current user's account
Pretty simple, right? I've spent years improving the syntax and behavior to make it really easy to use. I'd love your feedback.
I even made a client-side-only version, so you can test it out without installing anything [2]
---
To meet your criteria for:
no: >multiple programming/scripting languages to learn
You could look at building a Java FX or Java Swing desktop application with a Java server (SOAP or RPC).
Quite a few exploits (CORS, XSS) are not possible in a desktop app or are less likely to cause problems as your users aren't loading web pages.
The Java ecosystem is large and there are many stable libraries and frameworks out there that can help with CRUD application development.
The difficulty with desktop apps is updating the client on users machines. If you can get a Long Term Support (LTS) version of OpenJDK installed on your users machines, updates could be as simple as getting the users to copy paste a JAR file from a network share. There are probably nifty ways to get the client to ask the server for any updates, download the new JAR then tell the user to restart.
Any tool that can do CRUD in a web context has a minimum level of complexity. I strongly believe iommi comes closer to that minimum than standard django by a lot.
I'd say, figure out your storage layer (sql, mongo, files etc) then pick the right tech. Django and Rails will let you very easily bootstrap simple crud apps with very little code.
If you need CRUD API i'd personally go with Go and some db that i'm familiar with (pg). You can achieve tons with Go without any external deps.
- bubble.io for commercial solution - appsmith.com or budibase.com for self-host open source solution
Both are fantastic solutions for CRUD apps
In a web-application you are NECESSARILY breaking, in all but the most exotic cases, the "multiple programming/scripting languages to learn" AND "external dependencies" requirement. Almost always, the "simple and resilient, can last for a long time" requirement goes out the window as well.
If the requirements given by the OP are intended to be strict, then they need to go desktop. A few things come to mind...
* java swing -- OK, it's not simple, but it is "one language" and quite self-contained, ORM is extensive. Many teams still work on 20 year old codebases in this stuff.
* .net desktop UI's -- .net, especially lately, is a great choice if you want to remain in a "large-enough" walled-garden. For UI, there's a lot to choose from, winforms would keep the OP very strictly in the "one language" zone. If they're willing to go XAML based, then options open up a lot with the trade off that there's a lot more complexity/learning-curve to deal with.
Both of these options have the ability to "launch" from a website (java webstart and .net clickonce), and both could talk through native remote procedure calls, use a REST API or even through gRPC to a service written by the OP in the same language. So it's not like they're inflexible.
If you're coming with no experience in programming at all, nothing will be easy. There might be tools which focus on one programming language, but they would abstract away too much details of how web based apps work in general to really understand what you're doing.
If you have some experience in a programming language or coming from just another field than web development, I'd suggest you go with a web framework which is commonly used in your programming language's universe. That might be Django for Python, ASP.NET for C#, etc.
Then, there are many lowcode/nocode tools which gives quick results. I have used Anvil in a tutorial to build a Twitter Dashboard: https://bas.codes/posts/python-anvil-twitter-stats
Your idea with the static site generators could also work. Keep in mind that you're going to create mostly frontend code when using this approach. That involves JS and npm – so you might go deep into the rabbit holes of front end web development, which can be huge. However, if that's what you want, I'd suggest using NextJS over Gatsby since I'd consider it easier to setup for beginners. Using a non-JS static site gen would contradict your "no multiple languages" requirement ;)
Node.js + Postgres
Most flexible, biggest ecosystem of all, runs everywhere, talks to everything. Bonus: Get Github Copilot, it knows Node very well, and you don't even have to code most of the time, just tab, tab, tab.
For me, I am mainly a Javascript developer so I use AWS + Next.js. It's very easy to create an API with Serverless, hook up a DynamoDB table, maybe add some Cognito in there, etc. All just Javascript. You can deploy the Next.js site to S3.
Obviously, this means a ton of external dependencies, but if you want something easily it I think it works well.
User authentication and permissions are built in and there are many 3rd party modules available to do all sorts of thing. django-import-export for example allows importing and exporting to/from any spreadsheet format, including a preview of the changes before you run it for real.
It's really the best no-code app out there.
[0]: https://nocodb.com
- PHP on the server, regular .php files that process the requests
- Apache2/httpd as your web server
- SQLite as your database (just a file), through PHP's PDO
- just regular JS/CSS files for additional functionality that you need (e.g. add jQuery/Bootstrap)
- no Composer or reliance on external dependencies or package management whatsoever
That said, every application that i've seen that has been written this way has been pretty bad - eventually you develop your own badly tested and badly documented abstractions that will slow you down towards the end of the project development and will cripple most of the developers that will need to take over your mess. Furthermore, security is generally an issue, since you should almost never write your own security code under most circumstances, but you probably will do just that with this approach. Also, managing the installation will eventually be a bit problematic, as your current PHP version will be deprecated.For those reasons (and some others), i'd generally advise people to go with one of the other popular web frameworks with server side rendering:
- PHP with Laravel/Lumen/Slim
- Ruby with Rails
- Python with Django
Now, some might prefer having a separate front end application (Angular, React, Vue, Svelte) from the back end (probably REST for its simplicity), but that's just introducing more complexity into the mix than necessary in this case, even though it has other benefits in regards to eventually scaling and/or swapping out bits of functionality for other technologies down the road.Personally, i'd look in the direction of using something like MariaDB for the simpler apps that might need to eventually have a separate DB instance, as well as containers for managing the runtimes of everything as well as networking (Docker, Docker Compose, Docker Swarm, rather than something complicated like Kubernetes), but none of that is also strictly necessary.
As for the actual servers, just get an Ubuntu LTS VPS on whatever provider is affordable to you. It has a long life cycle, is generally pretty well documented and pretty boring. That way you can also migrate elsewhere if need be.
Even $10 a month becomes annoying after 5 years.
I built this: https://forever-free-cloud-app-starter.chriszhu.me/ as a way to build a basic CRUD app that would be free to host forever.
If simplicity is your main requirement you might find inspiration in this:
> My focus has been on how to adapt the lessons I have learned working in teams at Google to a single programmer building small business work. There are many great engineering practices in Silicon Valley's big companies and well-capitalized VC firms, but one person does not have enough bandwidth to use them all and write software. The exercise for me is: what to keep and what must go.
> If I have been doing it right, the technology and techniques described here will sound easy. I have to fit it all in my head while having enough capacity left over to write software people want. Every extra thing has great cost, especially rarely touched software that comes back to bite in the middle of the night six months later.
https://crawshaw.io/blog/one-process-programming-notes https://news.ycombinator.com/item?id=17701882
- No single language can do all of that successfully, unless you ditch GUI and client-server models
- Without external dependencies you will either be reinventing the wheel or adding lots of layers
- All software will require maintenance, more layers equal more maintenance
- All software can be compromised or hacked, more layers equal more attack surface
- If it has to last a long time, it cannot use anything that moves fast (or without LTS releases), but it depends on what you define by 'last' and 'a long time'
This doesn't mean your question is stupid, it's just not something that is simple and resilient while also being those other things.If it is a single-user, single-machine "app", you could use a plain UTF-8 text file which can be read and written to by any relevant text editor. No app is the best app in this case. This does depend in what kind of information you intend to CRUD.
It is not a stupid question at all. A problem I thought would have been solved by now or very closed to solving it. But we are not even half way there. Especially the self hosted API and services part.
Basically you want to bring Native App development model to the web. Although I think WebObject in the old days were quite close?
The current recommendation are Laravel, Rails and Django.
I'd link to it but it's not really ready for prime time. But there's probably a billion other similar tools like it already. For me, it was built out of the desire to create, not a framework, but a static code generator - it literally generates the .js files for you, you only run it once to generate those files, and the tool itself isn't part of the finished app at all.
You also can't get away from knowing at least a couple programming 'languages', it's hard to get away from writing at least some HTML/CSS unless you go with all pre-built solutions, at which point you may as well use a website builder...
(cf. 'situated programs' in https://youtu.be/2V1FtfBDsLU)
I would still build a crud app with the frameworks and dependency hell you are referring to. Magic solutions tend to save time in the short term but often cost more than it saved in the mid to long term.
I tried django but spent more time trying to understand the magic. I like writing out my SQL in the endpoint function for readability.
Oh if you want GUI component as well. Jinja2 and Htmx.
Django is great, you can get very far with it's defaults e.g. it uses local SQLite db.
* you didn't specify anything the app *should* do besides "CRUD". You'll get better answers if you can say more about your needs and goals.
* some of the given requirements are mutually contradictory - "no services / SaaS" and "doesn't require a lot of maintenance", for instance. Part of the tradeoff you make using third-party services is "risk of them disappearing" vs "maintenance effort reduction".
If you know any Python at all, it's extremely easy to get into, and has a lot of "battery included" for standard problems you encounter in the CRUD-world.
Standard Ebooks serves millions of requests per month with a 2GB VPS https://news.ycombinator.com/item?id=30302819
I mean if you think about it, git is technically a CRUD app...
1. choose a language with a LOT of "batteries included" (you don't want to have to write HTTP connection protocol handling from scratch). 2. re-create (or copy in) a ton of external code, which is still really "external dependencies" you've just copied them in to your code so you don't have to worry about them disappearing.
Either way you'll be writing a boatload of stuff from scratch that already exists. Regardless of which option you've chosen "easy" is no longer on the table. You want easy, you use the code other people have written to simplify things. That's why Rails, and its clones dominate web-dev. They have already done all the hard bits so that what's left is the "easy" bits and the proprietary bits.
> Should be simple and resilient, can last for a long time.
define "a long time"
Are we talking decades? C+ is probably the way to go. There's a ton of it in just about every industry so it's guaranteed to keep being supported for decades. Alternately, choose a language that's existed for a long time and still seems to be going strong like Smalltalk. As a benefit, Smalltalk's got a LOT of "batteries included".
> The closest I can think of is a static site generator with some kind of self-hosted database but I'm not aware of any.
that's an external dependency and most all of them depend on packages / libraries so it's an external dependency with external dependencies.
also, having a self-hosted database defeats the point of a "static" site generator. If it's static you don't need a db, unless you're storing meta-data that helps you generate the static files. That's why you're not finding any.
Im the app, if you have the right permission, you can use xml to describe tables, forms, and you can use lua to respond on the sever side to control and database events.
It is very staright forward, and you can do it all directly on the web.
It is still alpha, but if you are interested let me jnow and i will open a playground for you.
(...I'll show myself out)
Then you mention "static site generator", which implies the web, and all the layers that come with it. That will never be easy, nor stable.
It allows you to create CRUD apps visually with little to no JS code
Nowadays the best experience with full stack JS is a full-stack framework like Next.js, Next or the one I recommend, sveltekit. You can easily write client pages & server routes Next to each other, with all the standard client side features like components and use tried and tested JS libraries like node-postgres. It's great and is unlikely to break for years, or decades if dependencies are updated.
Install Node.js and an SQLite adapter. Learn to use the standard HTTP/S module. Write plain ol' JavaScript for the frontend and don't make it a SPA. Unless the app is getting a ton of traffic or has a lot of pages, there's no reason it can't be about that simple. In that case you only need 1 language and the only dependency is whatever you use to read/write to an SQLite database. No need for Rails, Laravel, Django, or anything that fancy.
On the other hand, one of those frameworks may be what you're looking for. I'm just saying it could be a lot simpler than that.
besides the backend itself, the only other dependency is a database.
as a result, building a site nowadays is drastically simplified. javascript and my favorite frontend framework is all i need.
I would say use Firebase or another fully managed solution. Don't waste time on a server if you can avoid it
I wonder why people keep asking such questions instead of just learning some of rails
For simplicity – probably JavaScript w/ Express.
go and build a simple gui app for macos and it’s a dream .
That said, I have some issues with Django as well: Integrating JavaScript with the Django goodies (e.g. form system, CSRF prevention) is far from ideal. I remember spending hours to add a form field for multiple handwritten entries "properly", I ended up writing the form template manually and just not using the abstraction for that one field. It worked, but felt hacky. I now had rendering, parsing, and validation in two places.
Permissions are handled the way you'd probably expect them to be: Permissions are strings which users have and pages can require or check them. This is fine for most apps, but sometimes you want multiple views of the same data with complex permissions (e.g. the data determines whether the current user can see the item), Django provides little support there.
I also wish the Admin interface was easier to modify. It can be done, but feels to me like monkeypatching an existing app, not using an abstraction I could build an app on. It's probably meant that way, but I wish there was a framework with a less rigid analogue.
I'm slowly working on my own approach to tackle this problem, mostly focusing on declarative permissions (I wrote about an old version: https://dvdkon.gitlab.io/articles/mocasys-dascore/). I'd appreciate any pointers to other solutions to similar problems.
EDIT: As an aside, here are my criteria for a good CRUD app framework:
- The data model is the source of truth: I shouldn't have to repeat what tables and columns I have, or what constraints are placed on them. Server-side validation and client-side inputs should be autogenerated
- Permissions are all in one place: Critical parts of app security shouldn't be all over the place, especially they shouldn't be duplicated between the backend and frontend.
- Permissions should be granular to both columns and rows: I know this isn't always needed and that it's hard to implement, but sometimes you just need granularity, and hacking it in is, IMO, a bad idea for security reasons (see point above)
- The app is in a git repository, separate from the data it operates on: This is where a lot of "low-code" solutions fail for me, I get the goal of user-extensibility, but when I'm making software that will run a business' core functions, I don't want hidden state. Plain text is the best we've got in that regard.
EDIT2: Another criterion: Transparent handling of history. Keeping every change of an item should't need to be programmed once for every datatype, same for the retrieval UI.