1 00:00:00,480 --> 00:00:01,350 Hello and welcome. 2 00:00:01,350 --> 00:00:11,640 In this lecture we are going to try and understand some of the concepts we have covered while creating 3 00:00:11,750 --> 00:00:15,190 our first web app. 4 00:00:15,420 --> 00:00:24,210 One of the concept we are going to go through here is the intelligence we use eat in our previous lectures. 5 00:00:24,240 --> 00:00:35,130 Intel sense is kind of like a tool that tries to guess which code you're trying to type and gives you 6 00:00:35,190 --> 00:00:36,140 options. 7 00:00:36,180 --> 00:00:37,860 So it's quite useful. 8 00:00:37,860 --> 00:00:43,890 It helps you to complete your code and make the code writing process faster. 9 00:00:43,890 --> 00:00:49,550 So let's just give you a quick illustration just in case you can't remember what it is. 10 00:00:49,610 --> 00:00:54,220 If for example I'm trying to type a string type in the word s.. 11 00:00:54,730 --> 00:01:00,430 You notice that it creates a sub menu here giving me a list of items. 12 00:01:00,450 --> 00:01:03,970 So he's trying to guess what I'm trying to type. 13 00:01:04,290 --> 00:01:11,780 So if for example I wanted to type if the guess is right and I wanted to try string rather than typing 14 00:01:11,790 --> 00:01:16,330 the whole world string I just click on it and it puts it in there and so on. 15 00:01:16,680 --> 00:01:20,310 So that's basically the concept of intelligence. 16 00:01:20,310 --> 00:01:25,020 It helps you preempt the code you're trying to write in. 17 00:01:25,150 --> 00:01:32,460 I mean the process speeds up the code writing process. 18 00:01:32,460 --> 00:01:44,550 Next thing I want to highlight here is the distinction between the DOT is picks dot c s and the airspace 19 00:01:47,050 --> 00:01:51,720 so notice we've got to file names here almost identical. 20 00:01:51,960 --> 00:01:57,670 But the difference is that one of them has got the dot c s extension after it. 21 00:01:58,100 --> 00:01:58,510 OK. 22 00:01:58,560 --> 00:02:07,020 So I just want to illustrate the similarity or the differences between them in a way these two files 23 00:02:07,110 --> 00:02:13,260 both represent the same side of the coin. 24 00:02:13,720 --> 00:02:16,790 Does they represent two sides of coin. 25 00:02:16,830 --> 00:02:18,270 A coin has two sides. 26 00:02:18,630 --> 00:02:25,340 So this follows basically represents both sides of a coin. 27 00:02:25,800 --> 00:02:31,560 So you can usually access this to project files by from the solution explorer. 28 00:02:31,590 --> 00:02:33,510 So this is this solution explorer. 29 00:02:33,900 --> 00:02:42,270 If I click on this one here that says identity dot ESB X if I expand that you should see the two files 30 00:02:42,270 --> 00:02:45,420 so you've got the identity is being dots. 31 00:02:45,420 --> 00:02:46,550 Yes. 32 00:02:46,560 --> 00:02:47,080 All right. 33 00:02:47,220 --> 00:02:57,090 And then you've got the identity dot ESB X as you can see from the hierarchy of files files and then 34 00:02:57,090 --> 00:03:05,850 in dot c is denote the C sharp files it means that they are C sharp files and they can be seen as representing 35 00:03:06,060 --> 00:03:21,420 the code behind the identity dot a S P x form so if I double click on this identity or a speaks double 36 00:03:21,420 --> 00:03:24,070 click on it. 37 00:03:24,630 --> 00:03:30,350 So by double clicking on the identity or aspects you see the desired view. 38 00:03:30,450 --> 00:03:38,910 However if you click on the source option here which is this one here a five scroll down to the top 39 00:03:40,010 --> 00:03:49,380 you should see that on the source here on line one here you could see a reference on the first line 40 00:03:49,380 --> 00:03:50,100 of code. 41 00:03:50,580 --> 00:03:50,990 Okay. 42 00:03:51,000 --> 00:03:58,140 This is a reference on the first line of code so you can see here the first line says these are some 43 00:03:58,200 --> 00:03:59,030 airspeed. 44 00:03:59,140 --> 00:04:02,100 Let SB X code. 45 00:04:02,100 --> 00:04:14,180 It also tells you that the code behind is on the identity dot E P X dot c s which is this code here. 46 00:04:14,190 --> 00:04:15,420 All right so you've got. 47 00:04:15,420 --> 00:04:21,640 If I click on this here we've got to call the identity and then we'll call the identity dot airspace. 48 00:04:21,660 --> 00:04:26,050 So it's telling you that this code behind that the code is behind this. 49 00:04:26,070 --> 00:04:29,160 So if I click on that which is this here. 50 00:04:29,160 --> 00:04:35,750 So this is the identity dot ESPN they'll see us code behind that. 51 00:04:35,760 --> 00:04:38,200 It is referring to. 52 00:04:38,220 --> 00:04:44,570 So this is the code behind that is responsible for the form. 53 00:04:44,610 --> 00:04:46,770 It is what controls the phone. 54 00:04:48,360 --> 00:04:57,240 So we're running on the web server this piece of code here will be responsible for handling the back 55 00:04:57,330 --> 00:05:08,820 end logic for the form while the while the identity dot a speaks code handles what's delivered to the 56 00:05:08,820 --> 00:05:15,860 front end and is immediately viewable to the user or visitor. 57 00:05:15,870 --> 00:05:17,910 All right. 58 00:05:18,120 --> 00:05:27,060 So eventually when the files become compile these two files will be merged into a single file called 59 00:05:27,510 --> 00:05:30,360 Identity dot ESB x. 60 00:05:30,470 --> 00:05:31,040 Okay. 61 00:05:31,080 --> 00:05:37,330 So at runtime when the code is compile both files are merged. 62 00:05:37,440 --> 00:05:43,460 Let's have a quick look at the server controls for which is the tool box here. 63 00:05:43,470 --> 00:05:50,190 So these are the server controls we are going. 64 00:05:50,200 --> 00:05:53,880 We've already used some of them from this standard. 65 00:05:53,900 --> 00:05:58,370 We've used some from this standard tool box here. 66 00:05:58,500 --> 00:06:02,100 The data controls we've got one here called data control. 67 00:06:02,100 --> 00:06:11,250 This one here the data control basically is used to bind to a data source like a database you're trying 68 00:06:11,250 --> 00:06:18,260 to connect something or get some data to from a database you be using the data control as one here that's 69 00:06:18,260 --> 00:06:19,880 what's used to bind it. 70 00:06:20,040 --> 00:06:28,410 Then we've got the the here we've got the validation controls the validation controls basically ensures 71 00:06:28,560 --> 00:06:36,450 the end users are providing inputs in an acceptable format. 72 00:06:36,800 --> 00:06:41,180 We've got the navigation control here there's one for navigation. 73 00:06:41,180 --> 00:06:47,980 So the navigation control basically is for creating menus and site navigation. 74 00:06:47,990 --> 00:06:50,990 We've called we should have one for logging. 75 00:06:51,020 --> 00:06:57,950 Yes we've got a log in one here and the logging controls basically handles securing a site with a password 76 00:06:57,950 --> 00:07:01,740 protection and retrieval. 77 00:07:01,970 --> 00:07:07,640 So we're not going to go through all of them I just wanted to highlight some of the server controls 78 00:07:08,420 --> 00:07:13,070 so that you know what they do in case you want to use them. 79 00:07:13,280 --> 00:07:19,070 We quickly go of the button click event. 80 00:07:19,130 --> 00:07:25,310 So this here on line twelve on her own line 17. 81 00:07:25,310 --> 00:07:32,150 Here we've got an okay button and notice here there's this e here is an event the click event. 82 00:07:32,150 --> 00:07:36,020 So basically what happens is this is the code behind it. 83 00:07:36,050 --> 00:07:43,130 So when we click when the button is clear when the users enter the first name last name and you click 84 00:07:43,340 --> 00:07:47,390 on the button it triggers off an event. 85 00:07:47,390 --> 00:07:49,090 All right so a tool. 86 00:07:49,110 --> 00:07:55,360 Then the results it to then generate a result on output which is this one here. 87 00:07:55,970 --> 00:08:05,570 OK so these two strings here this first option here will take whatever input the user type thing into 88 00:08:05,570 --> 00:08:07,430 the first dialog box. 89 00:08:07,430 --> 00:08:13,970 And the second one here would take the second input the user types in and then you have the click button 90 00:08:14,420 --> 00:08:22,880 which will take the result of what's been typed in and output it is in this string result. 91 00:08:22,880 --> 00:08:29,090 So these strings here this first name and last name can be known as they are basically variable. 92 00:08:29,090 --> 00:08:34,480 A variable is a count like a way to store something. 93 00:08:34,730 --> 00:08:45,370 So you can look at a variable as a bucket that is big enough to store information of a specific type. 94 00:08:45,470 --> 00:08:51,810 In this case it will be storing text information which is known as a string. 95 00:08:51,860 --> 00:08:55,180 So the way you declare a variable is in C sharp. 96 00:08:55,190 --> 00:08:58,500 You first will have to declare the type. 97 00:08:58,520 --> 00:09:03,920 So by string meaning it's going to be a text followed by the name of the variable. 98 00:09:03,920 --> 00:09:11,270 So this is a type and that's the name of the variable and the equals two is used to assign a value to 99 00:09:11,420 --> 00:09:13,660 that variable. 100 00:09:13,710 --> 00:09:22,640 So I've got a simple diagram here just to illustrate and let make you understand the difference between 101 00:09:22,640 --> 00:09:25,600 the design time and the runtime. 102 00:09:25,610 --> 00:09:35,870 So the process by which the design time which is the human readable code becomes compiled down to a 103 00:09:35,870 --> 00:09:40,440 runtime or machine readable time the runtime is machine readable. 104 00:09:40,440 --> 00:09:47,220 Why the design time is the human readable code. 105 00:09:47,220 --> 00:09:55,650 The computer cannot read human readable code so it has to be compiled into a machine readable code. 106 00:09:55,700 --> 00:09:58,490 And this basically is the process. 107 00:09:58,610 --> 00:10:00,510 So you start off with your code here. 108 00:10:00,530 --> 00:10:01,860 This is your code. 109 00:10:02,210 --> 00:10:05,570 And then the code is passed on to the compiler. 110 00:10:06,050 --> 00:10:08,020 So this is with C sharp compiler. 111 00:10:08,060 --> 00:10:15,560 So the compiler then compiles the code and passes the on to the dot net framework assembly. 112 00:10:15,560 --> 00:10:15,970 All right. 113 00:10:16,000 --> 00:10:25,530 So that that then passes it on to the airspeed dot net runtime which then passes it on to the web server. 114 00:10:25,520 --> 00:10:30,440 There's a built in web server and Visual Studio that web server then passes that information. 115 00:10:30,440 --> 00:10:33,760 The results of that after it has been compiled. 116 00:10:33,800 --> 00:10:39,400 It passes the result onto the web browser which is then displayed for you to see. 117 00:10:39,410 --> 00:10:47,960 So basically this is what goes on behind it while the code is being compiled into a machine readable 118 00:10:47,990 --> 00:10:49,710 code. 119 00:10:50,120 --> 00:10:57,720 So the human readable code will be compiled into a machine readable format. 120 00:10:57,740 --> 00:10:58,090 All right. 121 00:10:58,100 --> 00:11:08,450 The code is compiled into a dot net assembly which typically can be a single file with a dot dear little 122 00:11:08,510 --> 00:11:10,280 file extension. 123 00:11:10,280 --> 00:11:18,590 In the case of a web application that will be then used and reference whenever we want to serve up the 124 00:11:18,590 --> 00:11:29,910 Web page a web server then launches is dot net which in turn calls that DL assembly into play. 125 00:11:30,110 --> 00:11:38,960 Requesting a definition of the identity dot ESB exe file or whatever name you've called your file. 126 00:11:39,400 --> 00:11:40,310 All right. 127 00:11:40,310 --> 00:11:48,860 The code will then be executed and the ESPN dot net will deliver it to the requesting web server. 128 00:11:48,860 --> 00:11:55,180 The web server in turn will pick that up and send it back to the end user. 129 00:11:55,290 --> 00:11:57,540 VI The web browser. 130 00:11:57,620 --> 00:12:08,450 So this is the way the process works from when the code is compiled and when the user sees the content 131 00:12:08,630 --> 00:12:10,210 on the page. 132 00:12:10,310 --> 00:12:12,090 So that is it. 133 00:12:12,110 --> 00:12:13,520 Thanks for watching. 134 00:12:13,570 --> 00:12:13,830 By.