Write PHP Like a Pro: Build a PHP MVC Framework From Scratch

4.5 (1853)
Онлайн-курс
Payment
Обучение платное
Language
Английский
Duration
3 часа курса
Курс от Udemy
Чему вы научились?
Separate application code from presentation code
Organise your PHP code into models, views and controllers in an MVC framework
Use namespaces and an autoloader to load PHP classes automatically
Use the Composer tool to manage third-party package dependencies and autoloading
Handle errors and exceptions in PHP and display more or less error detail based on the environment
Understand how MVC frameworks work, making it easier to learn an existing framework like Laravel or CodeIgniter
О курсе

Learn the basic
concepts of using a model-view-controller framework that will make
your PHP projects faster, easier to write and maintain, and more
secure.

Learn to
Structure your PHP Code Like a Professional by Building a PHP MVC
Framework from Scratch.

  • Model-view-controller
    (MVC) pattern concepts
  • Build an MVC
    framework in PHP from scratch
  • Separate
    application code from presentation code
  • Use namespaces
    and an autoloader to load classes automatically

Take your PHP
Projects to the Next Level

Learning how to use
an MVC framework puts a very powerful tool at your fingertips. Most
commercial websites and web applications written in PHP use some sort
of framework, and the MVC pattern is the most popular type of
framework in use.

The gap between
knowing PHP and using a framework can be huge. This course bridges
that gap. By writing your own framework from scratch, you'll gain an
understanding of just how each component works. Frameworks like
Laravel, Symfony and CodeIgniter all use the MVC pattern, so
understanding how an MVC framework is put together will give you a
strong background to more easily learn frameworks such as these.

Content and
Overview

I designed this
course to be easily understood by programmers who know PHP but don't
know how to use a framework. Are you putting database code and HTML
in the same PHP script? Want to know why this is a bad idea? Want to
know how to do it better?

Starting with the
basic concepts of MVC frameworks, this course will take you through
all the steps needed to build a complete MVC framework, a piece at a
time.

Beginning with a
single PHP script, each lecture explains what you're going to add to
the code and why, building up the framework step by step. At the end
of this course, you'll have built a complete MVC framework in PHP,
ready to use in your own projects.

Complete with
working source code at every stage, you'll be able to work alongside the instructor
and will receive a verifiable certificate of completion upon
finishing the course.

Программа
Introduction: MVC concepts and development environment setup
Understand how the MVC pattern works, how it can help you to write better code, and set up the environment for creating the framework.
Introduction
An introduction to the course, including:
  • A summary of what you're going to learn
  • How to get the most out of the course
  • How to download the code and other resources with each video
  • How to contact me for help with anything at all
The problem with writing web applications: how NOT to structure your code
Understand why mixing application code and presentation code in the same PHP script is a bad idea, the problems it causes, and their solution.
The MVC pattern: What it is and how it can help you write better code
Learn what the Model-View-Controller (MVC) pattern is, what each part does, and the advantages of using it.
Install a web server, database server and PHP on your computer
Install and configure everything you need on your computer so you can follow along with the course: a web server that supports PHP and a database server like MySQL.If you do have any problems at this stage, please don't hesitate to ask for help. For example, having Skype installed or a recent install of WIndows 10 could require a slight change to the configuration to get it working as shown in the video.
Start writing the framework: Create the folders and configure the web server
Begin creating the framework by creating the folders necessary on the web server, and configuring it so the code will be more secure.
Addendum: Additional configuration for AMPPS on Windows
If you're using AMPPS on Windows, there's an additional change you need to make to the Apache configuration to change the root of the web server (not necessary on Linux as shown in the video).
MVC concepts
Routing: how URLs are processed in an MVC framework
Process all requests through a single script, getting the request URL from the query string and matching this to a list of routes.
Create a central entry point to the framework: the front controller
Understand what a front controller is: how every request goes though the same script file, and how we get the request URL from the query string.
Configure the web server to have pretty URLs
Configure the web server to remove the query string question mark from the URL, giving us pretty or vanity URLs.
Addendum: Possible additional configuration required for the Apache web server
If you're using the Apache web server (the one that comes with AMPPS and XAMPP for example), and you're having problems getting the pretty URLs working, then it's possible that you need an additional line of code in your .htaccess file. This lecture details the small change that you need to make to your code.
Требования
  • You should already be familiar with PHP and HTML.
  • You should be comfortable installing software on your computer - in the first section we'll be installing a web server.
Лекторы
Dave Hollingworth
Dave Hollingworth
IT Trainer
Платформа
/storage/img/providers/udemy.svg
Курсы Udemy подойдут для профессионального развития. Платформа устроена таким образом, что эксперты сами запускают курсы. Все материалы передаются в пожизненный доступ. На этой платформе можно найти курс, без преувеличений, на любую тему – начиная от тьюториала по какой-то камере и заканчивая теоретическим курсом по управлению финансовыми рисками. Язык и формат обучения устанавливается преподавателем, поэтому стоит внимательно изучить информацию о курсе перед покупкой.
Рейтинг
4.5
(1225)
(506)
(115)
(23)
(6)
Комментарии (1853)
Как и любой другой веб-сайт, konevy использует файлы cookie. Эти файлы используются для хранения информации, включая предпочтения посетителей и страницы веб-сайта, которые он/она посещал. Информация используется для того, чтобы подстроить содержимое нашей страницы под тип браузера пользователя и другие параметры и таким образом улучшить его пользовательский опыт. Для получения более подробной информации о файлах cookie, пожалуйста, прочтите статью «Что такое файлы cookie»