174 karma · joined June 2, 2022
I prefer Django's having models defined in code and being able to generate views and migrations based off these. The auth situation seems more robust.
Obviously there's direct benefit to me with working with a familiar language.
The decision to give Rails a go instead really game down to me trying to minimise how many pieces I need to tape together. And with Django it seems I'd need to sort out my own frontend story and build my own deployment process. Rails has defaults for both of these now. I'm fully prepared I might decide to rebuild with Django in the future, but right now Rails is working.
And I feel like I’ve found that with Rails. In my free time I’ve recently chosen Rails to build apps for myself. I’m aware that there’s a productivity bias in new projects but so far everything I’ve needed my app to do has come out of the box with Rails (e.g. object storage). If you’ll pardon the pun, I feel like I have these guard rails that prevent me from going off on tangents and keep me focussed on the product.
And I’ve got the app hosted! This is a first for me and I’ve been a dev for 15 years. I feel like a lot of the complexity of web dev is tamed with this framework and that I’m on a very well trodden path.
Author id: int, name: string, book_id: int
NewAuthor name: string, book_id: int
ViewAuthor name: string, book_title: string
Author represents the data in the db, NewAuthor allows for an insert operation, and ViewAuthor is for showing the data to a user.
You could argue for combing Author and NewAuthor and making id optional but I wanted to enforce at the type level that I was working with stored data without needing to check id everywhere.
The most involved project I did with it was a CRUD app for organising Writer's Festivals.
The app was 100% OCaml (ReasonML so I could get JSX) + Dream + HTMX + DataTables. I used modules to get reusable front end templates. I loved being able to make a change to one of my data models and have the compiler tell me almost instantly where the change broke the front end. The main value of the app was getting data out of excel into a structured database, but I was also able to provide templated and branded itineraries in .odt format, create in memory zipped downloads so that I didn't need to touch the server disk. I was really impressed by how much I could achieve with the ecosystem.
But having to write all my database queries in strings and then marshal the data through types was tiring (and effectively not compile time type checked) and I had to roll my own auth. I often felt like I was having to work on things that were not core to the product I was trying to build.
I've spent a few years bouncing around different languages and I think my take away is that there is no perfect language. They all suck in their own special way.
Now I'm building an app just for me and I'm using Rails. Pretty much everything I've wanted to reach for has a good default answer. I really feel like I'm focused on what is relevant to the product I'm building and I'm thinking about things unrelated to language like design layout and actually shipping the thing.
This image shows a minimalist, abstract geometric composition with several elements:
Four black shapes that appear to be partial circles or "Pac-Man" like forms, each with a wedge cut out, positioned in the four corners/quadrants of the image Two thin black triangular or arrow-like shapes - one pointing upward in the upper left area, and one pointing to the right in the center-right area All elements are arranged on a light gray or off-white background
The idea is the app should be very easy to submit entries (entries can be small) as a way to get thoughts and emotions out of your head.
I want to focus on an interesting search functionality that aggregates entires into a single document about similar subjects.
I'd be keen to hear your development workflow for building an MVC style app, what you use for the front end, and how you go about refactoring, e.g. when editing a struct which is stored in the DB and shown in a view is when I particularly feel like I'm flying blind.
It's been a while since I've worked on a CRUD app so I'm finding the whole thing quite interesting. The purpose of the app is to solve a scheduling problem.
I've written my own CDCL SAT solver (now just using google or tools), and on the app side I've jumped from Phoenix (elixir) -> Dream (ocaml) -> axum (rust) -> Django. I feel like Phoenix probably perfectly suits what I'd like to do with this app (long running tasks and collaborative editing) but I'm at the point where I want to support this app long term and I don't see me not being familiar with python anytime soon.
Additionally, when the internet is mostly created by bots, why would I go online to look up a recipe on a bot cooking blog that was generated yesterday when I could have my pocket bot generate a brand new, tailor made cooking blog for me whenever I want? Ditto for instagram/tiktok. Generate the next image based on how long I looked at the last one.