8 ms·
> I would say that Laravel is an extremely high quality framework (on par with and even in some ways better than Rails) that nobody should be ashamed to use. N
by insaneirish 6y ago
> I would say that Laravel is an extremely high quality framework (on par with and even in some ways better than Rails) that nobody should be ashamed to use.
Never heard of Laravel. Decided to take a look. First thing the intro documentation says to do is install something called 'Docker Desktop'. I'm good, thanks.
Why do I need Docker to play around with a web framework?
- hokumguru 6y agoBecause getting a modern version of PHP, postgres, and redis up and running isn’t necessarily easy for your average beginner.
- deleted 6y ago[deleted]
- trog 6y agoDoes docker make it easier or harder though? I was testing out Apache Superset the other day and it recommends using Docker to do so. I am not strong in Docker - I prefer to run things from scratch so I know exactly what is going on under the hood - but thought I'd give it a go. I had so many problems getting it going. Part of it was the Superset instructions were slightly obsolete, but mostly it was this same problem in this issue[1] from 2016, which was closed in 2017, which is still obviously an active issue for new Docker users. It seems to be just a relatively simple Linux filesystem permissions issue (or at least, that is how I resolved it quickly, just to get it working), but it strikes me as bizarre that this kind of thing could not be resolved with a better installer or docs or something. I then ran into problems with the application running under Docker not being able to access the database in the host OS. Again there are a zillion resources for resolving this, going back years, with many dead ends as it has changed so much since then. There's this hugely upvoted solution[2] on Stack Overflow - which works for Docker, but Superset is launched through docker-compose, so straight away a new user has to figure out the differences. In PHP on a fresh Linux box, you can be up and running and developing on Debian/Ubuntu with two or three apt-get commands, depending on whether you need a database server. Adding Docker into this mix just seems like it would unnecessarily complicate things. All that said, I appreciate once you're over the learning curve of Docker, it's super useful. I am finding myself increasingly reaching for it as an option to container-ise some setups away from my current setup, which is basically bash-scripted install processes on fresh VMs.
- nickjj 6y ago> Does docker make it easier or harder though? I happen to do web development and run a Docker course and I will confidently say it's a lot easier based on support questions and overall feedback that I've gotten over the years. Because the alternative involves a ton of manual steps that every individual needs to take, for example with Python (and this applies to most languages / ecosystems with tiny changes): - Which version of Python do I install? How do I install it on Windows 10? What about macOS? What's the instructions look like on my distro of Linux? - How do I handle multiple versions of my programming language or install the language without the root user? - I need to run Postgres, how do I install that on my OS? - I need to run Redis, how do I install that on my OS? - I need to run a specific version of Postgres / Redis for this project but a different version for another project, how to set this up? - I need to use Webpack, how do I get Node installed and set all of that up - How can I easily run all of my app's dependent services at once (web + worker + webpack + database + cache) without having to open multiple terminals or discover language specific tools with their own config files - How can I use environment variables in my app that are loaded from a file? - My app needs a library that requires a C dependency to be compiled to use it, how do I get that working on my OS? Now imagine you're just getting into programming and want to build a web app with Flask, Django, Laravel, Rails, Phoenix or any other language / framework. You're going to need to do this for pretty much every tech stack and the learning curve for this stuff is really high when you're a beginner. There's so many unknown unknowns that lead to dead ends causing folks to get really frustrated and just say fuck it and never start. But with Docker, you install Docker Desktop and technically you can treat it as a black box where everything is on a need to know basis. As long as you can find a reasonable base project to work off of getting started is as easy as installing Docker and running docker-compose up --build, and waiting 5-10 minutes. Now you can focus on learning the important thing (web development using the framework you've picked). In most cases that works very well. Sure there's some installation related issues along the way but with tens of thousands of folks who have taken one of my courses using Docker, this a huge minority and it's usually something that's easily fixable (I offer support and deal with questions like this once in a while).
- zozbot234 6y agoDocker on non-Linux OS's is just a VM. You could do the same by starting a linux VM w/ the system environment you're deploying on, and save the Docker overhead.
- ipaddr 6y agoRedis and postgres are an apt install away. I can't imagine redis would throw you. Postgres use to require using a separate user to login through the shell.
- YottaBun 6y agoUnfortunately the documentation does make it look like you need docker to get started. You don’t though. A litter further down in the docs there is a section for using just Composer, if you’re still interested in checking it out: https://laravel.com/docs/8.x#installation-via-composer https://laravel.com/docs/8.x#installation-via-composer
- insaneirish 6y agoAha! Thank you. I haven't used PHP since ~2002/2003 so I wasn't aware of Composer, but this seems more along the lines of the original Rails tutorials which used gem to install rails. I think learning things with as few components as possible is an important part of actually learning what you're working with, rather than just turning knobs.
- busterarm 6y agoWhat happened to Homestead? That seemed to be the recommended way of starting last I touched PHP professionally (4-5 years ago)
- 40four 6y agoAlive and well. And if you haven’t seen the surrounding laravel ecosystem in 4-5 years I think you will be quite impressed. The amount of 1st party integrations and side projects is amazing. https://laravel.com/docs/8.x/homestead https://laravel.com/docs/8.x/homestead
- ZephyrBlu 6y agoFrom the looks of things it's because it sets up a full project with MySQL and Redis rather than just a codebase.
- deleted 6y ago[deleted]
- rumblestrut 6y ago“ Never heard of Laravel. Decided to take a look. First thing the intro documentation says to do is install something called 'Docker Desktop'. I'm good, thanks. Why do I need Docker to play around with a web framework?” Because modern web development is complex, and Docker helps make that burden less so. You make it sound like you took one look at the docs, and that was just too much for you to go any further. Don’t get into front end development, because you’ll lose your mind.
- cutler 6y agoOP has a valid point. What's so painful about Laravel deployment that it requires Docker? And that's just for Laravel, then you need another for your database. Then if you're working from home most broadband connections will not be suitable for containers. The whole Docker/Kubernetes cult is a farce as far as solo freelancers are concerned. Making it an idiomatic default just smacks of elitism.
- wnevets 6y ago> Why do I need Docker to play around with a web framework? PHP is server side, not frontend like React or Angular
- oneeyedpigeon 6y agoI think OP was referring to Laravel as the web framework, not PHP.
- wnevets 6y agoMaybe but I would find even that is more confusing.
- hakfoo 6y agoThis feels so un-PHP. One of the reasons PHP won is because it was relatively environmentally neutral. There was a galaxy of free and cheap PHP software whose deployment process was basically "FTP everything up and plug in database credentials." At most, you might have to confirm you had PHP5+, but basically any random cheap hosting or default-config VPS would work with default or near-default settings. In contrast, a lot of Rails and Node stuff was much more fragile by comparison-- I can recall trying to deploy other people's RoR applications and it turns into a huge rabbit hole of version matching and dependencies that aren't there out of the box and "OMG you never should have started with $distro." The Docker mindset feels like a snarky response to "it works on my machine"; rather than actually making things reasonably environment-neutral, just ship your machine with every install!
- thomaslord 6y agoYou don't, that's just the quickest/easiest way to get started. If you read slightly further, you'll get to the section for people who already have the dependencies installed directly: https://laravel.com/docs/8.x#installation-via-composer https://laravel.com/docs/8.x#installation-via-composer