Ask HN: What is the simplest and most flexible way to build a CRUD app in 2019?

63 points by sidcool ↗ HN
I like the Rails model of ActiveRecord and Spring Data too. Any other models, tools, frameworks that make building CRUD apps easy and also provide flexibility?

45 comments

[ 3.0 ms ] story [ 103 ms ] thread
I know many people who are extremely productive doing CRUD apps using Django. I am not one of those people.

They claim it is very fast development once you get past some comfort level. There is a bit of jump involved when it just clicks. I've tried a few times and it seems like slugging it out with a lot of magic.

While I write and like Python more than PHP, something like Laravel or Symfony seems more logical for CRUD than Django to me.

I second that. Been building CRUD apps for a couple of years and Laravel is just so smooth to work with.
Web based spreadsheets are one sweet spot. Generally simplest and most flexible are conflicting requirements.
limited querying capabilities though.
Yep. There are some clunky escape hatches (you can use simple SQL in QUERY() or script in JS etc) in Google Sheets at least. But you should use or migrate to something else if you know you're going to need them.
Odoo is probably the fastest way to create crud apps, especially with Odoo Studio: https://www.odoo.com/page/studio
Your history involves a lot of Odoo posts. If you're involved with that project, you should disclose that.
He's the founder and CEO of Odoo SA. Most of his posts do have a disclaimer, seems like he forgot this time.
Never tried Studio, but I have to agree Odoo is pretty nice if you want something that makes simple things easy, while letting the complexity grow quite a lot, since you can write fully custom Python backend code and/or frontend JavaScript/HTML if you need it.

The main drawback in my experience (which is a couple of years out of date) is that once you started pushing the framework to outside what it was designed to do (I'm talking about being far from CRUD), it's less likely that someone has written a blog post or module to do it than in Django, so you'll have to do it yourself. But it was a reasonably rare event, and I'm confident we saved quite a bit of time on the whole.

(Disclaimer: worked at an Odoo partner company for a few years. I don't currently have anything to do with Odoo except a few friendships in that company.)

Our company has used BulletTrain (RoR) with success - met our unique business needs quickly and at a low cost. Since it’s standard Rails we can tap into a big dev community.

https://bullettrain.co/

Is there an equivalent for the PHP world?
I've found it relatively easy (and very quick) to get something up and running with Firestore/Firebase and React.js.
Laravel, Django, or Rails. The productivity comes from being proficient with the tools. Pick the one you like, each is extremely productive, from my experience.
I completely agree and I'd add Phoenix to the list! I've found it more productive than Django out of the box and almost at the level of Rails or Laravel. But after a month or two, it's a net win for me since immutability and lack of "magic" makes debugging so much easier.
That sounds great. I haven't had the opportunity to use Phoenix yet but I'd like to sometime.
Make use of the tools you are most familiar with. You want delays to arise from your understanding of the problem domain rather that the platform upon which you are building it. Also if you are targeting the simplest and most flexible execution, then you should accept that the platform you choose for v1 might not be the same for v2 as more specific use cases might emerge that will enable you to better compare frameworks and platforms.
> simplest

> most flexible

Pick one.

I recommend [1] react-admin, it's an admin panel framework built for CRUD style apps.

Tables, Lists and Forms are all built-in and nicely abstracted, along with an Auth system. It's built using react and redux which makes it easily extensible. And there's plenty of database connectors for it too.

[1] https://github.com/marmelab/react-admin

It is very easy to build a CRUD app with reasonable security using [Meteor](https://www.meteor.com/) and its [autoform](https://github.com/aldeed/meteor-autoform) package.

The best part is you retain complete freedom and control to manage any part of the process both on the client and server side and "hook" in practically anything else on top of it.

Even in Meteor there are new ways but require more learning.

[Django](https://www.djangoproject.com/) is also very good if you like Python.

IMHO, the best part of both is that you don't need to worry about a TON of standard functionalities like authentication, logging, messaging, security (to a good extent), user management, etc.

I program on the side and focus more on the business, and just find comfort in JS although I do analytical work in Python (and integrate them using hacks and bridges .... works fine for most part ... little slow and clunky but works and saves a lot of dev time)

I might be wrong, because it's been a while since I developed a Meteor app, but doesn't Meteor come with real time data sync from server to all its clients using web socket?

In such case, I wouldn't agree with recommending Meteor for a simple CRUD app because naturally there are lots of performance overhead and moving parts.

Rails/Postgres/Heroku/Cloudflare is a great stack. You have the option of scaffolding for quick and dirty mvp test stuff, and you can use something like react_on_rails to do universal rendering of react, which is pretty great too for the more customized and interactive views.
Can you clarify how Heroku fits with Cloudflare? If I have a domain registered via Namecheap or Google Domains, then point the appropriate record at my Heroku subdomain, it works easily. Heroku also includes easy SSL support.

I hear about using Cloudflare often for DNS usage, I just have limited experience with the network side of things, so Ive never been clear why it's something that you need a standalone service for at the MVP stage?

Oh, cloudflare is amazing. A few really great things it does: free(ish) bandwidth, ddos protection, cdn caching, configurable page rules to apply all sorts of things such as granular caching, workers including a key/value store database, to run code inside 150 points of presence all around the world... Plus it does dns and ssl like you already have.

They do a bunch of other amazing things as well, but those are a few favorite features off the top of my head. Definitely check them out!

Heroku free tier does not support SSL, but you can add it using cloudflare.
while i absolutely agree about that being a good stack, the ask was for SIMPLE

* Sinatra, is orders of magnitude simpler than Rails

* The command line interface of MySQL is orders of magnitude simpler than PostgreSQL (think "SHOW TABLES" vs. "\dt")

* Installing SQLite is easier than PostgreSQL OR MySQL.

* Cloudflare is completely unnecessary complexity. Yes it's a valuable service, but most webapps will never need it, and it can be added on later.

There are many things that experienced developers come to do without thinking. This doesn't mean they're simple. This usually just means we've memorized how to do the hard bits without worry.

Totally agree here, there's a lot of unnecessary hurdles in setting up MySQL and Cloudflare, which you just don't need for a simple CRUD app.

Basically, YAGNI (You Aint Gonna Need It)

It depends what you know. There is a productive option in pretty much every language. If you know JavaScript, you’re ahead of the curve simply because you can share so much code between frontend and backend. With tools like next.js it’s almost automatic.

The real problem, I think, is that 95% of real business problems are not simple CRUD apps. There is always some complication unique to your domain that burdens you with constraints. Also, it seems like authentication is a problem that is still not solved smoothly without paying for SaaS. It doesn’t take long before you feel like you’re anything but a standard “CRUD app.”

My lesson from the past few years has been this: stay within the guardrails as much as possible. Use frameworks when you can, and try not to deviate too far from their conventions, no matter how tempting. If you stay within these rails, it’s fairly easy to ride the flow of changes and keep your code up to date without losing velocity on new features.

Whatever you choose, you're still going to be using it in three years. The safest option is probably to pick something really popular.

very wisely pointed out and I second this based on my own experience
While it may be true that "95% of real business problems are not simple CRUD apps" it doesn't mean that 95% of webapps can't be implemented _well_ as CRUD apps. I've been doing this for a long time. The Vast VAST majority of webapps are "Take some data from a form and shove it in the database. Take some stuff from the database and shove it on a page. Make a form so that people can edit the stuff in the database. Repeat" We've been adding a lot of fancy interactive JavaScript on top of it, but most of it isn't necessary, and most of it doesn't change the core behavior described above.

Yes, there's frequently a corner of the app that deals with whatever special sauce the company does, but the rest of the app, the majority of the web app.... is very easily handled with CRUD. Even something like Uber: Request a ride (submitting a form "CREATE"). Check the status of an inbound driver ("READ" data from a db). Pick up a user ("UPDATE" the status of the order in the db). Cancel my account ("DELETE" a record from the DB).

I still think Rails is the fastest way, but any of the "monolith" frameworks (django, etc) is similarly fast, once you know the tooling well.
If you go the JS/TS route, definitely go with MikroORM as your ORM [1]... it is rather newish, but works unlike all other JS/TS ORM's on the open source market. Namely it has implemented Unit of Work...

[1] https://github.com/mikro-orm/mikro-orm

(Note: v3 is beta and what you should start with. Quite stable as it has 100% coverage.)

I like python flask! Great flexibility, and it has a great plugin ecosystem.
I have a pretty simple boilerplate Flask setup for a pretty quick deployment utilizing a number of Flask's extensions to handle users.
That's the way....
My choice:

Framework7 hybrid front end + Parse Server back end, hosted on Heroku and mLab.

Or if you want lighter and simpler, with less scalability, jQuery + Bootstrap + Parse Server. Maybe Vue.

Setting up Parse Server is poorly documented, so I wrote a little walkthrough: https://medium.com/@smuzani/setting-up-a-mobile-backend-serv...

I'm not sure about the others, but I'd say it would take about 2 hours to build a quick listing app with little experience.

I just completed my own CRUD App and feel super proud. Simple no non-sense user interface all in Vanila JS along with my own personal hand coded CSS and HTML. Backend using Python Flask with form packages for input forms. Database simple SQLite and authentication using Flask login system. Super simple yet lovely and useful.
(comment deleted)
Well Express + Express Generator is pretty neat in NodeJS ecosystem.