| Topic | Presenter | Summary | Duration |
| ------------------------------------------- | ------------ | -------------------------------------------------------------------------- | -------- |
| C4: Creating a New Systems Connector Part 1 | Johnathan L. | This video briefly covers how to set up a new systems connector within C4. | 16:20 |00:00:07.780 --> 00:00:11.614 This video will just very briefly go over how00:00:11.614 --> 00:00:15.770 to set up a new systems connector within C4.00:00:15.770 --> 00:00:18.900 So just for some background.00:00:18.900 --> 00:00:21.852 So the structure of C4 has a couple of00:00:21.852 --> 00:00:25.030 these directories that build up props soon.00:00:25.030 --> 00:00:31.330 So at the very top level it will add on some.00:00:31.330 --> 00:00:34.410 Just basic dependencies for Celica.00:00:34.410 --> 00:00:37.315 As well as stock up files to00:00:37.315 --> 00:00:39.670 every project within this folder,00:00:39.670 --> 00:00:41.418 that means every module,00:00:41.418 --> 00:00:44.714 including C4 itself, every plugin.00:00:44.714 --> 00:00:47.690 Everything gets these.00:00:47.690 --> 00:00:50.259 Next up is the modules level directory.00:00:50.260 --> 00:00:52.829 Build that props which just adds on.00:00:52.830 --> 00:00:56.440 It depends CDC for itself.00:00:56.440 --> 00:00:59.050 And then imports the global properties.00:01:01.500 --> 00:01:03.828 I thought that all the way.00:01:03.830 --> 00:01:05.797 The way you would go about screen,00:01:05.800 --> 00:01:07.235 you systems connector and let's00:01:07.235 --> 00:01:09.170 actually go ahead and make one here.00:01:13.480 --> 00:01:16.938 Is you would navigate to the air00:01:16.938 --> 00:01:19.948 directory of endure acronyms in C4?00:01:19.950 --> 00:01:21.740 Will Microsoft be energy local?00:01:24.280 --> 00:01:28.870 Go into modules. Now.00:01:28.870 --> 00:01:30.916 It's for a new system character,00:01:30.920 --> 00:01:32.630 not particularly for a client.00:01:32.630 --> 00:01:35.366 We're going to start off with and DSM.00:01:37.900 --> 00:01:39.531 So you see, right now we already00:01:39.531 --> 00:01:40.680 have connectors for a selfie,00:01:40.680 --> 00:01:41.973 attendees here, etc.00:01:41.973 --> 00:01:44.990 A look they're not in the solution.00:01:44.990 --> 00:01:46.874 So we're going to go ahead00:01:46.874 --> 00:01:48.809 and make just a new one,00:01:48.810 --> 00:01:51.880 let's call it who are.00:01:51.880 --> 00:01:53.108 Active Directory called fewer.00:01:57.490 --> 00:02:00.227 Initialize new get repository inside of this.00:02:00.230 --> 00:02:03.744 So every. Every module in C4,00:02:03.744 --> 00:02:05.007 as previously discussed,00:02:05.010 --> 00:02:09.818 is intended to be his phone get submodule.00:02:09.820 --> 00:02:11.836 That way commit histories are separate.00:02:11.840 --> 00:02:13.835 It's easier to merge 'cause all I00:02:13.835 --> 00:02:16.340 have to do is merge just the commit00:02:16.340 --> 00:02:18.411 version and just sort of enforces00:02:18.411 --> 00:02:20.907 some cleaner breaks between the two.00:02:24.770 --> 00:02:27.630 So next time we're going to want to make a00:02:27.702 --> 00:02:30.766 new class library or two new class libraries.00:02:30.770 --> 00:02:33.356 So every ESM is basically expected,00:02:33.360 --> 00:02:36.054 although very hard requirement to have00:02:36.054 --> 00:02:39.408 both a type project and in DSM project.00:02:41.720 --> 00:02:46.360 Like new class loop just names Foo Bar, ESM.00:02:53.390 --> 00:02:55.720 And same thing for types.00:03:00.180 --> 00:03:03.435 So that type project is what will00:03:03.435 --> 00:03:06.709 contain the actual data transfer types.00:03:06.710 --> 00:03:09.194 Whereas the ESM project will contain00:03:09.194 --> 00:03:12.289 the nodes for that particular system.00:03:14.690 --> 00:03:15.962 So Next up, we're going to00:03:15.962 --> 00:03:17.559 go back up in a little bit.00:03:21.310 --> 00:03:24.136 So inside the client scripts folder.00:03:24.140 --> 00:03:26.018 You'll find one script per client.00:03:26.020 --> 00:03:28.218 Let's just go in here real quick.00:03:31.490 --> 00:03:32.876 So right now you see we00:03:32.876 --> 00:03:34.340 have one for MG already.00:03:34.340 --> 00:03:36.772 So we can go ahead and make a00:03:36.772 --> 00:03:38.600 new client. Let's just call me.00:03:41.820 --> 00:03:43.656 Do you want to edit this?00:03:43.660 --> 00:03:46.006 And you'll see it in here.00:03:46.010 --> 00:03:47.960 We already have some requirements00:03:47.960 --> 00:03:49.130 for different modules,00:03:49.130 --> 00:03:51.788 so this required function is defined00:03:51.788 --> 00:03:54.750 in the build system global script.00:03:54.750 --> 00:03:56.934 But all you really need to know to00:03:56.934 --> 00:03:59.591 use it is that you run it against00:03:59.591 --> 00:04:01.220 a particular path within C4.00:04:01.220 --> 00:04:03.327 If that path is, they get submodule,00:04:03.330 --> 00:04:05.184 clone it down, otherwise in it00:04:05.184 --> 00:04:06.960 or just after cooling it down,00:04:06.960 --> 00:04:09.368 whether it actually need to clone or not,00:04:09.370 --> 00:04:12.114 it will add that to a completely00:04:12.114 --> 00:04:13.760 brand new solution file.00:04:13.760 --> 00:04:15.960 And they built some globals.00:04:15.960 --> 00:04:18.160 Also adds like the standard00:04:18.160 --> 00:04:19.920 projects like C4 itself,00:04:19.920 --> 00:04:23.660 the clients their client projects.00:04:23.660 --> 00:04:25.249 If you are you told these etc.00:04:28.500 --> 00:04:30.480 So here, let's go ahead and00:04:30.480 --> 00:04:31.470 remove everything else.00:04:31.470 --> 00:04:33.940 You'll probably want to keep00:04:33.940 --> 00:04:37.698 general utilities. And add in. Bar.00:04:43.020 --> 00:04:47.620 So now we can go into File Explorer. Shut up.00:05:00.200 --> 00:05:02.510 And I can run this new script.00:05:07.250 --> 00:05:10.748 Is he creating your social file?00:05:10.750 --> 00:05:13.708 And just give a second here.00:05:13.710 --> 00:05:15.630 Hello, the standard projects.00:05:18.460 --> 00:05:19.750 Now it was unable to clone00:05:19.750 --> 00:05:20.773 for that though, so.00:05:20.773 --> 00:05:22.638 It just moved straight onto00:05:22.638 --> 00:05:25.179 adding both of our CSS projects.00:05:25.180 --> 00:05:28.020 And it added general utilities.00:05:28.020 --> 00:05:30.846 It's press enter to get back out of that.00:05:30.850 --> 00:05:32.260 Now that also modified the sushi,00:05:32.260 --> 00:05:33.640 I already am, so we're just00:05:33.640 --> 00:05:34.850 going to reload this book.00:05:44.610 --> 00:05:46.250 So if you look over here at modules00:05:46.250 --> 00:05:47.687 will see that the only modules00:05:47.687 --> 00:05:49.145 clearly in here are for foobar00:05:49.193 --> 00:05:50.957 because we didn't require any other00:05:50.957 --> 00:05:52.390 modules for this particular client.00:05:55.390 --> 00:05:56.470 Next up, let's just go ahead00:05:56.470 --> 00:05:57.430 and make a quick type.00:06:00.090 --> 00:06:01.838 Now First off the.00:06:01.838 --> 00:06:04.023 Namespace and Snap style is00:06:04.023 --> 00:06:06.109 always C4 without nodules.00:06:06.110 --> 00:06:09.310 That's just the name of that remote system.00:06:09.310 --> 00:06:13.440 In this case, C4 modules Foo bar.00:06:13.440 --> 00:06:14.740 So first thing we're actually00:06:14.740 --> 00:06:16.987 going to do is make sure that we00:06:16.987 --> 00:06:18.477 have the correct ballot version.00:06:18.480 --> 00:06:20.700 Now currently it's expected that00:06:20.700 --> 00:06:23.570 it will always be done at 5.0.00:06:23.570 --> 00:06:26.978 And this will change once six years out.00:06:26.980 --> 00:06:29.638 But typically we want to be00:06:29.638 --> 00:06:32.234 sticking with the most recently00:06:32.234 --> 00:06:34.427 released version of.net.00:06:37.140 --> 00:06:39.484 We can remove the noble enable for now00:06:39.484 --> 00:06:42.030 because that is, as you saw earlier,00:06:42.030 --> 00:06:44.180 actually added by that global00:06:44.180 --> 00:06:46.366 directory in that build up props.00:06:46.370 --> 00:06:49.025 Another thing we want to do is set the.00:06:52.450 --> 00:06:54.955 Set the right main space00:06:54.955 --> 00:06:57.190 to support modules. After00:07:00.640 --> 00:07:02.350 I'm just going to copy this00:07:02.350 --> 00:07:03.870 guy Andrew PSM as well.00:07:12.610 --> 00:07:15.480 So that we have the projects of00:07:15.480 --> 00:07:17.949 Alloway also wanna go ahead and00:07:17.949 --> 00:07:20.644 do things around at a file header?00:07:20.650 --> 00:07:23.586 Now, no, in C4 I don't use Resharper.00:07:23.590 --> 00:07:25.963 However, Stylecop will give you all of00:07:25.963 --> 00:07:28.378 these things just through the analyzers.00:07:28.380 --> 00:07:30.746 So you want to make sure that00:07:30.746 --> 00:07:32.789 you're trying to follow those,00:07:32.790 --> 00:07:35.342 but these most of the time I'm not00:07:35.342 --> 00:07:37.580 so strict on stallcup warnings,00:07:37.580 --> 00:07:40.149 but they released a good general follow.00:07:42.430 --> 00:07:45.854 This will make your first day of class.00:07:45.860 --> 00:07:47.870 Let's call it's getting full.00:07:54.290 --> 00:07:56.858 Just don't give it a name.00:08:00.080 --> 00:08:00.710 Hoppiness00:08:05.060 --> 00:08:05.868 let's just say nothing.00:08:08.480 --> 00:08:12.886 So now. We want some way to actually00:08:12.886 --> 00:08:15.130 get these new kitten descriptions.00:08:15.130 --> 00:08:17.040 Let's go back over here.00:08:17.040 --> 00:08:20.346 Let's just make him new node.00:08:20.350 --> 00:08:23.675 Also confused. Properly set up a file.00:08:30.050 --> 00:08:33.160 This is going to call this. It'll be free.00:08:35.490 --> 00:08:42.306 Now, one thing notes with C4 is that.00:08:42.310 --> 00:08:44.746 First off, it will automatically add credit00:08:44.746 --> 00:08:46.967 points or anything that marks a record.00:08:49.420 --> 00:08:52.996 The other thing is that if you annotate00:08:52.996 --> 00:08:56.497 a script with the script attributes.00:08:56.500 --> 00:08:58.660 And give it a different name.00:08:58.660 --> 00:09:00.128 You can actually override00:09:00.128 --> 00:09:01.596 which template it's for,00:09:01.600 --> 00:09:04.085 so let's say for example we want00:09:04.085 --> 00:09:06.389 this thing to be called Dave.00:09:06.390 --> 00:09:10.220 He bought picker. Oh info.00:09:13.000 --> 00:09:14.696 No, within the UI.00:09:14.696 --> 00:09:17.640 This is how you refer to it.00:09:17.640 --> 00:09:18.780 And it will actually00:09:18.780 --> 00:09:20.205 properly parse this all out.00:09:23.540 --> 00:09:25.815 So let's just go and add it.00:09:25.820 --> 00:09:28.304 Our inheritance, we want to typically00:09:28.304 --> 00:09:30.370 inherit from just common mode.00:09:30.370 --> 00:09:32.281 That gives us a bunch of reflection00:09:32.281 --> 00:09:33.570 utilities just by default.00:09:35.940 --> 00:09:37.008 And then we just want to00:09:37.008 --> 00:09:37.910 implement. I know as well.00:09:40.290 --> 00:09:44.100 So let's go ahead and. Maybe parameter.00:09:46.190 --> 00:09:47.190 Ormax list.00:09:50.280 --> 00:09:51.790 Note that every parameter has00:09:51.790 --> 00:09:53.906 to be a string. You can parse00:09:53.906 --> 00:09:55.718 it out as something else later,00:09:55.720 --> 00:09:58.128 but it has to start as a string.00:09:58.130 --> 00:09:59.036 This restriction will00:09:59.036 --> 00:10:00.546 hopefully be relaxed in future.00:10:03.390 --> 00:10:05.638 Now we can add our own gear boots.00:10:18.460 --> 00:10:19.948 So we don't have to manually00:10:19.948 --> 00:10:20.940 install parts of them.00:10:28.470 --> 00:10:31.126 Now let's just go and make our outlook.00:10:36.060 --> 00:10:39.516 So this is just going to return one info.00:10:46.140 --> 00:10:47.897 And make sure we have our dependencies.00:10:50.280 --> 00:10:53.766 Who turned one kid info per pump.00:10:53.770 --> 00:10:55.756 So note that for the airport00:10:55.756 --> 00:10:57.925 you do not use an ienumerable00:10:57.925 --> 00:11:00.613 or an IE signal graph the bat.00:11:00.620 --> 00:11:03.872 You return each iteration of what00:11:03.872 --> 00:11:07.940 you want to be returning. It's Scott.00:11:10.180 --> 00:11:11.068 And pull out.00:11:14.260 --> 00:11:15.820 So now on every pump.00:11:22.190 --> 00:11:23.222 We would do whatever00:11:23.222 --> 00:11:24.512 logic is required to get.00:11:24.520 --> 00:11:26.326 That's new info from the root system.00:11:26.330 --> 00:11:28.472 In our case, we're just going to00:11:28.472 --> 00:11:30.189 do something real simple here.00:11:30.190 --> 00:11:33.620 Are we actually going to leverage the?00:11:33.620 --> 00:11:34.508 On pipeline, Sir.00:11:36.630 --> 00:11:37.998 Have some internal stuff.00:11:57.120 --> 00:11:59.649 So one thing to note is that a pipeline00:11:59.649 --> 00:12:02.189 could very well be reused multiple times.00:12:02.190 --> 00:12:04.409 So even though you can default things00:12:04.409 --> 00:12:06.274 up here, they won't necessarily always00:12:06.274 --> 00:12:08.530 be the same when the pipeline starts,00:12:08.530 --> 00:12:11.922 so you'll usually want to try to reassign00:12:11.922 --> 00:12:15.288 to them again and on pipeline start.00:12:15.290 --> 00:12:18.608 Or on my plan for that matter.00:12:18.610 --> 00:12:21.190 Nonsense, go ahead and let's.00:12:21.190 --> 00:12:25.568 The car came in faults. This new one.00:12:50.770 --> 00:12:53.338 So that was creating both our data class00:12:53.338 --> 00:12:55.496 for this remote system and creating00:12:55.496 --> 00:12:58.292 just a basic picker node for a more00:12:58.292 --> 00:13:00.548 in depth version of how to work with00:13:00.550 --> 00:13:02.825 async and such on the picker node,00:13:02.830 --> 00:13:05.248 there's another video dedicated to that00:13:05.248 --> 00:13:08.330 this video is just supposed to go over.00:13:08.330 --> 00:13:10.250 How to make a system overall?00:13:12.470 --> 00:13:14.702 So now the next thing we're going to do.00:13:14.710 --> 00:13:18.504 Is pop up in a crown props?00:13:18.510 --> 00:13:20.214 I would recommend usually going through00:13:20.214 --> 00:13:21.809 WL or something similar for this.00:13:27.100 --> 00:13:29.476 Well, you could also you see00:13:29.476 --> 00:13:31.990 me with a link function.00:13:31.990 --> 00:13:33.166 Then you're going to go into00:13:33.166 --> 00:13:33.754 these scripts directory.00:13:41.420 --> 00:13:43.840 Excuse me please directory00:13:43.840 --> 00:13:46.260 and then under types.00:13:46.260 --> 00:13:48.900 You want to add a new symbolic link.00:13:48.900 --> 00:13:53.600 2B modules. Yes Sam. Bar.00:13:56.980 --> 00:14:00.499 Second bar types.00:14:03.800 --> 00:14:07.604 Now just whichever folder contains the00:14:07.604 --> 00:14:12.398 actual DLL named Foo Bar types that deal.00:14:12.400 --> 00:14:15.420 And you just want to have to be the same00:14:15.500 --> 00:14:18.596 name as that's the L minus the extension.00:14:18.600 --> 00:14:20.460 So we're just going through the00:14:20.460 --> 00:14:22.949 same thing. For the example.00:14:25.110 --> 00:14:26.950 So ES M live under the script folder.00:14:37.200 --> 00:14:40.020 Shut power. Smoke.00:14:42.900 --> 00:14:44.076 Obviously we haven't built it yet,00:14:44.080 --> 00:14:46.448 so it's all there.00:14:46.450 --> 00:14:48.956 So that is how you actually register00:14:48.956 --> 00:14:51.868 it to be brought in on startup.00:14:51.870 --> 00:14:53.634 There will always be this plugins folder.00:14:53.640 --> 00:14:55.158 It will always have two subfolders,00:14:55.160 --> 00:14:56.294 scripts and types.00:14:56.294 --> 00:14:59.438 Types will be loaded first and it will00:14:59.438 --> 00:15:02.364 contain all things for the type resolver.00:15:02.370 --> 00:15:03.486 So for example,00:15:03.486 --> 00:15:05.718 we can go over to the.00:15:05.720 --> 00:15:07.760 Foo bar types.00:15:07.760 --> 00:15:09.620 Let's build things first.00:15:13.930 --> 00:15:16.314 And just once more, it smells in here.00:15:16.320 --> 00:15:18.830 We never actually reference before.00:15:18.830 --> 00:15:20.305 Because it is being referenced00:15:20.305 --> 00:15:22.200 at the module level by another00:15:22.200 --> 00:15:24.010 directory that builds up props.00:15:24.010 --> 00:15:26.290 Although that file is not currently00:15:26.290 --> 00:15:28.590 visible from here because it wasn't00:15:28.590 --> 00:15:30.738 manually added back to the solution.00:15:30.740 --> 00:15:32.483 Just know that it's there and it's00:15:32.483 --> 00:15:33.630 already adding things for you.00:15:38.470 --> 00:15:40.736 So now we're looking here. We'll see.00:15:40.736 --> 00:15:42.028 That's inside foobar types,00:15:42.030 --> 00:15:43.980 there's a Foo bar type SL.00:15:43.980 --> 00:15:45.888 This is what will get directly00:15:45.888 --> 00:15:47.544 loaded and then subsequently C4
00:15:47.544 --> 00:15:49.164 will look inside this folder00:15:49.164 --> 00:15:50.460 for any dependencies needed.00:15:50.460 --> 00:15:51.748 After loading at DLL.00:15:58.890 --> 00:16:01.055 At this point you basically00:16:01.055 --> 00:16:03.220 have a fully functional voice.00:16:03.220 --> 00:16:04.375 Optional systems connector.00:16:04.375 --> 00:16:06.685 Obviously this is a whole lot00:16:06.685 --> 00:16:08.667 more logic that would go into00:16:08.667 --> 00:16:10.690 how you work with remote system,00:16:10.690 --> 00:16:12.937 but that it is heavily system dependent.00:16:12.940 --> 00:16:15.130 For example, one system might be00:16:15.130 --> 00:16:17.384 usually arrested or face one might00:16:17.384 --> 00:16:19.550 be using WCF and require satellite.00:16:19.550 --> 00:16:20.693 And so on.