4 ms·
We're back to "The boring solution has a long list of inconveniences and uglinesses that everyone knows about. If we chose the new solution, nobody would know w
by pjc50 7y ago
We're back to "The boring solution has a long list of inconveniences and uglinesses that everyone knows about. If we chose the new solution, nobody would know where the bugs are and we can have exciting new ones."
Really the problem is that the standard solution hasn't improved. Backends are still a hassle in the 2020s. People keep reinventing CGI.
Every now and again I think "why doesn't someone just produce a simple standardised solution that would be cheap to host and easy to write", and have to lie down until the madness goes away.
- choicenotchance 7y agoThis makes me remember how annoying Django and its third party packages sometimes get. Say I want to spin up a simple project that: - has a few new fields for the User model, thus requiring to create a custom user model - has registration APIs (signup) requiring the new fields in User model - has authentication APIs (login, logout) but using a new field in the User model - has user authentication management APIs (change password, forgot password, etc) Enter DRF, and django-rest-auth. One would think that they will make your life easy. But hell no. Having a custom model and requiring their integration in the APIs provided thereby by rest-auth is a huge pain in the ass. First of all, allauth some how comes into play. Then, you have to write a funky new custom account adapter that replaces the one allauth uses by default Then, define custom serializers and views and urls for registration, login, logout, etc. And run into many other problems revolving around setting some X_Y_Z settings local to the third party package. It's truly mind boggling that this hasn't been solved yet. Maybe I'll just write something that does all that so that I don't have to cry in pain when using rest-auth and drf with Django for basic project already setup with custom user registration, and authentication and authentication management.
- deleted 7y ago[deleted]
- etripe 7y agoBackends are still a hassle? In what way do you feel Spring (Boot), ASP.NET Core and the like don't solve the problem adequately?
- pjc50 7y agoYou still have to write one at all? And it's an entirely separate process from the frontend, and usually in an entirely different language? And many places hire different developers to do it? Maintaining a static site is easy and places like github pages will host it for free; you can put a "SPA" in there if you like for no additional cost. But as soon as you need a backend it gets more complicated and expensive. Still cheap in absolute terms, but relatively more complicated. Oh and you need to keep an eye on it for security. I know the long list of reasons for this situation, but I'm questioning why it has to be this way. Back in the 80s there were proprietary monolithic single-user systems for producing what were effectively interactive databases, such as dBase and FoxPro. There was also the legendary programmable hypertext system HyperCard. And yet developing a small web application to do something that could be knocked up with a few screens of dbase or hypercard is much more time-consuming.
- path411 7y agoGive someone an excel file and they are perfectly happy. Give them a web app to do the same process and suddenly their "needs" forces you to completely abstract all of the concepts to something entirely unrecognizable from the start. It seems to me I see more and more a growing distance between how data is stored in a sql db and how the data is actually rendered or represented in the application.
- battery_cowboy 7y agoI use Dokku, which is like Heroku, but on my own server. To setup a backend, I just write the code with whatever I want (I use Elixir) and I use a local DB to test, using an env var to get the DB host. Then, I create an app on Dokku, a server, and deploy: Dokku install: $> wget https://raw.githubusercontent.com/dokku/dokku/v0.19.13/bootstrap.sh; $> sudo DOKKU_TAG=v0.19.13 bash bootstrap.sh Now, go to the server's IP or the domain you have setup previously and configure it with an SSH key and some other options. Create an app: On the server: $> dokku apps:create application_name $> dokku postgres:create application_db $> dokku postgres:link application_db application_name Deploy the app: On the client: $> git remote add dokku ssh://dokku.servername.tld:22/application_name $> git push dokku master Once more on the server, to get TLS certs set up and auto-renewal (only the first time per application): $> dokku letsencrypt application_name $> dokku letsencrypt:cron-job --add Then it just builds automagically, and as long as you use some sort of took to coordinate your database schema (for my use I use ecto migrations), then you don't need to do any more than this, really. You might have to do some limited configuration in your repo, but not much (add a .buildpacks file, then maybe a buildpack.config and a app.json). For a static site, you literally push a repo with a `.static` file and an `index.html` in the root dir (you can do more complicated things, too). It's not quite as powerful as k8s or whatever, but it can run small to medium sites easily, and it does have an Alpha-quality scheduler to push to k8s that I haven't tried yet, but should work as well as the Docker backend, eventually (and I'll switch to that when it's fully capable, too). With DigitalOcean, I hear you can do 1-click Dokku servers if you don't want to do it yourself (I haven't tried this).
- scoutt 7y ago> "The boring solution has a long list of inconveniences and uglinesses that everyone knows about. If we chose the new solution, nobody would know where the bugs are and we can have exciting new ones." Is this C vs Rust again? (it's a joke, but go ahead, downvote).
- jkoudys 7y agoRust is great, but it's so young that even the ugliness we knew about from a couple months ago is better known than the ugliness of today. The latest stabilisation of async/.await has me hard at work forgetting all the pre-futures-0.3 stuff I'd learned.
- pjc50 7y agoOh, it's practically general purpose life advice. You could even apply it to some people's second marriages.
- wilg 7y agoI have a hard rule to downvote whenever anyone asks to be downvoted or complains about being downvoted. Enjoy!