1
00:00:01,130 --> 00:00:04,820
OK, so let's discuss a little bit.

2
00:00:05,760 --> 00:00:12,270
Keep in mind that our aim is not to learn how to code in, so we're not really interested in all the

3
00:00:12,270 --> 00:00:20,220
details, we just want to see what is it used for and how we can recognize it and also where can we

4
00:00:20,220 --> 00:00:20,710
find it.

5
00:00:21,600 --> 00:00:24,680
So first of all, what is BHB?

6
00:00:25,780 --> 00:00:32,740
Well, as a programming language or also can be considered to be a widely used open source scripting

7
00:00:32,740 --> 00:00:36,610
language, and its main purpose is for web development.

8
00:00:37,480 --> 00:00:45,730
Another interesting thing for us is that, as it says right here, BHP can be embedded into HTML.

9
00:00:46,880 --> 00:00:47,780
What does this mean?

10
00:00:48,290 --> 00:00:56,210
Well, the same way that we can add JavaScript inside of HTML we can do it would be to a simple example,

11
00:00:56,210 --> 00:00:58,910
would be the code that we can see at this page.

12
00:00:59,810 --> 00:01:08,150
As we can see, the cold starts with open mouth pegs, we got some HTML open headers, open tags, open

13
00:01:08,150 --> 00:01:15,320
border tags and inside of the body tag we get a code which is embedded inside of this HTML code.

14
00:01:15,920 --> 00:01:22,280
This is the most simple code, but we can notice what actually distinguishes it and what allows us to

15
00:01:22,280 --> 00:01:28,270
notice that this indeed is a pretty good first of all, it starts with these packs.

16
00:01:28,910 --> 00:01:34,290
We got this arrow pointing to the left, then we got questionmark and then BHB.

17
00:01:34,970 --> 00:01:37,460
This is opening tag for Descript.

18
00:01:38,030 --> 00:01:41,000
Under that comes the code that we write in.

19
00:01:41,540 --> 00:01:46,700
And in this case, there's just a simple echo script that says, Hi, I'm a B script.

20
00:01:47,330 --> 00:01:53,600
After you finish typing all of your code, you simply just closed the tags by typing Questionmark and

21
00:01:53,600 --> 00:01:54,770
Arrow to the right.

22
00:01:55,860 --> 00:01:59,460
And after that, you can simply just continue with your HTML code.

23
00:02:00,120 --> 00:02:04,170
OK, so PCP's used for Web development, same as JavaScript.

24
00:02:04,970 --> 00:02:08,699
It can be included in HTML code, same as JavaScript.

25
00:02:08,729 --> 00:02:10,560
So what is the difference?

26
00:02:11,400 --> 00:02:17,460
Well, JavaScript is used for client side will be used for server side.

27
00:02:18,210 --> 00:02:25,830
The key is that client can really view code that is being run by server, taking into consideration,

28
00:02:25,830 --> 00:02:29,670
of course, that everything is set properly and not configured.

29
00:02:30,630 --> 00:02:35,260
Perhaps this is better said here in this paragraph right here.

30
00:02:36,000 --> 00:02:42,840
So, as it says, what distinguishes BHP from something like client side JavaScript is that the code

31
00:02:42,840 --> 00:02:48,840
is executed on the server generating HTML, which is then sent to the client.

32
00:02:49,530 --> 00:02:55,260
The client would receive the results of running that script, but would not know what the underlying

33
00:02:55,260 --> 00:02:56,220
code was.

34
00:02:57,200 --> 00:03:04,130
You can even configure your Web server to process all your HTML files with BHP, and then there's really

35
00:03:04,130 --> 00:03:10,070
no way that users can tell what you have up your sleeve, meaning that they can figure out what code

36
00:03:10,070 --> 00:03:10,970
you have in.

37
00:03:12,660 --> 00:03:19,170
Another reason why it is good is besides it being available on all major operating systems.

38
00:03:19,350 --> 00:03:24,630
It is good in command line scripting and server side scripting, which you mentioned already.

39
00:03:25,320 --> 00:03:29,100
Server side scripting is the main field for coverage.

40
00:03:29,100 --> 00:03:34,260
For this, we need three different things, and that is we need to have the parser.

41
00:03:34,590 --> 00:03:38,000
We need to have a Web server and a Web browser.

42
00:03:38,790 --> 00:03:45,650
And in this case, to run the code, you can just have the Web server running with the connected installation.

43
00:03:46,260 --> 00:03:49,410
Then you can access the program with a Web browser.

44
00:03:50,570 --> 00:03:57,890
How it exactly runs is explained really good in this image right here or in this diagram, how you want

45
00:03:57,890 --> 00:03:58,370
to call it.

46
00:03:58,940 --> 00:04:06,110
As we can see, these are labeled as steps we go from the device, as it says, user requests, some

47
00:04:06,110 --> 00:04:06,620
website.

48
00:04:07,130 --> 00:04:11,420
It goes to the Apache Web server or any Web server whatsoever.

49
00:04:12,140 --> 00:04:16,220
Then it processes back to the interpreter, which is step number five.

50
00:04:16,550 --> 00:04:22,220
Then it sends back the Apache Web server and then the Web server processes the page and sends it back

51
00:04:22,520 --> 00:04:23,210
to the user.

52
00:04:24,060 --> 00:04:30,480
Now, another thing worth mentioning is that you can make a run without any server or browser, you

53
00:04:30,480 --> 00:04:36,060
could run it with a command line would just be parser and it will still work, OK?

54
00:04:36,450 --> 00:04:39,750
Nonetheless, this is the basic principle behind BHB.

55
00:04:40,200 --> 00:04:42,610
We just mentioned what it was used for.

56
00:04:42,810 --> 00:04:49,470
Where can we find it and how can we recognize what is important to remember?

57
00:04:50,710 --> 00:04:57,520
Well, it's important to remember that is used for server side, it is mainly used for web development

58
00:04:57,760 --> 00:05:05,920
and can be embedded into HTML code and we can see how to do that right here with the simple script.

59
00:05:08,150 --> 00:05:12,620
Everything else that we might need will cover as we go for now, this will be enough.

60
00:05:12,620 --> 00:05:16,120
So that's about it and I will see you guys in the next video.

