HNHacker News
TopNewBestAskShowJobs

midrus

1,678 karma · joined November 29, 2016

submissionscomments
midrus··on You don't need that CORS request
+1

I find Laravel + Unpoly a great combination.

midrus··on You don't need that CORS request
> This is not the case with SPAs,

LOL. I'm yet to see a single SPA which can tolerate a bad network. You certainly have better tools to do it, but it still takes a ton of effort and nobody does it. So it ends up failing in worse ways because now the application just stalls and you don't even get the standard browser errors/timeouts.

Unless SPAs are built as "offline first" I haven't seen a single one which works better than a traditional MVC app in such conditions.

midrus··on You don't need that CORS request
Probably you're not aware yet that there are also "modern ways" to do server side templates/html. Nowadays you have things such as Unpoly, Htmx, Hotwire, Livewire, etc which can be added incrementaly to any traditional MVC applications leading to an incredible reduction in the amount of work necessary to ship something robust if you're a single developer or in a small team.

SPAs can be great for large teams with different skills/profiles, and large companies with a lot of money though.

midrus··on Why Linux is now my primary OS going into 2022
Yes, as long as you have tons of free time, and will to invest it in learning these systems tools.

For me this would be madness, I want the computer to achieve something, not to spend my days tweaking it.

midrus··on macOS Setup after 15 Years of Linux
Good for you then. As I said it depends a lot how we work, what kind of work we do, and what we prefer. Enjoy it.
midrus··on macOS Setup after 15 Years of Linux
How is it "trying to like it" when you try to replace everything and re arrange the entire OS to your liking?

I think they just tried to convert it to Linux for 1 year and that didn't work, which as I said, that's expected, it might not be the OS for you and that's fine. We're lucky we have options, and we are all not the same.

As I said in the comments, macos is for people that can accept the trade offs, that can adapt to a more rigid and propietary system in exchange for something that just works and allows you to focus on your actual work, and not on tuning your computer as if it was a hobbies sports car.

Again, nothing wrong with that, I've been like that in the past. Now I just prefer things that just work and I don't have to waste my time maintaining. We are all not the same, thanks God.

midrus··on macOS Setup after 15 Years of Linux
Either a defective unit or the admin software doing something wrong. I've had many personal and work provided MacBook air/pros and never faced anything of this Actually the biggest issue I've had has been related to the terrible keyboards they used to put in the 2018~2020 models
midrus··on macOS Setup after 15 Years of Linux
Great tip! Didn't know this. Thanks!
midrus··on macOS Setup after 15 Years of Linux
Well, if you're very opinionated regarding your setup, trying to force macOS into your ways won't work, macOS is great and very easy to use and gives you zero problems but you have to adapt to it. I've also moved after many years of linux and I could not be happier. I like easy and I like to focus on getting my actual work done, I got tired of spending weeks personalizing stuff, dealing with drivers issues, tuning the trackpad, adjusting applications to work with different dpi screens, etc, etc. For me it was a never ending war and a lot of time wasted.
midrus··on Ask HN: What's the quickest way to go from zero knowledge to build a web app?
Laravel. Nothing as easy, robust and productive, even if you're just learning PHP (which is a pretty easy to learn language).
midrus··on Ask HN: What tech stack would you use to build a new web app today?
A full stack framework on any language you prefer, such as Laravel or Rails. Interactive parts with hotwire/livewire or Unpoly.

Definitely not a bare bones one (express, flask, Sinatra, etc...) And absolutely NOT an SPA.

Deploy on heroku until it gets expensive (like, an ops salary expensive) then move to AppEngine.

midrus··on Ask HN: Recommended Domain Registrars?
I'm a very long time Dreamhost user. Never had any trouble with them.
midrus··on Ask HN: Top Skills to Learn for 2022?
For me it is going to be Laravel and PHP.
midrus··on The Big DevOps Misunderstanding
Are you comparing the cost of learning kubernetes to the cost of learning heroku? Or even AppEngine? Those are totally different leagues.

Also, with heroku, AppEngine, etc you have tons of documentation (official and unofficial) and resources. It is well tested and the exact same service runs thousands of businesses.

While kubernetes is like the react of the infrastructure world: you won't find two similar implementations. You need thousand tools configured around it to make it usable, and of course you might have docs about the individual pieces but you never have it for the big picture.

midrus··on Do not use Digital Ocean for production
That's what happens when you run your infrastructure on $5 servers, even if paying more, the company is optimized for people paying $5 and running mostly side projects.

If you're doing anything serious, go with gcloud or AWS. Their support might suck as well, but 99,9% of the time the problem is your fault and not their service, because it is so widely used and so many businesses depending on it that they'll notice even the slightest issue on their platform.

midrus··on From Node to Ruby on Rails
>Not next.js, but nest.js is a better opponent for rails

What part of that comment says anything about layers or maturity?

By that rule I could compare rails to express and say they are about the same.

midrus··on From Node to Ruby on Rails
100% this. I've always said that the ecosystem, the tooling, the editor support, the libraries, the frameworks and the availability of people to hire are far more important than the language. For example it irks me when people say they like react because jsx or Vue because templates...that's the smallest of the reasons to choose one or another!!!

Same thing with Rails/Laravel/etc...people don't choose it because PHP or because Ruby , etc...the language doesn't matter at all, the tooling does matter it all.

midrus··on From Node to Ruby on Rails
How to do an unique validation in a full stack framework (Laravel):

https://laravel.com/docs/8.x/validation#rule-unique

How to do a unique validation in nestjs (didn't find it in the docs, so had to Google it):

https://gist.github.com/zarv1k/3ce359af1a3b2a7f1d99b4f66a17f...

No thanks.

This is still apples vs molecules to mount your own apples.

midrus··on From Node to Ruby on Rails
- No assets pipeline

- Terrible templating system

- No equivalent to hotwire/livewire/liveview

- No built in jobs/scheduling system

- Insanely bad packaging and dependencies system

midrus··on From Node to Ruby on Rails
Django is good only if you're building a backend.

Its frontend solution is a 90s monty python's joke.

Rails, Laravel, etc are real full stack frameworks.

midrus··on From Node to Ruby on Rails
> as a solo developer

MVC all the way, because otherwise you're never going to finish it. Doing a separate backend + SPA is an insane amount of work compared to a traditional full stack framework. Just thinking about validations (both server and client) make my brain hurt. Also you'll have to rewrite the frontend before even finishing it given how fast the landscape changes.

And even being a small team and not just yourself, I'd only think of an SPA if 1) You need an offline first experience, or 2) You don't have full stack engineers at hand and you only have backend people which don't want to touch JavaScript and frontend people which only want to work with JavaScript..... but this is more of a people problem than technical one.

I've done a lot of Django in the past, then a lot of SPAs for the last 6 ~ 8 years, and now I'm back to Laravel + Livewire and I'm living in a dream right now. Everything is so easy that I feel I've been cheated the last few years.... so much time and money (from my employers) wasted...

midrus··on From Node to Ruby on Rails
Having some experience with both, agree with everything you said.

I'd also add Django is great if you're building only a backend with it (and you have no frontend and/or it's an external SPA).

For full stack development, Laravel all the way. Just it's templating system (blade) is a joy to use compared to Django's templating system which feels stuck in the 90s.

midrus··on From Node to Ruby on Rails
THIS!

I've worked many years with Django (doing old style MVC), then moved to do all the SPA stuff (worked with React mostly and some Vue). Now I'm back to MVC using Laravel and Livewire and it is simply awesome. If the decision is on me, I'm not going back. Laravel is awesome, and current day PHP is not 10 years ago's PHP the same current day JavaScript is not 10 years ago's JavaScript

midrus··on From Node to Ruby on Rails
Next.js is extremely limited compared to Rails, so you're still not comparing apples to apples. Add to next.js a librarydatabase access, background jobs, csrf and related security stuff, migrations, server side caching of data, *validation*, email sending, email receiving, testing, and I could spend an entire day listing things Rails gives you that Next.js won't give you. Web development is not just rendering html, unless you're building just landing pages, there's a lot more going on.
midrus··on Rails 7 Released
I'm having the same experience you're mentioning with Laravel and Livewire. It's an amazing and simple way to ship really robust and reliable web apps in a fraction of the time.
midrus··on What would be your choice for setting up a new SaaS project for 2022?
Laravel or Rails. Keep as far as you can from SPAs, they're a waste of time and never lead to a better solution unless you're building an offline first web app or something like Google Maps. A dashboard or your usual CRUD app don't need to be an SPA.

Use a full stack framework, don't reinvent the wheel. Look into Livewire, Hotwire and Unpoly. Hire people that are neither JavaScritp fanatics, nor Go fanatics, nor Kubernetes fanatics. Hire people with an open mind and focused on building your product and not obsessed on whatever they think the best tech stack is.

Unless your new project is API only (has no frontend) then don't use Django. Django is great for building backends, but its frontend solution is a joke and that really feels like something from the 90s (that's why I recommend Laravel or Rails).

Regarding infrastructure, a Dockerfile and Google App Engine is all you need. No need to build your own kubernetes cluster for a project you're just starting out.

midrus··on Ask HN: What tech stack would you use for your next small/middle project?
Laravel, and the TALL stack. Maybe also Unpoly for certain parts.

I'd avoid SPAs as hell. Just a total waste of my time/money and end user's resources. If employer wants to use his money for SPAs, I'd build them happily.

midrus··on Ask HN: What is your preferred/most commonly used stack and why?
Laravel, livewire, Unpoly and tailwind. Never been this productive in my life.
midrus··on Django 4.0
Django: Great if you are building only a backend or rest API with a separate frontend (an SPA in React, etc). The templates system is terrible, has no asset pipeline built in and frontend on it feels like developing in the 90s. You'll miss php a lot here.

Elixir: Technologically "mind blowing", although all the nice things come from the Erlang VM and not from Elixir itself in my opinion. You will likely not find any job using Elixir, if you do it is going to be full of people just learning the language so the codebase will be very likely a disaster. You will miss a lot of libraries and you will have to write code for things you'd take for given in the PHP ecosystem. Be ready to fight your editor plugins (depending on which one you use, and the degree of IDEisms you're used to).

I understand you want to learn something new, so the most "radical" one here that will teach you more new things is clearly Elixir.

But other than learning purposes, If I were to build something for real, I'd stick with PHP and Laravel, it's an incredible productive, well documented and well thought out platform to develop in.

midrus··on Django 4.0
I have a lots of experience with Django, and a few months experience with Laravel. I think Django is good at pure backend solutions. When you're not doing the frontend in Django itself but instead doing a separate SPA. Also the admin is a great tool as an internal CMS. Django rest framework is awesome too.

Laravel is a real "full stack" framework, it has a very powerful templating system (one of the best I've seen!) where you can do components instead of just includes. It has a powerful assets bundling pipeline, great integration with alpine, Vue, inertia and the super awesome livewire.

Laravel documentation is TOP.

As I'm not a fan of the SPA approach and still like frontend and building applications, I much prefer Laravel nowadays.

← PreviousPage 6 of 20Next →