PHP and MVC Architecture -- building a better website

AOL Patch Labs - 675 Avenue of the Americas, Floor 3 New York - View Map Girl Develop It NYC
Mon, Jun 11, 2012, 7:00 PM (EDT)

About this event

PHP was one of the first and still the most popular language on the web that allows people to build dynamic websites without having to compile code. As a server side language, PHP can retrieve data from any database, manipulate it and display it on the web for users to interact with. PHP is used by millions of websites including Facebook, Etsy and the most popular CMS applications Wordpress and Drupal.

Well designed PHP takes advantage of the MVC(model/view/controller) architecture which separates the code that structures the data, the code that does all the heavy computations and lifting, and the code that allows the user to see something on the page.

This course is designed for people who have never programmed in PHP or who have a little PHP experience and want to learn how to build a well-structured website that allows for easy growth and maintenance. While there are many existing MVC frameworks (Kohana, Symfony, Zend and CakePHP), this course will focus on the structure of MVC architecture and how to build a good website rather than how to use a specific PHP framework. Experience with HTML and CSS is helpful.

Students will need to download a hosting server (it’s not as scary as it sounds, I promise). For Macs, you will use MAMP ( and for PCs you can use either WAMP ( or XAMPP( . You will also need a text editor. There are variety of good free ones including TextWrangler, Aptana, jEdit, and Notepad++. You may also download PHPStorm, a PHP editor for which Girl Develop It has a teaching license.

This section meets for 4 class sessions from Monday, May 28 to Monday, June 18.

Session 1: PHP and Views – Monday, June 11 7-9pm
Session 2: Models and Database Connections – Monday, June 18 7-9pm
Session 3: Controllers and Data Manipulation – Monday, June 25 7-9pm
Session 4: Security and Permissions – Monday, July 2 7-9pm

Session 1: PHP and Views
This session is an introduction to the dynamic nature of PHP. Learn how to build basic views quickly and integrate PHP-driven data into your HTML page. Understand how variables and programming logic allow different data to display depending on user input or external factors, like the time of day.

Session 2: Models and Database Connections
The power of PHP is being able to access data from a database. We will construct a basic MySQL relational database and learn how to build a data model for our system. Create functions that allow you to insert data, retrieve data, update data and delete data.

Session 3: Controllers and Data Manipulation
Although we are getting to controllers last in MVC, they are the most powerful component. Learn how to get data from your model, structure it, manipulate it and send it on to the view so people can see it.

Session 4: Security and Permissions
Once we have built our site, we need to think about permissions. Not everyone should have permission to do everything on the site. You can’t update your friend’s Facebook status and I can’t delete one of your tweets. We need to make our site just as secure.


Monday, Jun 11
7:00 PM - 10:00 PM (EDT)


AOL Patch Labs
675 Avenue of the Americas, Floor 3 New York