Help me learn back-end web programming.
August 10, 2011 3:27 PM   Subscribe

Help me begin learning back-end web programming.

Over the past few years, I have become very proficient with HTML/CSS, to the extent that I've earned a bit of cash on the side doing some basic, freelance web design. I would, however, like to begin learning back-end web programming; I find myself feeling a bit incompetent every time I log onto MeFi/Facebook/Amazon... as I have not the slightest idea of how these websites actually "work."

Although I am a college student (in the US), I am not a computer science major, and know literally nothing about computer programming. Despite this, I am smart, patient, and very determined to learn.

I am looking for advice along the lines of: "So you have no idea what a database is? Read (X), and consider learning (insert programming language here)."

Thanks MeFi!
posted by lobbyist to Computers & Internet (15 answers total) 42 users marked this as a favorite
 
Best answer: So you have no idea what a database is?

Read this, and consider learning a web-oriented programming language. Personally, I recommend Python, using this book: How to Think Like a Computer Scientist Using Python. Next, learn a web framework like django.
posted by sonic meat machine at 3:33 PM on August 10, 2011 [5 favorites]


Best answer: The best SQL database tutorial, hands down.
posted by Monsieur Caution at 3:38 PM on August 10, 2011 [7 favorites]


Best answer: I decided to give a little more detail about what you're trying to learn. As you've already discerned, there is a fundamental divide in web programming between the client and server dimensions of web sites. The most important technologies on the client side are the traditional browser-based languages that you already know: HTML, CSS, and JavaScript.

On the server side, you're mostly looking at three different pieces of software: a web server, like Apache; web services written in a language like PHP, Python, or Ruby (or Java, or Scala, or ASP.NET...); and a database system. In general, the web server handles external connections and sending information to the client. The web services provide business logic. The database system is used for data persistence (articles, users, merchandise information, etc).

This gets more complicated when you add asynchronous technologies such as AJAX (Asynchronous Javascript and XML), or Javascript frameworks that make it easier to write AJAX and fancy effects (jQuery, etc.)
posted by sonic meat machine at 3:42 PM on August 10, 2011 [2 favorites]


Best answer: Yeah, Python's fantastic as a first programming language. I learned using Python Programming: An Introduction to Computer Science by John Zelle, and it remains my favorite technical book ever.

However, it's really difficult to use Python on a web server without some sort of framework. (Frameworks aren't bad, but using one means tackling yet another learning curve, and at your current skill level you might find it worthwhile to hack things together without one at first.)

PHP, however, can be used with or without a framework. Without one, you can do things like put a header on every page or transfer form data between two pages very quickly. That said, PHP (especially sans framework) doesn't make you do things the "right" way, so you'll have to be wary of picking up bad habits. It's also kind of an ugly language.

If you decide to go the framework route, this question I asked a year ago might be helpful. But if you'd rather start hacking one piece at a time, PHP is probably the way to go. I learned using PHP and MySQL Web Development by Luke Welling and Laura Thomson, which is good but not great. Other MeFites might have better recommendations.
posted by randomname25 at 4:03 PM on August 10, 2011


PHP/mySQL is a great place to start. You'll have instant gratification and a decent foundation. One common mistake is to write all PHP inline in your HTML - all the time. You'll eventually find that it's not scalable and you'll have to go back and learn how to make it object oriented.

I'd start with how PHP interacts with mySQL, something like this. Then move on to OO PHP.

You will learn to LOVE php.net... You can learn the basics of OO PHP is here on php.net.

Feel free to MeMail me if you want more resources (I code in an mentor in PHP/mySQL professionally).
posted by bikergirl at 4:23 PM on August 10, 2011


I'm with randomname (and I say this as a Ruby on Rails guy) PHP is hands down one of the easiest languages to get something rough and ready working quickly. It gets a bad rap and deservedly so in a lot of ways but its still quite easy to get going. You can easily get a server up and running using one of the Pre-Built AMP (Apache, Mysql, PHP*) Packages and literally have your first php app running in minutes. Learn some basics of a language before jumping too far into frameworks.

BTW if you do try a framework you might want to try something called a "micro-framework" which doesn't have all the bells and whistles of a Symphony, Django or Rails but is much easier to get your head around at first, I don't do much PHP these days but last time I did I liked Limonade

yes I know some people like to stick Perl and Python in there as the P but I'm old school like that
posted by bitdamaged at 4:27 PM on August 10, 2011


Best answer: My girlfriend is a non-programmer and is currently working through Learn Ruby the Hard Way, a translation of Learn Python the Hard Way. It seems good.

The Stanford CS101: Introduction to Computing Principles coursework also looks good, particularly since they teach you programming concepts in JavaScript. One advantage there is that you can learn programming fundamentals in a client-side framework that you're comfortable with before moving to the server, and you can start applying those skills to the HTML/CSS work you're already getting paid for. Plus, if you want to continue honing that skill, you could even use JavaScript on the server side thanks to node.js.

Regardless of which of the approaches you take, the introduction from The Hard Way is Easier is spot-on, in my opinion:
At first, you will not understand anything. It'll be weird, just like with learning any human language. You will struggle with words, and not know what symbols are what, and it'll all be very confusing. Then one day BANG your brain will snap and you will suddenly "get it". If you keep doing the exercises and keep trying to understand them, you will get it. You might not be a master coder, but you will at least understand how programming works.
posted by lantius at 5:01 PM on August 10, 2011


I like PHP as a way to learn the rudiments of web programming, but as a first programming language it seems suboptimal. It makes so many mistakes in design, and its syntax is so Perl-ish...
posted by sonic meat machine at 5:01 PM on August 10, 2011 [1 favorite]


I've never found anything better than PHP for server-side web development. After ten years working with it and even while developing near-native high proficiency in Python for GIS and image manipulation, PHP + Apache + MySQL is still my toolbox of first choice for developing for the web. Every single one of PHP's mistakes in design is there to make your life easier as a web developer.

The first thing you want for yourself is an environment where you can freely screw up and make mistakes while working on the real internet. Pair.com offers a $20/month service with up to 20 separate databases for you to experiment with.
posted by migurski at 8:37 PM on August 10, 2011 [1 favorite]


To be honest, front-end is the future. Back-end database programmers are everywhere (including me), but the front-end is coming into the fore. Some of the stuff they are doing with JQuery and HTML5 is amazing, and it's totally the future.

I heard on a podcast that even future Window UI are going to be HTML5/Javascript.

You could learn back-end and be a small fish in a big sea, or become shit-hot at HTML5/Js, and rule the world.
posted by antiquark at 2:30 AM on August 11, 2011


I don't buy it, antiquark. The front-end has to have something to communicate with.
posted by sonic meat machine at 3:06 PM on August 11, 2011


sonic meat machine: It does, and back end is never going away, but the focus is moving more to the front end. Soon (now?) backends will just deliver JSON feeds to the front end.

The answer to "how do these websites work" will be %80 about Javascript, and %20 about backend/databases.
posted by antiquark at 3:34 PM on August 11, 2011


Response by poster: Wow -- thanks so much for all of your terrific answers. I've decided to go ahead and order some books on Python (thank you for your recommendation randomname25, the Zelle book is first on my list). Also, thanks to sonic meat machine for your second, more detailed comment -- I really found that overview helpful.
posted by lobbyist at 4:48 PM on August 11, 2011


Glad to help. :)

antiquark: My view of it is that the UI is sexy—you can truly do some amazing things with JavaScript these days—but the back end is where the value is. Give me a database without a UI, and I have value. Give me a UI without a database, and I have a pretty wireframe.
posted by sonic meat machine at 5:41 PM on August 11, 2011


I have seen projects with beautiful user interfaces that emphasize user experience and leverage human-computer interaction... but are created on top of application logic that is made of sticks and glue that breaks whenever it is touched.

I have also seen the opposite where the back-end is amazingly elegant, scalable, and maintainable. High availability and failover is seemless. Data is replicated smoothly... but has the equivalent of a 1990s-based Geocities-quality front-end.

For the OP, if your goal is to have a foundational-based understanding of back-end application logic, it doesn't particularly matter which language you do your deep diving (Ruby, Python, Java, C#). Try to understand and build upon the foundation concepts.

* Work through creating a data model (schema creation, SQL CREATE, INSERT, UPDATE)
* Functional and maintainable application logic to access that data (Usually via some form of object-relational modeling or rolling your own if you absolutely have no other choice)
* How this data gets passed to and from the presentation layer (Understanding how HTTP protocol requests and responses work, AJAX which works off the same foundational idea)
* Finally render the data with simplicity in mind to enable an end-user to be most effective (HTML, CSS, Javascript).

Keep your first project simple because it will be significantly more effort than you might envision. You can also modify and build upon this initial project to add more features or create additional enhancements with the new knowledge you acquire.
posted by seppyk at 9:19 AM on August 15, 2011


« Older Good LGBT blogs and websites?   |   Looking for low-key, clarinet-heavy jazz that will... Newer »
This thread is closed to new comments.