java-development-for-beginners-learnit / 32 - Java Platform Module System Modules in Java & Migration of Java Apps /002 Migration of Java Apps Example of migration to a modular application_en.srt
Tan115's picture
Add files using upload-large-folder tool
07c2d26 verified
Raw
History Blame Contribute Delete
38.4 kB
1
00:00:06,000 --> 00:00:11,000
Hello, distance in Prius lesson, we have learned what modules are in decay?
2
00:00:11,000 --> 00:00:14,000
We also created our first modular application.
3
00:00:14,000 --> 00:00:21,000
In case you skipped the previous lesson, please make sure you watched it because in this lesson, we'll
4
00:00:21,000 --> 00:00:23,000
keep talking about modules.
5
00:00:24,000 --> 00:00:28,000
But this time will not create our module application from scratch.
6
00:00:28,000 --> 00:00:35,000
But instead, we'll focus our attention on the questions of migration of Nano Modular Java application
7
00:00:35,000 --> 00:00:37,000
to modular Java application.
8
00:00:37,000 --> 00:00:44,000
Also, this lesson will be interesting for architects who are in charge of Java migration and responsible
9
00:00:44,000 --> 00:00:47,000
for making decisions and planning next migration steps.
10
00:00:48,000 --> 00:00:53,000
You need to be aware about issues and solutions that we are going to discuss in this lesson.
11
00:00:54,000 --> 00:01:00,000
This is a super important topic, especially if your organization made a decision to migrate from Java
12
00:01:00,000 --> 00:01:07,000
eight to NAS, a long term support version like Java Plans that includes support of modules.
13
00:01:07,000 --> 00:01:14,000
And also, this is super important in case you decide to pass Oracle Java certifications, because some
14
00:01:14,000 --> 00:01:22,000
of the Oracle certifications include questions about migration to modular application, including top
15
00:01:22,000 --> 00:01:29,000
down and bottom up migration, and Split Ajala Agile Associates application into modules for migration.
16
00:01:30,000 --> 00:01:36,000
We'll start our lesson from learning and understanding of general algorithm for migration of our court
17
00:01:36,000 --> 00:01:41,000
to the new environment, including migration to the new version of Dedicate.
18
00:01:41,000 --> 00:01:47,000
Special focus today will be the migration of application to modular architecture.
19
00:01:47,000 --> 00:01:54,000
I will explain in one Java Class Dependency Analyzer tool is and what Java deprecated API is.
20
00:01:54,000 --> 00:01:57,000
Current tool is also we're going to learn today.
21
00:01:57,000 --> 00:02:04,000
Different migration strategies will review Bottom-Up and top-down migration strategies that start our
22
00:02:04,000 --> 00:02:05,000
lesson.
23
00:02:06,000 --> 00:02:13,000
And before I start diving in details, let's come up with steps and migration algorithm first, the
24
00:02:13,000 --> 00:02:15,000
step number zero and super important one.
25
00:02:16,000 --> 00:02:21,000
If you great internet, not sure that you would find this advice anywhere, but exactly as you said,
26
00:02:21,000 --> 00:02:23,000
was help make them a great deal.
27
00:02:23,000 --> 00:02:29,000
Worse software products two different versions and environments before any movements were scored that
28
00:02:29,000 --> 00:02:36,000
potentially may impact the way our program works, no matter whether this is refactoring or migrating
29
00:02:36,000 --> 00:02:41,000
and in what may impact or change code and the way how it is executed.
30
00:02:42,000 --> 00:02:45,000
Make sure that you have for libel suit of tests on different levels.
31
00:02:46,000 --> 00:02:51,000
The general recommendation here would be to automate as much as possible.
32
00:02:51,000 --> 00:02:57,000
Some of my clients say to me that this automation is a huge investments and they have dedicated manual
33
00:02:57,000 --> 00:03:04,000
regression time and cost wise, easy to understand the point you were talking about short periods of
34
00:03:04,000 --> 00:03:07,000
time and a not complex project.
35
00:03:07,000 --> 00:03:11,000
But I also saw projects where regression takes months.
36
00:03:11,000 --> 00:03:13,000
Nowadays, probably it is crazy.
37
00:03:13,000 --> 00:03:19,000
Amount of times it will add this software product to survive in the current environment, where your
38
00:03:19,000 --> 00:03:26,000
competitors are releasing new features each week or two weeks and your product only has regression for
39
00:03:26,000 --> 00:03:26,000
one months.
40
00:03:27,000 --> 00:03:27,000
Definitely.
41
00:03:27,000 --> 00:03:30,000
Is there a different areas and domains?
42
00:03:30,000 --> 00:03:31,000
Some of them more competitive?
43
00:03:32,000 --> 00:03:33,000
Some of them less.
44
00:03:33,000 --> 00:03:35,000
But I am sure you understood my point.
45
00:03:36,000 --> 00:03:42,000
So when my clients send me about not having enough resources on the creation of automation test and
46
00:03:42,000 --> 00:03:48,000
framework that includes small tests, use regression tests, etc., I'm asking a simple question.
47
00:03:49,000 --> 00:03:55,000
I am sure that in this case, you have enough resources and needs to halt any migrations.
48
00:03:56,000 --> 00:04:02,000
Probably it is better to put resources into product development, marketing to the market, find investments
49
00:04:02,000 --> 00:04:09,000
and come to the point where we have enough resources to scale and grow because otherwise we are not
50
00:04:09,000 --> 00:04:12,000
doing any migration just to do migration.
51
00:04:12,000 --> 00:04:20,000
We need to identify purposes of the migration and be sure that our migration brings some value and it
52
00:04:20,000 --> 00:04:21,000
is needed.
53
00:04:21,000 --> 00:04:27,000
And if it is needed, we're happy to accept all imports and provide everything what is necessary to
54
00:04:27,000 --> 00:04:28,000
make this happen.
55
00:04:29,000 --> 00:04:31,000
Here's where the first principle comes from.
56
00:04:32,000 --> 00:04:39,000
We need to identify goals of our migration and measures to stay specific and objective.
57
00:04:39,000 --> 00:04:46,000
What we are trying to achieve by performance, better security, better code design in order to be able
58
00:04:46,000 --> 00:04:48,000
to scale application faster.
59
00:04:49,000 --> 00:04:53,000
This is super important and once goal is defined.
60
00:04:53,000 --> 00:04:56,000
Make measurements of the current system.
61
00:04:56,000 --> 00:04:58,000
You need to have something and other.
62
00:04:58,000 --> 00:05:00,000
You can say communication has been successful.
63
00:05:00,000 --> 00:05:06,000
Often, migration trends are the goals were achieved because at the end of the day, we never the a
64
00:05:06,000 --> 00:05:09,000
factor on migration just for fun.
65
00:05:09,000 --> 00:05:12,000
We do it to get advantage of measurable benefits.
66
00:05:13,000 --> 00:05:14,000
Never forget about this.
67
00:05:15,000 --> 00:05:21,000
Let's agree it's within the scope of this particular demo will hold migration to another long term support
68
00:05:21,000 --> 00:05:28,000
Java release in order to achieve better structure in order to simplify introducing of new features,
69
00:05:29,000 --> 00:05:35,000
improving court architecture to make each release predictable and reduce impact of introducing new changes
70
00:05:35,000 --> 00:05:37,000
on already released codes.
71
00:05:38,000 --> 00:05:39,000
Improved security.
72
00:05:39,000 --> 00:05:46,000
We are achieving better encapsulation of components, greater platform integrity, improved performance.
73
00:05:47,000 --> 00:05:52,000
These are goals of Java platform Model S system and in case you missed the previous lesson.
74
00:05:52,000 --> 00:06:00,000
Please watch it because we discussed goals and benefits of modules in detail in previous lesson, and
75
00:06:00,000 --> 00:06:03,000
we agreed to migrate our app to the modular architecture.
76
00:06:04,000 --> 00:06:06,000
Let's review the following steps for this.
77
00:06:07,000 --> 00:06:14,000
The next thing that we need to do is to download the updated JDK version Java Platform Modular System
78
00:06:14,000 --> 00:06:17,000
finally was introduced in Java version nine.
79
00:06:18,000 --> 00:06:25,000
But as we discussed in the first lesson about JDK, I would recommend you to use long term support Java
80
00:06:25,000 --> 00:06:25,000
versions.
81
00:06:26,000 --> 00:06:28,000
Nowadays, we have two long term support versions.
82
00:06:29,000 --> 00:06:35,000
They are eight and 11 considering that we want to migrate our app to have modular application.
83
00:06:36,000 --> 00:06:39,000
Most likely, we would opt for Java version 11.
84
00:06:39,000 --> 00:06:43,000
But you also can opt for Java version nine if you wish.
85
00:06:44,000 --> 00:06:46,000
Wrong application was near adjudicate.
86
00:06:46,000 --> 00:06:48,000
This is also important step.
87
00:06:48,000 --> 00:06:54,000
Java ensures backwards compatibility, but still, there might be some changes.
88
00:06:55,000 --> 00:07:02,000
For example, if you used some options for garbage collector, pay attention that, for example, indicate,
89
00:07:02,000 --> 00:07:04,000
well, some of them removed.
90
00:07:05,000 --> 00:07:11,000
That's why, even despite Java guarantees backwards compatibility, it is never redundant to compile
91
00:07:12,000 --> 00:07:14,000
and run your app with new adjudication.
92
00:07:15,000 --> 00:07:20,000
Also, this might be important to ensure compatibility was a by your libraries.
93
00:07:20,000 --> 00:07:26,000
So the main goal is to run your app on the use adjudicate mission and to deal with this task.
94
00:07:26,000 --> 00:07:32,000
You need to be aware about new features in Japanese that you want to use for immigration.
95
00:07:32,000 --> 00:07:35,000
This can be easily found on the official websites.
96
00:07:36,000 --> 00:07:40,000
The first step would be to update third party dependencies if needed.
97
00:07:40,000 --> 00:07:47,000
So we need to make sure that your app was all external dependencies may be compiled, built and started
98
00:07:47,000 --> 00:07:51,000
successfully Ranji DApps against your project.
99
00:07:52,000 --> 00:07:53,000
Enthusiasm for familiar with J.
100
00:07:53,000 --> 00:07:55,000
DApps and don't know what it is.
101
00:07:56,000 --> 00:07:57,000
Let me quickly explain.
102
00:07:58,000 --> 00:08:05,000
Basically, this is a tool that is present in JDK to identify dependencies between classes, modules,
103
00:08:05,000 --> 00:08:07,000
packages in your app.
104
00:08:07,000 --> 00:08:12,000
It is a common line to runs a Java Class Dependency Analyzer tool.
105
00:08:13,000 --> 00:08:20,000
It processes Java bytecode, meaning the class files all the jars that contains them and analyzes the
106
00:08:20,000 --> 00:08:23,000
statically declared dependencies between the classes.
107
00:08:23,000 --> 00:08:30,000
The results can be filtered in various ways and can be aggregated to package or jar level.
108
00:08:31,000 --> 00:08:34,000
Knapp's is also fully aware of the module system.
109
00:08:34,000 --> 00:08:41,000
This is super important and useful for you to understand before you plan and immigration, and before
110
00:08:41,000 --> 00:08:47,000
you make any final decision about your modules and packages structured a little bit later.
111
00:08:47,000 --> 00:08:54,000
In this lesson, I am going to show you how to work with Jade DApps program Ramji that are scrum against
112
00:08:54,000 --> 00:08:55,000
your project.
113
00:08:55,000 --> 00:08:59,000
If you're not familiar with this, though, let me quickly explain what it is.
114
00:09:00,000 --> 00:09:07,000
This tool is a static analysis tools its concept jar file or some other aggregation of class files for
115
00:09:07,000 --> 00:09:10,000
usages of deprecated API elements.
116
00:09:10,000 --> 00:09:18,000
When you upgrade to the new version, you might be interested in this information to to update your
117
00:09:18,000 --> 00:09:19,000
code accordingly.
118
00:09:19,000 --> 00:09:26,000
Do not accumulate dependencies on deprecated classes and masses a little bit later today on the real
119
00:09:26,000 --> 00:09:30,000
example, I'm going to show you how to apply this to now.
120
00:09:30,000 --> 00:09:36,000
After all these steps, we're safe to proceed with the next steps on this stage.
121
00:09:36,000 --> 00:09:43,000
Having all necessary input information, we are ready to make a decision and plan the duration we need
122
00:09:43,000 --> 00:09:45,000
to select the migration strategy.
123
00:09:45,000 --> 00:09:47,000
Today, we'll discuss a few of them.
124
00:09:48,000 --> 00:09:53,000
Once you select migration strategy and plan migration steps, we're going to proceed with migration
125
00:09:53,000 --> 00:09:54,000
execution.
126
00:09:55,000 --> 00:10:02,000
Usually, Oracle and community release migration guides for each new version that contains important
127
00:10:02,000 --> 00:10:06,000
information that you need to consider during the migration of your app.
128
00:10:06,000 --> 00:10:10,000
One of such goods, I will leave in attachments to the lesson.
129
00:10:10,000 --> 00:10:17,000
But you can easily find similar guides for other versions, and each migration should be followed by
130
00:10:17,000 --> 00:10:18,000
regression testing.
131
00:10:18,000 --> 00:10:25,000
We already discussed that even before starting doing steps like this, we need to make sure that we
132
00:10:25,000 --> 00:10:32,000
have reliable sort of tests that will allow us to confirm that at least nothing is broken and migration
133
00:10:32,000 --> 00:10:33,000
goals are achieved.
134
00:10:34,000 --> 00:10:39,000
After that, we are ready to proceed with a step where you can apply measurements that you did before
135
00:10:39,000 --> 00:10:42,000
migration to verify region of migration goals.
136
00:10:43,000 --> 00:10:49,000
For example, if the goal was to improve performance, measure performance of your app after migration
137
00:10:49,000 --> 00:10:52,000
and if performance become even worse.
138
00:10:52,000 --> 00:10:55,000
The question is was immigration was successful?
139
00:10:55,000 --> 00:10:57,000
I don't think so.
140
00:10:57,000 --> 00:11:02,000
That means is that some steps still need to be done and planned.
141
00:11:02,000 --> 00:11:08,000
This migration should be adjusted to include additional steps to reach the goal of migration.
142
00:11:08,000 --> 00:11:09,000
Does it make sense?
143
00:11:10,000 --> 00:11:14,000
So now, like the reviews it, I'll Google one more time.
144
00:11:15,000 --> 00:11:16,000
Press pause if needed.
145
00:11:17,000 --> 00:11:24,000
And once you are sure about each step and the sequence of actions we are glad to proceed is a step number
146
00:11:24,000 --> 00:11:25,000
zero.
147
00:11:25,000 --> 00:11:26,000
I have separate course for that.
148
00:11:27,000 --> 00:11:30,000
You can check my course got and test during development.
149
00:11:30,000 --> 00:11:33,000
I elaborated a lot on this topic.
150
00:11:33,000 --> 00:11:36,000
Step number one is up to you and your organization.
151
00:11:37,000 --> 00:11:42,000
You should identify goals of migration internally, and I wouldn't be able to help you with that.
152
00:11:43,000 --> 00:11:45,000
Do not forget to perform any measurements.
153
00:11:45,000 --> 00:11:51,000
How long was a goal to compare these before immigration and after migration?
154
00:11:52,000 --> 00:11:57,000
Regarding the loading of the latest duplicate version, I believe if you already watching this lesson,
155
00:11:58,000 --> 00:12:03,000
you are smart and mature enough to download Oracle JDK or open JDK.
156
00:12:04,000 --> 00:12:07,000
After that, you need to run your project with new JDK.
157
00:12:07,000 --> 00:12:13,000
I'm sure you will be able to those that want the same as updates and third party dependencies too,
158
00:12:14,000 --> 00:12:18,000
and with the next step, probably let me help you with that one.
159
00:12:19,000 --> 00:12:26,000
Let me explain to you more about the app's program, how to use it and show this on live demo.
160
00:12:27,000 --> 00:12:33,000
So as we have discussed, GDP is a Java dependency analysis tool, probably the first questions that
161
00:12:33,000 --> 00:12:39,000
students ask me is where they can get the depth and the words they should download.
162
00:12:39,000 --> 00:12:45,000
I want to say that you don't need to worry about that if you have dedicated, download it on your PC.
163
00:12:46,000 --> 00:12:47,000
This program is already is.
164
00:12:47,000 --> 00:12:55,000
They're waiting for you in bin folder since Java version eight will work with this tool directly from
165
00:12:55,000 --> 00:12:56,000
Command Prompt.
166
00:12:57,000 --> 00:13:03,000
So make sure that you JDK pass configure it properly and that Jane Daps Version Command returns your
167
00:13:04,000 --> 00:13:05,000
result in command line.
168
00:13:06,000 --> 00:13:11,000
Let me show you a quick them in order you could understand how to work with this still.
169
00:13:12,000 --> 00:13:15,000
This told me on the last group of classes.
170
00:13:15,000 --> 00:13:21,000
Let me show you two examples now in the first example, I will show you how to analyze old fashioned
171
00:13:21,000 --> 00:13:25,000
clean Java project as a simple project we are going to use.
172
00:13:25,000 --> 00:13:32,000
My Java project was examples, the ones that are used to demonstrate different topics to students of
173
00:13:32,000 --> 00:13:32,000
mine.
174
00:13:33,000 --> 00:13:40,000
And then the second example will analyze more single modular project that doesn't have too much dependencies
175
00:13:40,000 --> 00:13:44,000
between different packages and modules in case you have a general project.
176
00:13:44,000 --> 00:13:51,000
The first thing that you need to do is to aggregate all components resources in one folder miserably
177
00:13:51,000 --> 00:14:01,000
Jr. Archive in separate lessons were learned such build tools and maven granule, et cetera, that those
178
00:14:01,000 --> 00:14:08,000
in charge of building your project, creating some deployable pieces like jars or walls, and now a
179
00:14:08,000 --> 00:14:14,000
specific case would need to generate just by our cells in the clips.
180
00:14:14,000 --> 00:14:21,000
I can easily do this by mouse, right click on the project, find them experts option and select the
181
00:14:21,000 --> 00:14:21,000
jar.
182
00:14:21,000 --> 00:14:23,000
File some options here.
183
00:14:23,000 --> 00:14:32,000
Now we need to specify jar pots and place where archive will be located and generated zen numerous of
184
00:14:32,000 --> 00:14:32,000
other options.
185
00:14:33,000 --> 00:14:37,000
Majority of them are so describing I want a stop on those.
186
00:14:37,000 --> 00:14:44,000
But even in case you have some questions, let me know in comments below this video and I will be happy
187
00:14:44,000 --> 00:14:44,000
to answer.
188
00:14:45,000 --> 00:14:47,000
Now one, we have jar file.
189
00:14:47,000 --> 00:14:49,000
We are ready to analyze it.
190
00:14:49,000 --> 00:14:56,000
I open it bush terminal in this folder and now executes my script in this directory.
191
00:14:57,000 --> 00:15:02,000
Commands that I'm going to execute is stored in a common dirt file.
192
00:15:03,000 --> 00:15:08,000
I store the script on the Zagat index so that you could investigate it later.
193
00:15:08,000 --> 00:15:12,000
Let me open this script and I will explain what is the reason here.
194
00:15:13,000 --> 00:15:16,000
This is actually to invoke Java dependency analysis.
195
00:15:17,000 --> 00:15:25,000
That output is a command line option to specify a destination directory for the file output, not file
196
00:15:25,000 --> 00:15:32,000
content is simple tags that can be copied and pasted into the online editor, for example, or other
197
00:15:32,000 --> 00:15:39,000
editors to generate graphs that visualizes dependencies will generate one in the middle.
198
00:15:40,000 --> 00:15:44,000
You can see that they use Dot after dot output option.
199
00:15:44,000 --> 00:15:51,000
If you are familiar with this character, then you already know that Daughtery first is a current directory.
200
00:15:52,000 --> 00:15:59,000
So this means is a dirt file will be generated in the current directory, whereas this command will
201
00:15:59,000 --> 00:16:00,000
be executed.
202
00:16:01,000 --> 00:16:03,000
The next option is recursive.
203
00:16:03,000 --> 00:16:11,000
This option recursive the traverses or runtime dependencies plus force option specifies directory was
204
00:16:11,000 --> 00:16:19,000
ClassPass, including external dependencies in our particular cases, with few external dependencies
205
00:16:19,000 --> 00:16:20,000
on different lessons.
206
00:16:20,000 --> 00:16:24,000
And I don't know that these jurors into my downloads folder.
207
00:16:25,000 --> 00:16:32,000
That's why I also included those here, and the last program argument is just to analyze.
208
00:16:33,000 --> 00:16:35,000
Basically, that is the ones that we built.
209
00:16:36,000 --> 00:16:42,000
It contains all classes from all packages of my training project that's executed the script.
210
00:16:43,000 --> 00:16:48,000
I wrote the name of the script to console and press enter.
211
00:16:49,000 --> 00:16:56,000
It takes some time to analyze dependencies, but finally, not file is generated in the current directory.
212
00:16:57,000 --> 00:17:02,000
Let's open it, and you can see that the content of this file is just text.
213
00:17:03,000 --> 00:17:05,000
It contains some specific structure.
214
00:17:06,000 --> 00:17:13,000
You can see dependency of each package on another package, probably when you have session load of packages.
215
00:17:14,000 --> 00:17:21,000
It is even better to use this text representation to analyze this data and think about structuring new
216
00:17:21,000 --> 00:17:21,000
modules.
217
00:17:22,000 --> 00:17:27,000
But still, if you want to visualize it, let's use special tools for that.
218
00:17:27,000 --> 00:17:31,000
We can find online tools to visualize our dependencies.
219
00:17:32,000 --> 00:17:36,000
For example, we can use just one of those I'm talking about.
220
00:17:36,000 --> 00:17:45,000
Map Graph is just Scorpion's based content of the file based here and press generate graphs button.
221
00:17:45,000 --> 00:17:50,000
That was easy, but you can see how much gross dependencies we are.
222
00:17:51,000 --> 00:17:51,000
Definitely.
223
00:17:51,000 --> 00:17:57,000
There is a lot of work here, considering this is a project and a lot of different topics.
224
00:17:57,000 --> 00:18:04,000
Some of them very often reuses some common glosses or packages, and that's why we have something like
225
00:18:04,000 --> 00:18:04,000
this.
226
00:18:05,000 --> 00:18:08,000
You can spend time after the lesson and used to get this.
227
00:18:09,000 --> 00:18:11,000
I added these files in to get this.
228
00:18:12,000 --> 00:18:16,000
So you will be able to find those in the directory of the project.
229
00:18:17,000 --> 00:18:23,000
Most likely, if you would, any great all project that doesn't have more destruction, you would see
230
00:18:23,000 --> 00:18:24,000
something like this.
231
00:18:25,000 --> 00:18:26,000
Or even worse.
232
00:18:26,000 --> 00:18:29,000
Well, most likely you will see worse.
233
00:18:30,000 --> 00:18:31,000
Sorry, but this is true.
234
00:18:32,000 --> 00:18:39,000
OK, let's move on, and now I'd like to show you how to work with this, though, if you would like
235
00:18:39,000 --> 00:18:41,000
to analyze modular application.
236
00:18:41,000 --> 00:18:46,000
And you remember, is it a previous lesson of the creative modular application?
237
00:18:46,000 --> 00:18:49,000
Let's analyze dependencies for that app.
238
00:18:50,000 --> 00:18:56,000
The idea is similar, but instead of Java, you can pass a reference to the director with your modules
239
00:18:56,000 --> 00:18:59,000
so you already can make a conclusion.
240
00:18:59,000 --> 00:19:06,000
ZG Depths Program has separate group of command line options for modular and non modular applications.
241
00:19:07,000 --> 00:19:12,000
These are common ones that they want to execute is also stored in shell script.
242
00:19:12,000 --> 00:19:16,000
Let me open the file and we'll discuss what is written here.
243
00:19:17,000 --> 00:19:22,000
Also to execute shell script in the other directory, I open terminal.
244
00:19:23,000 --> 00:19:30,000
As you can see, I use Module First Command Line option and pauses a reference to the directory where
245
00:19:30,000 --> 00:19:32,000
all my module is located.
246
00:19:33,000 --> 00:19:39,000
Another option is that modules to add modules to zero set for analysis.
247
00:19:39,000 --> 00:19:46,000
I use custom to add all modules in the directory as the last option here is the list is pretty familiar
248
00:19:46,000 --> 00:19:47,000
to you.
249
00:19:47,000 --> 00:19:49,000
This is for the output.
250
00:19:49,000 --> 00:19:55,000
Let's execute this script in the terminal and we have generated summary file.
251
00:19:55,000 --> 00:20:02,000
Let's copy content from here and let me paste this content on the website to generate the graph.
252
00:20:03,000 --> 00:20:09,000
As you can see, code I think moves at depends on coal.
253
00:20:09,000 --> 00:20:16,000
I think moves greetings module and Moses and the pass on Java based module.
254
00:20:16,000 --> 00:20:18,000
Is it clear for you?
255
00:20:18,000 --> 00:20:23,000
Press a pause for a minute and sync one more time about this live demo.
256
00:20:24,000 --> 00:20:24,000
Thank you.
257
00:20:24,000 --> 00:20:26,000
Samsung is still not clear for you.
258
00:20:27,000 --> 00:20:32,000
Please do not hesitate to pose your question below this video, and I will be happy to answer.
259
00:20:34,000 --> 00:20:40,000
On the screen, you can find common long options that you may use with great depths on the slide, you
260
00:20:40,000 --> 00:20:42,000
can find possible options.
261
00:20:43,000 --> 00:20:45,000
Module dependency analysis options.
262
00:20:46,000 --> 00:20:48,000
Options to filter dependencies.
263
00:20:48,000 --> 00:20:51,000
Options to filter closest to be analyzed.
264
00:20:51,000 --> 00:20:54,000
And as you can see, there are a lot of them.
265
00:20:54,000 --> 00:20:58,000
Probably it doesn't make any sense to me holding them off each option.
266
00:20:58,000 --> 00:21:03,000
I believe you understood the main principle, and so I would demo was few options.
267
00:21:03,000 --> 00:21:06,000
You can just play with other options if you want.
268
00:21:07,000 --> 00:21:11,000
Feel free to pause the Ouija if you want to read all comments on the slide.
269
00:21:12,000 --> 00:21:14,000
OK, let's proceed.
270
00:21:15,000 --> 00:21:21,000
The next thing that I am going to demo you is depressed, can't program, you have a deprecated API
271
00:21:21,000 --> 00:21:25,000
kind of tool is a common line tool to scan for users.
272
00:21:25,000 --> 00:21:29,000
So deprecated API elements of given Java class files.
273
00:21:29,000 --> 00:21:38,000
Input glosses can be given as a bosnich to a class file and directory or jar file, the same as G Deps
274
00:21:38,000 --> 00:21:44,000
G Deeper Scan also has been included in genica installation since adjudicate.
275
00:21:44,000 --> 00:21:48,000
That means you can find that in bin folder of Dedicate.
276
00:21:48,000 --> 00:21:54,000
And if you configure Java POS properly, you can access it from command line.
277
00:21:55,000 --> 00:22:01,000
I'm going to show you example, Wisconsin, of my learning project, I put Judy Proskauer in Shell script.
278
00:22:02,000 --> 00:22:08,000
The simplest way how to use this command is to invoke it and pass journal names that we would like to
279
00:22:08,000 --> 00:22:09,000
scan.
280
00:22:09,000 --> 00:22:12,000
I want to execute this script and get the bus.
281
00:22:12,000 --> 00:22:21,000
And again, it takes some time because Project has a lot of files and it is done on the top.
282
00:22:21,000 --> 00:22:24,000
You can see notifications in which classes are used.
283
00:22:24,000 --> 00:22:32,000
Deprecated masses Knowing this information, you can just check deprecated masses, usually in documentation
284
00:22:32,000 --> 00:22:38,000
is deprecated mass that it is specified which other mass that you should use instead.
285
00:22:38,000 --> 00:22:39,000
That is simple.
286
00:22:40,000 --> 00:22:40,000
I agree.
287
00:22:41,000 --> 00:22:45,000
And this command also has few important command line options.
288
00:22:45,000 --> 00:22:47,000
Definitely Zionism's MS engine.
289
00:22:47,000 --> 00:22:55,000
That program has but still something for you, at least to be aware of response if you want to explore
290
00:22:55,000 --> 00:22:56,000
all these in details.
291
00:22:57,000 --> 00:22:59,000
And if you're OK, I will continue.
292
00:23:00,000 --> 00:23:03,000
Now, let's review immigration strategies.
293
00:23:03,000 --> 00:23:09,000
We will cover case when a regional application is based on gender versions that is less than juvenile
294
00:23:10,000 --> 00:23:17,000
or it is Java nine or higher, but the modular approach wasn't originally implemented since the use
295
00:23:17,000 --> 00:23:19,000
of this mechanism is fully optional.
296
00:23:20,000 --> 00:23:26,000
M. relearned tools and went through the step where we did the line, which modules draft files are present
297
00:23:26,000 --> 00:23:30,000
in application and what dependencies exist between them.
298
00:23:30,000 --> 00:23:37,000
Also, another way to do that besides such automated tools of static code analysis as DApps is through
299
00:23:37,000 --> 00:23:42,000
an Iraqi eagle diagram, whereas these dependencies are represented in their way.
300
00:23:43,000 --> 00:23:49,000
This will help give an overview of the components of the application and of each of them, and in which
301
00:23:49,000 --> 00:23:51,000
orders it can be migrated.
302
00:23:51,000 --> 00:23:57,000
Identifying those who will not be able to adopt temporally or definitively.
303
00:23:58,000 --> 00:24:04,000
The later case can be given, for example, insert various libraries that have stopped offering support,
304
00:24:04,000 --> 00:24:06,000
and that will hardly become modules.
305
00:24:07,000 --> 00:24:12,000
There are two different migration mechanisms that responds to different initial situations.
306
00:24:13,000 --> 00:24:20,000
To illustrate the process in each of them, let's imagine the next scenario we plan to migrate an application
307
00:24:20,000 --> 00:24:25,000
that consists of three jars representing the different layers of the application.
308
00:24:26,000 --> 00:24:32,000
They are application services and utilize the diagrams that you can see on the screen.
309
00:24:32,000 --> 00:24:35,000
Now shows the dependencies between these lists.
310
00:24:36,000 --> 00:24:42,000
Where application depends on services and the tiers and services depends on the utils only.
311
00:24:42,000 --> 00:24:45,000
Let's review Bottom-Up migration first.
312
00:24:45,000 --> 00:24:52,000
In this strategy, initially, all jar files that are part of the application will be located at its
313
00:24:52,000 --> 00:24:53,000
ClassPass.
314
00:24:54,000 --> 00:24:56,000
All of them can be migrated one by one.
315
00:24:56,000 --> 00:24:58,000
Does the module POS?
316
00:24:58,000 --> 00:25:01,000
To do this, we need to follow describes steps.
317
00:25:02,000 --> 00:25:08,000
The first thing that we need to do is to choose a project package or layer was the lowest position in
318
00:25:08,000 --> 00:25:09,000
dependencies.
319
00:25:09,000 --> 00:25:12,000
Iraqi yet has not yet been migrated to module.
320
00:25:13,000 --> 00:25:17,000
That means to select the project that has less dependencies.
321
00:25:17,000 --> 00:25:20,000
In our case, this is your deals there.
322
00:25:20,000 --> 00:25:26,000
After that and the module info Java file to the project, it will be needed to.
323
00:25:26,000 --> 00:25:33,000
Ads are quite explicit statements to make current module packages available to Iraqi Higher Level Modules
324
00:25:33,000 --> 00:25:41,000
Moves Integrated Project as a named module from application's class bus to its module bus ensure that
325
00:25:41,000 --> 00:25:43,000
all not yet migrated.
326
00:25:43,000 --> 00:25:48,000
The modules remain as unnamed modules in application's class bus.
327
00:25:48,000 --> 00:25:52,000
What is unnamed modules were discussed in previous lesson.
328
00:25:52,000 --> 00:26:00,000
One of the learned modules types please refer to the previous lesson through use that, if needed after
329
00:26:00,000 --> 00:26:07,000
we did all this is this seems it remains to do is to repeat this process was the next lowest level packages
330
00:26:08,000 --> 00:26:10,000
list of projects in the Iraqi.
331
00:26:10,000 --> 00:26:15,000
That is not migrated yet, and we are progressing in the bottom direction.
332
00:26:15,000 --> 00:26:23,000
Can you understand now why this strategy is called bottom up when this approach works the best and when
333
00:26:23,000 --> 00:26:24,000
we need to apply?
334
00:26:24,000 --> 00:26:27,000
The bottom up migration strategy was the best one.
335
00:26:27,000 --> 00:26:33,000
We have the ability to modify any jar that has not yet been converted to module.
336
00:26:33,000 --> 00:26:41,000
It makes easier as a migration of the project's packages was a whole layers that are at the top of the
337
00:26:41,000 --> 00:26:47,000
dependency diagram and encourages care in what is exposed to other modules.
338
00:26:48,000 --> 00:26:54,000
The modules of the lower levels of the Iraqi will be found in the module costs without access to the
339
00:26:54,000 --> 00:26:56,000
packages of unnamed modules.
340
00:26:57,000 --> 00:27:03,000
While these unnamed modules that have not been migrated and allocated in the class, ClassPass will
341
00:27:03,000 --> 00:27:09,000
be able to access zip packages located in both class and module bus.
342
00:27:10,000 --> 00:27:11,000
Does it make sense so far?
343
00:27:13,000 --> 00:27:19,000
And now is immigration strategy would be top down in this strategy, initially, all jar files that
344
00:27:19,000 --> 00:27:25,000
are part of the application will be located at its model bus, so all non-immigrant its projects are
345
00:27:25,000 --> 00:27:27,000
treated as automatic modules.
346
00:27:28,000 --> 00:27:31,000
Greatest lesson I current or what automatic modules are.
347
00:27:32,000 --> 00:27:36,000
So please make sure you watch the previous lesson about modules.
348
00:27:36,000 --> 00:27:44,000
If you forget, this is example when I didn't use modular approach since it is optional in this case,
349
00:27:44,000 --> 00:27:47,000
it is recommended to frozen next steps.
350
00:27:47,000 --> 00:27:54,000
The first thing to do is to choose a high level project and the dependencies Iraqi that has not yet
351
00:27:54,000 --> 00:27:56,000
been integrated the module.
352
00:27:56,000 --> 00:28:03,000
After that, we need to add some module info gel file to the project to transform it from an automatic
353
00:28:03,000 --> 00:28:05,000
module to a named module.
354
00:28:06,000 --> 00:28:12,000
Also, we shouldn't forget to add necessary expert statements to make current module packages available
355
00:28:12,000 --> 00:28:20,000
to other modules and the necessary require statements that makes available OSM modules expose packages
356
00:28:20,000 --> 00:28:25,000
to the current one in case of the reference to a module not yet migrated.
357
00:28:26,000 --> 00:28:29,000
It should be done through its automatic module name.
358
00:28:29,000 --> 00:28:36,000
Once these have been migrated, these references should be changed to Z definitive module names.
359
00:28:37,000 --> 00:28:41,000
Repeat this process was the next high level component.
360
00:28:41,000 --> 00:28:44,000
Is Iraqi citizens not migrated yet?
361
00:28:44,000 --> 00:28:49,000
Then the stunt in which case is top down strategy needs to be applied and robust at best.
362
00:28:50,000 --> 00:28:55,000
This strategy is the best when you don't have the possibility of one day on the horizon.
363
00:28:55,000 --> 00:29:00,000
All the dependencies of the application was a temporarily or definitively.
364
00:29:01,000 --> 00:29:06,000
Also, the lower dependencies of the application have not yet been modularized.
365
00:29:06,000 --> 00:29:10,000
The application itself can be converted into morning.
366
00:29:10,000 --> 00:29:15,000
Named modules that have already been integrated will be found in the module.
367
00:29:15,000 --> 00:29:22,000
Boss was access to the entire code contained in the automatic modules that are also found in module
368
00:29:22,000 --> 00:29:22,000
path.
369
00:29:23,000 --> 00:29:23,000
Is that clear?
370
00:29:24,000 --> 00:29:26,000
And remember another important sync?
371
00:29:27,000 --> 00:29:31,000
In all cases, we have to avoid circle of dependencies between modules.
372
00:29:32,000 --> 00:29:34,000
That's all what I wanted to share with you in this lesson.
373
00:29:35,000 --> 00:29:37,000
Let's recap what we have learned today.
374
00:29:38,000 --> 00:29:44,000
After this lesson, you know, general algorithm to follow during the platform, migration to the new
375
00:29:44,000 --> 00:29:48,000
environment or in US adjudicate version in particular.
376
00:29:48,000 --> 00:29:57,000
I showed you how to use in practice Java Class Dependency Analyzer to also we used how to use Java deprecated
377
00:29:57,000 --> 00:30:05,000
API second to review of different migration strategies, namely, we bottom up and top down migration
378
00:30:05,000 --> 00:30:05,000
strategies.
379
00:30:06,000 --> 00:30:11,000
I hope you'll love this lesson and learned a lot of new useful sinks.
380
00:30:12,000 --> 00:30:13,000
Thanks a lot for your attention.
381
00:30:14,000 --> 00:30:17,000
Have a great day and see you in the next lesson.