1 00:00:00,410 --> 00:00:04,940 To begin our journey about what common languages do and how they work together, 2 00:00:04,940 --> 00:00:09,130 let's begin by dissecting the languages needed for a web application. 3 00:00:09,130 --> 00:00:11,625 On second thought, let's begin at the drive-through. 4 00:00:12,900 --> 00:00:14,840 Imagine you're at a drive-through. 5 00:00:14,840 --> 00:00:18,625 You order some food through one of those giant intercom menus. 6 00:00:18,625 --> 00:00:22,120 That order's sent to the kitchen where they make the food. 7 00:00:22,120 --> 00:00:26,980 When the food is ready, it's put into a bag and handed to you through the window. 8 00:00:26,980 --> 00:00:30,399 When you originally placed your order at the intercom, 9 00:00:30,399 --> 00:00:32,954 it was like typing a URL into the browser. 10 00:00:32,954 --> 00:00:34,946 The URL is sent to a web server, 11 00:00:34,946 --> 00:00:38,480 the kitchen, which then produces what you asked for. 12 00:00:39,620 --> 00:00:44,870 When the content is retrieved, aka your food is ready, it's placed in a bag and 13 00:00:44,870 --> 00:00:48,010 handed through the window, or the front end of the website. 14 00:00:49,070 --> 00:00:53,240 Just like a drive-through wouldn't put just any order through the window when you 15 00:00:53,240 --> 00:00:55,650 drive up, it's the same for a website. 16 00:00:56,930 --> 00:00:58,910 This is called the client server model. 17 00:00:58,910 --> 00:01:02,130 The client makes a request to the server. 18 00:01:02,130 --> 00:01:05,190 And the server gives back the content to the client. 19 00:01:05,190 --> 00:01:06,750 Once the page has loaded, 20 00:01:06,750 --> 00:01:10,770 from this point on when you send messages through the front-end, 21 00:01:10,770 --> 00:01:16,010 you are sending messages to the back-end, which then returns what you asked for. 22 00:01:16,010 --> 00:01:18,788 For example, maybe you forgot to ask for ketchup, so 23 00:01:18,788 --> 00:01:22,110 you ask the nice lady at the front for some ketchup. 24 00:01:22,110 --> 00:01:23,850 She turns around and asks the kitchen for 25 00:01:23,850 --> 00:01:28,120 a packet of ketchup and hands it to you, and you walk away happy. 26 00:01:28,120 --> 00:01:31,540 You can see this when you go to the Treehouse website. 27 00:01:31,540 --> 00:01:35,860 When I pull up my Treehouse home page, I only see my information. 28 00:01:35,860 --> 00:01:37,210 Like the points I've accrued, 29 00:01:37,210 --> 00:01:42,080 my name, and the course I'm on have all come from the server. 30 00:01:42,080 --> 00:01:46,190 But the layout and styling are going to look the same, whether it's you or 31 00:01:46,190 --> 00:01:48,950 anyone else signing on to the Treehouse site. 32 00:01:48,950 --> 00:01:51,860 The front end, or the drive-through window if you will, 33 00:01:51,860 --> 00:01:56,000 uses images in the languages HTML, CSS, and JavaScript. 34 00:01:57,160 --> 00:02:01,130 HTML and CSS are not programming languages exactly. 35 00:02:01,130 --> 00:02:05,220 HTML is a markup language which builds the structure of the website. 36 00:02:05,220 --> 00:02:09,190 And CSS is a styling language which tells the browser how 37 00:02:09,190 --> 00:02:10,680 to make that structure look. 38 00:02:11,760 --> 00:02:14,290 Let's leave those languages aside for now. 39 00:02:14,290 --> 00:02:16,212 You'll learn a lot more about them later. 40 00:02:16,212 --> 00:02:17,420 The back-end, or 41 00:02:17,420 --> 00:02:22,690 the kitchen in our analogy, is made of what are called server-side languages. 42 00:02:22,690 --> 00:02:27,050 And there are many different languages like PHP, Ruby, Java, and 43 00:02:27,050 --> 00:02:29,010 Python to choose from. 44 00:02:29,010 --> 00:02:32,320 Whether you're programming for a website or mobile app, 45 00:02:32,320 --> 00:02:37,660 you're going to be dealing with a lot of the same process you just saw for the Web. 46 00:02:37,660 --> 00:02:42,084 One of the big differences when developing mobile versus the Web is 47 00:02:42,084 --> 00:02:45,093 the number of languages you'll need to use. 48 00:02:45,093 --> 00:02:49,526 If you're programming for a mobile android device like the Moto 360 or 49 00:02:49,526 --> 00:02:50,599 Samsung Galaxy, 50 00:02:50,599 --> 00:02:55,880 you'll probably just be using Java to program the whole application. 51 00:02:55,880 --> 00:03:00,200 If you wanted to build something for a mobile iOS device, like an iPhone or 52 00:03:00,200 --> 00:03:04,940 an iPad, you'll be using Swift or Objective-C. 53 00:03:04,940 --> 00:03:07,943 Hopefully now you have a better grasp of what back-end and 54 00:03:07,943 --> 00:03:11,630 front-end languages are and how they work together. 55 00:03:11,630 --> 00:03:16,150 In the next video we'll talk about the similarities and differences between some 56 00:03:16,150 --> 00:03:21,290 of the back-end languages we discussed like Ruby, Python, PHP, and Java.