| Topic | Presenter | Summary | Duration | Tags | Quiz | Captions |
| ------------------------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| ASP.Net Core 3 & Angular 9 Book, CH 6 | Chris Black and Chris Reddick | The ASP.Net Core 3 & Angular 9 series continues in this discussion about chapter 6 of the book. | 1:51:35 | #FridayDevTraining, #DevTraining, #ClarityTraining, #Angular, #ASP.Net | 08/14/20 Dev Training: ASP.Net Core Book CH 6 | |00:00:04.050 --> 00:00:10.082 - So this week we're just going to continue on with Chapter 6 in 00:00:10.082 --> 00:00:12.402 - our.net core and angular 9 00:00:12.402 --> 00:00:17.080 - application and. We're just going to kind of go over it like 00:00:17.080 --> 00:00:20.392 - a little bit slower pace, and I'm just going to ask random 00:00:20.392 --> 00:00:22.876 - questions, random individuals, and will kind of just work 00:00:22.876 --> 00:00:26.188 - through it together. And it's not to put anybody on the spot. 00:00:26.188 --> 00:00:29.224 - Definitely, you know there's going to be some things in here 00:00:29.224 --> 00:00:32.260 - that you know you might not be familiar with, and that's 00:00:32.260 --> 00:00:35.296 - completely OK because its angular 9 and you know it's not 00:00:35.296 --> 00:00:38.608 - something you work with every day. So just if you can just 00:00:38.608 --> 00:00:42.196 - give your best to answer or just think through the, you know what 00:00:42.196 --> 00:00:43.576 - you think it could be. 00:00:44.400 --> 00:00:47.064 - Feel free to tap out at anytime and say you know what? 00:00:47.064 --> 00:00:49.950 - I don't know, but I'd love to hear more about it, so that's 00:00:49.950 --> 00:00:52.392 - what we're just going to roll through today and it's just 00:00:52.392 --> 00:00:54.612 - like I said, kind of building off last week's code. 00:00:55.990 --> 00:01:00.722 - And then you know this weeks before we jump into that, I just 00:01:00.722 --> 00:01:05.090 - wanted to do a quick refresher on just like basic clarity. Get 00:01:05.090 --> 00:01:08.730 - just to kind of refresh everybody's memory of like help 00:01:08.730 --> 00:01:12.370 - pull request generally go branch naming conventions and all that 00:01:12.370 --> 00:01:17.466 - fun stuff. So what I'm going to do is I'm going to share my 00:01:17.466 --> 00:01:21.106 - screen. Please let me know if you can't see anything. 00:01:23.330 --> 00:01:25.948 - And I'll try to make it bigger. I'll make this code 00:01:25.948 --> 00:01:28.566 - bigger here in a second. We're just kinda kinda not worry 00:01:28.566 --> 00:01:30.232 - bout that bit for a second though. 00:01:32.940 --> 00:01:36.229 - Alright cool alright moving on. So basically just want to cover 00:01:36.229 --> 00:01:39.817 - this really quickly and I'm just going to break it down and 00:01:39.817 --> 00:01:43.704 - then I'll go over it and then if you guys have any questions 00:01:43.704 --> 00:01:47.591 - on get and how we use it at clarity just please like give 00:01:47.591 --> 00:01:51.777 - me a shout and ask questions at the end. That way we can just 00:01:51.777 --> 00:01:54.169 - roll through this pretty quickly. Alright? So basically 00:01:54.169 --> 00:01:55.963 - I want to go to like. 00:01:57.010 --> 00:02:00.454 - A repo and this is the main stuff repo but I wanna go stuff 00:02:00.454 --> 00:02:03.160 - product just to show a little bit a few more examples. 00:02:05.020 --> 00:02:09.970 - So basically we can see that it's all structured in whenever 00:02:09.970 --> 00:02:14.470 - you guys make a branch, you'll notice that it's always 00:02:14.470 --> 00:02:15.820 - structured support clients. 00:02:16.640 --> 00:02:20.237 - The acronym and then the actual branch name, and that's because 00:02:20.237 --> 00:02:24.488 - it will keep it at this like exact level here. So whenever we 00:02:24.488 --> 00:02:28.412 - name it like that, it's just basically to keep it in order 00:02:28.412 --> 00:02:32.663 - and let me see I think somebody that has a little bit of 00:02:32.663 --> 00:02:36.587 - feedback coming through Heather. I think it might be you or Igor. 00:02:36.587 --> 00:02:41.165 - It might be used. Well, guys can just mute for a second. If you 00:02:41.165 --> 00:02:43.448 - wouldn't mind. Cool, thank you. 00:02:44.920 --> 00:02:48.768 - So yeah, getting back into that, if you guys are going to make 00:02:48.768 --> 00:02:52.320 - any kind of bug fixes or anything, you just want to keep 00:02:52.320 --> 00:02:55.872 - it on that same level so it doesn't get like lost somewhere 00:02:55.872 --> 00:03:00.016 - else in the mix up. Because if somebody goes to take a look at 00:03:00.016 --> 00:03:02.976 - like you know the different branches for that repository, it 00:03:02.976 --> 00:03:07.120 - might not show up at all. So you just want to make sure that 00:03:07.120 --> 00:03:09.784 - you're keeping everything like together. So in this particular 00:03:09.784 --> 00:03:13.928 - case, if I was to check out a branch right for, go ahead and 00:03:13.928 --> 00:03:15.112 - close this this way. 00:03:15.170 --> 00:03:18.698 - Those settings so should that be published with feature? 00:03:20.400 --> 00:03:21.020 - Yes. 00:03:22.180 --> 00:03:26.990 - Not prefix, but so basically you could do something like if I was 00:03:26.990 --> 00:03:31.430 - going to get check out something it would be you know Git 00:03:31.430 --> 00:03:35.500 - Checkout Dash B and then it'll be support clients you know 00:03:35.500 --> 00:03:39.940 - farm. In this particular case and then you can say feature and 00:03:39.940 --> 00:03:44.750 - then what your feature is right? 'cause that way it'll keep it in 00:03:44.750 --> 00:03:49.560 - the farm and the farm repository in the farm branch tree and then 00:03:49.560 --> 00:03:51.410 - you'll have one deeper of 00:03:51.410 --> 00:03:56.100 - feature. And your actual branch name. Same thing for bugs. If 00:03:56.100 --> 00:03:59.655 - it's just in like that particular repository, it would 00:03:59.655 --> 00:04:04.395 - be support clients farm bug slash what your bug is right? So 00:04:04.395 --> 00:04:09.530 - you kind of want to keep it structured that way so it stays 00:04:09.530 --> 00:04:13.875 - in this same bit. In another thing you might notice is 00:04:13.875 --> 00:04:17.430 - whenever you get check out the sev product repository. 00:04:18.260 --> 00:04:21.860 - You're gonna have always have the develop branch checked out 00:04:21.860 --> 00:04:25.820 - whenever you clone it, and you'll always have to check out. 00:04:25.820 --> 00:04:29.420 - You know the relevant branch to your product project whenever 00:04:29.420 --> 00:04:30.500 - you clone it. 00:04:31.230 --> 00:04:34.810 - And that's basically because in a repository with how git 00:04:34.810 --> 00:04:38.748 - works, whenever you do a Git Clone, it's always going to 00:04:38.748 --> 00:04:42.328 - default and check out the branch of the actual default 00:04:42.328 --> 00:04:45.908 - branch selected. In git, you'll see in our case it's 00:04:45.908 --> 00:04:49.130 - not master, but it's developed, right? So any any 00:04:49.130 --> 00:04:51.994 - branch that you would make off of develop. 00:04:53.540 --> 00:04:57.219 - Gonna have all of your whenever you check out you know the repo 00:04:57.219 --> 00:05:00.898 - and you make a new branch. You'd be branching off of develop. You 00:05:00.898 --> 00:05:03.728 - wouldn't be branching off of your client branch, you know 00:05:03.728 --> 00:05:07.124 - since you pulled it down, you have to switch to that branch. 00:05:07.124 --> 00:05:10.237 - Anud switch to dev. In this particular case, off of support 00:05:10.237 --> 00:05:13.633 - clients farm, dev and then after you check that out you would 00:05:13.633 --> 00:05:17.312 - check a branch out again so it would check out off of this 00:05:17.312 --> 00:05:20.991 - branch instead of the default branch and we can kind of find a 00:05:20.991 --> 00:05:22.689 - little bit more simple of A. 00:05:24.150 --> 00:05:28.648 - Use of this so in this in this repository is just a DN 00:05:28.648 --> 00:05:31.762 - repository, so we don't have all of those branches. 00:05:33.320 --> 00:05:37.184 - You know, in in the same kind of level, right? So we can see 00:05:37.184 --> 00:05:40.772 - that we have a dev branch prod branch in a U80 Branch, and 00:05:40.772 --> 00:05:43.808 - then there's one branch of prod changes that probably need to 00:05:43.808 --> 00:05:46.568 - have all the changes brought back in and propagated through 00:05:46.568 --> 00:05:49.604 - the branch. But you can see that our branch are default 00:05:49.604 --> 00:05:52.916 - branch is dev and it's also the compare branch. So that means 00:05:52.916 --> 00:05:56.228 - that all of our behind and ahead will be off of Dev. 00:05:57.390 --> 00:06:00.126 - And whenever we check out this repository right, it'll 00:06:00.126 --> 00:06:03.774 - automatically have dev checked out. So all you would have to do 00:06:03.774 --> 00:06:07.422 - in this particular case is you wouldn't have to check out any 00:06:07.422 --> 00:06:11.678 - other branch, you just have to make a new branch off of it by 00:06:11.678 --> 00:06:15.326 - giving it the command Git Checkout Dash B to make a new 00:06:15.326 --> 00:06:18.670 - branch, and then whatever your branch name is. Again, it would 00:06:18.670 --> 00:06:22.318 - be support clients farm and then feature and then feature name or 00:06:22.318 --> 00:06:25.662 - support clients farm bug and then bug name whatever you want 00:06:25.662 --> 00:06:28.702 - to do there and then whenever you're making your commits. 00:06:29.570 --> 00:06:34.068 - You wanna do something like? You know Chris has a really good one 00:06:34.068 --> 00:06:38.220 - here. Removing reorder button. So if I'm like hey man I know 00:06:38.220 --> 00:06:43.064 - that we need to add back in this reorder button. I can just go 00:06:43.064 --> 00:06:46.870 - into caves, commit and just literally it tells me you know 00:06:46.870 --> 00:06:51.368 - what file was changed and what lines were changed so I can just 00:06:51.368 --> 00:06:55.866 - undo that change if necessary. Or you know kind of like Oh OK 00:06:55.866 --> 00:06:58.288 - be had a really cool fix for 00:06:58.288 --> 00:07:02.320 - this. And I can just scroll through the commits and be 00:07:02.320 --> 00:07:04.980 - like, OK, that's exactly what I'm looking for. Their Tristan 00:07:04.980 --> 00:07:07.640 - also did a good one here. Social media icons inclusion. 00:07:09.230 --> 00:07:12.030 - Is there a way to just delete it from there? That would be nice. 00:07:13.490 --> 00:07:16.768 - Delete what like, just remove that commit like kind of just 00:07:16.768 --> 00:07:20.940 - snip it out. Is there anyway to do that from a? Are you talking 00:07:20.940 --> 00:07:24.218 - about? I think you're talking about cherry pick I suppose. Can 00:07:24.218 --> 00:07:28.092 - cannot be done like right in the UI that you're showing us. That 00:07:28.092 --> 00:07:31.668 - would be really cool if you could, or I don't believe so. 00:07:33.570 --> 00:07:36.771 - So it's just copying the full shot of the commit, browse 00:07:36.771 --> 00:07:40.554 - files, new branch block. You can create A tag, but yeah, if you 00:07:40.554 --> 00:07:44.628 - wanted to cherry pick it, you have to do it with a little bit 00:07:44.628 --> 00:07:48.702 - of get Kung Fu. Outside of this, I'm not certain if you can share 00:07:48.702 --> 00:07:50.448 - your side of the actual commit. 00:07:51.890 --> 00:07:53.456 - So go into the actual commit. 00:07:54.170 --> 00:07:57.240 - Cool. And then in the. 00:07:58.000 --> 00:08:01.696 - Top right and those in ellipses. 00:08:05.080 --> 00:08:06.608 - Oh, there you go, you can do it. 00:08:08.050 --> 00:08:10.811 - That's how I generally do them, and that makes it easiest. 00:08:12.460 --> 00:08:13.040 - Nice. 00:08:15.780 --> 00:08:19.157 - 'cause you can do it through get, but it's a lot 00:08:19.157 --> 00:08:19.771 - more complicated. 00:08:22.160 --> 00:08:23.220 - I don't know about that. 00:08:24.220 --> 00:08:25.048 - Teach their own. 00:08:26.610 --> 00:08:30.570 - And then one final thing I wanted to cover is just, you 00:08:30.570 --> 00:08:34.200 - know, pull requests because I've seen a few pull requests just 00:08:34.200 --> 00:08:37.170 - kind of sitting stale that haven't necessarily, you know, 00:08:37.170 --> 00:08:40.140 - well, they've been approved. They've just been sitting there 00:08:40.140 --> 00:08:43.110 - because autocomplete wasn't set, so you'll notice these different 00:08:43.110 --> 00:08:47.070 - policies here an you can have this nice little blue ribbon to 00:08:47.070 --> 00:08:51.030 - kind of let you know what those policies that there are policies 00:08:51.030 --> 00:08:54.990 - or should say, and you can see what those branch policies are 00:08:54.990 --> 00:08:57.300 - if we click on that. Ellipses on 00:08:57.300 --> 00:09:01.760 - the right. And you might not be able to change these yourselves 00:09:01.760 --> 00:09:05.280 - with your credentials, but you should be able to see the 00:09:05.280 --> 00:09:08.480 - different policies. So in this particular instance, you can see 00:09:08.480 --> 00:09:11.680 - that it requires a minimum number of reviewers checks for 00:09:11.680 --> 00:09:14.880 - linked work items, checks for comment resolution an it limits 00:09:14.880 --> 00:09:18.720 - the merge type to only basic merge with no Fast forward, so 00:09:18.720 --> 00:09:22.880 - you don't get to do rebase and Fast forward because we want to 00:09:22.880 --> 00:09:26.080 - keep that entire git commit history. Same thing with squash 00:09:26.080 --> 00:09:29.920 - merge or rebase with merge commit and then it will have the 00:09:29.920 --> 00:09:33.050 - automatically included. The PR regular reviewer's, and 00:09:33.050 --> 00:09:37.154 - generally that's set product your your viewers or reviewer 00:09:37.154 --> 00:09:43.082 - front end groups on DN, repose, and the same on Sep Repose but 00:09:43.082 --> 00:09:47.186 - just added in the back end reviewers as well. 00:09:48.580 --> 00:09:50.710 - It doesn't offer interlaced merge. 00:09:53.310 --> 00:09:55.623 - I'm not, I'm not certain on that one, Brandon. 00:09:57.190 --> 00:10:00.034 - And then kind of just moving on. There's also some security here. 00:10:00.420 --> 00:10:03.440 - And you'll notice on the branch security that this rewrite 00:10:03.440 --> 00:10:06.762 - history delete branches and tags is actually set to allow. But 00:10:06.762 --> 00:10:09.782 - like we were talking about earlier, we didn't want to 00:10:09.782 --> 00:10:13.104 - rewrite any of the history or delete branches or tags or 00:10:13.104 --> 00:10:16.710 - anything like that. However, whenever you checkout a 00:10:16.710 --> 00:10:19.798 - branch, those these settings are actually carried over 00:10:19.798 --> 00:10:24.430 - inherited to your branch. So in the case that if we did, 00:10:24.430 --> 00:10:28.676 - you know, set autocomplete on a PR from like Devin, you 00:10:28.676 --> 00:10:32.922 - 80, let's go ahead and see what that would look like. 00:10:36.430 --> 00:10:40.030 - So I'm just gonna click new pull request so farm dove into. 00:10:40.810 --> 00:10:41.380 - Beauty. 00:10:43.400 --> 00:10:46.416 - And I'm just going to, you know, I have my work item and 00:10:46.416 --> 00:10:48.504 - then just going to grab this really quickly here. 00:10:53.910 --> 00:10:57.042 - My little guy there, so I'm going to create this. I'm not 00:10:57.042 --> 00:11:00.174 - going to complete it or anything, but you can see that I 00:11:00.174 --> 00:11:01.218 - can set auto complete. 00:11:02.220 --> 00:11:05.641 - And whenever I do, it will give me the option for 00:11:05.641 --> 00:11:08.129 - complete associated work items after merging customers commit 00:11:08.129 --> 00:11:10.928 - message or delete support. The branch that you're merging 00:11:10.928 --> 00:11:14.038 - into, which is the source branch and the target branch. 00:11:14.038 --> 00:11:17.459 - So you'll see that it's grayed out because I have those 00:11:17.459 --> 00:11:20.880 - policies on there. So let me go ahead and abandon this. 00:11:23.650 --> 00:11:25.288 - I think I just actually click back. 00:11:27.300 --> 00:11:27.810 - Maybe not. 00:11:28.920 --> 00:11:29.760 - Me abandonou 00:11:31.340 --> 00:11:33.020 - Where is abandoned. 00:11:33.970 --> 00:11:35.188 - I think it should be up here. 00:11:36.260 --> 00:11:36.908 - Is it here? 00:11:38.310 --> 00:11:38.550 - Go. 00:11:39.820 --> 00:11:42.565 - Cool, so I will make a new pull request. 00:11:43.850 --> 00:11:48.710 - And it looks like there is changes from prod, so I'm going 00:11:48.710 --> 00:11:51.140 - to select that and select dev. 00:11:52.540 --> 00:11:55.928 - Just grab this really quickly. Looks like there's a whole lot 00:11:55.928 --> 00:11:59.316 - of user stories for some reason attached this just going to 00:11:59.316 --> 00:12:00.548 - clear all of these. 00:12:02.230 --> 00:12:04.435 - Say you know we'll just get one. 00:12:07.020 --> 00:12:09.855 - Cool, so I'm going to create this pull request. 00:12:12.200 --> 00:12:13.766 - Whenever I go to set autocomplete. 00:12:15.230 --> 00:12:17.930 - You'll notice that I this is checked automatically, but you 00:12:17.930 --> 00:12:21.170 - generally want to check this if you're doing a feature or you 00:12:21.170 --> 00:12:24.680 - know a bug or anything like that because you don't want to cloud 00:12:24.680 --> 00:12:27.920 - up the repo with a bunch of branches that we don't need 00:12:27.920 --> 00:12:31.160 - anymore, and then it'll take somebody to kind of go back and 00:12:31.160 --> 00:12:34.400 - filter and see you know what commits are where. If PR commits 00:12:34.400 --> 00:12:38.180 - are in place for that branch and then clean up the repo kind of 00:12:38.180 --> 00:12:41.150 - manually, which is just tedious and nobody really wants to do 00:12:41.150 --> 00:12:44.390 - it. So just make sure that you know whenever you are setting 00:12:44.390 --> 00:12:45.470 - autocomplete. Well, first of 00:12:45.470 --> 00:12:48.504 - all. Make sure that you're setting autocomplete on your 00:12:48.504 --> 00:12:51.784 - pull requests every time, and that way whenever they get 00:12:51.784 --> 00:12:55.392 - approved, nobody has to manually complete them because a lot of 00:12:55.392 --> 00:12:59.000 - people go, including myself and just review the code and then 00:12:59.000 --> 00:13:02.280 - just select approve and not necessarily complete so it could 00:13:02.280 --> 00:13:05.888 - be a stale PR that's all approved, but the code hadn't 00:13:05.888 --> 00:13:08.840 - slid in because the autocomplete wasn't selected and complete 00:13:08.840 --> 00:13:11.792 - wasn't selected. When individuals are going in to take 00:13:11.792 --> 00:13:15.072 - a look at it because there's several approver groups that 00:13:15.072 --> 00:13:16.712 - take a look at these. 00:13:18.190 --> 00:13:21.743 - So just make sure that you're selecting that and that will 00:13:21.743 --> 00:13:24.973 - keep the repo from getting kind of muddied up there. 00:13:25.790 --> 00:13:28.198 - And does anybody have any questions, feedback, comments, 00:13:28.198 --> 00:13:30.907 - concerns or anything for anything we covered so far? 00:13:32.270 --> 00:13:36.074 - Yeah, So what if you were working on like a few? Like 00:13:36.074 --> 00:13:39.244 - little small things? Should you still break him out into 00:13:39.244 --> 00:13:42.731 - individual like PR is like one tiny thing? One tiny thing 00:13:42.731 --> 00:13:45.584 - went anything and column all feature feature feature or 00:13:45.584 --> 00:13:48.437 - what? If some are bug fixes and summer features. 00:13:50.720 --> 00:13:54.224 - It makes a lot of sense, so I would name your branch 00:13:54.224 --> 00:13:56.852 - appropriately for whatever the majority is that you're working 00:13:56.852 --> 00:14:00.648 - on, and whenever you get done with one bug fix or like 1 00:14:00.648 --> 00:14:04.152 - feature, just make a commit there. So that way it's in the 00:14:04.152 --> 00:14:07.072 - commit history, 'cause otherwise you would be doing the same 00:14:07.072 --> 00:14:10.284 - thing with a bunch of many branches, right? You would just 00:14:10.284 --> 00:14:13.496 - be making those changes. History for the branch, so the only 00:14:13.496 --> 00:14:17.292 - difference would be is that you have a lot of these extra merged 00:14:17.292 --> 00:14:19.044 - PR commits instead of just the 00:14:19.044 --> 00:14:22.360 - commit. 'cause whenever PR it'll have your commit, but it will 00:14:22.360 --> 00:14:25.818 - make an extra commit for the merge. So in that case you can 00:14:25.818 --> 00:14:28.744 - just name your branch the most appropriate thing in the case 00:14:28.744 --> 00:14:31.404 - and then make several commits with the appropriate message for 00:14:31.404 --> 00:14:34.862 - each of those fixes. Yeah, I was asking about the name. Could you 00:14:34.862 --> 00:14:38.054 - say that 'cause I? Personally I guess don't follow it. 'cause I 00:14:38.054 --> 00:14:41.512 - don't do the feature or bug and so sometimes 'cause a lot of 00:14:41.512 --> 00:14:42.576 - times you not like. 00:14:43.450 --> 00:14:47.350 - A lot of like little ones in there or like maybe like 4 00:14:47.350 --> 00:14:50.950 - little ones. And then I just need like check out fixes or 00:14:50.950 --> 00:14:54.250 - something like that, but so should that be feature so check 00:14:54.250 --> 00:14:57.550 - out fixes would be a bug right? Because you're fixing something 00:14:57.550 --> 00:15:00.850 - and addressing a bug. If it changes to how the checkout 00:15:00.850 --> 00:15:04.150 - works and you're adding a feature or like adding you know 00:15:04.150 --> 00:15:07.750 - something new to it and not addressing a problem with it, it 00:15:07.750 --> 00:15:11.650 - would be a feature but kind of like what I kind of covered 00:15:11.650 --> 00:15:14.950 - there for a second is if you're fixing feature if you. 00:15:15.220 --> 00:15:19.840 - They are including a feature and a bug, and it's a bunch of small 00:15:19.840 --> 00:15:23.800 - little, you know, small ones that just makes sense to not do 00:15:23.800 --> 00:15:27.760 - in separate little. Many PR's just make sure that you have the 00:15:27.760 --> 00:15:31.390 - different commits for them, but in the naming you know branch 00:15:31.390 --> 00:15:35.020 - convention. If it's the majority of what you're doing is a 00:15:35.020 --> 00:15:38.320 - feature and then you're just also including some little bitty 00:15:38.320 --> 00:15:41.950 - bug fixes along the way, it would be support clients acronym 00:15:41.950 --> 00:15:44.920 - feature, 'cause That's the majority of the work, right? 00:15:46.080 --> 00:15:52.032 - Yeah. Uh, so I had previously been told that when I make a 00:15:52.032 --> 00:15:56.142 - feature branch, I should put the ticket number associated with 00:15:56.142 --> 00:16:01.485 - that in the name of the branch. Is that something we should be 00:16:01.485 --> 00:16:04.362 - doing, or should I not do that? 00:16:05.990 --> 00:16:09.675 - I mean, it's accept, that's acceptable as well. You can put 00:16:09.675 --> 00:16:13.695 - it even in the you know the commit message, but either way 00:16:13.695 --> 00:16:18.050 - you can see that your during the PR itself it will have that 00:16:18.050 --> 00:16:22.070 - ticket on the PR so you can track the witch tickets attached 00:16:22.070 --> 00:16:26.090 - to which. But you know, I think it's completely fine doing it 00:16:26.090 --> 00:16:30.445 - with the ticket number if that's the way that you would like to 00:16:30.445 --> 00:16:35.470 - do it or prefer to do it instead of like feature so it would be 00:16:35.470 --> 00:16:39.688 - like. You know support clients acronym feature ticket number? 00:16:41.660 --> 00:16:45.188 - I just always wanna be following best practices, so if we should 00:16:45.188 --> 00:16:48.128 - put the ticket number or shouldn't, that's good to know. 00:16:48.720 --> 00:16:53.040 - I think it would be preferable for everybody just from like A. 00:16:54.000 --> 00:16:57.322 - You know, just from a visual standpoint of like what you're 00:16:57.322 --> 00:17:00.342 - working on because you know otherwise. You know, one could 00:17:00.342 --> 00:17:04.570 - have to go in and like look up the ticket number to even look 00:17:04.570 --> 00:17:07.590 - at what Brendan's talking about when he makes his PR. 00:17:07.590 --> 00:17:10.610 - Or, if you're like, you know, support clients you know 00:17:10.610 --> 00:17:11.214 - acronym feature. 00:17:14.170 --> 00:17:16.250 - Whichever you know, adding in. 00:17:17.570 --> 00:17:20.639 - You know insert well like feature here. That would be like 00:17:20.639 --> 00:17:24.545 - OK, I know exactly what this PR is for and what this branch was 00:17:24.545 --> 00:17:27.893 - made for because it's in in relation to you know the naming 00:17:27.893 --> 00:17:30.962 - convention other than the ticket and the tickets always going to 00:17:30.962 --> 00:17:35.147 - be applied to the PR anyway so we can go back and take a look 00:17:35.147 --> 00:17:39.600 - at it. And going through the book will just do like a 00:17:39.600 --> 00:17:42.922 - different fund structure of like if you have a question, just 00:17:42.922 --> 00:17:47.452 - stop me. Same thing on my side I might stop in the middle of it 00:17:47.452 --> 00:17:51.076 - and ask, you know an individual question as well. So we'll just 00:17:51.076 --> 00:17:54.398 - kind of roll through this just kind of unstructured. You know, 00:17:54.398 --> 00:17:58.324 - I would say, let's just let's just see how it plays out and 00:17:58.324 --> 00:17:59.532 - we'll go from there. 00:18:00.530 --> 00:18:03.710 - So if anybody has the code for this book, it's going to 00:18:03.710 --> 00:18:07.155 - be in Chapter 6. So if you want to kind of follow along 00:18:07.155 --> 00:18:10.600 - on your own, that's cool. If not, you can just take a look 00:18:10.600 --> 00:18:13.250 - at my screen and hang out and enjoy the show. 00:18:14.310 --> 00:18:16.754 - So let me try to make it big enough. Patrick is this big 00:18:16.754 --> 00:18:20.416 - enough? I know that you're you're pretty on top of the on 00:18:20.416 --> 00:18:23.744 - top of it. As far as like text size goes, so that's pretty 00:18:23.744 --> 00:18:27.764 - cool. Did a little bit bigger. If you would for me it's OK 00:18:27.764 --> 00:18:30.384 - right now, but for the video it's all that's awesome. 00:18:31.040 --> 00:18:35.616 - OK, might have a couple things cut off here, so I'm just going 00:18:35.616 --> 00:18:40.192 - to pull up this app. OK, put this app again. This is our 00:18:40.192 --> 00:18:44.768 - little app that we made in the book, so you know, here's our 00:18:44.768 --> 00:18:48.640 - nice little front page or whichever an we made cities last 00:18:48.640 --> 00:18:52.512 - time and we had countries as well that just populates this 00:18:52.512 --> 00:18:57.088 - grid. We add that nice little filter here at the top which is 00:18:57.088 --> 00:19:00.608 - a nice little input that is playing along with AngularJS 00:19:00.608 --> 00:19:04.463 - built in. Uh, it's an angular modulation, say, but you can 00:19:04.463 --> 00:19:07.496 - bring in from the angular library called angular material 00:19:07.496 --> 00:19:11.540 - and all that whole bit there. So we kind of, you know. 00:19:12.220 --> 00:19:15.707 - We're getting data fetching and receiving data from the back end 00:19:15.707 --> 00:19:19.511 - and this week we're going to do the opposite of that. We're 00:19:19.511 --> 00:19:21.730 - going to send data to the back 00:19:21.730 --> 00:19:25.844 - end, so. We're going to cover the front end here for a minute, 00:19:25.844 --> 00:19:29.012 - and then I think whenever CR jumps on, we're going to cover 00:19:29.012 --> 00:19:30.068 - the back end, but. 00:19:30.840 --> 00:19:34.404 - Let me just grab a drink of water really quick here. Before 00:19:34.404 --> 00:19:37.968 - we proceed, you said that we were working on getting the data 00:19:37.968 --> 00:19:41.235 - last time and now we will be sending it. Well, isn't 00:19:41.235 --> 00:19:42.423 - filtering sending the data? 00:19:44.430 --> 00:19:48.005 - And Oh yeah, I guess you could technically right we did. We did 00:19:48.005 --> 00:19:51.580 - send that data to get paged results back, so we did send a 00:19:51.580 --> 00:19:54.880 - little bit. I guess on this side is what I'm talking about 00:19:54.880 --> 00:19:57.630 - instead of filtering it, we're going to be creating and 00:19:57.630 --> 00:20:00.105 - updating so it's different. Two different parts of the. 00:20:00.180 --> 00:20:03.060 - Application so we were doing basically reading right last 00:20:03.060 --> 00:20:06.900 - week, so we're going to be creating and updating to be a 00:20:06.900 --> 00:20:08.180 - little bit more specific. 00:20:09.980 --> 00:20:11.155 - Cool alright thanks for calling 00:20:11.155 --> 00:20:15.080 - that out. Alright, so you'll notice that this is our cities 00:20:15.080 --> 00:20:18.980 - are out we created last week. Just has are nice grid here and 00:20:18.980 --> 00:20:22.880 - then. We have this nice little new button called add a new city 00:20:22.880 --> 00:20:27.080 - so that's going to take us to the route city and then we can 00:20:27.080 --> 00:20:29.180 - see that we have a nice little 00:20:29.180 --> 00:20:33.718 - form here. That has some validation and all that good 00:20:33.718 --> 00:20:37.327 - stuff and we can't create anything without, you know 00:20:37.327 --> 00:20:41.738 - having these filled in. So I think what everybody is mostly 00:20:41.738 --> 00:20:46.149 - used to including myself in angular JS we have what's called 00:20:46.149 --> 00:20:50.961 - template driven forms right? So that's where we have a bunch of 00:20:50.961 --> 00:20:55.773 - operators in the HTML and it's exactly what it sounds like is 00:20:55.773 --> 00:21:00.184 - the paradigm is it's the form is driven by the template. 00:21:00.960 --> 00:21:05.354 - So we don't have a lot of control as a developer with how 00:21:05.354 --> 00:21:08.396 - those form controls in the template interact, they just 00:21:08.396 --> 00:21:12.114 - interact directly with the server for us, so it's kind of 00:21:12.114 --> 00:21:15.832 - nice because you know, as a developer you don't really have 00:21:15.832 --> 00:21:19.550 - to do anything on your own. Angular does everything for you 00:21:19.550 --> 00:21:23.944 - and figures it all out, but you don't have a whole lot of 00:21:23.944 --> 00:21:27.662 - control over the data validation and you can't do, you know 00:21:27.662 --> 00:21:30.366 - manipulation of that data or massaging the data. 00:21:30.780 --> 00:21:34.470 - Before it actually goes to the server, so it's pretty 00:21:34.470 --> 00:21:38.160 - quick to roll out a nice little template driven form. 00:21:39.740 --> 00:21:43.460 - So if it's something like is simple is like, even at this 00:21:43.460 --> 00:21:46.870 - would be, you know super simple to do on the template 00:21:46.870 --> 00:21:49.970 - side, but we're going to do today is called reactive 00:21:49.970 --> 00:21:53.070 - forms, and it's exactly what it sounds like. So with 00:21:53.070 --> 00:21:55.550 - reactive forms it kind of puts the control. 00:21:57.190 --> 00:22:00.886 - Developer in the typescript so you can manipulate that data and 00:22:00.886 --> 00:22:04.918 - kind of massage it. Or you know do whatever Olympic sport with 00:22:04.918 --> 00:22:09.286 - it that you want before you send it to the server. So it's 00:22:09.286 --> 00:22:13.654 - basically it. So let's take a look at the book and what kind 00:22:13.654 --> 00:22:15.334 - of jump into it so. 00:22:16.200 --> 00:22:20.388 - This is just going to cover exactly what we did before. This 00:22:20.388 --> 00:22:24.576 - is kind of reasons to use forms, we kind of already understand 00:22:24.576 --> 00:22:27.717 - that everybody is pretty familiar with no validation and 00:22:27.717 --> 00:22:32.254 - all that good fun stuff. You get that in HTML5. I mean just 00:22:32.254 --> 00:22:36.093 - required attribute in HTML5 will have that nice validation with a 00:22:36.093 --> 00:22:40.281 - nice little pop up. If you know fields not inputed and as 00:22:40.281 --> 00:22:44.818 - required on it. So just the pros on template driven forms so we 00:22:44.818 --> 00:22:47.959 - know we don't have reactive forms in angular JS. 00:22:48.920 --> 00:22:53.048 - So that's the pro for current stuff as we can't use reactive 00:22:53.048 --> 00:22:56.832 - forms. But in angular you can choose either one. So template 00:22:56.832 --> 00:23:00.272 - driven forms really easy to write. We're all familiar with 00:23:00.272 --> 00:23:04.400 - him, can cook out a form pretty quickly. They're really easy to 00:23:04.400 --> 00:23:08.528 - read and understand. I would say the only drawback to really easy 00:23:08.528 --> 00:23:13.000 - to read and understand if you start to put a lot of validation 00:23:13.000 --> 00:23:17.128 - on a form, and especially like with regex and stuff like that 00:23:17.128 --> 00:23:18.160 - to check for. 00:23:18.600 --> 00:23:23.000 - Um, you know, email validation to make sure it hasn't at 00:23:23.000 --> 00:23:27.000 - symbolanda.com or something like that. It can start, you know, 00:23:27.000 --> 00:23:30.200 - really building up. And if somebody doesn't really 00:23:30.200 --> 00:23:33.400 - structure those attributes pretty clearly, it can get 00:23:33.400 --> 00:23:38.200 - pretty muddy. And even if you do have nice and formatted, there's 00:23:38.200 --> 00:23:43.800 - just so much going on in HTML. That kind of gets gets a little 00:23:43.800 --> 00:23:48.600 - confusing as well, and as far as coding goes, you know whenever 00:23:48.600 --> 00:23:49.800 - you're writing code. 00:23:50.020 --> 00:23:54.122 - Stuff for the machine to you know to read. I mean it is, but 00:23:54.122 --> 00:23:57.931 - it's also for humans to read too. So you want to have the 00:23:57.931 --> 00:24:00.568 - aspect of human readability in your code, because whether 00:24:00.568 --> 00:24:04.377 - you're like if you golf your code, you only want to golf your 00:24:04.377 --> 00:24:08.479 - code or make your code as short as possible just to send it over 00:24:08.479 --> 00:24:12.581 - the wire. So if you bundle it, you want it to be, you know, 00:24:12.581 --> 00:24:15.511 - really golf and have like variables like A&B instead of 00:24:15.511 --> 00:24:19.027 - like city and ID and countries and stuff like that, right? But 00:24:19.027 --> 00:24:20.492 - just for the readability you 00:24:20.492 --> 00:24:24.378 - want to understand. You know what things are doing, so that's 00:24:24.378 --> 00:24:28.470 - why we give them nice variable names like title and form and 00:24:28.470 --> 00:24:32.903 - stuff like that, right? So it's a lot easier to read if your 00:24:32.903 --> 00:24:36.654 - logic is in your controller and you can kind of follow 00:24:36.654 --> 00:24:40.746 - everything, then it's if it's in your HTML. 'cause like I talked 00:24:40.746 --> 00:24:45.179 - about template driven is all the logic is kind of in the template 00:24:45.179 --> 00:24:49.271 - itself and you don't have a lot of control yourself in the 00:24:49.271 --> 00:24:51.999 - typescript over what's actually happening in the form. 00:24:52.840 --> 00:24:53.888 - So what kind of? 00:24:54.980 --> 00:24:58.100 - Jump over to the model driven reactive forms and every I mean 00:24:58.100 --> 00:25:01.220 - is this isn't like rocket science. I think you know a lot 00:25:01.220 --> 00:25:03.820 - of this is going to immediately make sense to everybody. 00:25:05.430 --> 00:25:09.016 - But basically what you you'll have is, you'll get a nice 00:25:09.016 --> 00:25:12.928 - getter method for your form, and the only difference is just the 00:25:12.928 --> 00:25:16.514 - directive. Here you can see or bring inform group. I think. 00:25:16.514 --> 00:25:20.752 - Let's see if we can have a template driven form. So on this 00:25:20.752 --> 00:25:24.664 - one we're just instantiating a new form, but it's going to be 00:25:24.664 --> 00:25:28.250 - an energy form. And then there's a couple of small differences, 00:25:28.250 --> 00:25:31.836 - like engie submit method, and that's going to run our on 00:25:31.836 --> 00:25:35.096 - submit and we're passing the form through it, stuff like 00:25:35.096 --> 00:25:38.545 - that. And then you can still see that we're getting it in 00:25:38.545 --> 00:25:40.745 - G model. You know for the city name. 00:25:42.220 --> 00:25:46.804 - And just you know it's it's pretty simple stuff as far as 00:25:46.804 --> 00:25:51.388 - this goes. Well, and then we have our nice little or submit 00:25:51.388 --> 00:25:56.354 - button that runs are nice submit method that will get to here in 00:25:56.354 --> 00:26:00.556 - a minute and then the disabled attribute that is acting on 00:26:00.556 --> 00:26:04.376 - formed dot invalid and then jumping back over to the 00:26:04.376 --> 00:26:08.578 - reactive form. We can see a few differences are buttons the 00:26:08.578 --> 00:26:12.398 - same, just how we're kind of dealing with our validation. 00:26:12.490 --> 00:26:16.174 - Here is a little bit different. So instead of just having it 00:26:16.174 --> 00:26:19.551 - immediately available, we have to do a getter to get the 00:26:19.551 --> 00:26:22.621 - attribute name out of the form object that's being instantiated 00:26:22.621 --> 00:26:26.612 - for us, and we'll kind of get to that we're instantiating in our 00:26:26.612 --> 00:26:29.989 - constructor orenji on and it method little bit later on will 00:26:29.989 --> 00:26:33.059 - kind of cover the actual code here in a minute. 00:26:33.790 --> 00:26:37.365 - And we're saying if it's touched or if it's if the 00:26:37.365 --> 00:26:40.940 - control has been, you know, have been touched at all, or 00:26:40.940 --> 00:26:44.515 - if it's dirty. So that means there's like a letter or 00:26:44.515 --> 00:26:45.815 - number in it, and. 00:26:46.900 --> 00:26:49.748 - The form name that. 00:26:51.200 --> 00:26:55.950 - Uh, attribute has errors and it's required then it's going 00:26:55.950 --> 00:26:58.325 - to, you know, basically invalid, 00:26:58.325 --> 00:27:01.696 - right? So that's just a simple validation there, so 00:27:01.696 --> 00:27:04.523 - let's take a look at what that actual code looks like. 00:27:06.220 --> 00:27:12.016 - Could we see this form that get and then something is document 00:27:12.016 --> 00:27:13.948 - get element by ID? 00:27:14.750 --> 00:27:19.540 - Uh, in Dong? Could that be like similar similar thing? 00:27:20.770 --> 00:27:25.749 - And it's so it's different in the way that the way that you're 00:27:25.749 --> 00:27:30.728 - saying it is that get element by ID would actually be an HTML, 00:27:30.728 --> 00:27:36.587 - you know. Code where the form in this particular bit is an actual 00:27:36.587 --> 00:27:40.954 - object that's in the state of the view of the angular 00:27:40.954 --> 00:27:44.924 - application, so it's an actual state object that lives inside 00:27:44.924 --> 00:27:49.291 - the Dom during the angular lifecycle, whereas get by ID is 00:27:49.291 --> 00:27:55.246 - just a piece of HTML, right? So it's just a piece of code? Or if 00:27:55.246 --> 00:27:59.613 - you wanted to use something like jQuery, jQuery would turn it 00:27:59.613 --> 00:28:01.598 - into an object for you. 00:28:02.770 --> 00:28:06.389 - But you're still getting like the the actual HTML object or 00:28:06.389 --> 00:28:10.666 - jQuery object in this form is its own object and will just to 00:28:10.666 --> 00:28:14.943 - kind of cover that really quick. We can jump over there just to 00:28:14.943 --> 00:28:16.588 - kind of clear that up. 00:28:18.030 --> 00:28:22.790 - So on our nude on our energy on it method in our controller you 00:28:22.790 --> 00:28:26.870 - can see that this dot form is being assigned. Well let me 00:28:26.870 --> 00:28:31.290 - scroll up a little bit to make it even more clear. So we're 00:28:31.290 --> 00:28:32.310 - bringing form group. 00:28:33.750 --> 00:28:37.578 - And that is coming in from angular itself and at the 00:28:37.578 --> 00:28:41.754 - type. So we're saying form is going to be of type form 00:28:41.754 --> 00:28:44.886 - group of that interface, right? So later on were 00:28:44.886 --> 00:28:48.366 - saying this stuff form equals new form group and then 00:28:48.366 --> 00:28:50.802 - instantiating the object with these different properties. 00:28:50.802 --> 00:28:54.630 - So we're getting it name, lat lanja, Tude Country ID and 00:28:54.630 --> 00:28:58.458 - then we'll kind of talk about this bit later, but that's 00:28:58.458 --> 00:28:59.850 - part of the validation. 00:29:01.010 --> 00:29:05.182 - And then you know, for each of these were giving it a new form 00:29:05.182 --> 00:29:08.460 - control, and then it's going to be instantiated as an empty 00:29:08.460 --> 00:29:11.440 - string, and then we're giving it just a simple validators 00:29:11.440 --> 00:29:13.526 - dot. Required validators is another destructured object 00:29:13.526 --> 00:29:15.016 - that we're pulling out of. 00:29:16.710 --> 00:29:22.248 - Forms module at the top and all it's doing in this new form 00:29:22.248 --> 00:29:26.934 - control method or instantiation of an object is just saying that 00:29:26.934 --> 00:29:31.620 - this property is going to now be on this form control. 00:29:34.330 --> 00:29:35.600 - Does that answer your question? 00:29:37.070 --> 00:29:39.666 - Cool, alright. We'll take a look at that real quick as 00:29:39.666 --> 00:29:42.262 - well will just scroll up and look at for validators form 00:29:42.262 --> 00:29:42.970 - group informed control. 00:29:44.050 --> 00:29:46.227 - So we can see that we're all 00:29:46.227 --> 00:29:48.760 - getting these from. Scroll over. 00:29:49.360 --> 00:29:53.360 - Angular forms, so it's built into angular forms. It's just 00:29:53.360 --> 00:29:56.560 - like we're getting our dependency injection and our 00:29:56.560 --> 00:30:00.160 - component from angular core or HTTP client HTTP params. 00:30:00.260 --> 00:30:03.860 - From common HTTP and our router and stuff like that from router. 00:30:06.050 --> 00:30:09.398 - And so we also have a question, so jumping 00:30:09.398 --> 00:30:11.258 - back over to our HTML. 00:30:13.400 --> 00:30:14.650 - Let's see. 00:30:16.320 --> 00:30:17.340 - Where we at? 00:30:18.680 --> 00:30:24.388 - OK. We closed this again. So kind of like we talked about 00:30:24.388 --> 00:30:28.368 - we're instantiating are form right? So we're just saying the 00:30:28.368 --> 00:30:33.542 - form group is a form and here's our on submit method. So we're 00:30:33.542 --> 00:30:37.920 - saying hey angular are submit method is going to be whatever 00:30:37.920 --> 00:30:39.910 - the method is in our. 00:30:40.550 --> 00:30:43.946 - Our control and this form isn't like just some string that we're 00:30:43.946 --> 00:30:47.625 - feeding it. This is actually our form, so the form group is the 00:30:47.625 --> 00:30:51.021 - form that we instantiate. Idd in our controller, so this could be 00:30:51.021 --> 00:30:54.134 - like cities form right whenever it's that new form group and 00:30:54.134 --> 00:30:57.530 - we're just telling angular what are formed group is in our in 00:30:57.530 --> 00:30:58.945 - our controller and that's it. 00:31:00.510 --> 00:31:02.785 - And then this is just for CSS 00:31:02.785 --> 00:31:08.020 - fun stuff. How to be able to target and then we have all of 00:31:08.020 --> 00:31:11.680 - our nice little operators that we're very used to just a little 00:31:11.680 --> 00:31:15.340 - bit different syntax and angular so orenji if we know the form 00:31:15.340 --> 00:31:19.610 - dot or if the form is invalid an form errors and form errors is 00:31:19.610 --> 00:31:22.660 - dupe city vault. Again we'll get to in a minute. 00:31:23.960 --> 00:31:28.748 - Then we want to give it a nice error, and that's going to be 00:31:28.748 --> 00:31:32.510 - the class alert alert danger. There's going to be this over 00:31:32.510 --> 00:31:36.956 - the top method here of error and strong HTML, and then a city 00:31:36.956 --> 00:31:40.376 - with the same name, lat, long and country already exists, 00:31:40.376 --> 00:31:42.428 - right? So that is not visible. 00:31:43.940 --> 00:31:47.900 - Currently sorry. Where does Angie? If in the first day, 00:31:47.900 --> 00:31:49.484 - where does it end? 00:31:50.880 --> 00:31:56.730 - Oh, it ends right here. Oh sorry and this did it. It ends on the 00:31:56.730 --> 00:32:01.800 - closing day. If so, if it's an attribute on that piece of HTML, 00:32:01.800 --> 00:32:06.090 - it will basically encompass all the HTML inside of that element. 00:32:06.090 --> 00:32:10.770 - So it's basically this entire thing. So if this is true, then 00:32:10.770 --> 00:32:13.110 - create a class, make it strong. 00:32:13.910 --> 00:32:18.880 - Drive to city. All of this right in middle of the OK. Yep, that's 00:32:18.880 --> 00:32:22.075 - exactly. Otherwise it doesn't render in the state, so 00:32:22.075 --> 00:32:25.980 - AngularJS angular can tear down the state or the components of 00:32:25.980 --> 00:32:30.950 - the HTML on the Dom itself. You know, at the drop of a hat 00:32:30.950 --> 00:32:34.855 - essentially. So if you update the state then this will update 00:32:34.855 --> 00:32:39.825 - as well. And then so these will be true and then this will fire 00:32:39.825 --> 00:32:44.085 - off and make this visible. Does it mean that they will not 00:32:44.085 --> 00:32:48.544 - exist? Or the thing in between where the engie, everything 00:32:48.544 --> 00:32:50.328 - after the Ng, if. 00:32:51.250 --> 00:32:54.490 - Yeah, that's really so. The dib itself won't exist. 00:32:55.120 --> 00:32:58.240 - So let's see if we can get to it here. It should be at the top. 00:32:59.610 --> 00:33:01.360 - So this is our form. 00:33:03.270 --> 00:33:06.416 - So it should be the next one down, so here's our 00:33:06.416 --> 00:33:07.560 - here's RN GF, right? 00:33:09.650 --> 00:33:10.598 - It's just not there. 00:33:16.390 --> 00:33:19.723 - Cool alright and then just rolling through this the rest of 00:33:19.723 --> 00:33:22.753 - this is pretty simple. There's no surprises or anything like 00:33:22.753 --> 00:33:26.389 - that, so just rolling through it. You know we have a nice 00:33:26.389 --> 00:33:30.328 - little forum group here. This is our city name. We can see that 00:33:30.328 --> 00:33:33.055 - we're giving it a nice placeholder city name ellipses. 00:33:33.055 --> 00:33:36.691 - It's class form control, so we get all these nice little things 00:33:36.691 --> 00:33:40.327 - that are built into our CSS. Like this little guy here and 00:33:40.327 --> 00:33:41.842 - then we can say that. 00:33:42.690 --> 00:33:47.198 - In this little did is this name is required so we can see that 00:33:47.198 --> 00:33:51.384 - here in this division that Angie. If so we're doing RN G if 00:33:51.384 --> 00:33:55.248 - again, right, and then since form is an object, we have this 00:33:55.248 --> 00:33:59.112 - nice little gitter. I'm so we can get the property or the 00:33:59.112 --> 00:34:02.654 - property on the form object that we're trying to target. Just 00:34:02.654 --> 00:34:06.840 - passed in as a string. Really easy. So if the name is invalid 00:34:06.840 --> 00:34:11.026 - and the form name is dirty and the name has been touched or 00:34:11.026 --> 00:34:12.958 - sorry or the name has been 00:34:12.958 --> 00:34:15.266 - touched. Then it's basically going to render 00:34:15.266 --> 00:34:18.522 - this bit and then again here at the forum dot get 00:34:18.522 --> 00:34:21.186 - name has errors and is required. Then we're going 00:34:21.186 --> 00:34:23.850 - to throw this little error to show our user. 00:34:25.230 --> 00:34:28.695 - And we're just repeating that same logic, just kind of over 00:34:28.695 --> 00:34:32.475 - and over again for each one of these. Just really simple stuff. 00:34:32.475 --> 00:34:35.310 - And again, we doing this reactive approach that keeps 00:34:35.310 --> 00:34:39.090 - your HTML very readable and there's not a lot of logic going 00:34:39.090 --> 00:34:43.815 - on here. All we have as far as logic, is just NGS right so far, 00:34:43.815 --> 00:34:47.910 - so there's not a whole lot of stuff we actually have to read 00:34:47.910 --> 00:34:52.320 - through to see how this form works. We just go OK, got it. If 00:34:52.320 --> 00:34:54.525 - this is true, then it's going to 00:34:54.525 --> 00:34:58.250 - show this otherwise. It's not going to show it, so so far we 00:34:58.250 --> 00:35:00.680 - haven't done any rocket science. It's just super straightforward. 00:35:02.420 --> 00:35:07.016 - The function get will try and get one of the properties from 00:35:07.016 --> 00:35:11.514 - the form. Yeah, from the form that you instantiate, idd. 00:35:13.260 --> 00:35:18.771 - And I should clarify to this form is in our code. 00:35:19.830 --> 00:35:22.380 - Uh is literally this object. 00:35:23.350 --> 00:35:27.387 - So it's not some abstract form object or anything like that. 00:35:27.387 --> 00:35:31.791 - It's literally the form object and its tide in our component in 00:35:31.791 --> 00:35:35.828 - our controller, and so 44 and below those are the properties 00:35:35.828 --> 00:35:39.865 - name Latlong, Country ID, that we can pass into get functional. 00:35:39.865 --> 00:35:43.902 - OK. Yeah, that's exactly so. Those are going to be the 00:35:43.902 --> 00:35:46.838 - properties that we're instantiating it with, and then 00:35:46.838 --> 00:35:51.609 - we can just do the get method because our form gets the get 00:35:51.609 --> 00:35:53.077 - method because it's of. 00:35:53.350 --> 00:35:55.414 - Javascript's prototypal inheritance. So since we're 00:35:55.414 --> 00:35:58.510 - instantiating form from form group, since form group has 00:35:58.510 --> 00:36:02.638 - it, that means we have it, and then we can just, you 00:36:02.638 --> 00:36:06.766 - know, use that, get property to pass in a string of our 00:36:06.766 --> 00:36:10.206 - property, and return the value of it or the different 00:36:10.206 --> 00:36:12.958 - properties on that form, control. 'cause, again, name 00:36:12.958 --> 00:36:16.742 - is a property, but it's also a form control, so would 00:36:16.742 --> 00:36:19.150 - prototypal inheritance. We're also getting all the 00:36:19.150 --> 00:36:22.246 - properties that form control whenever we instantiate a new 00:36:22.246 --> 00:36:23.966 - form control and color name. 00:36:25.430 --> 00:36:28.940 - What would happen if we had two forms? Then we have to have, 00:36:28.940 --> 00:36:30.560 - like form one and form 2. 00:36:31.710 --> 00:36:36.330 - Yeah, you can do that. You can say like you know if we wanted 00:36:36.330 --> 00:36:40.950 - to get crazy you know you say yours form and then this is just 00:36:40.950 --> 00:36:42.600 - another you know form group. 00:36:44.670 --> 00:36:51.303 - Spell and then we would recommend that they get name get 00:36:51.303 --> 00:36:53.112 - locked. OK, yeah. 00:36:54.800 --> 00:36:58.195 - There we go. But yeah, and then we can instantiate, 00:36:58.195 --> 00:37:00.645 - you know, whatever whatever you want on yours as well. 00:37:02.060 --> 00:37:05.010 - And that's how easy it is. I mean, it's literally 00:37:05.010 --> 00:37:08.255 - just, you know, it's you get a lot of control over 00:37:08.255 --> 00:37:10.025 - it, and then you kind of. 00:37:11.600 --> 00:37:15.846 - You know, get to dictate like what properties it has, what 00:37:15.846 --> 00:37:19.320 - validators as you can instantiate, you know the the 00:37:19.320 --> 00:37:23.566 - properties with value. If you want it to for whichever reason. 00:37:23.566 --> 00:37:24.724 - Stuff like that. 00:37:28.920 --> 00:37:33.987 - And let's see a Jesse, can you tell me? 00:37:35.300 --> 00:37:38.486 - What this is and why it's in the constructor? 00:37:40.060 --> 00:37:41.608 - It's the base URL. 00:37:43.260 --> 00:37:47.319 - Basically, where I must come from somewhere else, as in from 00:37:47.319 --> 00:37:52.116 - where this is maybe from even like the app dot TS or wherever 00:37:52.116 --> 00:37:55.806 - this module eventually finds itself injected into the app, so 00:37:55.806 --> 00:37:59.496 - it's basically will just comes from somewhere else and it's 00:37:59.496 --> 00:38:03.924 - being injected in OK. And what would that would that be called 00:38:03.924 --> 00:38:07.983 - as far as like a paradigm I dependency injection nice, and 00:38:07.983 --> 00:38:12.780 - why do we have that in our constructor instead of in on G? 00:38:13.000 --> 00:38:16.516 - Ng on it, 'cause the constructor has access to the things that 00:38:16.516 --> 00:38:20.618 - the world it has access to. The things that built it and the Ng 00:38:20.618 --> 00:38:21.790 - on it. It doesn't. 00:38:23.180 --> 00:38:23.810 - Perfect. 00:38:27.310 --> 00:38:29.038 - Trip you up. I'll trip you. 00:38:30.540 --> 00:38:34.290 - As you know with JavaScript but something else, yeah, probably. 00:38:35.610 --> 00:38:37.878 - Traction on a 1972 Thunderbird work. 00:38:39.410 --> 00:38:41.426 - Is that a car that's a car? 00:38:43.440 --> 00:38:43.830 - Cancel. 00:38:47.020 --> 00:38:48.508 - Bird have that though. 00:38:49.670 --> 00:38:54.086 - Well you never know, yeah bird, it's from it's from birds with 00:38:54.086 --> 00:38:58.502 - old old time birds. So all that all, that's pretty basic stuff. 00:38:58.502 --> 00:39:03.286 - So let's just jump on down to our next function here. So we 00:39:03.286 --> 00:39:07.702 - are familiar with this. We know how this works from last time. 00:39:07.702 --> 00:39:11.750 - We're just running this function in RNG on and it here 00:39:11.750 --> 00:39:16.166 - online 51 and loading the data for page right? So this is 00:39:16.166 --> 00:39:18.006 - going to load the countries. 00:39:19.620 --> 00:39:24.804 - This is going to let's see, do do do do do do do build out our 00:39:24.804 --> 00:39:28.692 - URL. Have our get request of type city is going to be 00:39:28.692 --> 00:39:31.608 - returned passing in the URL we're subscribing to that 00:39:31.608 --> 00:39:34.524 - observable we're executing it, and then we're actually getting 00:39:34.524 --> 00:39:39.060 - our data and this is going to be some pretty fun stuff to talk 00:39:39.060 --> 00:39:43.272 - about. 2 but before we get there to our subscribe method and some 00:39:43.272 --> 00:39:47.160 - other methods that were going to jump in from RX JS library. 00:39:48.730 --> 00:39:52.386 - Has anybody seen this Patch value method before? 00:39:54.210 --> 00:39:54.699 - I have a. 00:39:56.210 --> 00:39:59.550 - Cool, so I know that 00:39:59.550 --> 00:40:03.420 - some. Back in doves are probably pretty familiar with puts and 00:40:03.420 --> 00:40:07.140 - patches and stuff like that. Brendan, can you kind of tell me 00:40:07.140 --> 00:40:10.860 - what a patches as far as like the C sharp.net realm is. 00:40:12.030 --> 00:40:16.710 - Sure, I'll Patch is an update, so you have a data source that 00:40:16.710 --> 00:40:19.230 - has a record an you want to 00:40:19.230 --> 00:40:23.317 - update. That record that already exists in your data source. 00:40:25.700 --> 00:40:28.444 - Well, actually it's a type of the request. 00:40:30.070 --> 00:40:34.425 - It is a nation TP method that you specify in the header and 00:40:34.425 --> 00:40:38.110 - instructing the API to do an update on some existing data. 00:40:38.110 --> 00:40:42.130 - Well, it doesn't have to. That's what I'm saying, it's just going 00:40:42.130 --> 00:40:46.485 - to make a request of type edge, but what are you doing? It 00:40:46.485 --> 00:40:50.170 - that's your? If the HTTP method is patched, then by the 00:40:50.170 --> 00:40:53.520 - specification it should be an update on an existing record. 00:40:57.610 --> 00:41:00.338 - And that's exactly what we're doing here so. 00:41:02.110 --> 00:41:06.114 - On on this method you even see that you know we're up literally 00:41:06.114 --> 00:41:10.118 - as the comment that says, update the form of the city value right 00:41:10.118 --> 00:41:13.814 - and on the form object on that form group object. We actually 00:41:13.814 --> 00:41:17.510 - have the method Patch Patch value and you can see that we're 00:41:17.510 --> 00:41:21.514 - patching the value for this city and you can pass any of the. 00:41:22.930 --> 00:41:26.439 - The attributes or properties I should say to be a little 00:41:26.439 --> 00:41:30.267 - bit more clear of your form group into that. So if we 00:41:30.267 --> 00:41:31.543 - wanted to update the. 00:41:32.750 --> 00:41:35.860 - You know the latitude or longitude or anything like that. 00:41:35.860 --> 00:41:39.592 - We could still use that same bit that we're getting. You know 00:41:39.592 --> 00:41:43.324 - that result back from the back end and we're just patching the 00:41:43.324 --> 00:41:47.367 - value. So we're doing an update. That's all it is, and we're not 00:41:47.367 --> 00:41:51.721 - doing the entire form, just this dot city. So if this city is an 00:41:51.721 --> 00:41:55.142 - empty string we're getting we're patching and updating it in the 00:41:55.142 --> 00:41:58.252 - typescript in the angular state with the city that's coming 00:41:58.252 --> 00:42:01.673 - back. So we're not saving or anything like that were just 00:42:01.673 --> 00:42:03.228 - literally asking the back end. 00:42:03.570 --> 00:42:06.342 - For the city were saying, OK, cool, I'm going to update my 00:42:06.342 --> 00:42:09.345 - state with the city so I can show the user that you know 00:42:09.345 --> 00:42:11.424 - in in the form. This is the city, right? 00:42:13.870 --> 00:42:17.218 - And that's basically it. That's basically it. So how 00:42:17.218 --> 00:42:21.682 - this works is basically it's is it going to make so is 00:42:21.682 --> 00:42:25.402 - pitch value in the background going to make a request?00:42:26.420 --> 00:42:30.237 - Or Patch value doesn't make the request the request is happening 00:42:30.237 --> 00:42:35.095 - on Line 66, so we're saying our HTTP is out of our angular HTTP 00:42:35.095 --> 00:42:39.259 - module. We're calling git. We're going to have a city return to 00:42:39.259 --> 00:42:43.076 - us because it's going to be returned to type city were 00:42:43.076 --> 00:42:47.240 - passing in the URL that we're building here, so the base URL 00:42:47.240 --> 00:42:50.710 - that we're injecting with our dependency injection at the top 00:42:50.710 --> 00:42:55.568 - of the app plus API cities, which is our API or out on the 00:42:55.568 --> 00:43:02.020 - back end. Plus this dot ID. I mean we're getting that ID here 00:43:02.020 --> 00:43:06.750 - from the query parameter. Then we're passing that URL in. We're 00:43:06.750 --> 00:43:10.620 - subscribing to that and executing the observable that we 00:43:10.620 --> 00:43:15.350 - get back. This result is actual data from that execution and 00:43:15.350 --> 00:43:17.930 - then our city is the result. 00:43:19.310 --> 00:43:24.182 - OK, then we're updating Patch value with this city. So what is 00:43:24.182 --> 00:43:28.242 - fetch value actually do then populates the HTML with values 00:43:28.242 --> 00:43:30.272 - from the city object or. 00:43:31.100 --> 00:43:35.192 - Uh, so it doesn't update the HTML. It will appear that will. 00:43:35.192 --> 00:43:40.307 - So let me go back to cities and I'll show you how that works. So 00:43:40.307 --> 00:43:44.740 - basically what I'm going to do is I'm going to click here on 00:43:44.740 --> 00:43:49.514 - the name and you can see that I'm passing in this ID right? So 00:43:49.514 --> 00:43:54.288 - it's slash city slash 7835 and on the Ng on and it I'm rolling 00:43:54.288 --> 00:43:58.721 - with this load data method, so then I'm grabbing the ID out of 00:43:58.721 --> 00:44:01.880 - the URL. Well, this activated route snapshot 00:44:01.880 --> 00:44:03.336 - dot Param dot get. 00:44:05.010 --> 00:44:08.794 - And just passing in the query parameter that I want, which 00:44:08.794 --> 00:44:13.610 - is ID and I can show you here in a minute, we're going to 00:44:13.610 --> 00:44:17.050 - jump over to see how that's actually happening here, but 00:44:17.050 --> 00:44:19.802 - we're asking for the parameter and then building 00:44:19.802 --> 00:44:23.930 - out the URL and all this is doing is setting the Patch 00:44:23.930 --> 00:44:27.714 - value with this dot city. HTML is dumb and only gets 00:44:27.714 --> 00:44:31.498 - told what the you know the form values are, so we're 00:44:31.498 --> 00:44:34.250 - just putting the form dot city name here. 00:44:35.510 --> 00:44:36.774 - Wish we could take a look at now. 00:44:39.120 --> 00:44:42.648 - I sent it boom, OK, city name. 00:44:55.970 --> 00:44:57.350 - Sing it, sing it wrong. 00:45:00.480 --> 00:45:00.980 - Take it. 00:45:06.680 --> 00:45:10.002 - City name city city name so placeholders. City name in the 00:45:10.002 --> 00:45:13.324 - form control name is sitting, so that's how we're passing it 00:45:13.324 --> 00:45:16.948 - into this name, 'cause it's the form control name. So since it 00:45:16.948 --> 00:45:20.270 - has a value, it's getting pushed in to this. So we're 00:45:20.270 --> 00:45:24.498 - doing a Patch and we have all of those other guys as well As 00:45:24.498 --> 00:45:28.122 - for the latitude in Lanja Tude. So since we have those values 00:45:28.122 --> 00:45:29.330 - it's setting looking forwards. 00:45:31.060 --> 00:45:36.136 - Cool, alright. And then we'll take a look at our params and 00:45:36.136 --> 00:45:39.097 - kind of look at our route there. 00:45:40.510 --> 00:45:43.560 - Just so this, this actually makes sense online 60 because 00:45:43.560 --> 00:45:46.915 - this is kind of magic without. It's like where are you 00:45:46.915 --> 00:45:50.270 - getting ID because there's not a query string of ID, right? 00:45:50.270 --> 00:45:53.930 - So let's go ahead and take a look at our app module. 00:45:55.220 --> 00:45:58.976 - An let's take a look at our route, so we're injecting our 00:45:58.976 --> 00:46:02.732 - router component into or router module. I should say on Line 5 00:46:02.732 --> 00:46:05.862 - from angular router, there's just angular routing out of the 00:46:05.862 --> 00:46:10.244 - box, and then we can see that our online 35 were giving it the 00:46:10.244 --> 00:46:13.374 - router of path of city or parameter Anna parameters in 00:46:13.374 --> 00:46:17.443 - angular router will just be. I mean this is we stole this from 00:46:17.443 --> 00:46:21.199 - T Sharp essentially and you just said this is what our parameter 00:46:21.199 --> 00:46:25.894 - is going to be and you see like last week. This is kind of like 00:46:25.894 --> 00:46:30.118 - what we did. In the back end and it's just did Notates that or 00:46:30.118 --> 00:46:32.998 - notates that you know we're going to. That's what the 00:46:32.998 --> 00:46:36.454 - parameter is going to be called in the route, and then we're 00:46:36.454 --> 00:46:39.622 - feeding it this component. So whenever I hit this route, I 00:46:39.622 --> 00:46:42.502 - want this component and I'm feeding the same component to 00:46:42.502 --> 00:46:46.246 - city. But we have the logic in the city edit component that if 00:46:46.246 --> 00:46:49.414 - somebody passes it an ID, it can also have other functionality, 00:46:49.414 --> 00:46:53.158 - so this component can be reused so we don't have to write the 00:46:53.158 --> 00:46:56.326 - same exact code for another component when we can just use 00:46:56.326 --> 00:46:57.766 - this component for two things. 00:46:59.760 --> 00:47:02.472 - So whenever we get that parameter or application 00:47:02.472 --> 00:47:05.862 - knows that we're asking for the parameter of that route. 00:47:05.862 --> 00:47:09.591 - So whenever we say Get ID D application knows about ID 00:47:09.591 --> 00:47:12.981 - because we're building out our route with that as a 00:47:12.981 --> 00:47:13.659 - query parameter. 00:47:18.660 --> 00:47:22.412 - Cool and then if we don't have an ID's just going to go into 00:47:22.412 --> 00:47:25.896 - this this dot create or this title was create a new city. So 00:47:25.896 --> 00:47:29.380 - we take this little idea off of here and just hit this dot 00:47:29.380 --> 00:47:32.328 - slash city and it's not going to know about cities right? 00:47:32.328 --> 00:47:33.668 - It's just going to load. 00:47:35.110 --> 00:47:39.030 - Create a new city and then our form doesn't get. 00:47:39.030 --> 00:47:40.598 - Doesn't get any values. 00:47:45.460 --> 00:47:49.594 - Cool and then this is our little load countries, but that we kind 00:47:49.594 --> 00:47:53.410 - of talked about last time with our our pagination and how all 00:47:53.410 --> 00:47:55.318 - that works on the back end. 00:47:57.880 --> 00:48:02.001 - And we're going to cover this here in a second, so I'm going 00:48:02.001 --> 00:48:05.805 - to skip this now and then we're going to come back to 00:48:05.805 --> 00:48:09.292 - this on submit function. So kind of what we talked about. 00:48:10.640 --> 00:48:12.638 - Is with a. 00:48:13.230 --> 00:48:18.612 - Angular and the differences of promises and subscriptions was 00:48:18.612 --> 00:48:23.994 - last week, so with subscribe, you're executing a function 00:48:23.994 --> 00:48:29.974 - essentially an. Your result is an actual object with actual 00:48:29.974 --> 00:48:35.356 - data, or it's an actual object with an error. 00:48:36.900 --> 00:48:40.310 - At the other day, you're either getting your resolution or your 00:48:40.310 --> 00:48:43.720 - rejection right. Whenever it it finally ends or you know you 00:48:43.720 --> 00:48:47.440 - async bit returns to you in the meantime, it's just an object 00:48:47.440 --> 00:48:49.920 - and then resolution. You actually get your result 00:48:49.920 --> 00:48:53.330 - rejection. You actually get an object with a result. It's not 00:48:53.330 --> 00:48:55.500 - the result you want, but it's a 00:48:55.500 --> 00:49:00.592 - result nonetheless. So let's Scroll down to the end of this 00:49:00.592 --> 00:49:06.024 - bit here, and we're going to take a look at Line 132 an this. 00:49:06.024 --> 00:49:11.068 - A lot of this happens on the back end that we're going to 00:49:11.068 --> 00:49:12.620 - this logic for this. 00:49:14.150 --> 00:49:17.540 - Duke city bit here. We're just essentially with this function 00:49:17.540 --> 00:49:21.947 - were checking to see if there's a duplicate city so we can't add 00:49:21.947 --> 00:49:25.337 - like Paris eight times in our application. So we're building 00:49:25.337 --> 00:49:29.405 - city out. It's an object which is of type city. We're just 00:49:29.405 --> 00:49:33.812 - mapping through, you know, the the bits here, so city dot ID is 00:49:33.812 --> 00:49:38.219 - if we have an ID then it's this dot ID, otherwise it's zero 00:49:38.219 --> 00:49:40.253 - right? If we have a name. 00:49:41.670 --> 00:49:45.465 - It's gonna be named up value and we saw earlier we're 00:49:45.465 --> 00:49:49.605 - instantiating name as an empty string, so we don't have to do 00:49:49.605 --> 00:49:53.400 - that. Turn area operator here and assign it an empty string, 00:49:53.400 --> 00:49:57.195 - because if it's not a value already, we already have it 00:49:57.195 --> 00:50:00.300 - assigned to an empty string, so 137 one 38139. 00:50:00.700 --> 00:50:04.180 - And even 140 could all just be, you know, the 00:50:04.180 --> 00:50:07.312 - instantiated value of our form group objects, right? Or 00:50:07.312 --> 00:50:10.444 - those form control objects inside of that form group? 00:50:11.700 --> 00:50:16.404 - So again, we're building out our URL to hit the API on 142 and 00:50:16.404 --> 00:50:20.100 - then you can see that we're returning a post request that's 00:50:20.100 --> 00:50:24.132 - going to return a boolean were passing in URL in city, just 00:50:24.132 --> 00:50:28.500 - like we would with any get or post or anything like that. We 00:50:28.500 --> 00:50:32.532 - always pass in the route first and then the second argument is 00:50:32.532 --> 00:50:36.900 - going to be the object that we want to throw over the line, 00:50:36.900 --> 00:50:40.260 - which is city, but you'll see here that we have. 00:50:40.940 --> 00:50:42.848 - Type and map. 00:50:43.560 --> 00:50:46.670 - And. Map should look funny to 00:50:46.670 --> 00:50:52.081 - you. Because you can tell that we're not, we don't 00:50:52.081 --> 00:50:53.548 - have an array. 00:50:54.860 --> 00:51:00.026 - To map over. We're not doing something like an angular JS 00:51:00.026 --> 00:51:06.281 - where you would see at this dot Q Dot all and then passing in an 00:51:06.281 --> 00:51:11.285 - array for that and mapping over it to feed all those promises 00:51:11.285 --> 00:51:15.872 - into right for resolution or rejection. We have a pipe method 00:51:15.872 --> 00:51:18.374 - and we have a map method. 00:51:19.540 --> 00:51:24.520 - Pretty weird stuff, so let's kind of break this down, so map 00:51:24.520 --> 00:51:26.180 - is an RX JS. 00:51:28.720 --> 00:51:33.452 - A piece of the puzzle here. It's just an operator from RX JS 00:51:33.452 --> 00:51:37.092 - library or reactive JavaScript, right? So it's not an array 00:51:37.092 --> 00:51:41.460 - method, but it's an operator from the RX JS library which is 00:51:41.460 --> 00:51:46.556 - built into our share. So let's take a look at the top. This is 00:51:46.556 --> 00:51:51.652 - on 140 three scroll all the way up and we can see that we're 00:51:51.652 --> 00:51:54.928 - getting map from RX JS operators. An observable are 00:51:54.928 --> 00:51:58.568 - nice, little lovely observable from just the RX JS library. 00:51:59.740 --> 00:52:03.070 - So we can see that this is not a dot map or anything like that. 00:52:03.070 --> 00:52:05.290 - It works a little bit differently if we just hover 00:52:05.290 --> 00:52:06.622 - over it, we can see that. 00:52:08.020 --> 00:52:12.089 - You know, kind of what it does here. It applies a given project 00:52:12.089 --> 00:52:15.219 - function to each value emitted by the source observable and 00:52:15.219 --> 00:52:16.471 - emits the resulting value. 00:52:17.200 --> 00:52:23.624 - As an observable, and that's kind of gibberish for a minute. 00:52:23.624 --> 00:52:27.128 - So basically with us. Yeah with 00:52:27.128 --> 00:52:32.844 - subscribe. Your. You're basically executing your 00:52:32.844 --> 00:52:36.940 - observable. So that means when you execute your 00:52:36.940 --> 00:52:39.460 - observable, which is basically, you know a 00:52:39.460 --> 00:52:39.820 - function. 00:52:41.670 --> 00:52:46.002 - Then you're getting actual data back. So what map does is it 00:52:46.002 --> 00:52:50.334 - doesn't give you an actual, it doesn't give you actual data, it 00:52:50.334 --> 00:52:52.139 - just gives you an observable. 00:52:52.830 --> 00:52:54.390 - That you can manipulate. 00:52:55.120 --> 00:52:57.616 - Right and then all pipe does. 00:52:59.870 --> 00:53:04.966 - Is it gives you a way to run operators so you couldn't run 00:53:04.966 --> 00:53:06.534 - this dot map here? 00:53:07.100 --> 00:53:10.259 - And less you packed piped in, so that's all that does. Is pipe 00:53:10.259 --> 00:53:14.147 - gives us a way to run map and let's take a look at that in the 00:53:14.147 --> 00:53:17.306 - book because I think it goes a little bit more in depth than 00:53:17.306 --> 00:53:20.222 - the way I'm saying it, which will probably make a little bit 00:53:20.222 --> 00:53:21.437 - more sense to you guys. 00:53:22.430 --> 00:53:28.086 - This is the back end, it did it did the OK perfect. We're here. 00:53:28.086 --> 00:53:32.126 - We made it alright, so observables in RX JS operators 00:53:32.126 --> 00:53:36.974 - so I'm just going to read through this and please let me 00:53:36.974 --> 00:53:41.822 - know if this doesn't make any sense to you and it probably 00:53:41.822 --> 00:53:46.670 - this is like some of the more confusing side of angular, so 00:53:46.670 --> 00:53:51.922 - feel free to ask any questions on this bit so the Async Logic 00:53:51.922 --> 00:53:55.304 - Async meaning. Asynchronous non synchronous that's used to 00:53:55.304 --> 00:54:00.212 - perform the call makes extensive use of the observable in RX JS 00:54:00.212 --> 00:54:04.302 - pattern. This time, instead of relying on the subscribe method, 00:54:04.302 --> 00:54:08.392 - and like we were talking about earlier, whenever we're getting 00:54:08.392 --> 00:54:12.073 - our city right now we're using that subscription method. 00:54:12.073 --> 00:54:16.572 - They're using a pipe plus match approach to are very important. 00:54:18.000 --> 00:54:21.933 - Operators that allow us to perform our data manipulation 00:54:21.933 --> 00:54:25.866 - tasks while retaining the observable status of the return 00:54:25.866 --> 00:54:29.362 - value, while subscriptions will execute the observable and 00:54:29.362 --> 00:54:33.732 - return actual data instead. So remember our result. We actually 00:54:33.732 --> 00:54:38.976 - turned. We set our city. Was that result right? We said this 00:54:38.976 --> 00:54:43.783 - dot city equals the result that we're getting back from the 00:54:43.783 --> 00:54:47.745 - observable. That the subscription is giving us so 00:54:47.745 --> 00:54:51.390 - we're executing that observable and saying, hey, your function, 00:54:51.390 --> 00:54:56.655 - I'm executing you and I want you to give me your return value. 00:54:56.655 --> 00:55:00.705 - Now with map, it's basically taking your observable that it's 00:55:00.705 --> 00:55:04.755 - getting from the call and giving you another observable. It's 00:55:04.755 --> 00:55:05.970 - still a value. 00:55:06.630 --> 00:55:11.080 - But it's. It's the status of the return value or it retains 00:55:11.080 --> 00:55:13.680 - the status of the return value if that makes sense. 00:55:15.910 --> 00:55:20.854 - Now, does anybody have any questions on that? Boy I I don't 00:55:20.854 --> 00:55:25.798 - understand observables yet. I've yet to work with them, so I just 00:55:25.798 --> 00:55:27.446 - just seems like gibberish. 00:55:28.220 --> 00:55:34.707 - So I'll make a comparison is, you know, it's kind of like your 00:55:34.707 --> 00:55:37.701 - you know like as in method, 00:55:37.701 --> 00:55:41.937 - right? It's like a promise, so you get your promise and then 00:55:41.937 --> 00:55:44.764 - your promise has three states, obviously where it's like up in 00:55:44.764 --> 00:55:48.105 - the air and you're waiting and it just gives you an object to 00:55:48.105 --> 00:55:51.446 - hold onto in the meantime and says, hey, hold on to this empty 00:55:51.446 --> 00:55:54.787 - object. I'll be right back and I'm going to get you an answer. 00:55:54.787 --> 00:55:57.871 - It might not be the answer you like, but I'm getting you 00:55:57.871 --> 00:56:00.441 - something. And then whenever the promise resolves, it goes. Hey, 00:56:00.441 --> 00:56:04.620 - here's your data. Or it says hey yeah, that data that we talked 00:56:04.620 --> 00:56:07.896 - about man, I couldn't get it. Here's an object with an error 00:56:07.896 --> 00:56:09.807 - inside of it. Have a nice day. 00:56:10.390 --> 00:56:12.020 - So in the same way. 00:56:12.950 --> 00:56:16.352 - You're getting an observable, right? Instead of a promise, 00:56:16.352 --> 00:56:20.888 - it's an observable, so you know it's just a small word change, 00:56:20.888 --> 00:56:22.400 - but observable is essentially. 00:56:23.970 --> 00:56:27.655 - Uh, you know, let's just roll through here. I think this 00:56:27.655 --> 00:56:31.675 - probably seems in reading it as I'm talking. Is it just the 00:56:31.675 --> 00:56:35.695 - response from the request or is it something else? It is exactly 00:56:35.695 --> 00:56:39.715 - that, so it's the response that the request is giving you that 00:56:39.715 --> 00:56:40.720 - you can execute. 00:56:42.220 --> 00:56:43.860 - That you can execute. 00:56:44.970 --> 00:56:52.178 - Yes so. Let's let's look up what that means. 00:57:03.030 --> 00:57:07.815 - I mean, it's a bit confusing. Becausw response should be. I 00:57:07.815 --> 00:57:09.990 - don't know data structured in 00:57:09.990 --> 00:57:12.660 - Jason Or. Something. 00:57:14.810 --> 00:57:19.166 - A sea Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo. 00:57:21.090 --> 00:57:23.498 - Let me see if I can this music. 00:57:24.940 --> 00:57:25.858 - Yeah, it's a. 00:57:28.020 --> 00:57:30.312 - It's it's not me, it's it's this app that I have that 00:57:30.312 --> 00:57:31.076 - does it for me. 00:57:35.410 --> 00:57:36.199 - That that that. 00:57:37.830 --> 00:57:39.486 - Play music on the CB radio. 00:57:40.840 --> 00:57:46.196 - Strong mostly so. Just to cover it here. I think this does a 00:57:46.196 --> 00:57:51.140 - pretty good job of explaining it outside of my CV gibberish to 00:57:51.140 --> 00:57:55.260 - execute the observable you have created because we created the 00:57:55.260 --> 00:57:58.968 - observable from the API call. So whenever we're hitting 00:57:58.968 --> 00:58:02.676 - subscribe, it's creating that observable, right? Or any other 00:58:02.676 --> 00:58:06.796 - HTTP request with pipe. It's creating that observable? OK, so 00:58:06.796 --> 00:58:11.328 - then we did a call. We have an observable cool, so. 00:58:11.490 --> 00:58:16.209 - Uh, in this particular bit, the observable you have created an 00:58:16.209 --> 00:58:20.499 - begin receiving notifications on you. Call it subscribe method so 00:58:20.499 --> 00:58:24.789 - that passing an observer. So the subscribe method is now 00:58:24.789 --> 00:58:29.508 - observing what you're getting back from that call, so it's a 00:58:29.508 --> 00:58:32.940 - JavaScript object that defines the handlers for the 00:58:32.940 --> 00:58:36.801 - notifications that you receive. The subscribe call returns a 00:58:36.801 --> 00:58:41.091 - subscription object that has an unsubscribe method which you can 00:58:41.091 --> 00:58:42.378 - call to stop. 00:58:42.470 --> 00:58:44.040 - Receiving notifications. 00:58:47.220 --> 00:58:47.920 - Don't don't. 00:58:54.870 --> 00:58:56.760 - Now let's see if we can go on to. 00:59:00.660 --> 00:59:04.980 - Scribe, the other one straight from the documentation or not. 00:59:06.750 --> 00:59:07.350 - Oxy 00:59:10.070 --> 00:59:11.080 - that's nice. 00:59:12.250 --> 00:59:12.960 - Nice guy. 00:59:15.110 --> 00:59:20.282 - That sounds like there you know when you make an Ajax request 00:59:20.282 --> 00:59:25.023 - and then in the end you have callback success and callback 00:59:25.023 --> 00:59:27.178 - failure. Can you repeat your 00:59:27.178 --> 00:59:32.352 - question? And I was just saying that I was working with Ajax and 00:59:32.352 --> 00:59:36.384 - Ajax requests and every time you make a request you get a 00:59:36.384 --> 00:59:39.744 - callback success and callback failure like you can define a 00:59:39.744 --> 00:59:43.104 - function that's going to be executed very similar, yeah? I 00:59:43.104 --> 00:59:44.784 - mean it's very similar with 00:59:44.784 --> 00:59:49.890 - Async. I mean it's very similar concepts. There are nuances are 00:59:49.890 --> 00:59:52.838 - slightly different. But very, very similar. 00:59:54.470 --> 00:59:56.598 - Yeah, and that's that's a really good. 00:59:57.670 --> 00:59:59.784 - But there, so let's go up and 00:59:59.784 --> 01:00:04.040 - you'll see. But that's kind of what we're doing here online 89 01:00:04.040 --> 01:00:07.967 - is so whenever like this HTTP, git were subscribing to the 01:00:07.967 --> 01:00:09.395 - observable that this call 01:00:09.395 --> 01:00:13.942 - returns, right? And then we're executing it and saying that 01:00:13.942 --> 01:00:17.308 - either your success is here and that's our resolution. 01:00:18.050 --> 01:00:21.180 - Or if you get your failure that runs this function. 01:00:22.700 --> 01:00:25.940 - And if we wanted something really pretty, we could. Do 01:00:25.940 --> 01:00:28.532 - you know something like this, right? It is 01:00:28.532 --> 01:00:29.828 - essentially the same thing. 01:00:32.730 --> 01:00:37.532 - I have the exact syntax here, but you know you get the you get 01:00:37.532 --> 01:00:41.991 - the the bit of it 'cause it's just. It's the same thing is 01:00:41.991 --> 01:00:45.764 - like this is what happens when it succeeds. This is what 01:00:45.764 --> 01:00:49.880 - happens when you get an error and then the only difference is 01:00:49.880 --> 01:00:53.653 - is that you're getting that actual value here on your result 01:00:53.653 --> 01:00:57.426 - whenever it resolves and then on this pipe you're just literally 01:00:57.426 --> 01:01:00.513 - getting another observable. Then we're just returning either you 01:01:00.513 --> 01:01:04.434 - know. If it's a dupe city, it's going to be returning as deep 01:01:04.434 --> 01:01:07.938 - city, true, or just going to return a null value. If there's 01:01:07.938 --> 01:01:09.106 - not a duplicate city. 01:01:11.180 --> 01:01:15.446 - Hopefully that didn't muddy the water and eat anymore. 01:01:18.110 --> 01:01:22.086 - I think it will help if we were able to attach and step through 01:01:22.086 --> 01:01:25.494 - it and visualize it, 'cause I think it will help everyone to 01:01:25.494 --> 01:01:28.334 - just see what's physically happening too. If you guys want 01:01:28.334 --> 01:01:32.026 - to do that, you know that would be awesome. Totally do that. I 01:01:32.026 --> 01:01:33.730 - don't know if we can observe. 01:01:35.990 --> 01:01:39.638 - I I just realized the ironic irony of what I'm fixing to 01:01:39.638 --> 01:01:42.982 - say. I don't know if we can observe an observable. Yeah, 01:01:42.982 --> 01:01:46.326 - you can. Just yeah. Can you just attach in the JavaScript 01:01:46.326 --> 01:01:49.974 - and just step through and then see whenever it comes back? I 01:01:49.974 --> 01:01:52.710 - mean, that's kind of the typical thing I've always 01:01:52.710 --> 01:01:53.014 - done. 01:01:54.460 --> 01:01:55.918 - Let's do yeah. 01:01:57.790 --> 01:02:01.114 - I just don't know if will have access to the actual observable. 01:02:02.640 --> 01:02:07.380 - I think it will help even if we don't get into the, you know the 01:02:07.380 --> 01:02:10.224 - physical observable. You can still see kind of what's 01:02:10.224 --> 01:02:12.752 - physically happening. Oh sure, you're you're completely right. 01:02:13.380 --> 01:02:18.244 - Is city. Here yeah, yeah yeah, you're gonna have to 01:02:18.244 --> 01:02:21.548 - blow that thing up because that's really Dockery. 01:02:22.670 --> 01:02:24.020 - Oh yeah, there we go. 01:02:24.890 --> 01:02:27.550 - Don't dump done. OK, cool. 01:02:29.060 --> 01:02:34.001 - Alrighty. So I don't want to be here. I probably should have. 01:02:35.800 --> 01:02:40.820 - Set this. So is Duke City runs whenever we're trying to create 01:02:40.820 --> 01:02:44.924 - the new city. So let's try to create a new city. Hopefully 01:02:44.924 --> 01:02:47.660 - this is in here. I bet it is. 01:02:52.220 --> 01:02:52.880 - There we go. 01:02:54.120 --> 01:02:58.787 - So I'm in my debugger now. Looks like whenever the country is hit 01:02:58.787 --> 01:03:00.941 - then will kind of roll through 01:03:00.941 --> 01:03:04.390 - this here. So I think this is actually when it comes back. 01:03:04.390 --> 01:03:06.400 - Let me see if I can make this bigger without. 01:03:09.490 --> 01:03:11.492 - Do do do do do. I might want to put it in there. 01:03:12.690 --> 01:03:13.740 - You can post it out. 01:03:15.170 --> 01:03:17.354 - I've never heard of Keras in Zimbabwe. 01:03:20.240 --> 01:03:21.326 - So let's see if I can. 01:03:22.230 --> 01:03:23.650 - Cover my result here. 01:03:31.160 --> 01:03:35.010 - So it's just returning back a false right? Because we're 01:03:35.010 --> 01:03:39.245 - throwing this result in the map and then it's coming back 01:03:39.245 --> 01:03:43.480 - basically as full. So since this is false, it's going to 01:03:43.480 --> 01:03:44.250 - obviously return. 01:03:45.850 --> 01:03:46.530 - No. 01:03:48.220 --> 01:03:49.648 - Let's try to make it France. 01:03:51.270 --> 01:03:54.000 - I'm trying to do it again. I wonder if it will let me 01:03:54.000 --> 01:03:54.630 - choose. OK, cool. 01:03:55.830 --> 01:03:58.080 - Shipping make it turn true here. 01:04:02.070 --> 01:04:04.046 - Would help if I knew my alphabet probably. 01:04:06.510 --> 01:04:09.810 - Oh, it's backwards. It's OK that sounds like where is effect. 01:04:11.750 --> 01:04:12.770 - What the F? 01:04:14.810 --> 01:04:17.340 - There we go. Yeah, they had it backwards. It was like 01:04:17.340 --> 01:04:17.800 - upside down. 01:04:18.950 --> 01:04:23.207 - Cool. Alright cool, so we did our call. Let's check that call 01:04:23.207 --> 01:04:26.938 - really quick before we jump back over there. So is Duke City is 01:04:26.938 --> 01:04:30.382 - here. It already came back and we can see that and there's 01:04:30.382 --> 01:04:33.826 - thoughts. Why don't we have a preview or is it still waiting? 01:04:33.826 --> 01:04:37.844 - Oh duck is still waiting for me to let's just do this again so 01:04:37.844 --> 01:04:41.001 - it's coming back as false, which is interesting. I figured there 01:04:41.001 --> 01:04:42.723 - would be a Paris France. Let's 01:04:42.723 --> 01:04:47.094 - try that again. The prize have the same latitude in Lanja Tude 01:04:47.094 --> 01:04:50.766 - 'cause the city is the full object and so you're passing in 01:04:50.766 --> 01:04:52.602 - the city into the bull, right? 01:04:53.760 --> 01:04:54.210 - Is it? 01:04:55.460 --> 01:04:57.476 - You are probably right 'cause it's. 01:04:58.910 --> 01:05:01.342 - Is not going to be identical order backends 01:05:01.342 --> 01:05:02.254 - looking for though. 01:05:03.830 --> 01:05:06.070 - I guess we don't have ID OK. 01:05:10.000 --> 01:05:14.056 - Going here again, we're making our call. It's going to return a 01:05:14.056 --> 01:05:15.746 - bull and then we're just. 01:05:16.360 --> 01:05:20.740 - Piping that observable into this RX JS operator an were 01:05:20.740 --> 01:05:24.682 - saying Hey, returning the result and it's just basically 01:05:24.682 --> 01:05:29.500 - a true or false in this. In this particular particular bit 01:05:29.500 --> 01:05:30.814 - piping hot technique. 01:05:32.450 --> 01:05:34.390 - Nice. Cool. 01:05:39.050 --> 01:05:41.690 - Alright, I think in that that's basically it. From everything 01:05:41.690 --> 01:05:45.386 - else that we kind of, we kind of talked about. I'm just going to 01:05:45.386 --> 01:05:48.818 - ask a few more questions and then Chris, if you want to take 01:05:48.818 --> 01:05:51.986 - over the back end, I think that would be probably where we're 01:05:51.986 --> 01:05:53.306 - at. That's cool with you. 01:05:56.330 --> 01:06:01.226 - Cool, alright so Katie can you tell me? 01:06:05.950 --> 01:06:09.603 - Can you tell me what what city is here? So city is our 01:06:09.603 --> 01:06:12.694 - property on our controller, but can you tell me what what 01:06:12.694 --> 01:06:15.785 - this is out next to it and why we're using that? 01:06:17.470 --> 01:06:18.260 - Uh, No. 01:06:19.660 --> 01:06:24.049 - OK, Heather, can you tell me basically about this? This bit 01:06:24.049 --> 01:06:29.120 - of code? Yes, the city is what we're getting from the import 01:06:29.120 --> 01:06:30.865 - above from another file, it's 01:06:30.865 --> 01:06:33.678 - like. OK, let's take a look at 01:06:33.678 --> 01:06:38.307 - that file. Cool, it looks like we're exporting an interface, so 01:06:38.307 --> 01:06:42.410 - why would we be exporting this interface? And why would we? 01:06:43.990 --> 01:06:46.350 - What what does this even mean? Like it looks like 01:06:46.350 --> 01:06:48.474 - we're bringing in from another file like you said. 01:06:49.810 --> 01:06:53.050 - Is it is basically like a model so we can do and you could do 01:06:53.050 --> 01:06:55.426 - like city too, just like you were doing the Igor's form. 01:06:56.060 --> 01:06:59.180 - I'd be like city too and it would still be from city. 01:07:00.260 --> 01:07:05.360 - OK, but is there? Is there any particular reason? Like any kind 01:07:05.360 --> 01:07:09.610 - of safety, that we're saving ourselves from, so like errors 01:07:09.610 --> 01:07:10.885 - don't happen later? 01:07:12.490 --> 01:07:13.590 - The main purpose of it. 01:07:14.880 --> 01:07:18.774 - OK, yeah, that's exactly right. That's why I'm trying to get 01:07:18.774 --> 01:07:23.376 - into so in in typescript with, you know, if this is all written 01:07:23.376 --> 01:07:27.270 - in JavaScript, we would. You know we could just say, you 01:07:27.270 --> 01:07:31.518 - know, city is an object with, you know a name, lanja tude 01:07:31.518 --> 01:07:35.058 - latitude and an ID, right? But just like strongly typed 01:07:35.058 --> 01:07:38.598 - languages where JavaScript is dynamically typed so we can kind 01:07:38.598 --> 01:07:40.368 - of do whatever we want. 01:07:42.720 --> 01:07:46.295 - With strongly typed languages like C sharp or Java or anything 01:07:46.295 --> 01:07:49.870 - like that, there's strong types, right? So what we're doing is 01:07:49.870 --> 01:07:54.095 - we're using duck typing and type safety to kind of say you know 01:07:54.095 --> 01:07:57.345 - city is of type city, 'cause we're bringing that interface 01:07:57.345 --> 01:08:02.545 - and we're using it as a type, so we know if we're trying to set a 01:08:02.545 --> 01:08:06.120 - property on city, then we're going to get that object isn't 01:08:06.120 --> 01:08:10.345 - set to a reference of an object error at compile time, so that 01:08:10.345 --> 01:08:12.295 - way we don't have buggy code. 01:08:12.360 --> 01:08:15.550 - Whenever it goes through the actual just in time compiler on 01:08:15.550 --> 01:08:18.740 - the browser, right? So we can catch all those errors at 01:08:18.740 --> 01:08:21.640 - compile time. So whenever you're doing a deployment or something 01:08:21.640 --> 01:08:24.830 - like that, or writing a new feature, you can see that 01:08:24.830 --> 01:08:27.440 - something's wonky. Justin your intellisense, because if I try 01:08:27.440 --> 01:08:28.600 - to say, you know. 01:08:29.230 --> 01:08:33.559 - If I try to assign like this dot city dot face or something 01:08:33.559 --> 01:08:36.889 - like that you know equals something, it's going to be 01:08:36.889 --> 01:08:41.551 - like, dude, I don't know what this dot city dot face is not a 01:08:41.551 --> 01:08:45.547 - thing like what are you talking about right? It's just going to 01:08:45.547 --> 01:08:49.876 - have no idea because face isn't a property or a method on the 01:08:49.876 --> 01:08:50.875 - interface of city. 01:08:51.960 --> 01:08:54.786 - I'm not intelligent enough to make sense of Intellisense. 01:08:59.410 --> 01:09:02.240 - Alright cool alright and then. 01:09:05.310 --> 01:09:07.170 - What's up baby countries country. 01:09:09.380 --> 01:09:13.774 - Yeah, can you tell me can you tell me KB what what countries 01:09:13.774 --> 01:09:14.788 - is you know? 01:09:16.270 --> 01:09:17.518 - Imported from above. 01:09:20.030 --> 01:09:21.640 - I don't know if we went over 01:09:21.640 --> 01:09:25.560 - that. Yeah, OK, yeah, let's talk about that again. So you're 01:09:25.560 --> 01:09:28.640 - saying that it could, so it's being imported from above that 01:09:28.640 --> 01:09:31.160 - you saw. OK, we're bringin country from countries country 01:09:31.160 --> 01:09:34.800 - and let's take a look at that file really quick and kind of 01:09:34.800 --> 01:09:36.480 - inspect that so it's coming in 01:09:36.480 --> 01:09:38.380 - from countries. Country. 01:09:39.440 --> 01:09:43.190 - Alright cool, so we see here that we're exporting interface 01:09:43.190 --> 01:09:48.065 - called country with an ID, name, ISO two and ISO three. OK, so 01:09:48.065 --> 01:09:50.690 - let's go back to our file an. 01:09:51.420 --> 01:09:57.048 - So we know that we're we have a property on our class city edit 01:09:57.048 --> 01:09:59.058 - component, right? So what does 01:09:59.058 --> 01:10:02.950 - this mean? Like what are these brackets out next to it? Like 01:10:02.950 --> 01:10:04.539 - what is what is that whole thing 01:10:04.539 --> 01:10:07.340 - about an array? An array of. 01:10:08.060 --> 01:10:08.590 - Uh. 01:10:10.120 --> 01:10:12.490 - Strings I mean for for countries. 01:10:13.570 --> 01:10:15.658 - Well, it's not straight, it's just near Ray. 01:10:18.580 --> 01:10:19.748 - Last time this one. 01:10:20.430 --> 01:10:23.870 - You're really close, so it's an array of countries, right? 01:10:23.870 --> 01:10:27.998 - Otherwise, if it was an array of strings, it would be something 01:10:27.998 --> 01:10:29.718 - like. You know this, right? 01:10:31.380 --> 01:10:34.372 - Would be a string arrays. I was just thinking about the 01:10:34.372 --> 01:10:36.820 - countries that are being distributed to the array, but 01:10:36.820 --> 01:10:39.812 - there's no question. Well, we saw that earlier right in that 01:10:39.812 --> 01:10:42.804 - the typescript is the country is being inserted into the array 01:10:42.804 --> 01:10:46.884 - are an object with ID name I so too nice to have three, so we're 01:10:46.884 --> 01:10:50.148 - saying that if you're going to be a country, you're going to 01:10:50.148 --> 01:10:53.140 - have these four properties no matter what. And if you don't, 01:10:53.140 --> 01:10:56.948 - I'm going to gripe about it and I'm going to let you know that 01:10:56.948 --> 01:10:58.580 - something is broken or wonky at 01:10:58.580 --> 01:11:02.936 - compile time. Or before compile time got it OK? 01:11:03.710 --> 01:11:08.430 - Cool. Alright, and then, um Patrick, can you tell me what 01:11:08.430 --> 01:11:12.402 - line 41 is as part of this chunk of code? Like don't 01:11:12.402 --> 01:11:16.374 - worry about this at all. Can you just tell me like what 01:11:16.374 --> 01:11:18.360 - this is and what it does? 01:11:19.600 --> 01:11:21.480 - Asking I said Yep. 01:11:22.260 --> 01:11:22.740 - Cool. 01:11:24.710 --> 01:11:30.078 - Well, Line 41 is just whenever this component loads. You run 01:11:30.078 --> 01:11:33.982 - that bit of code from 42 to 49. 01:11:35.440 --> 01:11:37.246 - How is it different from the constructor? 01:11:42.260 --> 01:11:43.739 - Well, the constructor. 01:11:45.660 --> 01:11:48.456 - Builds do that I can use. 01:11:49.200 --> 01:11:51.366 - Well, I mean, it runs the 01:11:51.366 --> 01:11:54.090 - actual. Meat and potatoes of things. 01:11:56.670 --> 01:12:01.794 - OK, So what would we refer to? The method Ng on Annette as and 01:12:01.794 --> 01:12:06.552 - we kind of covered this a little bit in their last training. Give 01:12:06.552 --> 01:12:09.114 - a little bit of a cheat leeway. 01:12:09.810 --> 01:12:11.546 - It's completely. It's completely cool if you don't 01:12:11.546 --> 01:12:13.065 - know off the top of your head. 01:12:14.810 --> 01:12:16.330 - Sure, it's it's like that. 01:12:17.470 --> 01:12:20.866 - It's the think of The Lion King, the first song from that. 01:12:22.320 --> 01:12:27.710 - It's it's the what of what. Oh man that's good Jesse. 01:12:30.830 --> 01:12:33.233 - So it's it's a life cycle. Hook is what? 01:12:36.560 --> 01:12:40.370 - That is one of the most effective ways to store 01:12:40.370 --> 01:12:44.561 - information in the human mind is to associate something visual or 01:12:44.561 --> 01:12:49.133 - even you know, like you know, usually visual, but it can be 01:12:49.133 --> 01:12:52.562 - other ways too. Good job, Jesse. Those awesome so. 01:12:54.240 --> 01:12:58.112 - Lifecycle hooks in angular and so this is getting brought in 01:12:58.112 --> 01:13:02.336 - from the component, right? So we know that we have Angie on 01:13:02.336 --> 01:13:06.208 - it. It should be up here somewhere. I think we just 01:13:06.208 --> 01:13:07.968 - actually get it from component. 01:13:09.740 --> 01:13:14.134 - And so we have this lifecycle hooks, so whenever all Ng on and 01:13:14.134 --> 01:13:17.514 - it is, it's literally saying on the initialisation. Like Patrick 01:13:17.514 --> 01:13:21.232 - was saying, as soon as this components loaded into the state 01:13:21.232 --> 01:13:24.612 - on the initialisation of it after it's been constructed, we 01:13:24.612 --> 01:13:28.668 - want it to do some logic you know, and in the constructor 01:13:28.668 --> 01:13:31.710 - we're just naming outer variables and bringing in. You 01:13:31.710 --> 01:13:35.428 - know what we're going to use like you know, in giving 01:13:35.428 --> 01:13:39.484 - ourselves access to it, right? So we want to private, you know 01:13:39.484 --> 01:13:40.498 - variable called router. 01:13:40.810 --> 01:13:44.434 - Which is of type router and it's going to have with the 01:13:44.434 --> 01:13:47.454 - prototypal inheritance. Kind of like we talked about before. Is 01:13:47.454 --> 01:13:50.474 - router is going to have everything that its parent has 01:13:50.474 --> 01:13:54.098 - which is you know router right? So we're just saying router is 01:13:54.098 --> 01:13:58.024 - router, HTTP is HTTP client and so on and so forth and we're 01:13:58.024 --> 01:14:00.440 - using that dependency injection inside of the constructor 01:14:00.440 --> 01:14:03.460 - because we're just injecting it into the actual component, we 01:14:03.460 --> 01:14:07.386 - wouldn't be able to put that on Angie on and it because that's 01:14:07.386 --> 01:14:10.104 - after the components already constructed. That's just in G 01:14:10.104 --> 01:14:13.728 - on. It's just the Lifecycle Hook of what you want to do. 01:14:14.180 --> 01:14:17.560 - Whenever you have the component right, it's just like like 01:14:17.560 --> 01:14:21.616 - Patrick said, and Heather said is on the load of the component. 01:14:21.616 --> 01:14:26.348 - Do some stuff. Same thing you have in G on destroy so you can 01:14:26.348 --> 01:14:30.066 - kill any kind of you know observables you have. If you're 01:14:30.066 --> 01:14:33.784 - trying to, you know, emit things from this component other to 01:14:33.784 --> 01:14:37.502 - other components or something like that. You can kill those if 01:14:37.502 --> 01:14:40.544 - you have those open and there's several different lifecycle 01:14:40.544 --> 01:14:43.924 - hooks, kind of in between, right? So like energy change. 01:14:44.050 --> 01:14:48.483 - On change and stuff like that that we can kind of hook into 01:14:48.483 --> 01:14:53.257 - and be as reactive as possible to the end user so we can react 01:14:53.257 --> 01:14:56.667 - to their inputs without forms even or anything that they're 01:14:56.667 --> 01:15:00.077 - clicking on or anything like that, right? We can create 01:15:00.077 --> 01:15:03.487 - directives with them. We can create components with them and 01:15:03.487 --> 01:15:07.920 - use them just to interact with the UI and the user and what 01:15:07.920 --> 01:15:10.307 - they're actually in putting into our application. 01:15:13.220 --> 01:15:18.284 - And one last question, I'm going to shoot this over to Eric. 01:15:19.540 --> 01:15:23.665 - What what is this and why do we use it so much in what is 01:15:23.665 --> 01:15:27.460 - referred to? And you, I think it might be on either what 01:15:27.460 --> 01:15:30.232 - was what is what. I didn't see what the question, but 01:15:30.232 --> 01:15:31.240 - you were pointing at. 01:15:32.700 --> 01:15:36.120 - Eric might be working. Let's ask somebody else, let's ask. 01:15:37.350 --> 01:15:42.350 - Uh, awesome. You're in the top left corner, can you? Can you 01:15:42.350 --> 01:15:46.029 - tell us what this refers to? An why we use it so much? 01:15:47.150 --> 01:15:50.588 - Oh this, I thought you meant yeah Oh yes. 01:15:51.370 --> 01:15:53.690 - Yes, this this that's highlighted. 01:15:56.000 --> 01:15:59.460 - I can't remember like what it means specifically by know 01:15:59.460 --> 01:16:02.228 - it's like something that's kinda in the moment. 01:16:03.420 --> 01:16:07.557 - My come like in doesn't instantiate something. 01:16:08.840 --> 01:16:11.110 - Or the word lexical apply. 01:16:12.330 --> 01:16:15.390 - Yeah, I I can't really explain it. It's always been 01:16:15.390 --> 01:16:19.062 - confusing to me, but I know it's useful. I can tell you 01:16:19.062 --> 01:16:20.592 - what it is. Lexical scope. 01:16:23.080 --> 01:16:26.370 - Absolutely, and Brendan. You wanna go ahead and tell us? 01:16:28.010 --> 01:16:29.170 - The read it gave us. 01:16:30.600 --> 01:16:30.910 - Yep. 01:16:32.080 --> 01:16:33.460 - This is the. 01:16:34.590 --> 01:16:36.350 - The scope of the. 01:16:37.500 --> 01:16:41.308 - Environment, I guess that you're in, so this 01:16:41.308 --> 01:16:45.116 - is all the collection of all your properties 01:16:45.116 --> 01:16:47.020 - and methods inside of. 01:16:48.220 --> 01:16:50.500 - This controller that you're looking at. 01:16:52.730 --> 01:16:57.506 - Yep, that's exactly it. So like Chris is talking about is with. 01:16:57.506 --> 01:17:01.486 - In Capsulation we have this thing called lexical scope, so 01:17:01.486 --> 01:17:05.466 - you're just basically pointing at. You know whatever scope that 01:17:05.466 --> 01:17:09.844 - you're in. So in this particular case, this dot load countries 01:17:09.844 --> 01:17:12.232 - is. This is actually pointed at. 01:17:13.610 --> 01:17:16.940 - Our class here, city edit component and we're just calling 01:17:16.940 --> 01:17:20.603 - properties and methods on it, and that's basically it. And you 01:17:20.603 --> 01:17:23.600 - know, with any kind of application that you're creating 01:17:23.600 --> 01:17:27.596 - an just like, another important thing is kind of on this form 01:17:27.596 --> 01:17:31.259 - forms object to is in Capsulation you want to have in 01:17:31.259 --> 01:17:35.255 - Capsulation so you don't bleed out like I think we talked about 01:17:35.255 --> 01:17:38.918 - this last time with the styles and we're kind of giving 01:17:38.918 --> 01:17:42.581 - ourselves some styles here in our own component, so these are 01:17:42.581 --> 01:17:43.913 - encapsulated only to this 01:17:43.913 --> 01:17:48.670 - component. So they don't bleed out with the rest of the 01:17:48.670 --> 01:17:52.360 - application well, we're just in creating this in Capsulation as 01:17:52.360 --> 01:17:56.050 - well here and then. You know, again, we're creating another. 01:17:57.330 --> 01:18:00.192 - Object here that hasn't capsulation and it has access 01:18:00.192 --> 01:18:04.008 - to all of its children, but you don't have any access up 01:18:04.008 --> 01:18:06.870 - right? It's just encapsulated to itself and its children. 01:18:06.870 --> 01:18:08.778 - It doesn't go the other way. 01:18:10.990 --> 01:18:15.322 - You just have access to whatever is inside the object or the 01:18:15.322 --> 01:18:19.293 - lexical scope that you're in an nothing else unless you call 01:18:19.293 --> 01:18:22.903 - super and have some other crazy stuff happen in your 01:18:22.903 --> 01:18:23.986 - application. But that's 01:18:23.986 --> 01:18:26.160 - essentially it. Cool. 01:18:28.800 --> 01:18:31.891 - Alright Chris, you wanna go ahead and take take the reins 01:18:31.891 --> 01:18:35.263 - and jump on over to the Magic which is the back end. 01:18:36.280 --> 01:18:39.892 - Yeah, yeah, hopefully we can see a little bit more sharply on 01:18:39.892 --> 01:18:41.096 - some of these things. 01:18:42.660 --> 01:18:44.850 - Only do cats have reallybig.net? 01:18:47.560 --> 01:18:52.539 - I'll stop, but Gosh, I just want to keep going. OK, so I'm 01:18:52.539 --> 01:18:54.454 - joining the meeting on my 01:18:54.454 --> 01:18:58.590 - machine so. That's good, OK, thank you thank you alright. 01:18:58.590 --> 01:19:02.055 - So yeah, let's see here. Here's the app as we were 01:19:02.055 --> 01:19:05.835 - looking at an basically on the back end it was pretty light. 01:19:07.230 --> 01:19:09.978 - Out of additional code in general. 01:19:11.520 --> 01:19:14.360 - If you're going through this chapter, it's got some nice 01:19:14.360 --> 01:19:16.916 - dialogue on these things that that were added, which 01:19:16.916 --> 01:19:18.336 - I thought were pretty good. 01:19:19.850 --> 01:19:24.985 - The first one, that kind of the biggest one is this is Duke 01:19:24.985 --> 01:19:28.540 - Field API calls and it essentially goes through a 01:19:28.540 --> 01:19:30.515 - couple of different ways of 01:19:30.515 --> 01:19:33.828 - doing this. And let me kind of go. 01:19:34.850 --> 01:19:38.210 - To let me see if I can get the 1st way of calling it. 01:19:42.730 --> 01:19:49.058 - OK, so that's on the UI, so we can. The author starts out by 01:19:49.058 --> 01:19:53.126 - basically making this country do field issue or capability. 01:19:54.100 --> 01:19:56.888 - And then modifies it. 01:19:57.900 --> 01:19:59.860 - This is the city's controller. 01:20:00.620 --> 01:20:04.250 - I think, yeah, see if I can actually get to this. 01:20:05.620 --> 01:20:06.964 - I might have already gone past it. 01:20:08.920 --> 01:20:10.948 - Cool. I think I did. 01:20:13.100 --> 01:20:19.265 - I can just show you really fast. Kind of what what he did, and I 01:20:19.265 --> 01:20:23.375 - think this is kind of an interesting pattern to follow. 01:20:23.375 --> 01:20:27.896 - So he made this. Basically this method called is Duke Field. 01:20:29.450 --> 01:20:34.420 - And started out with using this basically to switch statement 01:20:34.420 --> 01:20:38.396 - that was essentially going to change the query. 01:20:41.270 --> 01:20:48.172 - That he added on to the kind of the base query depending on what 01:20:48.172 --> 01:20:55.074 - the actual field field name was, and so that was kind of easy to 01:20:55.074 --> 01:21:00.004 - read. Frankly, and it's pretty logical, but it wasn't dry. 01:21:01.350 --> 01:21:04.070 - And it wasn't just kind of, you know, reducing the 01:21:04.070 --> 01:21:06.246 - amount of code to accomplish the same thing. 01:21:07.390 --> 01:21:10.965 - So he can have refactored it and it's it's interesting whenever 01:21:10.965 --> 01:21:15.515 - you see this within the code and I'm actually going to zoom in a 01:21:15.515 --> 01:21:20.065 - little bit for me just so I can. I've got it on a 4K. 01:21:21.370 --> 01:21:22.914 - See if that's a little bit better, yeah? 01:21:25.230 --> 01:21:26.880 - It's just kind of interesting 'cause 01:21:26.880 --> 01:21:29.080 - sometimes whenever you optimize your code you can 01:21:29.080 --> 01:21:31.555 - make it less simple for people to work on. 01:21:33.010 --> 01:21:37.672 - And so he kind of talks about that in the book and just kind 01:21:37.672 --> 01:21:42.334 - of discuss is the pros and the cons to some extent of doing it 01:21:42.334 --> 01:21:46.476 - that way. And I think that's a really important consideration. 01:21:46.476 --> 01:21:50.183 - There can be performance impact. There can be issues with making 01:21:50.183 --> 01:21:54.227 - it easy for other people to understand what you did and why 01:21:54.227 --> 01:21:57.934 - you did it. So here's the original version that he wrote 01:21:57.934 --> 01:22:00.293 - here in the in the actual book. 01:22:01.920 --> 01:22:07.860 - And it's kind of like a copy and paste of the the city do code. 01:22:08.500 --> 01:22:13.791 - But kind of. The idea here is that he had to really think 01:22:13.791 --> 01:22:18.675 - about how to deal with this from a SQL injection attack approach 01:22:18.675 --> 01:22:20.710 - an then potentially from a 01:22:20.710 --> 01:22:25.225 - performance perspective. And so in order to use this more dry 01:22:25.225 --> 01:22:28.675 - approach, he's using link dot dynamic and we actually looked 01:22:28.675 --> 01:22:30.055 - at this last time. 01:22:30.710 --> 01:22:32.870 - Where you can do some pretty interesting things 01:22:32.870 --> 01:22:33.950 - inside of the link. 01:22:35.240 --> 01:22:41.176 - And I'll just pull it up in the code again here, but where you 01:22:41.176 --> 01:22:46.264 - can kind of build this string value that gets passed into the 01:22:46.264 --> 01:22:51.650 - link query. Ann and you can pass in these little variables that 01:22:51.650 --> 01:22:56.707 - you can see here that we're building up so the at zero is 01:22:56.707 --> 01:23:01.764 - field value and then at one is country ID and then he's also 01:23:01.764 --> 01:23:06.432 - bringing in the field name using the string dot format. So you 01:23:06.432 --> 01:23:10.322 - kind of these two ways of merging content string dot 01:23:10.322 --> 01:23:14.601 - format lets you bring things in with these little curly braces. 01:23:15.210 --> 01:23:18.894 - And so it's bringing in field name and then the at symbol 01:23:18.894 --> 01:23:22.271 - brings in these other values below. So zero is field value 01:23:22.271 --> 01:23:23.806 - and one is country ID. 01:23:24.540 --> 01:23:29.864 - And it's basically just building up this little query where we're 01:23:29.864 --> 01:23:34.220 - saying dynamically hey is citado field for this country. 01:23:35.310 --> 01:23:37.490 - For this field name. 01:23:38.590 --> 01:23:41.086 - Which goes at the beginning of the statement, and you can kind 01:23:41.086 --> 01:23:43.998 - of follow the pattern up here so you can see like these are all 01:23:43.998 --> 01:23:49.296 - the field names. So those are on the left, and then he's 01:23:49.296 --> 01:23:53.022 - basically saying where the field name equals field value 01:23:53.022 --> 01:23:58.404 - and the country ID. the ID is not equal to the country ID 01:23:58.404 --> 01:24:00.060 - that was passed in. 01:24:01.320 --> 01:24:04.730 - And so it gets kind of complicated and this is 01:24:04.730 --> 01:24:08.140 - something that I think is really helpful philosophically for us 01:24:08.140 --> 01:24:11.209 - from a development perspective is to understand that sometimes 01:24:11.209 --> 01:24:14.619 - when you're debugging and you're trying to figure out what's 01:24:14.619 --> 01:24:18.370 - going on, it can be really helpful to have more verbosity 01:24:18.370 --> 01:24:22.803 - and then kind of drill down into that verbosity. You can also, of 01:24:22.803 --> 01:24:26.554 - course, attach inside of this, but sometimes it can be a 01:24:26.554 --> 01:24:28.259 - challenge as you guys know. 01:24:28.930 --> 01:24:33.202 - And that's also where you know if you're trying to figure out, 01:24:33.202 --> 01:24:37.474 - maybe maybe you accidentally. I see this kind of thing all the 01:24:37.474 --> 01:24:40.678 - time, maybe accidentally did that and you forgot the 01:24:40.678 --> 01:24:43.882 - exclamation point. So now the logic is literally incorrect, 01:24:43.882 --> 01:24:47.798 - but if you did that, it's kind of hard to debug. 01:24:48.680 --> 01:24:53.202 - So there's kind of a pro and cons to doing it a certain way, 01:24:53.202 --> 01:24:57.078 - but this is really elegant and it can handle a nice scenario 01:24:57.078 --> 01:25:00.631 - whenever you end up adding a bunch of fields, so there's 01:25:00.631 --> 01:25:05.476 - kind of a pro and a con to doing things in a more kind of 01:25:05.476 --> 01:25:09.029 - compact and concise way that may not be logical right away, 01:25:09.029 --> 01:25:13.551 - and it just kind of depends you. I mean, you kind of. I saw 01:25:13.551 --> 01:25:17.104 - a really great quote from a software blogs that I was 01:25:17.104 --> 01:25:19.365 - reading last weekend. The Blogger literally said. 01:25:20.440 --> 01:25:24.700 - I'm trying to remember the exact words, but it was basically we 01:25:24.700 --> 01:25:28.605 - don't build rockets so that people can, you know, go go 01:25:28.605 --> 01:25:32.510 - design rocket engines. We build rockets so people can land on 01:25:32.510 --> 01:25:36.770 - the moon and the idea and this was a software developer. It 01:25:36.770 --> 01:25:41.030 - wasn't just an aerospace guy and that's why I was reading it. 01:25:42.520 --> 01:25:47.406 - He he literally was trying to say we build code so that we can 01:25:47.406 --> 01:25:51.245 - deliver on business needs, and I mean that's typically the case. 01:25:51.245 --> 01:25:54.735 - So there's always this kind of thought process about what's 01:25:54.735 --> 01:25:58.923 - going to be better than what the scenario is, and what's more 01:25:58.923 --> 01:26:02.413 - applicable. But anyway, really cool if you haven't seen this 01:26:02.413 --> 01:26:05.903 - link dynamic, it's really powerful, and it can be really 01:26:05.903 --> 01:26:10.440 - helpful for a lot of scenarios. And then the other thing was I 01:26:10.440 --> 01:26:13.581 - just wanted to point out that Heather was right. 01:26:13.690 --> 01:26:16.690 - About the logic in the controller. So good job Heather. 01:26:16.690 --> 01:26:20.290 - So you can see here it's checking the lat long as well. 01:26:21.160 --> 01:26:25.571 - So that's basically the is deep city is really really simple, 01:26:25.571 --> 01:26:30.383 - but it's just kind of building up this little this little query 01:26:30.383 --> 01:26:34.393 - that runs against the database. So those are the big. 01:26:35.020 --> 01:26:39.580 - Yeah, go ahead. I'm sorry I hate to interrupt. I was just 01:26:39.580 --> 01:26:42.620 - going to ask about the countries controller about 01:26:42.620 --> 01:26:46.420 - the method on that. So on the string dot format. 01:26:48.340 --> 01:26:51.900 - With this kind of interpolation is field name getting turned 01:26:51.900 --> 01:26:55.816 - into the zero, the 1st zero? And why wouldn't you just 01:26:55.816 --> 01:26:59.732 - interpolate it with like I think from Brennan's point in previous 01:26:59.732 --> 01:27:02.580 - trainings this would be more efficient than just 01:27:02.580 --> 01:27:06.496 - interpolating it like using like a template literal. Is that why 01:27:06.496 --> 01:27:11.124 - we're doing this or is there any other reason that we're doing it 01:27:11.124 --> 01:27:16.170 - this way? I don't know, but I believe that with Linq dynamic 01:27:16.170 --> 01:27:20.915 - it he's having to do it this way. To get this variable here 01:27:20.915 --> 01:27:25.295 - as well, because whenever it's executing on this in the kind of 01:27:25.295 --> 01:27:30.040 - in the back end code for this library, it's not able to in 01:27:30.040 --> 01:27:34.055 - whenever it's compiling, it's not able to bring in a variable, 01:27:34.055 --> 01:27:39.165 - but if you do it this way, it actually kind of. It works. It's 01:27:39.165 --> 01:27:43.180 - able to cast it properly and make it work like this. 01:27:43.230 --> 01:27:44.868 - Brendan filter if you were going to say something. 01:27:47.450 --> 01:27:52.070 - I I don't know about link dot dynamic, but using 01:27:52.070 --> 01:27:55.304 - string dot format as opposed to string 01:27:55.304 --> 01:27:58.538 - interpolation is quite a lot more efficient.01:28:00.740 --> 01:28:04.965 - OK, yeah, we can actually try it too and just see what happens, 01:28:04.965 --> 01:28:09.840 - but I think if we did like here we can just try it really fast. 01:28:09.840 --> 01:28:11.790 - If we did like at three. 01:28:12.880 --> 01:28:15.600 - I think it's gonna break because it's not and we'll 01:28:15.600 --> 01:28:16.688 - see what happens, but. 01:28:18.210 --> 01:28:20.706 - It's not going to know how to handle it. Kind of a deal. 01:28:22.520 --> 01:28:23.020 - No. 01:28:29.230 --> 01:28:32.389 - Oh, I don't know why I have to print the Seas understand even 01:28:32.389 --> 01:28:35.548 - with even without the string out format I'd like if we just did 01:28:35.548 --> 01:28:36.763 - like a big like template, 01:28:36.763 --> 01:28:39.150 - literal of dislike. Your money. 01:28:40.190 --> 01:28:43.303 - Money, curlies and then shoved everything in it would hate it. 01:28:44.810 --> 01:28:48.856 - I'm not sure. I mean, one way is to just try it and then 01:28:48.856 --> 01:28:52.613 - obviously you know it's a good idea to kind of dig and read 01:28:52.613 --> 01:28:56.659 - about it. So I'm going to try it and see what happens and that 01:28:56.659 --> 01:29:00.416 - might depending on the error it might tell me more. So OK, so 01:29:00.416 --> 01:29:04.566 - that worked. It appears and I'm just going to reveal trailer. 01:29:05.250 --> 01:29:09.176 - Yeah, feel free to be like shut up CBI think this is Great 01:29:09.176 --> 01:29:12.498 - 'cause this is helping other other folks 'cause they might be 01:29:12.498 --> 01:29:15.518 - looking at it thinking I don't know what this is. 01:29:16.970 --> 01:29:20.030 - So anyone who has these kind of questions you're welcome to fire 01:29:20.030 --> 01:29:21.815 - him off. I like to pick you. 01:29:22.770 --> 01:29:26.235 - I'm not sure why it would accept string dot format and 01:29:26.235 --> 01:29:29.070 - not accept an interpolated string. Yeah, that's true. I 01:29:29.070 --> 01:29:32.535 - mean, it could just be a preference that he you know 01:29:32.535 --> 01:29:36.945 - he's trying to show that, and I don't know if he talks about it 01:29:36.945 --> 01:29:41.040 - here, but we did this in the last chapter, so he might kind 01:29:41.040 --> 01:29:44.505 - of go on a little bit of a diatribe about it. 01:29:47.660 --> 01:29:51.468 - Is it best practice to use one over the other or is it just 01:29:51.468 --> 01:29:55.276 - kind of all about stuff so you know what it is? Guys? I think 01:29:55.276 --> 01:29:58.812 - it's. I think he might be doing that to prevent the sequel. I'm 01:29:58.812 --> 01:29:59.900 - just trying to remember. 01:30:01.010 --> 01:30:02.598 - Oh, the sanitize it. 01:30:03.420 --> 01:30:06.480 - Yeah, but I think that's what this whole is valid is for. 01:30:07.280 --> 01:30:09.534 - But I think that might be it. 01:30:11.690 --> 01:30:13.760 - It's awfully strange. 01:30:15.480 --> 01:30:18.760 - I mean, especially if it's just still works, it's like, 01:30:18.760 --> 01:30:22.040 - OK, we could always write him and be like, Hey. 01:30:27.660 --> 01:30:30.960 - We restructured your code except our PR or else for you. 01:30:35.530 --> 01:30:39.205 - OK, so I mean like as far as South goes, so would we use like 01:30:39.205 --> 01:30:42.635 - string dot format and a lot of our stuff or do we just use? 01:30:44.050 --> 01:30:48.782 - Just. Other interpolation, or what's the preferred method for 01:30:48.782 --> 01:30:49.919 - our back end? 01:30:50.540 --> 01:30:52.850 - Brandon, you sounded like you know that one pretty well. 01:30:52.850 --> 01:30:55.160 - Why don't you just give us a quick rundown there? 01:30:56.590 --> 01:30:58.975 - There is a lot of string interpolation and stuff. 01:31:00.700 --> 01:31:06.230 - Although string interpolation is a lot less eficient, some people 01:31:06.230 --> 01:31:10.101 - find it more readable. Generally, string interpolation 01:31:10.101 --> 01:31:15.078 - is about 1000 times less efficient than using something 01:31:15.078 --> 01:31:17.843 - like string dot format, but. 01:31:20.520 --> 01:31:22.350 - Readability is good too, I guess. 01:31:24.540 --> 01:31:30.227 - Now, Brendan, with this, with this format as well, would you 01:31:30.227 --> 01:31:32.812 - refer to that as string 01:31:32.812 --> 01:31:37.675 - interpolation? I'm I'm not used to that die. Oh yes, when you 01:31:37.675 --> 01:31:42.030 - put a dollar sign in front of a string and you have the 01:31:42.030 --> 01:31:45.380 - variables directly in it, that string interpolation OK and then 01:31:45.380 --> 01:31:47.725 - so you can do things like this. 01:31:49.510 --> 01:31:50.150 - Um? 01:31:52.210 --> 01:31:59.336 - Yeah, so the reason why that is so slow is because the C Sharp 01:31:59.336 --> 01:32:03.917 - engine is actually trying to individually parse all those 01:32:03.917 --> 01:32:09.007 - variables out and generate the strings as opposed to creating 01:32:09.007 --> 01:32:14.097 - one string initially with only one reference pointer, which is 01:32:14.097 --> 01:32:17.151 - what String Def Format is doing. 01:32:18.870 --> 01:32:21.910 - So how would you know without knowing this, 01:32:21.910 --> 01:32:23.810 - how would you test for? 01:32:25.850 --> 01:32:29.050 - Where would you see that happening? Like you say it's 01:32:29.050 --> 01:32:30.940 - 1000 times? I mean. 01:32:32.540 --> 01:32:38.403 - 1000 times less performant if it is taking like 10 NS to combine 01:32:38.403 --> 01:32:42.913 - that stream. 1000 times isn't very much, you know right? 01:32:45.570 --> 01:32:50.135 - So both of these suck basically, and it really applies whenever 01:32:50.135 --> 01:32:52.625 - you're doing a big for loop. 01:32:53.850 --> 01:32:58.410 - Or you're doing some kind of like yeah, or you're 01:32:58.410 --> 01:32:59.778 - doing no comment? 01:33:01.410 --> 01:33:03.522 - Trying to set a lot of break points throughout every part 01:33:03.522 --> 01:33:04.098 - of your card. 01:33:05.890 --> 01:33:11.278 - Back end of the C Sharp Line 150 is actually creating three 01:33:11.278 --> 01:33:14.038 - strings. To make that variable. 01:33:15.890 --> 01:33:18.900 - Because it has the the first double quoted string, the 01:33:18.900 --> 01:33:21.910 - second one, and then it's combining them into a third 01:33:21.910 --> 01:33:23.716 - one, which is the final result. 01:33:27.630 --> 01:33:31.806 - So this so you're saying that this format is way, way, way, 01:33:31.806 --> 01:33:33.546 - way way way faster, right? 01:33:35.560 --> 01:33:39.820 - It usually is. There are certain circumstances where it's not, 01:33:39.820 --> 01:33:44.506 - but the reason why string dot format is usually more efficient 01:33:44.506 --> 01:33:49.192 - is because it's only creating one reference to a string, and 01:33:49.192 --> 01:33:54.304 - in that buffer it's filling in those strings as it gets to 01:33:54.304 --> 01:33:56.434 - those points as opposed to. 01:33:57.570 --> 01:33:59.376 - Heating up that memory to build 01:33:59.376 --> 01:34:01.420 - that string out. Tried. 01:34:04.610 --> 01:34:08.474 - Is it using string builder in in the background? Because I know 01:34:08.474 --> 01:34:12.016 - that string builder is the most optimized way to work with 01:34:12.016 --> 01:34:17.878 - strings. A string builder has more overhead. 01:34:18.550 --> 01:34:22.222 - Then string that format. Because you're 01:34:22.222 --> 01:34:24.058 - instantiating that object. 01:34:25.480 --> 01:34:28.960 - Uh, I think this one is isn't doing that in the background. 01:34:31.170 --> 01:34:37.428 - Um, I don't know how else it would be able not to create new 01:34:37.428 --> 01:34:42.345 - variables, because when you said vars CB equals crisp plus black, 01:34:42.345 --> 01:34:46.815 - it creates 3 three variables, 3 memory allocations, correct? And 01:34:46.815 --> 01:34:51.285 - only string builder creates one memory allocation and then it 01:34:51.285 --> 01:34:56.202 - appends to it, so it's not creating additional, so I don't 01:34:56.202 --> 01:35:01.119 - see what would be the 3rd way. There are string format. 01:35:01.170 --> 01:35:01.990 - Could use. 01:35:05.520 --> 01:35:10.836 - I believe there's only like two ways to possible ways to be 01:35:10.836 --> 01:35:13.494 - manipulating things. Extremes, either through concatenation, 01:35:13.494 --> 01:35:15.709 - which is very slow and. 01:35:16.270 --> 01:35:18.070 - String builder which was built. 01:35:18.930 --> 01:35:20.460 - To optimize the. 01:35:21.680 --> 01:35:25.667 - Jobs the performance with strings, but OK we we. 01:35:26.810 --> 01:35:28.840 - Got into a different OK. 01:35:30.250 --> 01:35:33.880 - 146 yeah, you probably right. String format is is using a 01:35:33.880 --> 01:35:37.840 - string builder I guess. Yeah, I mean there couldn't be any other 01:35:37.840 --> 01:35:39.820 - way. There's only two ways to. 01:35:40.820 --> 01:35:42.170 - You can work with strings. 01:35:45.280 --> 01:35:45.630 - Oh 01:35:49.190 --> 01:35:52.334 - so I don't want to string everyone along too much on this. 01:35:54.280 --> 01:35:57.114 - It's it's all about the format of this meeting you know as to 01:35:57.114 --> 01:35:58.640 - how you guys wanted to go so. 01:36:00.400 --> 01:36:01.759 - Team building exercise. 01:36:06.250 --> 01:36:10.956 - But yeah, it looks like This Is. It looks like this is working 01:36:10.956 --> 01:36:15.662 - either way, so I'm not sure. I'm not sure what what the theory 01:36:15.662 --> 01:36:19.644 - was on doing the string out format there other than possibly 01:36:19.644 --> 01:36:23.626 - for performance, but I mean I would be interested if somebody 01:36:23.626 --> 01:36:25.074 - wanted to ask him. 01:36:26.860 --> 01:36:31.260 - You know, find out why he did it that way. We may be able to see 01:36:31.260 --> 01:36:34.835 - in his GitHub, you know why he did it that way, and certainly 01:36:34.835 --> 01:36:38.135 - if anyone knows of a good reason, feel free to point it 01:36:38.135 --> 01:36:41.985 - out. But OK, so that was pretty. Those are the main things on the 01:36:41.985 --> 01:36:45.285 - on the C Sharp side. It was pretty lightweight this time an 01:36:45.285 --> 01:36:49.135 - I'll turn it back over to you Chris or see if we have any 01:36:49.135 --> 01:36:52.985 - other topics we want to cover as a group here with the last 15 01:36:52.985 --> 01:36:57.893 - minutes. I think I just had a quick question because I you 01:36:57.893 --> 01:37:02.352 - know I. I know that we declare variables in the back end quite 01:37:02.352 --> 01:37:06.468 - a bit in our code and just so everybody's kind of familiar 01:37:06.468 --> 01:37:07.840 - with it, so why? 01:37:08.670 --> 01:37:14.142 - Why did we like online like 150 year? Whichever, so with a 01:37:14.142 --> 01:37:19.614 - strongly typed language like C sharp, how can we get away with 01:37:19.614 --> 01:37:23.262 - just declaring the variable instead of instantiating it? 01:37:23.262 --> 01:37:28.278 - Like with the bull string or integer? Yeah, because of the 01:37:28.278 --> 01:37:30.558 - equal sign contains the type. 01:37:31.720 --> 01:37:34.897 - Which C Sharp is inferring on the left side? 01:37:36.300 --> 01:37:40.392 - So it is strongly typed before you compile it. C sharp knows 01:37:40.392 --> 01:37:44.143 - that the resulting type of Chris Plus Black is going to 01:37:44.143 --> 01:37:48.235 - be a string. You can mouseover bar and it'll show you that 01:37:48.235 --> 01:37:48.917 - it's streaming. 01:37:50.380 --> 01:37:52.348 - Sorry I stepped away briefly, I'll do that. 01:37:53.760 --> 01:37:53.990 - Yeah. 01:37:55.770 --> 01:37:59.722 - And then I'm going to trip you up a little bit as well. 01:37:59.722 --> 01:38:02.762 - How? How is how is var different from a dynamic? 01:38:06.470 --> 01:38:07.298 - Are you asking me? 01:38:08.890 --> 01:38:13.690 - NEC sharpers dynamic is used to, I mean typically dynamic kind of 01:38:13.690 --> 01:38:18.890 - came around to be to store data from a Jason response. This kind 01:38:18.890 --> 01:38:23.380 - of. And I, I'm guessing that technically you could say that 01:38:23.380 --> 01:38:26.530 - one inherits the other. I don't know for sure. 01:38:28.280 --> 01:38:31.826 - Is a type that? Yeah, that's 01:38:31.826 --> 01:38:36.234 - true. Where fire is just a placeholder for the 01:38:36.234 --> 01:38:37.020 - resulting type. 01:38:38.590 --> 01:38:41.245 - Why wouldn't you use dynamic instead of? Like declaring 01:38:41.245 --> 01:38:44.195 - something you just use it and like something that you're 01:38:44.195 --> 01:38:47.440 - getting returned to you because you don't know what it is 01:38:47.440 --> 01:38:50.685 - essentially or you don't know what it's going to be. No, 01:38:50.685 --> 01:38:52.455 - that's not what dynamic is for. 01:38:53.610 --> 01:38:56.166 - Dynamic gives you the ability to. 01:38:58.820 --> 01:39:04.616 - It can give you runtime error. Actually it's not gonna give you 01:39:04.616 --> 01:39:08.480 - a compile. Actually I'm saying it wrong so. 01:39:10.330 --> 01:39:15.832 - It is a type while bar is in a Type 4 is not is 01:39:15.832 --> 01:39:19.369 - nothing but dynamic is a type, but it's it's. 01:39:20.870 --> 01:39:24.401 - It's not any type. It's weird. Too hard to explain it. 01:39:28.100 --> 01:39:30.206 - It'll be guys can still see my screen, right? 01:39:31.760 --> 01:39:35.280 - Of the type that you're working with in the runtime, 01:39:35.280 --> 01:39:38.800 - I think that's the closest thing I can think of. 01:39:40.050 --> 01:39:44.790 - No dynamic is its own type. It's used for where you don't. 01:39:45.410 --> 01:39:50.258 - Where C sharp doesn't have a way of knowing what the resulting 01:39:50.258 --> 01:39:54.298 - type is ahead of time and then install runtime, right? 01:39:56.250 --> 01:40:00.649 - Ah. In the run time, it will become a type of what you are. 01:40:00.760 --> 01:40:04.333 - Working with like integer or another class or whatever. 01:40:06.880 --> 01:40:12.354 - I my experience and you can kind of see the run down here. My 01:40:12.354 --> 01:40:17.046 - experience with dynamic is this. This piece right here is kind of 01:40:17.046 --> 01:40:19.001 - the killeeshil of using it. 01:40:20.300 --> 01:40:24.150 - It's just kind of pretty frustrating to deal with, but it 01:40:24.150 --> 01:40:28.350 - can be really useful kind of inside of where I've seen it 01:40:28.350 --> 01:40:33.250 - used a lot is a return from a call to another API that returns 01:40:33.250 --> 01:40:38.500 - Jason data and you don't want to make a new object on a new class 01:40:38.500 --> 01:40:43.050 - to define the return type, and you just want to quickly pass it 01:40:43.050 --> 01:40:47.250 - around and so that can be really useful for dynamic and it's 01:40:47.250 --> 01:40:50.400 - technically usable for other scenarios, but that's kind of 01:40:50.400 --> 01:40:54.811 - like. It was like man we have this and all these other 01:40:54.811 --> 01:40:57.821 - programming languages. Why can't we have this in C Sharp 01:40:57.821 --> 01:41:01.132 - and so enough you know forum posts and people pinging the 01:41:01.132 --> 01:41:04.744 - Csharp team and they're like fine will add this in here and 01:41:04.744 --> 01:41:07.754 - it basically helps deal with that situation so you don't 01:41:07.754 --> 01:41:09.861 - have to. You know, pedantically, build out. 01:41:11.430 --> 01:41:16.680 - A little glass for the object, but now a lot of times what I 01:41:16.680 --> 01:41:20.430 - see that works really well for that scenario where you're 01:41:20.430 --> 01:41:24.555 - getting a response from another API is you can literally. This 01:41:24.555 --> 01:41:27.180 - is really cool. You can go Jason 01:41:27.180 --> 01:41:32.895 - 2 csharp. An you can take your Jason Response. 01:41:33.580 --> 01:41:36.758 - I was gonna see if I could get a little Jason Blob from my 01:41:36.758 --> 01:41:38.801 - application really fast, but that on but you can. 01:41:40.350 --> 01:41:44.376 - Is the fields that are visible in that response, where normally 01:41:44.376 --> 01:41:48.768 - if the field is null then it won't fill in that property. 01:41:49.500 --> 01:41:53.064 - Yeah, it's not perfect, but if you're dealing with a project 01:41:53.064 --> 01:41:56.952 - where you have access to the end points, you can get the 01:41:56.952 --> 01:42:00.192 - definition and you know get billed out the object. But 01:42:00.192 --> 01:42:03.432 - there are tools where you can just literally paste in. 01:42:05.840 --> 01:42:08.720 - Like Brendan was saying, You'll you know you have to 01:42:08.720 --> 01:42:11.312 - be cognizant of the limitations of it, but you 01:42:11.312 --> 01:42:14.192 - can pay. Send Jason object and get the representation in 01:42:14.192 --> 01:42:15.920 - C Sharp, which is really nice. 01:42:17.050 --> 01:42:20.746 - There are different websites that do this that kind of our 01:42:20.746 --> 01:42:24.442 - higher quality than the others, but I've used this alot on 01:42:24.442 --> 01:42:28.810 - projects so that I'm not having to use the dynamic and I don't 01:42:28.810 --> 01:42:32.842 - have to physically sit there and build it out manually. I usually 01:42:32.842 --> 01:42:36.874 - will start with something like this and then go tweak it like 01:42:36.874 --> 01:42:40.570 - Brandon Moss and another great way to handle properties on a 01:42:40.570 --> 01:42:43.930 - Jason response where you don't know what the properties are 01:42:43.930 --> 01:42:48.298 - going to be is jason.net has a built in way to handle that. 01:42:49.250 --> 01:42:51.540 - Called Ali. Pull that up. 01:42:54.190 --> 01:42:57.494 - Called the Jason Extension 01:42:57.494 --> 01:43:03.409 - data attribute. So what you do is you apply that attribute to a 01:43:03.409 --> 01:43:04.954 - Dictionary of string an Jason 01:43:04.954 --> 01:43:09.928 - Token. And that will fill all of the properties that 01:43:09.928 --> 01:43:12.640 - it couldn't deserialize into that dictionary. 01:43:13.740 --> 01:43:18.192 - And that will allow you to access all of that data really 01:43:18.192 --> 01:43:23.518 - easily. Which I do in my next one is really cool connector 01:43:23.518 --> 01:43:28.174 - because I'm all of those fields are flat, so I can then 01:43:28.174 --> 01:43:31.278 - just deserialize all those properties like collected into 01:43:31.278 --> 01:43:33.218 - a string to string dictionary. 01:43:36.230 --> 01:43:39.722 - That is really cool. Do you have that available to show really 01:43:39.722 --> 01:43:43.796 - fast? I mean this is a tangent, but we're kind of done. I think 01:43:43.796 --> 01:43:45.542 - in less. Anyone else wants to. 01:43:46.860 --> 01:43:48.348 - Any comments or questions on this? 01:43:49.570 --> 01:43:55.370 - Uh, yeah. So I have this result set I'm getting from NetSuite 01:43:55.370 --> 01:43:57.460 - using a sweet QL query. 01:43:58.990 --> 01:44:02.499 - Screen a little bit bigger or just zooming, I sure can. 01:44:03.230 --> 01:44:03.930 - Thanks meme. 01:44:07.290 --> 01:44:10.490 - Let me know if this is even bigger. 01:44:13.560 --> 01:44:14.200 - Much better. 01:44:15.830 --> 01:44:20.640 - So I can have a query where I don't know necessarily what the 01:44:20.640 --> 01:44:22.120 - fields coming back are. 01:44:24.390 --> 01:44:29.450 - Because it's just a query where certain fields are selected in 01:44:29.450 --> 01:44:32.210 - the query, so I have this. 01:44:34.290 --> 01:44:36.696 - Object that I'm deserializing it too. 01:44:37.730 --> 01:44:43.229 - And so I don't know that that query has a location field on 01:44:43.229 --> 01:44:46.560 - it. So Jason because of. 01:44:48.100 --> 01:44:51.850 - Jason.net because I have this attribute on here will show 01:44:51.850 --> 01:44:56.350 - everything that I didn't have a field in my class into this 01:44:56.350 --> 01:45:00.475 - dictionary and it's saving as a J token because it might 01:45:00.475 --> 01:45:04.600 - not be a flat and property. It could be an object. 01:45:05.690 --> 01:45:12.335 - Ah. But in in the suite QL queries I know that all of the 01:45:12.335 --> 01:45:16.485 - field coming back are just going to be strings which. 01:45:18.210 --> 01:45:23.370 - Object collections. So then I'm just putting them into this 01:45:23.370 --> 01:45:28.530 - string district dictionary that's also in my model. In this 01:45:28.530 --> 01:45:32.658 - on deserialized method, which is another part of. 01:45:33.630 --> 01:45:38.622 - Jason.net where I can operate this field after 01:45:38.622 --> 01:45:41.118 - it's been filled in. 01:45:42.930 --> 01:45:45.530 - And it's being done automatically, right? And that 01:45:45.530 --> 01:45:48.780 - happens automatically as soon as I try to deserialize that. 01:45:50.990 --> 01:45:53.966 - And then you know, I could look through all of the names 01:45:53.966 --> 01:45:57.190 - of the keys to figure out what I want to do with it. 01:45:58.780 --> 01:46:02.157 - And or if I already know the keys I can do. 01:46:03.160 --> 01:46:06.733 - Cool things like like this where I'm just saying. 01:46:07.290 --> 01:46:10.776 - That field that I know about, you know I want to use it in 01:46:10.776 --> 01:46:11.523 - my integration now. 01:46:15.230 --> 01:46:17.723 - Then I could do something like having upsetting where. 01:46:18.750 --> 01:46:21.298 - I don't necessarily know what that field is going to be, but I 01:46:21.298 --> 01:46:24.042 - have some way that I want to operate on it when it comes back 01:46:24.042 --> 01:46:25.414 - and I could just fill that in. 01:46:29.860 --> 01:46:31.668 - Thank you very cool. 01:46:32.880 --> 01:46:36.114 - Yeah, and is that is that dependent on a library like 01:46:36.114 --> 01:46:39.642 - I was using, I was trying to use that the other day 01:46:39.642 --> 01:46:41.700 - and I want to say it was. 01:46:43.240 --> 01:46:48.830 - Like a front end like Web Library and I wasn't sure if I 01:46:48.830 --> 01:46:53.990 - wanted to bring that into my. I was building out a simple 01:46:53.990 --> 01:46:55.710 - like a console application. 01:46:57.220 --> 01:47:02.147 - I I don't know if I'm right about this, but I think that 01:47:02.147 --> 01:47:06.695 - that library requires, like the webs like it using of the web 01:47:06.695 --> 01:47:12.850 - components. Ann and tell me if I'm wrong about that. It 01:47:12.850 --> 01:47:17.431 - doesn't. It's just that soft Jason Csharp package, OK? 01:47:18.910 --> 01:47:22.749 - Anyone else have any topics or questions as we wrap up? 01:47:22.749 --> 01:47:25.890 - You guys know I can talk about stuff so. 01:47:27.440 --> 01:47:30.499 - To attend the after after hours meeting. 01:47:34.950 --> 01:47:36.058 - Is that a demand? 01:47:37.560 --> 01:47:41.220 - Meds I was thinking like, uh, yeah there's a pool you don't. 01:47:41.220 --> 01:47:45.185 - If you're if you don't join the six 6:00 PM hangout. Katie is 01:47:45.185 --> 01:47:48.845 - going to come to your house and do burnouts, burnouts in your 01:47:48.845 --> 01:47:52.810 - driveway in the story. Oh sweet dude. Well I will not be joining 01:47:52.810 --> 01:47:56.165 - them. I cannot wait to see you from my burnouts brother. 01:47:58.970 --> 01:48:03.205 - Turn up the yard man, I just restarted Dude, come on. 01:48:04.800 --> 01:48:06.655 - You're saying man, what are you doing? 01:48:11.900 --> 01:48:12.400 - Awesome. 01:48:14.030 --> 01:48:18.229 - Cool, there's a lot of people in my side. See how did you 01:48:18.229 --> 01:48:22.105 - have anything else? I was just gonna tell you guys gonna give 01:48:22.105 --> 01:48:25.981 - you guys some updates on the state of the Union. We have 01:48:25.981 --> 01:48:28.888 - some new projects getting started. The sales team is 01:48:28.888 --> 01:48:30.503 - getting crushed there. So busy. 01:48:32.040 --> 01:48:35.030 - There's there's an interesting couple of our fees that were 01:48:35.030 --> 01:48:38.618 - working on so these. These are not deals yet that we've won, 01:48:38.618 --> 01:48:40.412 - but where you know we're going 01:48:40.412 --> 01:48:44.566 - after him? And one of 'em is kind of interesting. It's 01:48:44.566 --> 01:48:48.778 - for Sitefinity so I I wanted to say for cap text Metro or 01:48:48.778 --> 01:48:52.342 - Cap Metro I think is what it's called here in Austin. 01:48:54.020 --> 01:48:57.233 - And that's a pretty big organization an it's for 01:48:57.233 --> 01:49:01.517 - sitefinity, so for all the team members that did all the site 01:49:01.517 --> 01:49:04.730 - nfinity work and getting certified. Thank you guys and 01:49:04.730 --> 01:49:09.371 - we're pressing to get deals big deals, some of them quite big so 01:49:09.371 --> 01:49:13.298 - you know strapped in I suppose and will certainly be getting 01:49:13.298 --> 01:49:18.296 - the rest of the team up to speed once we get these type of 01:49:18.296 --> 01:49:21.866 - projects moving. But it's a really big opportunity. We also 01:49:21.866 --> 01:49:25.079 - we had Taylor and Kevin went above and beyond. 01:49:25.140 --> 01:49:30.184 - Earlier this week and you know a few other times. The last few 01:49:30.184 --> 01:49:34.840 - weeks working on some site nfinity demos for us and we were 01:49:34.840 --> 01:49:39.496 - able to demo to the director of Europe for sitefinity. Ann is 01:49:39.496 --> 01:49:44.928 - very big because Europe is kind of a lot of their home base for 01:49:44.928 --> 01:49:46.480 - Telerik and progress sitefinity. 01:49:47.240 --> 01:49:50.705 - Anyway, they were really impressed with the demo and 01:49:50.705 --> 01:49:54.940 - looking forward to hopefully ruling us out to some of their 01:49:54.940 --> 01:49:59.945 - clients all over Europe to work with them so you never know what 01:49:59.945 --> 01:50:03.954 - that means. But I wanted to tell you that the work that you guys 01:50:03.954 --> 01:50:07.098 - are doing to get certified or did you get certified and will 01:50:07.098 --> 01:50:10.766 - be to be ramping up will really pan out for the rest of the 01:50:10.766 --> 01:50:14.434 - group. It will give us a lot of good projects to work on, so 01:50:14.434 --> 01:50:16.006 - good job. And then we also. 01:50:16.630 --> 01:50:20.956 - I don't. I think you guys know this, but I was doing some sage 01:50:20.956 --> 01:50:23.737 - certification the last three weeks, literally 120 hours of 01:50:23.737 --> 01:50:27.445 - certification on the last three weeks and that is done and we're 01:50:27.445 --> 01:50:31.153 - getting we're already getting a lot of interest on sage, and so 01:50:31.153 --> 01:50:33.934 - I think some of these certifications that we're doing 01:50:33.934 --> 01:50:38.260 - are really going to pan out for the company and give us a lot 01:50:38.260 --> 01:50:39.805 - more projects to work on. 01:50:40.660 --> 01:50:44.044 - And helps us through some of this pandemic non fun stuff. So 01:50:44.044 --> 01:50:47.992 - I just wanted to let you know that there are a lot of things 01:50:47.992 --> 01:50:51.094 - are going well. The sales team is literally like working around 01:50:51.094 --> 01:50:55.324 - the Clock and I say that with a smile on my face 'cause I'm like 01:50:55.324 --> 01:50:56.734 - well that's good for everyone. 01:50:58.100 --> 01:51:00.990 - But maybe eventually if that keeps happening, we will get 01:51:00.990 --> 01:51:02.435 - them some more help maybe. 01:51:07.310 --> 01:51:07.960 - Awesome. 01:51:14.580 --> 01:51:18.363 - Anyway, that's all that I had. I just wanted you to know some 01:51:18.363 --> 01:51:22.437 - good news and I mentioned in one of the pod stand up some some 01:51:22.437 --> 01:51:25.929 - updates as well. I think on Wednesday an I am planning on 01:51:25.929 --> 01:51:29.421 - shooting out a follow up note on that probably on Sunday night, 01:51:29.421 --> 01:51:32.331 - but everything is, you know, continuing along, and unless you 01:51:32.331 --> 01:51:35.532 - guys have anything else, I hope everyone has a great weekend.