1
00:00:00,810 --> 00:00:05,040
Now that we've got some initial set up of our application complete, we can start to think about writing

2
00:00:05,040 --> 00:00:06,480
code for our actual application.

3
00:00:07,170 --> 00:00:12,030
So in this video, I want to focus on the overall project structure we're going to use in general for

4
00:00:12,030 --> 00:00:13,680
all the applications you and I are going to build.

5
00:00:13,830 --> 00:00:16,320
We're going to create a collection of different files.

6
00:00:16,830 --> 00:00:22,620
Every different file is going to contain one single class in each of those classes represents one different

7
00:00:22,620 --> 00:00:24,190
thing inside of our project.

8
00:00:24,960 --> 00:00:29,100
Now, in some cases, I'm going to have you kind of figure out the different schema or the different

9
00:00:29,100 --> 00:00:30,210
classes we're going to create.

10
00:00:30,390 --> 00:00:31,860
But in this case, we're going to do it together.

11
00:00:32,580 --> 00:00:37,140
So when I look at this mock up right here, I really see three different things going on.

12
00:00:37,740 --> 00:00:40,440
I see one type of object for our user.

13
00:00:40,800 --> 00:00:46,530
So I think we should probably create a single file called Class Dot or some user dots that will hold

14
00:00:46,530 --> 00:00:48,180
a user class inside of it.

15
00:00:48,980 --> 00:00:53,670
That user class is going to have some methods and properties associated with it that define exactly

16
00:00:53,670 --> 00:00:55,140
what it means to be a user.

17
00:00:56,570 --> 00:01:01,370
Next up, I see a company thing inside of here as well, so likewise, I think we should create a separate

18
00:01:01,370 --> 00:01:06,920
file to house a company class that will also represent what a company is inside of our application.

19
00:01:07,910 --> 00:01:11,750
And then finally, the last obvious piece that we have here is the map itself.

20
00:01:12,310 --> 00:01:16,850
So I think we should probably create some separate file that's going to hold a class to represent the

21
00:01:16,850 --> 00:01:21,620
map and probably have some methods attached to it to actually get the map to show up on the screen and

22
00:01:21,620 --> 00:01:23,180
render some markers on it.

23
00:01:23,990 --> 00:01:26,660
So in total, I think we've got three separate classes here.

24
00:01:26,660 --> 00:01:33,020
We've got like a map file, a user file and a company file then to actually get all these different

25
00:01:33,020 --> 00:01:34,250
classes to work together.

26
00:01:34,580 --> 00:01:40,640
We will import them into our route indexed dots file, and that's where we're going to actually initialize

27
00:01:40,640 --> 00:01:46,070
our project, create a map, create a user, create a company and have some code to actually show the

28
00:01:46,070 --> 00:01:47,980
user and the company on that map.

29
00:01:49,350 --> 00:01:50,330
So that's the general idea.

30
00:01:51,580 --> 00:01:56,290
So right now, let's get started on our users, it's back inside my code editor.

31
00:01:57,480 --> 00:02:03,330
I'm going to find my SIRC folder, and inside there I'm going to make a new file called User Dotts.

32
00:02:04,320 --> 00:02:09,090
And one thing I want to point out right away, you'll notice that I called the file index starts with

33
00:02:09,090 --> 00:02:13,440
a lowercase I but user I labeled with a capital U.

34
00:02:13,920 --> 00:02:15,300
So what's with the difference there?

35
00:02:15,960 --> 00:02:22,230
Well, by convention, any time we have a file whose primary purpose is to create and export a class,

36
00:02:22,500 --> 00:02:24,870
we're usually going to give it a capital name.

37
00:02:25,230 --> 00:02:30,680
So in this case, capital, you user, because we're going to create and export a class from this file.

38
00:02:31,410 --> 00:02:34,650
However, in index tortillas, we're not going to have any classes.

39
00:02:34,680 --> 00:02:39,540
We're going to have just some code to import some classes and then use those to actually make something

40
00:02:39,540 --> 00:02:39,980
happen.

41
00:02:40,930 --> 00:02:46,120
You're going to most commonly see lower case file names any time you have a file that either serves

42
00:02:46,120 --> 00:02:47,860
as something like the index dots file.

43
00:02:47,880 --> 00:02:54,160
So like kind of the root of your application where a file that exports plain objects, plain functions

44
00:02:54,160 --> 00:02:55,240
or constants.

45
00:02:56,510 --> 00:02:58,700
All right, so now we've got the user doctor's file.

46
00:02:58,880 --> 00:03:03,980
I'm going to get started inside of here by declaring a new class called User Like So.

47
00:03:04,840 --> 00:03:09,160
And that's where we're going to leave it for right now, so let's take a quick pause with just this

48
00:03:09,170 --> 00:03:09,820
inside of here.

49
00:03:10,010 --> 00:03:14,050
By the way, if you see any air inside of this file right now, when we save this, that's totally fine.

50
00:03:14,050 --> 00:03:15,580
We're going to fix it up in just a second.

51
00:03:16,030 --> 00:03:17,350
So let's take a quick pause right here.

52
00:03:17,440 --> 00:03:18,960
And I'll see you in just a minute.

