Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
i think XAMPP better and FREE, why i can use MAMP
my question is why i can use MAMP , i love XAMPP
XAMPP is available for Windows, Linux, and Mac. I have used it on Windows and Linux and like it. I have not used MAMP, but one student was trying MAMP and had problems. They installed XAMPP and it worked fine. But many other students use MAMP also.
Alena HolliganTreehouse Teacher
First off, if you already have a dev environment or prefer one way over the other, by all means use that. This workshop is meant to provide beginners with a simple means to run their PHP sites directly on their machines.
Second, thank you all for chiming in and sharing what works well for you. YOU are what make our community awesome! :)
I spent quite a bit of time when considering what to show people since there are many great options that may be a better choice depending on your personal need. The goal of this workshop is to get complete beginners up and running as soon as possible so they can learn PHP without having to learn anything else first. Here are some things I considered when deciding what to use:
- if you're on a Mac, setting up a local dev environment directly on your machine is fairly strait forward, PHP and Apache are install right out of the box, so you just may want to upgrade those. Then that just leaves a database like MySQL which isn't too tough to install. There are some easy to follow tutorials online if you just do a google search. This CAN BE a good option for the speed, as it CAN have the smallest impact on your computer. Windows on the other hand.... I just wont go there :) a few things to think about
- It's not as easy for beginners and you'll have quite a bit of command line work to do.
- If you don't actually shut down apache and mysql, you're actually bogging down your computer ALL THE TIME instead of when you want to test out your site.
- If you mess something up, it's not easy to revert. With MAMP, you just delete the folder (or uninstall MAMP Pro) and you're done. The support is what really makes this hard for us to justify at Treehouse.
- There are quite a few *AMP packages available for both Windows and Mac, including Bitnami which is similar to xampp and I would choose it over xampp specifically for being able to test out PHP 7 and HHVM, so if that interests you, please check out bitnami.
- If you're going to work for a large company they will probably have some sort of virtual image for you to use that matches their production environment. This is probably done using something like docker or vagrant. This is more complicated and more to learn just to get started with PHP (we don't cover git until the end of the PHP track). However, it does NOT have to be HARD, as Lewis Cowles points out, and since this IS something that can help you in your career, we will probably cover this at some point either as a workshop, blog post or both. You can also test PHP 7 and HHVM with this option as well! WIN!
Some of the main reasons I chose MAMP
- MAMP itself is free and you can easily use it without having to upgrade to Pro.
- With MAMP Pro you can access everything in one place, including:
- Setting up virtual hosts
- Switching to multiple versions of PHP for testing. This can be extremely helpful when testing out an upgrade or new server, or testing things like WordPress plugins on multiple versions. But it can also get complicated, buggy and easily messed up.
I hope this helps to clarify things a little bit for you. Here at Treehouse we work hard to give you the best experience we can, so thank you for your feedback and stay tuned for more :) For now, like I said before, feel free to use whatever system works for you, just PLEASE TEST YOUR CODE BEFORE YOU DEPLOY TO PRODUCTION :)
Kevin Korte28,109 Points
My .02 echo's Ted's. I'm patiently waiting for treehouse to start getting more in depth advanced courses. I think for the majority of users, Virtualbox and Vagrant may be over most people's head. I know Virtualbox and Vagrant are skimmed over in the Laravel course, but I wish it would go into more advanced config, what each is actually doing, and advanced troubleshooting techniques.
Those courses would take treehouse to another level.
Lewis Cowles, I certainly see your point, but I think it is also important to remember where most students start, myself included. Most have little experience with programming. So Treehouse starts with the very basics. When I reached the point where I wanted a local environment, it was because I needed something that ran PHP well. I did not care about anything else. Later I cared about MySQL. XAMPP does that well, even if it is a simple solution. The problem I developed was only with the latest release for XAMPP where they changed the dashboard for Localhost. My solution is above. I was actually happy that I was able to 'hack' their page on my local environment and add what I wanted. It was a good test of what I have learned.
I think I would have been put off with learning Vagrant when I really just wanted to test my PHP and MySQL codes. I would have had to install VirtualBox, then Vagrant. Then I have to configure Vagrant at least one time. Only then could I think about my project. And for every project, I have to configure Vagrant at the beginning (I think). I don't have to do that with XAMPP. If it is on, then I am good to go. So while it may be a simple, maybe antiquated solution, it seems there are more places for beginners to go wrong. Now that I am more advanced, I may check out Vagrant, but XAMPP still works perfectly well for me.
Some courses on these more advanced environments may be a good thing.
You don't have to use MAMP specifically, or even XAMPP really. I believe XAMPP is OS independent while MAMP is OSX only, correct me if I'm wrong - I believe it was simply a recommendation on their end, but even more so why not use the natively pre installed systems in place for your development?
Kevin Korte28,109 Points
You can use either. I use XAMPP on Windows and MAMP on my MBP. I have no reason, it's just what I originally set up. My interaction with both of these software programs is so small, and they both work, I don't really care which one I use.
Lewis Cowles74,902 Points
You can also use Apache, or NginX directly with MariaDB, or MySQL, and PHP at any version you like; but if we are going to nit-pick, my main problem with this video, is that this is not using Vagrant, or similar modern-solution that requires virtualization of the tech-stack, and may have been setup by Ops to allow you a consistent environment between dev, staging and production; rather than risking having options, extensions configured differently.
In life diversity is awesome, in technology, we need to reduce potential for change, so we can spend our time more effectively avoiding troubleshooting. MAMP and XAMPP are both incredibly amateur solutions to these problems, and represent being tied into a brand, rather than learning the technologies behind their flimsy front-end.
Lewis Cowles74,902 Points
Sorry Kevin Korte and Ted Sumner; but downloading XAMPP, is equally as hard as downloading two windows installers where you click next until they are done. Okay so maybe you reboot your machine and type a few shell commands; again I'm not bashing the video, I was responding to earlier questions over the tech stack used; that I would consider spinning up Vagrant is easier than XAMPP / MAMP, especially as the boxes for LAMP are plentiful, and cater to more diverse use-cases.
I've also been happy with XAMPP. It runs nicely in Visual Studio Code the PHP Server extension.