PHP is the world’s most popular and widely used Web development language that runs nearly one third of the sites in Internet. It runs on a Web server which executes the PHP scripts as input and produces dynamic Web pages as output. PHP in combination with Linux, Apache and MySQL (the LAMP platform) is simple, stable and low cost open-source solution for wide range of Web applications.
In this course the students will learn the bases of the PHP language, MySQL and the LAMP platform as well as advanced techniques for developing complex data-driven Web sites. The curriculum covers the fundamentals of Web programming, HTML, CSS, the PHP language basics (variables, strings, arrays, conditional statements, loops, etc.), working with Web forms, using sessions and cookies, working with MySQL database and phpMyAdmin, using the SQL language for querying and modifying databases, working with files, controlling the HTTP headers, object-oriented programming and exceptions handling, using PEAR modules, working with Apache and mod_rewrite, as well as real-world practical examples. The course finishes with practical project where the students implement simple e-commerce application by applying all skills learned during the course.
Target Audience
The course is designed for beginners and existing Web developers who want to improve their skills. Having preliminary knowledge in computer programming and Web technologies is highly recommended but not necessarily required.
Syllabus
1. World Wide Web and HTTP Introduction (1 lecture)
- What is WWW?
- HTTP in depth, HTTP request / response lifecycle dissection
- URL, HTML
2. HTML Fundamentals (2 lectures, 4 exercises, 6 homework)
- Introduction to HTML
- HTML versus XHTML
- Basic tags, tags attributes, document types
- HTML lists
- HTML tables
- HTML special chars
- HTML forms
- Other tags
3. CSS Fundamentals (1 lectures, 2 exercises, 2 homework)
- What is CSS? Why “cascading”?
- Style sheet syntax
- Linking presentation and content
- CSS selectors and rules
4. PHP Basics (3 lectures, 3 exercises, 6 homework)
- What is CGI? What is PHP? What is Web server?
- Web application lifecycle
- PHP advantages and disadvantages
- PHP syntax
- Variables
- Floating point operations
- Boolean expressions
- Strings
- Arrays
- Constants
- Predefined variables
- Some basic functions
- Variable variables ($$)
5. Code Flow Control (1 lectures, 2 exercises, 4 homework)
- Conditional statements
- Loops
- Functions and return values
- Include and require
- Variables scope
6. Working with User Input (2 lectures, 2 exercises, 4 homework)
- HTML forms
- GET versus POST requests
- Handling file uploads
- Validating with regular expressions
- Escaping user data (HTML escaping)
7. PHP Sessions (2 lectures, 2 exercises, 4 homework)
- HTTP cookies in details
- Working with sessions
- Building custom sessions engine
8. SQL Language (3 lectures, 4 exercises, 6 homework)
- What is database and RDBMS?
- Introduction to MySQL
- PHP MyAdmin
- SQL syntax
- DML basics – SELECT, INSERT, UPDATE, DELETE
- DDL basics – CREATE, DROP, ALTER
- Working with multiple tables – UNION, JOIN
- Table keys, unique fields
- MySQL specific queries – LIMIT, REPLACE
9. Working with Databases (2 lectures, 2 exercises, 4 homework)
- Connecting database
- Fetching data
- Modifying data
- Persistent connections
- Preventing SQL injection
10. Accessing Files, Resources and Processes (2 lectures, 2 exercises, 4 homework)
- Opening files
- Reading/writing data
- Streams handling (pipelines)
- Directories
- File permissions
- Accessing external programs
- Network programming
- Example: handling emails
11. Output Control and HTTP Headers (1 lectures, 2 exercises, 3 homework)
- Output buffer control
- HTTP headers
- Controlling the browser cache
- Redirecting the browser
12. Object-Oriented Programming with PHP (2 lectures, 4 exercises, 6 homework)
- What are class and object?
- Methods and properties scope
- Inheritance
- Static methods and variables
- Serialization
- Namespaces
13. Exceptions Handling (1 lecture, 2 exercises, 2 homework)
- Try…catch
- throw function, the Exception class
- The @ operator
- Setting global exception handlers
- die function
- Setting the level of output
14. PEAR Package (2 lectures, 2 exercises, 6 homework)
- What is PHP package?
- Using PEAR
- Some PEAR classes (Database, XML, Authentication, Mail, …)
15. Advanced PHP Techniques and Integration with Apache (2 lectures, 2 exercises, 4 homework)
- PHP configuration (php.ini), modifying PHP configuration at runtime
- PHP security
- Working with the Apache Web server
- mod_rewrite and other useful Apache modules
- PHP from the command line
- MySQL configuration
- Apache configuration
- Debugging and performance
16. PHP Coding Best Practices (2 lectures, 1 exercises, 3 homework)
- Coding style best practices
- Best practices for accessing databases
- Best practices for session handling
- Making application location independent
- Supporting Cyrillic and Unicode
- Multiple languages and localization
- PHP design patterns
17. Building a Simple Blog System: A-Z Example (3 lectures)
- Creating the HTML and CSS from image files
- Designing the header, footer and the sidebar
- Designing the database
- Implementing “view topics” functionality
- Implementing login / logout functionality
- Implementing “post topic” functionality
- Implementing data paging
- Deployment on the production environment
18. Practical Project: e-Commerce Web Site (12 exercises, 36 homework)
- Implement simple e-commerce Web site with PHP, MySQL and Apache
- From Web design images to HTML and CSS
- Designing the header, footer and the sidebar
- Designing the database
- Implementing the functionality
- Browse categories and products
- Shopping cart
- Login / logout
- Add / edit / delete products and categories
- Upload product photos
- Data validation
- Data paging
- Deployment on the production environment
Duration
Lectures: 32 hours
Exercises: 48 hours
Homework: 104 hours
Duration: 2.5 months, 2 times weekly * 4 hours
Schedule
The course is scheduled for July 2008.