Live data from Hacker News

Ask HN: Easiest way to build a CRUD app?

news.ycombinator.com

71–80 of 239 posts

Re: Ask HN: Easiest way to build a CRUD app?

#73
post #3

How many people will use it and how will it be used? What is the app exactly going to do? 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]. [1]…

i use this setup (besides using python fastapi code in the backend) and i really love it. Retool is awesome.

Re: Ask HN: Easiest way to build a CRUD app?

#74
post #68

I used to use Django for this kind of thing, but I have found that Flask connected to your fully managed database of choice like AWS with dynamodb (nosql db gets rid of even worrying about schemas) is the simplest way to quickly get up and running and do almost everything in Python with very little learning of various settings and details of specific frameworks since it is so minimal. This is how I tend to prototype…

For me CherryPy is my go to as opposed to Flask because I can define classes that are Restful and paths that go to those routes.

If I want more power I reach for Django since it has an automatic admin UI.

I have heard really good things about FastAPI for Python but never used it.

Re: Ask HN: Easiest way to build a CRUD app?

#75
I'm a large fan of Django/Python for anything CRUD-like.

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

Re: Ask HN: Easiest way to build a CRUD app?

#76
If this isn't a business application, ignore this entire comment.

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.

Re: Ask HN: Easiest way to build a CRUD app?

#78
post #69

Any low-code will enable you to create multiple CRUD pages in less than 5 minutes.

Such as?

Mendix, outsystems, etc. In mendix you can build a CRUD page with a few clicks, as documented here: https://docs.mendix.com/howto/front-end/create-your-first-tw.... Or you can simply click "generate overviewpage" on an entity and have it all done for you. One more "deploy" click, and it runs in a container on AWS with an RDS database.

Re: Ask HN: Easiest way to build a CRUD app?

#79
I would answer at the meta-level - pick the framework in the language you know best.

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.

Re: Ask HN: Easiest way to build a CRUD app?

#80

.NET, razor pages, sqlite, entity framework. 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.

im actually trying to build a kind of admin UI in .NET Core, scaffolding on POCOs through EF Core: https://github.com/cloudy-net/Cloudy.CMS

although it is a little bit in disarray at the moment because of a migration to preact.

Post reply on HN