Framing our Application3:14 with Alena Holligan
All applications function is the same basic way regardless of whether this is a website, mobile app or even a voice-activated device. The application takes in a request and returns a response. This could be the request for a contact page on a website with its corresponding form response, a mobile app that requests weather information and responds with the weekly forecast, or asking Alexa to tell you a joke. This ask/tell request/response cycle is handled by the controller in an MVC application. The goal of this course is to introduce you to the concept of MVC frameworks, so you will be prepared to use any framework you may encounter.
As I mentioned in the last video, 0:00 you've already started to work with this separation of concerns. 0:02 When you move the header and footer of your website into separate files. 0:06 Or, when you organize functions and classes into an include folder. 0:10 We're going to continue to separate components in a clearly defined way. 0:15 All applications functions in the same basic way, regardless of whether 0:20 this is a website or mobile app, or even a voice activated device. 0:25 The application takes in a request and 0:30 returns a response, this is called the request response cycle. 0:33 The cycle may start with a request for 0:38 a contact page on a website with it's corresponding form response. 0:40 A mobile app, may request the weather information and 0:46 respond with the weekly forecast. 0:50 Or, you may ask Alexa to tell you a joke. 0:53 This Ask/Tell, Request/Response cycle 0:56 is handled by the controller in an MVC application. 1:00 We could build the entire application ourselves. 1:05 But being a programmer, 1:07 is all about knowing how to use the tools at your disposal. 1:09 One of those tools is a framework. 1:12 Developers saw the commonalities between projects. 1:15 And being in the business of solving problems, wanted to make it faster and 1:18 easier to get a project up and running. 1:23 A framework in development is much like framing a house. 1:25 It's the underlying structure of the application, or house, being built. 1:30 Using a framework, can help us build an application more rapidly, 1:35 by giving us the basic functionality right out of the box. 1:39 It can also make it easier to bring on new people to a project. 1:43 Because new developers may be familiar with the framework itself. 1:47 Or at the very least, have the documentation and 1:51 community support surrounding that framework. 1:54 PHP gives us many different frameworks to choose from. 1:58 Each framework may be geared for certain types of applications. 2:02 And therefore, come package with certain functionality. 2:06 There are also micro frameworks, 2:09 which are designed to be a minimal approach to development, 2:11 by giving you only the functionality most commonly seen throughout any application. 2:15 One of the dangers of using a framework, 2:21 is that many things can happen by what may seem like magic. 2:23 Since we're going to build a very basic site, and 2:28 also because I don't want you to be confused by magic. 2:31 We're going to be using a micro framework known as Slim. 2:34 The goal of this course is not to teach you to use Slim, but 2:38 to introduce you to the concept of MBC frameworks in general. 2:42 This will prepare you to use any framework you may encounter. 2:47 All reputable frameworks, we use a standard dependency management tool. 2:52 For PHP that tool is Composer. 2:56 If you need more information about setting up or using Composer, 2:59 check the notes associated with this video. 3:03 In the next video, we'll be using Composer and 3:06 setting up a minimum website using a controller with Slim Framework. 3:08
You need to sign up for Treehouse in order to download course files.Sign up