# Which Is Better, XAMPP or MAMP?



## dgentry (Mar 9, 2011)

I have tried to install separately MySQL, ColdFusion, and Apache, and I failed.  I am a new Web developer but I am a serious one.  I am using Dreamweaver.  I am investigating XAMPP and MAMP.  Which is better?  Is there another package I should be looking at also?  I want to develop shopping cart websites.


----------



## ElDiabloConCaca (Mar 9, 2011)

To be "serious," learn to program from scratch without a WYSIWYG editor.  Truly understanding HTML/XHTML structure and proper syntax is absolutely vital to being a true, successful, and capable web designer.  No drag-and-drop or WYSIWYG ("What You See Is What You Get") program will ever empower you to be a serious web developer.

"Real" shopping carts need two things: a database and something that accesses that database.  Most commonly, people use a combination of php (an interpreted, server-side scripting language akin to C) and mySQL (a relational database) because they're powerful, fast, and, above all, completely and absolutely free.

I highly recommend you learn those technologies in the following order, not moving on from one until you fully understand it:

1) HTML/XHTML
2) php
3) mySQL

There are tons of free tutorials and training materials available on the web, but, in my own opinion, these things are best taught in a structured, paced environment... in other words, school, and lots of it.  Of course, how you learn is best left up to you -- but always be aware that a self-taught programmer is a very dangerous programmer, and that's not "dangerous" like "James Dean" dangerous -- it's "dangerous" as in "atomic bomb" dangerous.

When dealing with shopping carts, you're potentially dealing with security in many forms: credit card information, payment information, the user's personal information -- those things should never be taken lightly, and badly-coded shopping carts can expose that information to the wrong parties.  Without someone standing over your shoulder to say, _"Don't do it that way.  That's the wrong way.  This is why it's the wrong way.  Here is the right way, and this is why it's the right way,"_ you may develop habits that are counter-intuitive and dangerous, and hard to break down the road.

With all that being said, neither one of those packages is "better" than the other.  They're both easy to set up and get running, and include similar tools (both include everything I listed above).

I would _highly_ recommend skipping both of those, though, and installing the free VirtualBox software (if you're running an Intel-based Mac) in which you would load the server flavor of Ubuntu (or your favorite Linux/UNIX distro) and configuring apache, mySQL, and php within that virtual machine for testing and development.  If you opt for a Debian-based distro, then installing those three technologies is a snap and many tutorials are available online.

The first question to be asked is: how experienced are you thus far?  What do you know?  What don't you know?  With that information, we can point you in the right direction for gaining additional knowledge and experience...


----------



## dgentry (Mar 10, 2011)

Thanks very much for your thoughtful reply.  You appear to be a knowledgeable IT person.  I am not.  But I am not a complete novice.

Background:

Strength: I know well about a dangerous, "atomic bomb," programmer.  I worked for 20 years as a banking product manager/developer which means that I was the liaison between the business side of the bank and the IT side.  If a programmer were sloppy (rare), I suffered.  I rose to be a Senior Vice President and Department Manager of a prominent regional US bank.  I know well the importance of a secure, IT gateway for a shopping cart website.

Challenge: To become a competent Web programmer.  When I left my bank in 2004, I started a successful air charter company which failed in the Great Recession.  I have always had an interest in programming.  When C+ first came out, I wrote a simple I/O program for a customer which I gave to him a s friend, not a bank representative.  The program told him how much money he had to keep in his business account under certain conditions.

About 2 years ago, I started with w3schools.com and lynda.com to do simple brochure websites.  I produced a couple simply for my own learning experience -- did not publish them.  I used Dreamweaver along with what I had learned about HTML and CSS from w3schools and lynda.com.  Also, I updated my air charter company's published website on my own.  When my company failed in 2009/2010, I decided to enter IT full time.

A friend wanted, and still wants, a shopping cart website.  Last summer, I researched shopping cart website builders and I found them kludgy and I could not do as much as I wanted to do with them.  That is when I tried and failed to establish a development environment on my Mac.

I have learned with the help of the MacPorts folks the power and precision of a command line.  I have spent many hours with the MySQL 3,400 page Reference Manual.  I have learned some Unix commands.  I have studied _Sams Teach Yourself SQL in 10 Minutes_.  [Handy book, but the title is misleading, to say the least.]  I have studied the _MacPorts User Guide_.  I have learned a lot about using my Mac for development.  For example, I have learned the hard way the importance of keeping my environment clean.

Your excellent reply has caused me to change my business strategy.  With your help, or someone's help, I will embark upon a structured learning program.  I will produce a shopping cart website for my friend with a website builder as a stop-gap measure.  I realize I can't learn enough _well_ to produce a shopping cart website from scratch quickly.  Maybe also I can sell a few brochure websites while I learn programming the right way.

I hope this post answers your questions.  If not, please let me know.  I look forward to your direction, if you are inclined enough to provide it.


----------



## ElDiabloConCaca (Mar 10, 2011)

Ah, you've already got a good foundation and more than enough experience to be able to tell a good habit from a bad habit.

Sorry if my post was long-winded and granular -- you get more than your fair share of the standard "I'm 19 -- teach me how to program web sites" kind of thing here on this forum.  A not-so-wise man on a forum once said about WYSIWYG editors, "I don't know anything about programming, I don't know anything about HTML, nor do I have any inclination to learn, but I DO want to produce beautiful and functional websites so WYSIWYG editors are a boon for people like me."

To which I replied, "I don't know anything about structural engineering, I don't know anything about trigonometry or geometry, nor do I have any inclination to learn, but I DO want to build beautiful and structurally sound bridges so..."

It may have been overkill but it gets the point across.  Building functional websites is not something that one can just jump head-first into without any experience and expect to be able to learn enough within the limited attention spans that people seem to have nowadays.  If anyone could build a website, web designers and web programmers would be out of business overnight... if anyone could build a bridge, architects would be rendered obsolete overnight.  You catch my drift... 

Apparently, NONE of that applies to you!  You obviously have the experience, desire, drive, and education in which to build a solid web design/programming career off of -- at least more so than those who choose that path typically.

I don't recant on my suggestion that sitting in a boring class is the number one way to learn a new skill or trade -- I can say from personal experience that one does not have to re-learn every single language out there -- once you have a solid foundation in one language and understand the primitives and constructs and basic structure of a good program, hopping from language to language is as simple as consulting a reference manual to find out the niggling differences in syntax.  The basic construct and form is identical across all languages: data types, looping, error checking, data structures -- they're all the same.  So I say "int i = 1" in one language and I say "dim i as integer; i = 1" in another -- either way, it's functionally equivalent.  You understand that i is storing 1, and that's the understanding that is important.

Also, as you say, doing something from scratch is already a great learning experience -- for one, well, you have to actually do it and mess up along the way and troubleshoot.  There's really no substitute for that.  Two, you get to cut the fat -- off the shelf solutions include a lot of stuff you won't use and may get in the way of you reading and understanding the code and what does exactly what within that code.

Let us know if you'd like any suggestions on where to start.  Here's a bit of old code, but still very functional and clean, that has to do with creating a php "login" system for a website:

http://www.evolt.org/node/60384

It's well documented and clean code and isn't too terribly advanced.  It uses both php and a mySQL (or other) database back-end and is quite elegant, in my opinion.  If you're going to do a shopping cart, you gotta have a way to remember who is currently logged in, and getting a login system going may be step one (or it may not, as you're the one familiar with the scope of your project).  Let me know if it's helpful or not -- I may be able to dig up some tutorials on php shopping carts that I know are clean, elegant, and done the correct way.


----------



## dgentry (Mar 10, 2011)

ElDiabloConCaca,

Great name, by the way!  Yes, I very much would like to know where to start.  Should I go to a community college for a class in HTML/XHTML?

David


----------



## ElDiabloConCaca (Mar 10, 2011)

For HTML/XHTML, you probably only need a working knowledge -- basic structure of a page, and a few handfuls of tags (headlines, paragraphs, tables, spans, divs).  I wouldn't be averse to saying that a working knowledge of HTML/XHTML could be garnered from a "do it yourself" book, much like the "Sam's Teach Yourself XXX in 24 Hours" style books.

Now, CSS styling for making web pages look "slick" is something that's best taught from a "master" -- I have to admit that with CSS, I started out by myself and learned some VERY wrong ways to do things.  It took a bunch of re/unlearning before I was back to being proficient with styling.  I should have learned the "proper" way first with CSS, as I initially dove right in and started coloring and moving things about on my HTML pages.  It was only after my "reeducation" and base-level understanding of how things work with CSS that I became fluent in it.

When moving on to php and mySQL, though, I would highly recommend a structured course or courses.

This is not at all a bad place to start and a good tutorial on basic HTML syntax:

http://www.w3schools.com/html/default.asp

If you feel comfortable moving through that tutorial and feel like you've got a grasp on HTML after that, I wouldn't waste any money having someone teach it to you all over again.  On to php!


----------



## dgentry (Mar 14, 2011)

Eldiabloconcaca,

Thanks for the login program and for the link to w3schools.  I have found the w3schools tutorials to be great.  I am going to use the HTML and the CSS tutorials again as refreshers and then I am going to write a brochure website before moving on to PHP.

David


----------



## ElDiabloConCaca (Mar 14, 2011)

Glad to hear it's helping -- they're the ultimate authority on "standards-based" web stuff concerning HTML and CSS, so that's definitely a good start.

php is fun (in my humble opinion) -- but may be slightly confusing without a background in C or programming structures... let me know what you find when you get to php and I'd be glad to help with anything you encounter.


----------

