1

00:00:00,900  -->  00:00:06,760
So we look at how we can access packages and also how we can create packages.

2

00:00:06,860  -->  00:00:09,560
No let's see how we should name packages.

3

00:00:09,560  -->  00:00:16,320
That is we will look at standard conventions for naming packages through a simple example let's just

4

00:00:16,320  -->  00:00:20,320
look at a problem that the man conter due to bad off naming packages.

5

00:00:22,050  -->  00:00:27,810
Let's have you have an idea who is a student at Stanford University let's assume Anita has developed

6

00:00:27,810  -->  00:00:32,070
a math library which is available for download for public use.

7

00:00:32,250  -->  00:00:39,300
One of the packages in this library is named as Mad Dog geometry non-IT Ajume there's a guy called John

8

00:00:39,420  -->  00:00:41,060
who works for Oracle.

9

00:00:41,340  -->  00:00:46,530
Let's Ajan also don't have the publicly available math library which also includes a package called

10

00:00:46,620  -->  00:00:52,100
Mad Dog geometry not assume that book on it does matter door geometry and.

11

00:00:52,130  -->  00:00:59,000
My documentary packages look very similar as most of methods have identical signatures although their

12

00:00:59,000  -->  00:01:00,700
implementations are quite different.

13

00:01:02,550  -->  00:01:08,380
Not have the company semi-big square on one of their projects is heavily in demand and they're already

14

00:01:08,380  -->  00:01:14,830
using and it does a bit not it's a semantic Square has a new and don't call bought and bought comes

15

00:01:14,830  -->  00:01:15,190
across.

16

00:01:15,200  -->  00:01:20,280
John celebrity and wants to use its modern geometry package.

17

00:01:20,420  -->  00:01:24,540
So he tries to use it and to his surprise it doesn't work as expected.

18

00:01:25,510  -->  00:01:31,660
After some investigation he finds that at runtime JVM is actually using and it does matter geometry

19

00:01:31,660  -->  00:01:34,520
package insert off John's package.

20

00:01:34,660  -->  00:01:40,800
Naturally this irritates Bob as you can see from his expression So basically the two packages with the

21

00:01:40,800  -->  00:01:45,090
same name JVM is always picking on its package.

22

00:01:45,150  -->  00:01:50,590
So there is a package named conflict here and this is because both are not on John.

23

00:01:50,610  -->  00:01:54,080
We're not following proper Bakhash naming conventions.

24

00:01:54,420  -->  00:01:59,550
So all packages are supposed to work class name conflicts they missed and not be helpful.

25

00:01:59,700  -->  00:02:07,120
If the developers do not follow proper naming conventions do what package name conflicts recommend the

26

00:02:07,120  -->  00:02:14,790
convention is to use the organizations to reverse Internet domain name one example our little engine

27

00:02:14,880  -->  00:02:20,850
could have named their packages are shown here on it from Stanford University whose domain is Stanford

28

00:02:20,860  -->  00:02:21,680
not to you.

29

00:02:22,020  -->  00:02:27,240
So she could have started her package name with the reverse of the domain name which would be edu Daut

30

00:02:27,240  -->  00:02:33,650
Stanford Similarly John could have started his package name with com dot article.

31

00:02:33,670  -->  00:02:40,410
This would have and or bought to use Johnson Library without any issues there are so few other naming

32

00:02:40,410  -->  00:02:47,760
conventions item 56 ineffective is all about naming conventions and it actually starts with naming conventions

33

00:02:47,790  -->  00:02:48,820
for packages.

34

00:02:49,770  -->  00:02:52,750
Here we discuss only the ones pertaining to packages.

35

00:02:52,830  -->  00:02:55,450
All of the recommendations will be discussed later.

36

00:02:55,500  -->  00:03:03,800
Towards the end of language basic series Hussman says that components in a package should consist off

37

00:03:04,120  -->  00:03:11,960
what gets alphabets on really digits component should also be shot generally eight or fewer characters

38

00:03:13,780  -->  00:03:21,490
meaningful abbreviations like you do for utilities are encouraged like in the case of Gelada acronyms

39

00:03:21,490  -->  00:03:29,510
or find do for example there is a package called AWB which is related to creating user interfaces hit

40

00:03:29,510  -->  00:03:37,410
N.W.T. is an acronym for abstract window toolkit Jindalee component should consist of only a single

41

00:03:37,420  -->  00:03:45,940
word Hundley you should know what stock you are packaged in the Java Oddjob X used with a standard July

42

00:03:45,950  -->  00:03:46,020
.

43

00:03:46,030  -->  00:03:54,190
The majority of packages in July be stocked with giallo Jorak seems to exist only for historical reasons

44

00:03:54,190  -->  00:03:54,560
.

45

00:03:54,730  -->  00:04:01,450
One son wanted to use it for only extensions that is called classes would reside within Java while extensions

46

00:04:01,450  -->  00:04:09,550
would be in jail X Java Swing API falls under Jagex So these are some naming conventions specific to

47

00:04:09,560  -->  00:04:10,670
packages.

48

00:04:10,670  -->  00:04:13,130
And you should really buy them.

49

00:04:13,220  -->  00:04:14,330
So that's about it.

50

00:04:14,330  -->  00:04:17,030
And that's the I know forward discussion on packages.

51

00:04:17,030  -->  00:04:17,390
Thank you
