Hi there now it's time to extend our project. 2
It's been a while since we have extended it. 3
The last extension was in the I wrote chapter so there we have extended the project to read the data 4
from X Files. 5
Before that we were reading the data from this class called us data store. 6
And then after we have learned some of the concepts in the Iowa chapter we have changed that in order 7
to read that it Off-Ramp ex-Vice. 8
OK. 9
The data is still stored in data store but the data is loaded from X Files. 10
Since then we have learned about data structures and also genetics. 11
So let's go ahead and put that into use. 12
OK. 13
So it's going to be a very simple extension. 14
So far the only data that we are using was are using single dimensional iron to be arrays. 15
So now we're going to change that. 16
OK. 17
Because our sort of very inflexible. 18
We need to know the size of the Army during the creation time. 19
So that's very inflexible and our eyes are also not auto extendable. 20
We know that. 21
OK. 22
So let's go ahead and change that and the conduction frame update us or just give us a lot of flexibility 23
so we don't have those limitations anymore. 24
The limitations that are is do us so we are going to do that. 25
We are simply going to use the collection framework data structures. 26
Okay so let's go ahead and do that. 27
But before that let's just do a very quick recap of the project. 28
So we know that the project is that application it's a social bookmarking with opposition where users 29
can bookmark their favorite bookmarks and other features and glore to make certain bookmarks as kid 30
friendly but much so that only kids can use them. 31
OK. 32
And that can be done by special type of users called editors and editors on into the future was to also 33
share certain bookmarks with a third party website and that was also another feature. 34
And we implemented certain Jela features when we tried to incorporate that right and center to the application 35
. 36
So we followed the MBC design back then. 37
So the core business logic was we were able to implement it but for the view part we have used a dolphin 38
we call it as good or Java and it's similar to the browser. 39
OK. 40
And then for the data base but be how you use the data store Barra's so that it is stored in data stored 41
on for much of the remaining business logic. 42
What we hope the business logic. 43
So that is already quoted in Java and that is fine. 44
It's just there for the view under the dust or part B how similar occurred using Golan Heights. 45
So later I might add a new chapter at the IGN and then I might cover some of the technologies that we 46
can use for implementing view. 47
And also for implement indeed Austral like the Maya security and also to color some of the JEDEC concepts 48
which can be used to do. 49
He did offer them that he duster from the database. 50
OK but I'm not sure I'll be able to do it. 51
So I would try my best to do that after I'm done with some of the other stuff. 52
Adding some of the other stuff. 53
And the last guess if I can on that. 54
I think you can enroll in other courses that are some other course. 55
Those are very good courses on Java eat and also on my SU fuel. 56
So you can just enroll for those courses. 57
Those are pretty short courses and you can when you are doing those courses you can extend this project 58
in order to implement a viewport on Also that database back. 59
So you can always do that. 60
But I will try my best to provide some kind of a basic introduction to those technologies and probably 61
cover that in this goes much since this is a it's it's a Java course purely gello course. 62
So the core part is definitely taken care of and the project options. 63
It's just the missing pieces. 64
RW and the database Boch which are simulated here using these dolphins but they we try our best to also 65
those the worst case you can actually enroll in other courses and extend this project while you're learning 66
those concepts. 67
So let's go ahead and get started here launched our Djala. 68
I simply think of it as a web server on Nixon built on just application on good or Java is a viewport 69
. 70
It also is that good ideas. 71
So let's go ahead and look at launch nodular. 72
Sophie scroll down. 73
So here is the main method and it isn't working load data on no database to the data. 74
OK. 75
And for that it is using DUDAS store and it isn't working this static function and it is loading users 76
ramblings more recent books. 77
OK. 78
And each of them loads read off from their text file. 79
Ok so this is node users. 80
So let's go ahead and change this. 81
OK. 82
So let's go ahead and make it. 83
Here is a string array. 84
So let's make it so the data is going to be stored in the string array. 85
So let's simply make it a list of strings 86
choose Obama notation on control Chiv. 87
Oh. 88
So it is a list of strings. 89
So this is the parameterised type. 90
We know that now that's going to I want to read. 91
And it's also changed this 92
day. 93
And here we don't need this column anymore because we are not going to use an ID. 94
So does keeping track of the index so let's ecstasy. 95
That's it. 96
And let's go back and the same thing happens here. 97
Oh score no users so users. 98
It's also an ID so we can also change that. 99
So click on doc. 100
So here is users. 101
So that just go ahead and make good on this user. 102
In fact you can make a collection of rules and also because one option is even more generic. 103
But Critchley read like Doc no. 104
Now we don't need any of this so it can be a fixed size. 105
It is also Ahto extendable. 106
So let's go back here we are. 107
So we are watching the data read will read the rest of the file and we need to store the data here. 108
Here we are adding it. 109
OK we are we are getting the data that we are parsing the data and then we are creating an instance 110
of user and we are storing it in this user's ID. 111
OK. 112
Now it's going to be our users and users list. 113
OK. 114
And this is on them but it is just it's keeping track of the index. 115
So let's just go ahead and remove that game because you're not using it. 116
So let's also remove this and let's just call that user user 117
users not add up. 118
So you're done with this matter. 119
So it's harder to users. 120
And we also have these other methods like web links or Lord rubbings Lord movies I'm dumb as a listen 121
just go out and mix similar kind of changes. 122
So let's just take the seam in here and Oppy it here no longer. 123
We have the string arm and that's it. 124
And the same thing goes here. 125
OK. 126
Here we are using mops which is a cootie mention NRD a daisy right highlight the. 127
We are going to restore the gambling's. 128
OK ramblings and this is column number is. 129
He is of keeping track of the column numbers. 130
So it's a truly array. 131
And in the zero Truglio sauteing doublings and in the first row I think we are storing movies on in 132
the second we are storing books. 133
OK. 134
So instead of a 2D area that's used and list off lest we get a list offer list. 135
So let me go back here to bookmarks. 136
So let's change this to the list and this is how another list so that this Nestor's this girl store 137
individually book. 138
So does you do it you be able to store a list which will how only rumblings had the fust position be 139
able to store a list which really how on the movies on a second the list will start on the books. 140
So it just resembles a goody and deore. 141
So let's change this also to our list and we don't need to specify dentata things there. 142
I'm a tradition we'll take get off Goc. 143
Now let's go back and sorry. 144
This needs to be a bookmark or a string. 145
Right. 146
This needs to be a bookmark and this internal list can store iterable or any of the bookmarks. 147
OK. 148
OK. 149
So the so the zero at that moment is a list of bookmark trusted images a list of bookmark on second 150
is also on this stuff bookmark. 151
OK. 152
And each of those of us can store a weblink or they can store a movie or a book. 153
OK so let's go back. 154
Here are the blanks. 155
And 156
so we need to remove this 157
. 158
See this bookmark reduced. 159
OK so that's this little part of the book. 160
Mark resistible how all of the blanks. 161
Now we need to add it to the bookmarks data structure on the grill get hired here. 162
OK. 163
So that's the zero at that moment. 164
Next year you need to do the same here for movies. 165
When it's go down you have to replace once again the ceiling step and actually extremal this 166
Scobie. 167
This 168
needs to be assigned here and this needs to go outside of the front low 169
scoring here 170
. 171
So that's the movies on the same thing for the books also. 172
So here we are remote this 173
. 174
So those are the road methods and we are also returning. 175
There are some guitars for that. 176
So let's also do that change here. 177
So this is going to return this you get bookmarks. 178
So certainly the data structures and this one is going to get users here should get it done this way 179
. 180
So that said and we don't need any of these any more. 181
So that may also remove that game. 182
So this this find this can be taken care of later. 183
So that's the thing. 184
So let me just stop it here. 185
Will this change with the changes that be made in the store. 186
So in the next lesson we will come back and maybe make some changes in the viewed or Djala and probably 187
in launch not July and few other files. 188
OK. 189
Because of the changes that we made we will get some competition out of there. 190
So we are going to fix that. 191
And the next lesson. 192
Okay okay then see you in the next Hessen