Settings

Theme

Ask HN: In 2022 how do you develop a simple CRUD app if you have few time?

40 points by dgerges 4 years ago · 37 comments · 1 min read


I'm a director in a structure with thirty people and my job has nothing to do with dev. I've been developing large apps in my day job but today I'm looking to develop a simple web app connected to a few data sources like Airtable. I'm amazed of the complexity of today environments and what you need to learn to have something up and running. I've used MERN, RoR and other things but there's so much hidden complexity and that it's difficult to use for small projects (just getting to an env that works is a pain). What would you recommend ?

minhmeoke 4 years ago

Depending on what you're trying to do, Retool (https://retool.com/) can get you up and running very quickly. It's great for quick and dirty internal tools, but maybe not that suitable if you are going to build something large and complex that you need a lot of custom functionality for.

In that case, I recommend Flask [1] + SQLite [2] (you can swap out SQLite for Postgres if you start hitting scaling issues). Flask is a very cleanly-designed Python-based web framework that makes it simple to get started, yet is quite powerful. SQLite3 is a whole database in only a single file, which makes deployment and backups very easy.

[1] https://flask.palletsprojects.com/en/2.1.x/tutorial/

[2] https://flask.palletsprojects.com/en/2.1.x/patterns/sqlite3/

ivanmaeder 4 years ago

For speed I'd look at Ruby on Rails.

The way it's been explained to me, Rails packages (gems) are like prefab bathrooms and kitchens. Compared to e.g., Node.js packages which provide things like "sink" and "tap" and "door handle."

E.g., in Rails there's a popular auth package that includes password reset and recovery functionality:

https://github.com/heartcombo/devise

Always a pain to build, and not something these popular Node.js packages save you from doing over and over again:

http://www.passportjs.org/

https://next-auth.js.org/

EDIT: It sounds like I'm picking on those packages. I don't mean to, just want to highlight the difference in philosophy between the Node.js and Rails approaches.

lysergic 4 years ago

Django Literally just create a django project, code your data models, and register them with django admin. Users and login included

mooreds 4 years ago

Wordpress with custom post types is what I'd reach for. You can install WP on any number of shared hosts for ~$10/month. Then install custom post types and you can set up attributes for each entity type. The UI is all taken care of. You can even use it to drive an API.

These instructions from me are a few years old but cover the basics: https://www.mooreds.com/wordpress/archives/2971

  • readonthegoapp 4 years ago

    is custom post types a thing? i see your page says something about a custom post types ui plugin.

    • Dma54rhs 4 years ago

      It is, the plugin in question just let's them setup (using UI?) easily but it's most certainly a thing on its own.

Zababa 4 years ago

It's interesting how all the responses are different. It seems like there are mostly 4 different groups of recommendations:

- SaaS/no code/low code tools: Retool, Bubble, PowerBI

- Big MVC frameworks: Ruby on Rails, Django, .NET Core, Spring.

- A few tools together: Next with Prisma and SQLite, Node/Deno with SQLite/CouchDB, Flask + SQLite, Flask, Javalin + Kotlin + Exposed, FastAPI, PHP.

- The usual "use what you already know".

This pattern happens all the time when people are asking how to build web products, especially "easy and well understood" ones like simple CRUD apps. The other interesting part is that no one seems to have "hard evidence" or something like that to argue their recommendations. I wonder if it's due to a lack of hard data, or that tools don't make a huge difference, or another factor.

ThalesX 4 years ago

Headless CMS seem to be an interesting approach. I've had some success lately with Sanity [0] which I enjoy [1] a bit more than other Headless CMS because of their data lake and CDN.

Just this week-end, a friend had an idea that he wanted to make a list of healthy products. I suggested Google Sheets as a starting 'database' and see where we move from there. He had some issues with inserting images to it though so I just created a sanity.io project. I think we were good to go in about 20 minutes with both a backend admin area and an API.

The next steps are to:

A - Build mobile app

B - Actually move the data from Sanity to a self hosted CDN

--

[0] https://www.sanity.io/

[1] I don't work for Sanity, but I'm also not a stranger to them.

  • adfm 4 years ago

    Wagtail offers a headless option and is built on top of Django.

contingencies 4 years ago

Use whatever you're most familiar with that allows you to get the job done to a sufficient level of execution in a reasonable time. Otherwise, delegate, outsource, or reconsider why you're building it at all.

bnchrch 4 years ago

I mean bubble is a great tool if you want to connect to airtable for a simple crud app.

Outside of that I’ve been having a lot of side project success with Chakra UI pro on the front end and Hasura on the backend

cdaringe 4 years ago

Hasura for the data layer, and any static site generator for the front end. If it’s moderately interactive, a next.js static site is a great pick. For styles for basic internal/simple apps, I use classless CSS sheets so I can just write html/jsx and get something presentable. I don’t have the patience for messing around with styles.

https://github.com/dbohdan/classless-css

throwaway81523 4 years ago

If you use Rails and don't care too much about fancy web visuals, the ActiveAdmin gem is very easy to use and makes reasonably nice CRUD screens. For my own stuff, I tend to just make super stupid handwritten html pages and Python cgi scripts, to avoid dealing with Rails. Elixir has its own thing like ActiveAdmin and I'd like to try it but haven't.

Other people just use spreadsheets for this type of stuff, depending on the application.

999900000999 4 years ago

I really like Firebase + Flutter Web.

But I will say Flutter Web is rather ugly compared to React... React has had UI libraries for years which are way beyond anything flutter can do

harg 4 years ago

I recently had to build a simple CRUD webapp in a very short timeframe (a few hours) as a coding challenge. I ended up using Next.js with Prisma (ORM) connected to a SQLite database. Got the job done pretty easily and quickly.

You could just talk directly to the DB using the basic Node SQLite packages/libraries but I found using an ORM like Prisma greatly reduces boilerplate and makes things more robust.

user7878 4 years ago

I basically create the application using the code genetor( with basic login / logout functionality) and using the code generator to create the new page with simple CRUD options. It's enterprise level application architecture that designed to cater high volume requests.

TechStack: Backend : .Net Core Frontend : React, AntDesign

connect me email available in profile

jpgvm 4 years ago

For really simple stuff I have been using Javalin + Kotlin + Exposed.

If I suspect it's going to be bigger I have been sticking to Spring Boot + Kotlin which has been very productive but it has a lot of magic going on that it sounds like you were trying to avoid.

snisarenko 4 years ago

I am working on something that can satisfy your needs

http://widgetterminal.com

Subscribe for early access, and i can give you a demo.

Also, have contact info in my HN profile.

dsfiguer 4 years ago

NestJS + Prisma is pretty neat. NestJS can generate you CRUD apps using the built in CLI and Prisma defines models/scheme in one file. I like this for smaller projects as it is quick and easy to manage.

midrus 4 years ago

I find Laravel (with something like livewire or Unpoly) quite easy, well documented and battle tested. Of everything I've tried in my life this is the best "one man army" stack I've seen.

  • adfm 4 years ago

    You're definitely in the ballpark, IMO. HTML-over-WebSockets drastically simplifies. Add HTMX to your list. The HOWL stack: HTML over whatever language.

maxlamb 4 years ago

Looks like the no-code platform Bubble has Airtable integration https://bubble.io/integration/airtable

codingdave 4 years ago

I've been liking Next.js recently. If you already know React, it is a fairly reasonable learning curve. But if you don't know React, I'd do something else that fits your existing skills.

midrus 4 years ago

Regarding to hidden complexity, the complexity is there. You either deal with it yourself or rely on the "magic" of the framework to do it for you. I prefer the latter.

RamblingCTO 4 years ago

As no one mentioned it, I'll add golang and gorm to the mix. Only crud you say? If you need web, I recommend gin. Easy af.

ravenstine 4 years ago

I would use the built-in HTTPs libraries in either Node.js or Deno. Maybe with Express.js or Fastify if I think I need them, but for simple CRUD I think those layers are usually unnecessary until you have many endpoints. Usually it's not a big leap to migrate to those since they also use the built-in request and response objects. The language really doesn't matter, though. If it were Ruby or Python then I'd choose their respective HTTP modules in the standard lib. Receive JSON, respond with JSON. Done.

For storage, SQLite is almost certainly the way to go by default IMO. People underestimate the capabilities of SQLite. Chances are it not only does most if not everything you want in a performant way, but it also scales very well. I might also go with CouchDB if I feel like it fits, and because I just find so much to like about it.

If I need webpages to be rendered, I'd use the Svelte compiler on the backend to SSR the components into HTML. Doing it from scratch requires a bit of work but not overly-so; I've done it 3 or 4 times with my own personal projects. That way you can not only render HTML in a very straight-forward way but you can easily rehydrate on the frontend if you need component behavior to run in the browser.

The end result of this is that you have few to no dependencies other than the language runtime and you understand the app in and out. I've been downvoted in the past for suggesting this approach, but I stand by it. No, you don't need a framework unless a framework is called for. I prefer to start with the minimum to get the job done and then work up from there. This way I can do what I want and not run into a situation where some other developer's nebulous definition of what makes something "middleware" get in the way. Separating business logic from "plumbing" logic helps when it becomes necessary to transition to a(nother) framework.

Rails is great and all that, and I started my current career in Rails, but in many cases these frameworks are just too much. Even the scaled down ones like Flask, Sinatra, and Express.js can be more than is necessary. An understanding of web security is kind of a requirement, and it takes more work to do things like CSRF tokens (as an example), but in my opinion it's worth it to know those things intimately earlier than to rely solely on prebuilt libraries without understanding what they're doing for you.

Of course there are exceptions. Don't re-implement cryptographic routines from scratch because why and also because you will screw them up. If I can screw up CRC8 then you can screw up BCrypt.

NanoWar 4 years ago

I'd give blitz.js a try, recently top on HN

smackeyacky 4 years ago

Power BI?

Not sexy, but can produce what you want.

polski-g 4 years ago

Python fastapi

cpach 4 years ago

Maybe Flask?

Or just PHP?

jdrc 4 years ago

php

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection