1 00:00:00,480 --> 00:00:02,440 As I mentioned in the last video, 2 00:00:02,440 --> 00:00:06,040 you've already started to work with this separation of concerns. 3 00:00:06,040 --> 00:00:10,220 When you move the header and footer of your website into separate files. 4 00:00:10,220 --> 00:00:15,640 Or, when you organize functions and classes into an include folder. 5 00:00:15,640 --> 00:00:20,870 We're going to continue to separate components in a clearly defined way. 6 00:00:20,870 --> 00:00:25,000 All applications functions in the same basic way, regardless of whether 7 00:00:25,000 --> 00:00:30,410 this is a website or mobile app, or even a voice activated device. 8 00:00:30,410 --> 00:00:33,220 The application takes in a request and 9 00:00:33,220 --> 00:00:38,460 returns a response, this is called the request response cycle. 10 00:00:38,460 --> 00:00:40,840 The cycle may start with a request for 11 00:00:40,840 --> 00:00:46,440 a contact page on a website with it's corresponding form response. 12 00:00:46,440 --> 00:00:50,500 A mobile app, may request the weather information and 13 00:00:50,500 --> 00:00:53,550 respond with the weekly forecast. 14 00:00:53,550 --> 00:00:56,458 Or, you may ask Alexa to tell you a joke. 15 00:00:56,458 --> 00:01:00,760 This Ask/Tell, Request/Response cycle 16 00:01:00,760 --> 00:01:05,010 is handled by the controller in an MVC application. 17 00:01:05,010 --> 00:01:07,950 We could build the entire application ourselves. 18 00:01:07,950 --> 00:01:09,120 But being a programmer, 19 00:01:09,120 --> 00:01:12,760 is all about knowing how to use the tools at your disposal. 20 00:01:12,760 --> 00:01:15,210 One of those tools is a framework. 21 00:01:15,210 --> 00:01:18,660 Developers saw the commonalities between projects. 22 00:01:18,660 --> 00:01:23,310 And being in the business of solving problems, wanted to make it faster and 23 00:01:23,310 --> 00:01:25,830 easier to get a project up and running. 24 00:01:25,830 --> 00:01:30,430 A framework in development is much like framing a house. 25 00:01:30,430 --> 00:01:35,710 It's the underlying structure of the application, or house, being built. 26 00:01:35,710 --> 00:01:39,810 Using a framework, can help us build an application more rapidly, 27 00:01:39,810 --> 00:01:43,800 by giving us the basic functionality right out of the box. 28 00:01:43,800 --> 00:01:47,350 It can also make it easier to bring on new people to a project. 29 00:01:47,350 --> 00:01:51,620 Because new developers may be familiar with the framework itself. 30 00:01:51,620 --> 00:01:54,970 Or at the very least, have the documentation and 31 00:01:54,970 --> 00:01:57,780 community support surrounding that framework. 32 00:01:58,970 --> 00:02:02,540 PHP gives us many different frameworks to choose from. 33 00:02:02,540 --> 00:02:06,210 Each framework may be geared for certain types of applications. 34 00:02:06,210 --> 00:02:09,930 And therefore, come package with certain functionality. 35 00:02:09,930 --> 00:02:11,920 There are also micro frameworks, 36 00:02:11,920 --> 00:02:15,230 which are designed to be a minimal approach to development, 37 00:02:15,230 --> 00:02:21,220 by giving you only the functionality most commonly seen throughout any application. 38 00:02:21,220 --> 00:02:23,540 One of the dangers of using a framework, 39 00:02:23,540 --> 00:02:28,060 is that many things can happen by what may seem like magic. 40 00:02:28,060 --> 00:02:31,050 Since we're going to build a very basic site, and 41 00:02:31,050 --> 00:02:34,430 also because I don't want you to be confused by magic. 42 00:02:34,430 --> 00:02:38,590 We're going to be using a micro framework known as Slim. 43 00:02:38,590 --> 00:02:42,710 The goal of this course is not to teach you to use Slim, but 44 00:02:42,710 --> 00:02:47,920 to introduce you to the concept of MBC frameworks in general. 45 00:02:47,920 --> 00:02:51,060 This will prepare you to use any framework you may encounter. 46 00:02:52,320 --> 00:02:56,667 All reputable frameworks, we use a standard dependency management tool. 47 00:02:56,667 --> 00:02:59,708 For PHP that tool is Composer. 48 00:02:59,708 --> 00:03:03,228 If you need more information about setting up or using Composer, 49 00:03:03,228 --> 00:03:06,570 check the notes associated with this video. 50 00:03:06,570 --> 00:03:08,990 In the next video, we'll be using Composer and 51 00:03:08,990 --> 00:03:13,590 setting up a minimum website using a controller with Slim Framework.