diff --git a/.gitattributes b/.gitattributes index a3b2a4b1af0341f117708399a0602be4d478cf1e..987542feafbec48754547949896dbb74330823a0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -98,3 +98,12 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text 106[[:space:]]-[[:space:]]Structural[[:space:]]Diagrams/005[[:space:]]Deployment[[:space:]]Diagram.mp4 filter=lfs diff=lfs merge=lfs -text 106[[:space:]]-[[:space:]]Structural[[:space:]]Diagrams/006[[:space:]]Composite[[:space:]]Structure[[:space:]]Diagram.mp4 filter=lfs diff=lfs merge=lfs -text 106[[:space:]]-[[:space:]]Structural[[:space:]]Diagrams/007[[:space:]]Profile[[:space:]]Diagram.mp4 filter=lfs diff=lfs merge=lfs -text +107[[:space:]]-[[:space:]]Code[[:space:]]Review[[:space:]]Fundamentals/001[[:space:]]Introduction[[:space:]]to[[:space:]]Code[[:space:]]Reviews.mp4 filter=lfs diff=lfs merge=lfs -text +107[[:space:]]-[[:space:]]Code[[:space:]]Review[[:space:]]Fundamentals/002[[:space:]]Basics[[:space:]]of[[:space:]]Code[[:space:]]Review[[:space:]]Process.mp4 filter=lfs diff=lfs merge=lfs -text +108[[:space:]]-[[:space:]]Tools,[[:space:]]Automation,[[:space:]]and[[:space:]]Industry[[:space:]]Best[[:space:]]Practices/002[[:space:]]Part[[:space:]]1[[:space:]]-[[:space:]]Checkstyle[[:space:]]Adhering[[:space:]]Coding[[:space:]]Standards.mp4 filter=lfs diff=lfs merge=lfs -text +108[[:space:]]-[[:space:]]Tools,[[:space:]]Automation,[[:space:]]and[[:space:]]Industry[[:space:]]Best[[:space:]]Practices/001[[:space:]]Tools[[:space:]]for[[:space:]]Code[[:space:]]Review[[:space:]]and[[:space:]]Code[[:space:]]Analysis.mp4 filter=lfs diff=lfs merge=lfs -text +108[[:space:]]-[[:space:]]Tools,[[:space:]]Automation,[[:space:]]and[[:space:]]Industry[[:space:]]Best[[:space:]]Practices/003[[:space:]]Part[[:space:]]2[[:space:]]-[[:space:]]Checkstyle[[:space:]]Adhering[[:space:]]Coding[[:space:]]Standards.mp4 filter=lfs diff=lfs merge=lfs -text +109[[:space:]]-[[:space:]]Advanced[[:space:]]Code[[:space:]]Review[[:space:]]Strategies/003[[:space:]]Provide[[:space:]]Feedback[[:space:]]like[[:space:]]a[[:space:]]Pro.mp4 filter=lfs diff=lfs merge=lfs -text +109[[:space:]]-[[:space:]]Advanced[[:space:]]Code[[:space:]]Review[[:space:]]Strategies/002[[:space:]]Coding[[:space:]]Standards,[[:space:]]Code[[:space:]]Quality[[:space:]]&[[:space:]]Consistency.mp4 filter=lfs diff=lfs merge=lfs -text +109[[:space:]]-[[:space:]]Advanced[[:space:]]Code[[:space:]]Review[[:space:]]Strategies/001[[:space:]]Code[[:space:]]Review[[:space:]]Guidelines[[:space:]]&[[:space:]]Contribution[[:space:]]Policy.mp4 filter=lfs diff=lfs merge=lfs -text +108[[:space:]]-[[:space:]]Tools,[[:space:]]Automation,[[:space:]]and[[:space:]]Industry[[:space:]]Best[[:space:]]Practices/004[[:space:]]PMD[[:space:]]Static[[:space:]]Code[[:space:]]Analysis.mp4 filter=lfs diff=lfs merge=lfs -text diff --git a/107 - Code Review Fundamentals/001 Introduction to Code Reviews.mp4 b/107 - Code Review Fundamentals/001 Introduction to Code Reviews.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..ca03ecb1b8ec0a8f0d98ded4fac23bca9a5b2570 --- /dev/null +++ b/107 - Code Review Fundamentals/001 Introduction to Code Reviews.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:611df4524d45cd3d1a14997e435e270599c7944bb4f208db65dab1c8e310fe5c +size 175037426 diff --git a/107 - Code Review Fundamentals/002 Basics of Code Review Process.mp4 b/107 - Code Review Fundamentals/002 Basics of Code Review Process.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..7f04d6662d07238f5f9253f7b0b1797086da0d03 --- /dev/null +++ b/107 - Code Review Fundamentals/002 Basics of Code Review Process.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4197b398ee00dffba96a87f7eba7be5f504940c85643511380f7a4c39f06079c +size 235360613 diff --git a/108 - Tools, Automation, and Industry Best Practices/001 Tools for Code Review and Code Analysis.mp4 b/108 - Tools, Automation, and Industry Best Practices/001 Tools for Code Review and Code Analysis.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..9794c007c35902a0b4efd9a55eefd3af8ea3b297 --- /dev/null +++ b/108 - Tools, Automation, and Industry Best Practices/001 Tools for Code Review and Code Analysis.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29ef47fd64bef0864e1c0f8b204c21626dc9c12700621d725c62ac0117df94cd +size 244475795 diff --git a/108 - Tools, Automation, and Industry Best Practices/002 Part 1 - Checkstyle Adhering Coding Standards.mp4 b/108 - Tools, Automation, and Industry Best Practices/002 Part 1 - Checkstyle Adhering Coding Standards.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..0eec7631646b358bfbb94e434caafb4c7675d91a --- /dev/null +++ b/108 - Tools, Automation, and Industry Best Practices/002 Part 1 - Checkstyle Adhering Coding Standards.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3699bb77cee79d5161d35aa83f4427b322b27d4e133563c9d6791af66fac91d7 +size 188326372 diff --git a/108 - Tools, Automation, and Industry Best Practices/003 Part 2 - Checkstyle Adhering Coding Standards.mp4 b/108 - Tools, Automation, and Industry Best Practices/003 Part 2 - Checkstyle Adhering Coding Standards.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..ef5a7835e89a07bd8b48baea5a82c0da79558448 --- /dev/null +++ b/108 - Tools, Automation, and Industry Best Practices/003 Part 2 - Checkstyle Adhering Coding Standards.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d98972a554bcfd67d44b751f5aaf36cae80699e396ae436b53eecad52a00525a +size 248055267 diff --git a/108 - Tools, Automation, and Industry Best Practices/004 PMD Static Code Analysis.mp4 b/108 - Tools, Automation, and Industry Best Practices/004 PMD Static Code Analysis.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..601037120f6babc42a5184806819d35e01c3bc6a --- /dev/null +++ b/108 - Tools, Automation, and Industry Best Practices/004 PMD Static Code Analysis.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9bb0e9f17a14b876fdc4992631122fb88a6aa89896727f650e41acb2e79ea26d +size 366781223 diff --git a/109 - Advanced Code Review Strategies/001 Code Review Guidelines & Contribution Policy.mp4 b/109 - Advanced Code Review Strategies/001 Code Review Guidelines & Contribution Policy.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..38f85b78545a4b22f0e84bf5196f1631b20691dc --- /dev/null +++ b/109 - Advanced Code Review Strategies/001 Code Review Guidelines & Contribution Policy.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:187450314872d3de630d2abf2f594a235c9e6f70b21a28c05683ee5bf6af97d1 +size 295490498 diff --git a/109 - Advanced Code Review Strategies/002 Coding Standards, Code Quality & Consistency.mp4 b/109 - Advanced Code Review Strategies/002 Coding Standards, Code Quality & Consistency.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..dd3854283573a5a0b0109c5eefd6f7f3966c1522 --- /dev/null +++ b/109 - Advanced Code Review Strategies/002 Coding Standards, Code Quality & Consistency.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce00b276f635e816b8487d9fb1a7781290ddbaedb966a0a7680218405dd6720b +size 280386333 diff --git a/109 - Advanced Code Review Strategies/003 Provide Feedback like a Pro.mp4 b/109 - Advanced Code Review Strategies/003 Provide Feedback like a Pro.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..394eed5c6e0faa16934e8bcf9fcaecafd65a5fcf --- /dev/null +++ b/109 - Advanced Code Review Strategies/003 Provide Feedback like a Pro.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b5bf70490120ad6b74e83759c2e93ab374c53ca12759f8aecc49f976a46ac58 +size 194513345 diff --git a/61 - Servlets/003 Source-of-web.xml-from-the-lesson.url b/61 - Servlets/003 Source-of-web.xml-from-the-lesson.url new file mode 100644 index 0000000000000000000000000000000000000000..bf702f3087c5b4c57f72cfacff4304de28f0f772 --- /dev/null +++ b/61 - Servlets/003 Source-of-web.xml-from-the-lesson.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/WEB-INF/web.xml \ No newline at end of file diff --git a/61 - Servlets/003 web.xml - Deployment Descriptor_en.srt b/61 - Servlets/003 web.xml - Deployment Descriptor_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..571acb31d0acfa33f852ad8979f39c191318c83c --- /dev/null +++ b/61 - Servlets/003 web.xml - Deployment Descriptor_en.srt @@ -0,0 +1,864 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello. + +2 +00:00:06,000 --> 00:00:06,000 +Yes. + +3 +00:00:07,000 --> 00:00:12,000 +In this lesson, we're going to learn what that smell is and what we can configure zero. + +4 +00:00:13,000 --> 00:00:14,000 +Well, then why? + +5 +00:00:14,000 --> 00:00:17,000 +That big smell is called the climate descriptor. + +6 +00:00:18,000 --> 00:00:25,000 +We're going to compare X amount based configuration of our web application with annotation based configuration. + +7 +00:00:26,000 --> 00:00:31,000 +I'll give you my advice is how to select one or another type of configuration. + +8 +00:00:31,000 --> 00:00:37,000 +The biggest part of our lesson today will be alive demo and review of examples. + +9 +00:00:38,000 --> 00:00:40,000 +I would explain you can file. + +10 +00:00:40,000 --> 00:00:44,000 +This is why we need it and how to configure it. + +11 +00:00:44,000 --> 00:00:51,000 +You will also see server configuration in WebEx email and so that's MOP and we're going to learn how + +12 +00:00:51,000 --> 00:00:53,000 +to set the context parameters. + +13 +00:00:54,000 --> 00:01:01,000 +Also, we're going to then how to set security constraints for our web application and examples. + +14 +00:01:01,000 --> 00:01:05,000 +Atlassian will briefly talk about session configuration environments. + +15 +00:01:05,000 --> 00:01:07,000 +Now let's start our lesson. + +16 +00:01:08,000 --> 00:01:13,000 +Let's have some understanding of what that book Snow File is. + +17 +00:01:13,000 --> 00:01:21,000 +WebEx email is also called Deployment Descriptor because it contains instructions configurations for + +18 +00:01:21,000 --> 00:01:22,000 +our web application. + +19 +00:01:23,000 --> 00:01:31,000 +If you remember where we just saw a Web file and the lesson about Tomcats, we also adjusted it in our + +20 +00:01:31,000 --> 00:01:34,000 +homework when we configured our syndication for Tomcat. + +21 +00:01:35,000 --> 00:01:42,000 +They'll remember that if you skip lessons about Tomcat Server, I recommend you to watch them and to + +22 +00:01:42,000 --> 00:01:50,000 +complete home task Java Web Applications User Deployment Descriptor File to determine how you will map + +23 +00:01:50,000 --> 00:01:58,000 +the so that's which your else require are syndication filters, configure error handling and all the + +24 +00:01:58,000 --> 00:02:01,000 +information this file is named. + +25 +00:02:01,000 --> 00:02:08,000 +That X amount and resides in the apps bar on the zavod directory. + +26 +00:02:08,000 --> 00:02:15,000 +That maximal is part of the service standards for web applications and web applications. + +27 +00:02:15,000 --> 00:02:23,000 +Deployment descriptor describes the closest resources and configuration of the application and how the + +28 +00:02:23,000 --> 00:02:26,000 +web server uses them to serve fabric requests. + +29 +00:02:26,000 --> 00:02:34,000 +When the web server receives a request for the application, it uses a deployment descriptor two mobs + +30 +00:02:34,000 --> 00:02:35,000 +at your browser request. + +31 +00:02:35,000 --> 00:02:44,000 +These include that all the handles requests in our previous last and you saw that we can figure it all + +32 +00:02:44,000 --> 00:02:47,000 +our surrounding examples without web amount. + +33 +00:02:48,000 --> 00:02:55,000 +This is because starting from the select mission three, we can use annotation based configuration instead + +34 +00:02:55,000 --> 00:02:56,000 +of map smell. + +35 +00:02:57,000 --> 00:03:04,000 +Starting from Tomcat version seven, you are not obligated to use Rabbit's amount as a main configuration + +36 +00:03:04,000 --> 00:03:06,000 +source for your map application. + +37 +00:03:07,000 --> 00:03:14,000 +There is a group of people who prefer configuration in X amount and there is also another group of people + +38 +00:03:14,000 --> 00:03:17,000 +who prefer configuration with annotations. + +39 +00:03:17,000 --> 00:03:22,000 +Which option is bad and which one I recommend you to use? + +40 +00:03:23,000 --> 00:03:27,000 +You know, there is no single and correct answer on this question. + +41 +00:03:28,000 --> 00:03:35,000 +If annotation based configuration is supported from the service version three, ZIP doesn't needs an + +42 +00:03:35,000 --> 00:03:39,000 +x amount based configuration become obsolete and nobody using it. + +43 +00:03:40,000 --> 00:03:46,000 +Indeed, there is a group of people who love to use sectional based configuration. + +44 +00:03:46,000 --> 00:03:55,000 +The different pros and cons of fixing base configuration versus annotation based configuration ensure + +45 +00:03:55,000 --> 00:04:02,000 +keeping all configurations in rabbits and now allows you to see the big picture and all configurations + +46 +00:04:02,000 --> 00:04:04,000 +in one place. + +47 +00:04:04,000 --> 00:04:10,000 +Here's my big symbol here all configurations, all mappings, all sources. + +48 +00:04:10,000 --> 00:04:16,000 +And you can see everything at once instead of opening source code of hundreds files. + +49 +00:04:17,000 --> 00:04:24,000 +But the disadvantage of such approach is that in case you have hundreds of suits, your excellent file + +50 +00:04:24,000 --> 00:04:29,000 +become way too happy and the faces scrolled through reads. + +51 +00:04:29,000 --> 00:04:37,000 +So what you need or bottom of the file supports of such a maximum file may become a challenge. + +52 +00:04:38,000 --> 00:04:46,000 +On the other hand, have an annotation based configuration allows you to see all configurations related + +53 +00:04:46,000 --> 00:04:47,000 +to that particular thread. + +54 +00:04:48,000 --> 00:04:55,000 +When you open its source code, you don't need to navigate to that maximum file in order to find or + +55 +00:04:55,000 --> 00:05:03,000 +change your configurations, all configurations related to each particular scene that are located in + +56 +00:05:03,000 --> 00:05:10,000 +the file with each so that source code and you are not to bother with non-related configurations. + +57 +00:05:11,000 --> 00:05:15,000 +In this case you may face with another disadvantage. + +58 +00:05:15,000 --> 00:05:20,000 +First of all, your source code is mixed with configurations. + +59 +00:05:21,000 --> 00:05:27,000 +This is not always considered as a good practice because you put configurations as a part of the source + +60 +00:05:27,000 --> 00:05:33,000 +code that is needed to be compiled instead of keeping configuration separately. + +61 +00:05:33,000 --> 00:05:41,000 +So with new compilation, in case of configuration changes, there is a resistance to do configurations + +62 +00:05:41,000 --> 00:05:48,000 +and source code separately because in this case it is easy to suppose is used to defend basis. + +63 +00:05:49,000 --> 00:05:55,000 +And another disadvantage is that in case you need to find mappings that you are interested in or finds + +64 +00:05:55,000 --> 00:06:02,000 +any particular suit that you need to search through the source code of many different files instead + +65 +00:06:02,000 --> 00:06:08,000 +of execution of search in one configuration file like in fabric smell is via. + +66 +00:06:09,000 --> 00:06:17,000 +So these are differences very ensure and it is only up to you which way of configurations to choose + +67 +00:06:18,000 --> 00:06:25,000 +person that I love x amount based configurations for enterprise projects and for running and educational + +68 +00:06:25,000 --> 00:06:26,000 +purposes. + +69 +00:06:26,000 --> 00:06:31,000 +It is easier and more clear way to configure with annotations. + +70 +00:06:31,000 --> 00:06:31,000 +Yes. + +71 +00:06:31,000 --> 00:06:38,000 +So like I used annotation based configurations and use classes, but when it comes to production project + +72 +00:06:38,000 --> 00:06:47,000 +and configuration of suites, probably I would prefer SML base configuration, but again, it depends + +73 +00:06:47,000 --> 00:06:48,000 +on different factors. + +74 +00:06:49,000 --> 00:06:56,000 +In this class we are going to know how to work with WebEx, email and X and on base configurations and + +75 +00:06:56,000 --> 00:06:59,000 +you will be able to choose which option you like most. + +76 +00:07:00,000 --> 00:07:06,000 +Now that's have a demo to understand and see specific configurations of X. + +77 +00:07:06,000 --> 00:07:14,000 +Among the first things I'd like to do is the location of the file, like we have discussed already. + +78 +00:07:14,000 --> 00:07:19,000 +File is located in developing folder which is in our lab. + +79 +00:07:19,000 --> 00:07:20,000 +That folder. + +80 +00:07:20,000 --> 00:07:28,000 +Accordingly, when you first open that maximum file in leaves, you might see the following editor this + +81 +00:07:28,000 --> 00:07:31,000 +this Eclipse editor for External Files. + +82 +00:07:32,000 --> 00:07:38,000 +Here you can easily see main notes of X-Mode tree and attributes of each node. + +83 +00:07:39,000 --> 00:07:42,000 +Well, it is also possible to work with this editor. + +84 +00:07:42,000 --> 00:07:45,000 +Personally, I prefer to work with this raw file. + +85 +00:07:46,000 --> 00:07:50,000 +You can try different options and select the one you like the most. + +86 +00:07:50,000 --> 00:07:54,000 +But during this lesson I will look with the source of the file. + +87 +00:07:55,000 --> 00:08:04,000 +Here you can find two different taps that allow you to see which of you stands for Extensible Markup + +88 +00:08:04,000 --> 00:08:05,000 +Language. + +89 +00:08:05,000 --> 00:08:12,000 +That means you can use any tax you wish in case of a system amount you are restricted. + +90 +00:08:12,000 --> 00:08:21,000 +Was using on the special packs with x amount you can use any tax while there is still an agreement which + +91 +00:08:21,000 --> 00:08:23,000 +tax you will use in our lab x amount file. + +92 +00:08:25,000 --> 00:08:28,000 +The first line in X file is called parallel. + +93 +00:08:29,000 --> 00:08:34,000 +Prologue is a component added in the beginning of an excellent document. + +94 +00:08:35,000 --> 00:08:42,000 +Otherwise, we can say that what I want it to be is because it document's element can be considered + +95 +00:08:42,000 --> 00:08:43,000 +as prologue. + +96 +00:08:44,000 --> 00:08:49,000 +Makes some provoke an excellent declaration and some processing instructions. + +97 +00:08:50,000 --> 00:08:56,000 +We are going to have a separate lesson about eczema, where we will discuss more about namespaces in + +98 +00:08:56,000 --> 00:08:56,000 +eczema. + +99 +00:08:57,000 --> 00:09:04,000 +It's for the nation and many, many of the seeds, because eczema itself is very interested in separate + +100 +00:09:04,000 --> 00:09:04,000 +topic. + +101 +00:09:05,000 --> 00:09:08,000 +As of now, we are going to learn how to use it. + +102 +00:09:09,000 --> 00:09:17,000 +Our vamp application, the only descriptor has one root element is it is called that that you can see + +103 +00:09:17,000 --> 00:09:26,000 +that that map that is opened in the beginning of the file and closed at the end of the file in the attachments + +104 +00:09:26,000 --> 00:09:27,000 +to the class and I'm going to leave. + +105 +00:09:27,000 --> 00:09:32,000 +The documentation was least of all possible elements anywhere with some file. + +106 +00:09:32,000 --> 00:09:38,000 +And in this lesson I am going to give you is the most important once in my opinion. + +107 +00:09:39,000 --> 00:09:47,000 +The first one element in our example here is the optional warm and cold display named element. + +108 +00:09:48,000 --> 00:09:51,000 +It specifies the web application display name. + +109 +00:09:51,000 --> 00:09:56,000 +This sure means it can be displayed by graphic user interface tools. + +110 +00:09:57,000 --> 00:09:59,000 +The next element is an interesting one. + +111 +00:10:00,000 --> 00:10:02,000 +It is called Vulcan File List. + +112 +00:10:03,000 --> 00:10:05,000 +I believe that intuitively. + +113 +00:10:05,000 --> 00:10:07,000 +You already understand what it is about. + +114 +00:10:08,000 --> 00:10:10,000 +This element is also optional. + +115 +00:10:11,000 --> 00:10:13,000 +It is not mandatory one. + +116 +00:10:13,000 --> 00:10:20,000 +It contains an order at least of welcome file elements when zero interacts with of applications. + +117 +00:10:20,000 --> 00:10:25,000 +Requested web server links for other sources from this list. + +118 +00:10:25,000 --> 00:10:27,000 +First Lords. + +119 +00:10:27,000 --> 00:10:28,000 +The first ones that was found. + +120 +00:10:29,000 --> 00:10:31,000 +Let me run our web application. + +121 +00:10:36,000 --> 00:10:42,000 +And when applications started, I navigated the zeroth euro of my application. + +122 +00:10:42,000 --> 00:10:49,000 +But each page is open to hear how Tomcat Server understands what page to open. + +123 +00:10:50,000 --> 00:10:52,000 +This is because of welcome file lists. + +124 +00:10:53,000 --> 00:10:57,000 +In this case, I navigated to the index JSP file. + +125 +00:10:57,000 --> 00:10:58,000 +Why? + +126 +00:10:58,000 --> 00:11:05,000 +Because in my web resources on the index GCP resource is available from all other resources from this + +127 +00:11:05,000 --> 00:11:06,000 +list. + +128 +00:11:06,000 --> 00:11:07,000 +Is it clear? + +129 +00:11:08,000 --> 00:11:14,000 +This is very useful to use for home pages in order to navigate user to the home page straight away. + +130 +00:11:15,000 --> 00:11:22,000 +Once user reached is a home resource of your web application and as you can see, welcome file list + +131 +00:11:22,000 --> 00:11:25,000 +elements may contain welcome file elements. + +132 +00:11:26,000 --> 00:11:26,000 +Let's continue. + +133 +00:11:27,000 --> 00:11:31,000 +The next element that I want to show you is called silhouette. + +134 +00:11:31,000 --> 00:11:34,000 +So that element is used to describe silhouette. + +135 +00:11:35,000 --> 00:11:38,000 +It may contain Zenimax animals. + +136 +00:11:39,000 --> 00:11:46,000 +So that name is used to refer to this ledger as a cigarette mopping and select full class name. + +137 +00:11:46,000 --> 00:11:49,000 +ZS Child elements are mandatory ones. + +138 +00:11:50,000 --> 00:11:57,000 +I still recommend you to watch the official documentation where you will be able to learn more details. + +139 +00:11:58,000 --> 00:12:07,000 +I would just stress that instead of the loss, you can use the AP file that these two are interchangeable. + +140 +00:12:07,000 --> 00:12:10,000 +The first one specifies class. + +141 +00:12:11,000 --> 00:12:15,000 +The second said Z Pass is a GSP file. + +142 +00:12:15,000 --> 00:12:20,000 +And just to remind you, we're going to have a separate lesson about GSP technology. + +143 +00:12:21,000 --> 00:12:26,000 +Well, all the elements inside that element are optional. + +144 +00:12:26,000 --> 00:12:31,000 +You can press pause and explore more details on this slide if you wish. + +145 +00:12:32,000 --> 00:12:35,000 +Once you explore the slide, we can proceed. + +146 +00:12:36,000 --> 00:12:36,000 +On the example. + +147 +00:12:36,000 --> 00:12:45,000 +You can also see how I passed these parameters so that also we can configure a load on startup value. + +148 +00:12:46,000 --> 00:12:52,000 +If you don't remember what is in lease, which previous lesson and the lesson about synthetic. + +149 +00:12:52,000 --> 00:12:55,000 +Now I've learned a lot on top. + +150 +00:12:55,000 --> 00:12:56,000 +Yes. + +151 +00:12:56,000 --> 00:13:04,000 +And in general, if you watched the previous lesson, you have to remember that we took the same configuration + +152 +00:13:04,000 --> 00:13:06,000 +so we can do we have EPS of that annotation. + +153 +00:13:07,000 --> 00:13:10,000 +So this is just a little bit different syntax. + +154 +00:13:11,000 --> 00:13:18,000 +The next element that we are going to review is called Silhouette Map and it is used to map zoom that + +155 +00:13:18,000 --> 00:13:20,000 +we take with zero plot. + +156 +00:13:21,000 --> 00:13:27,000 +And you already know from previous lesson that each scene that they have defined to your own mappings. + +157 +00:13:28,000 --> 00:13:36,000 +That's why I map my existing hello world so that it was already mapped to kind of go to another URL. + +158 +00:13:37,000 --> 00:13:39,000 +Let me navigate to the browser. + +159 +00:13:42,000 --> 00:13:45,000 +And now I will try to reach hello world source. + +160 +00:13:46,000 --> 00:13:49,000 +And you can see that I successfully reached my silhouette. + +161 +00:13:50,000 --> 00:13:55,000 +The next thing that I want to show you is how to set context parameters. + +162 +00:13:55,000 --> 00:14:03,000 +In previous lesson will read, you saw what that context is and how we can use it to set and abstract + +163 +00:14:03,000 --> 00:14:04,000 +attributes. + +164 +00:14:05,000 --> 00:14:08,000 +See you can see context for example element. + +165 +00:14:08,000 --> 00:14:17,000 +I can set parameter in the parameter rally special for this case I created and not assume that that + +166 +00:14:17,000 --> 00:14:19,000 +is called context for value. + +167 +00:14:19,000 --> 00:14:27,000 +So let in this so that I get some that context object and call getting needs param officer with context + +168 +00:14:27,000 --> 00:14:27,000 +object. + +169 +00:14:28,000 --> 00:14:37,000 +Now let me navigate as a web browser and here I use context per I'm zero to reach demo of that and you + +170 +00:14:37,000 --> 00:14:43,000 +can see on the screen will point to zero that we use for our context parameter. + +171 +00:14:44,000 --> 00:14:45,000 +Let's see. + +172 +00:14:45,000 --> 00:14:47,000 +I'd like to demo this. + +173 +00:14:47,000 --> 00:14:51,000 +How to Set Security Constraints for your web application. + +174 +00:14:52,000 --> 00:14:55,000 +If you remember homework for some type of web server. + +175 +00:14:55,000 --> 00:14:57,000 +We did see no task in Tomcat. + +176 +00:14:57,000 --> 00:14:58,000 +That X no. + +177 +00:14:59,000 --> 00:15:07,000 +In this example, I use the same piece of code from the solution to set basic authentication mucosa + +178 +00:15:07,000 --> 00:15:08,000 +example. + +179 +00:15:08,000 --> 00:15:14,000 +If it is not familiar to me, please look at the homework solution for Tomcat Web server. + +180 +00:15:15,000 --> 00:15:22,000 +The only difference here is running Tomcat from Eclipse, and I believe it is important to mention when + +181 +00:15:22,000 --> 00:15:29,000 +you improve to a Tomcat Web summit in Eclipse, you have to understand that changing configurations + +182 +00:15:29,000 --> 00:15:34,000 +is a Tomcat installation folder will bring you nothing. + +183 +00:15:35,000 --> 00:15:44,000 +You have to configure Tomcat users in the place where can Eclipse in project explorer new project is + +184 +00:15:44,000 --> 00:15:44,000 +created. + +185 +00:15:44,000 --> 00:15:53,000 +It is called servers Open Tomcat servers at present and here you can find Tomcat users configuration + +186 +00:15:53,000 --> 00:15:53,000 +file. + +187 +00:15:54,000 --> 00:15:59,000 +If you wish to ask the about Tomcat Web server, you already know what we have to add here. + +188 +00:16:00,000 --> 00:16:05,000 +We have to add user with a concrete mole and password for authentication. + +189 +00:16:06,000 --> 00:16:13,000 +You can see that our admin user has clients role and in our event with similar file, we also allow + +190 +00:16:13,000 --> 00:16:16,000 +a syndication for users with clients role. + +191 +00:16:17,000 --> 00:16:26,000 +Let me access test false acorn and you can see that I faced was web authentication I just write logging + +192 +00:16:26,000 --> 00:16:33,000 +password and I can reach end point I have full for because such resource doesn't exist. + +193 +00:16:34,000 --> 00:16:39,000 +But the main thing for this example is that I post authentication on this fact. + +194 +00:16:40,000 --> 00:16:40,000 +Great. + +195 +00:16:41,000 --> 00:16:48,000 +Let's continue in the deployment descriptor we can configure parameter for our session was a session + +196 +00:16:48,000 --> 00:16:49,000 +config element. + +197 +00:16:49,000 --> 00:16:56,000 +We can configure session demo in defiance is the number of minutes after which sessions in this web + +198 +00:16:56,000 --> 00:17:03,000 +application Explorer, we're going to learn how to work with the session object as a separate lesson. + +199 +00:17:04,000 --> 00:17:08,000 +You already know that we can use session config element in web x-mode. + +200 +00:17:09,000 --> 00:17:14,000 +Among all the important elements, is it possible to consider an example? + +201 +00:17:14,000 --> 00:17:20,000 +But would you introduce a date for consideration of filters and global error handling? + +202 +00:17:21,000 --> 00:17:27,000 +But we are glad because this is a relevant lessons because none of that filters error. + +203 +00:17:27,000 --> 00:17:34,000 +Having allies out of the scope of this lesson because of the amount of scenes we discuss in scope of + +204 +00:17:34,000 --> 00:17:35,000 +that topics. + +205 +00:17:36,000 --> 00:17:39,000 +And I believe that's what I wanted to share with you today. + +206 +00:17:39,000 --> 00:17:46,000 +Let's recap what we have learned in this lesson, in this lesson and what that is. + +207 +00:17:47,000 --> 00:17:53,000 +Now, you know the difference between annotation, base configuration and excellent base configuration. + +208 +00:17:53,000 --> 00:18:02,000 +We also discussed that using one or another is a matter of style and each option has its own advantages + +209 +00:18:02,000 --> 00:18:03,000 +and disadvantages. + +210 +00:18:03,000 --> 00:18:06,000 +With that, how to configure Vulcan File. + +211 +00:18:06,000 --> 00:18:15,000 +This is a lesson the example of configuring so that I that's not an event it's now I showed you example + +212 +00:18:15,000 --> 00:18:23,000 +was configuration of server and that's parameters and also we can see that security constrains web application + +213 +00:18:24,000 --> 00:18:31,000 +to restrict access to some resources at the end of the lesson we learned also session can see element. + +214 +00:18:32,000 --> 00:18:33,000 +That's all for today. + +215 +00:18:33,000 --> 00:18:35,000 +Thanks for your attention. + +216 +00:18:35,000 --> 00:18:39,000 +Have a great day and see you in the next lesson. + diff --git a/61 - Servlets/external-links.txt b/61 - Servlets/external-links.txt new file mode 100644 index 0000000000000000000000000000000000000000..affdbab11cf0b9ad5238fc4364fb3e3ac1293d26 --- /dev/null +++ b/61 - Servlets/external-links.txt @@ -0,0 +1,18 @@ + +001 Link-to-Jakarta-documentation +https://jakarta.ee/specifications/platform/9/apidocs/jakarta/servlet/http/package-summary.html + +001 Link-to-the-HelloWorldServlet +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/servlets/HelloWorldServlet.java + +002 Source-code-examples-from-the-lesson +https://github.com/AndriiPiatakha/java-learnit-web-online-store/tree/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/servlets + +003 Documentation-about-elements-in-web.xml-file +https://docs.oracle.com/cd/E13222_01/wls/docs81/webapp/web_xml.html#1017275 + +003 Source-of-web.xml-from-the-lesson +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/WEB-INF/web.xml + +003 Source-code-of-ContextParamValueServlet +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/servlets/ContextParamValueServlet.java diff --git a/62 - Web Filters/001 Source-code-of-HelloWorldFilter.url b/62 - Web Filters/001 Source-code-of-HelloWorldFilter.url new file mode 100644 index 0000000000000000000000000000000000000000..3a876913f479fd97d85765a3f1590124808a76e3 --- /dev/null +++ b/62 - Web Filters/001 Source-code-of-HelloWorldFilter.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/filters/HelloWorldFilter.java \ No newline at end of file diff --git a/62 - Web Filters/001 Source-of-web.xml-from-the-lesson.url b/62 - Web Filters/001 Source-of-web.xml-from-the-lesson.url new file mode 100644 index 0000000000000000000000000000000000000000..bf702f3087c5b4c57f72cfacff4304de28f0f772 --- /dev/null +++ b/62 - Web Filters/001 Source-of-web.xml-from-the-lesson.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/WEB-INF/web.xml \ No newline at end of file diff --git a/62 - Web Filters/001 Web Filters_en.srt b/62 - Web Filters/001 Web Filters_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..df6e61125af5ba72ee95b2b559a6d6a6b52624ce --- /dev/null +++ b/62 - Web Filters/001 Web Filters_en.srt @@ -0,0 +1,884 @@ +1 +00:00:06,000 --> 00:00:14,000 +Hello my friends in this last month announce blog that filters are also will learn how to use them in + +2 +00:00:14,000 --> 00:00:14,000 +practice. + +3 +00:00:15,000 --> 00:00:22,000 +It is important to learn this topic because that filters are in the basement of some advanced frameworks + +4 +00:00:22,000 --> 00:00:24,000 +like spring security, for example. + +5 +00:00:25,000 --> 00:00:29,000 +We'll start our lesson from the overview of map filters. + +6 +00:00:30,000 --> 00:00:34,000 +I'm going to explain what they are and why we need them. + +7 +00:00:35,000 --> 00:00:39,000 +I will explain when and where we can use map filters. + +8 +00:00:39,000 --> 00:00:43,000 +After that, we'll talk about filter lifecycle. + +9 +00:00:43,000 --> 00:00:49,000 +Knowing these basics will proceed with none of the source code of filter API. + +10 +00:00:50,000 --> 00:00:53,000 +Filter API consists of the following interfaces. + +11 +00:00:54,000 --> 00:00:57,000 +Filter filter config and filter chain. + +12 +00:00:58,000 --> 00:01:05,000 +I will explain what this spreadsheet types enum is and what is the difference between include and for + +13 +00:01:06,000 --> 00:01:07,000 +the real examples. + +14 +00:01:07,000 --> 00:01:08,000 +Will configure filter. + +15 +00:01:08,000 --> 00:01:09,000 +Yeah. + +16 +00:01:09,000 --> 00:01:12,000 +That filter annotation and we have that x amount. + +17 +00:01:13,000 --> 00:01:14,000 +Let's start our lesson. + +18 +00:01:15,000 --> 00:01:22,000 +Let's start from the Sierra first and understand what the filters are and why we need them. + +19 +00:01:22,000 --> 00:01:23,000 +Java. + +20 +00:01:23,000 --> 00:01:29,000 +So that filter is used to intercept the class request and do some preprocessing. + +21 +00:01:30,000 --> 00:01:37,000 +Imagine that you have group of resources dedicated for users with admin role only, and you need to + +22 +00:01:37,000 --> 00:01:46,000 +make sure that nobody besides authenticated users was at zero will not be able to access that resources. + +23 +00:01:47,000 --> 00:01:55,000 +This check may be placed into that filter and all requests, those are secure resources will be intercepted + +24 +00:01:55,000 --> 00:02:00,000 +and validated based on the user roles that will be decision made. + +25 +00:02:00,000 --> 00:02:02,000 +What should be done next? + +26 +00:02:02,000 --> 00:02:07,000 +Also, we can control post processing by intercepting as a response. + +27 +00:02:08,000 --> 00:02:09,000 +Why we might need this. + +28 +00:02:10,000 --> 00:02:15,000 +Imagine that you need to add additional added resources at once. + +29 +00:02:15,000 --> 00:02:24,000 +For example, you don't want to cache JavaScript resources one lines request so you can do the same + +30 +00:02:24,000 --> 00:02:31,000 +to create in that filter, mapping all JavaScript resources to it and control all requests to these + +31 +00:02:31,000 --> 00:02:31,000 +resources. + +32 +00:02:32,000 --> 00:02:36,000 +Also, that filters might be used for other tasks. + +33 +00:02:36,000 --> 00:02:44,000 +For example, perform filtering tasks such as conversion, logging, compression, encryption, decryption, + +34 +00:02:44,000 --> 00:02:49,000 +input, validation, etc. This red filter is pluggable. + +35 +00:02:50,000 --> 00:02:54,000 +This means that its entry is defined in the fabric single file. + +36 +00:02:54,000 --> 00:03:02,000 +Or we have that filter annotation and removes the entry both filter and mapping user from garbage smell. + +37 +00:03:02,000 --> 00:03:11,000 +All combat filter annotation will be removed automatically and we don't need to change this too, so + +38 +00:03:11,000 --> 00:03:16,000 +we can easily plug the filter to control access to resources that we want. + +39 +00:03:17,000 --> 00:03:24,000 +Some other common tasks that we can do with so that things are logging the request parameters, the + +40 +00:03:24,000 --> 00:03:31,000 +log files, including logging of the IP addresses of the computers from which the requests originate. + +41 +00:03:31,000 --> 00:03:39,000 +Authentication and authorization of request for resources for mining of request, body or header before + +42 +00:03:39,000 --> 00:03:42,000 +sending it to select for mining of the response before. + +43 +00:03:42,000 --> 00:03:49,000 +Send it back to the client for mining response by adding some cookies, headers, information, etc. + +44 +00:03:50,000 --> 00:03:52,000 +Comparisons of response data sense. + +45 +00:03:52,000 --> 00:03:57,000 +Does it want encryption and decryption input validation? + +46 +00:03:58,000 --> 00:04:04,000 +We now have basic sense about filters that's proceeding on filters by looking at the source code. + +47 +00:04:04,000 --> 00:04:06,000 +And we have examples. + +48 +00:04:07,000 --> 00:04:11,000 +On the screen, you can see the source code of the filter interface. + +49 +00:04:11,000 --> 00:04:14,000 +It is located in Jakarta, so that's the package. + +50 +00:04:15,000 --> 00:04:22,000 +Let's explore the masses of the new client and this interface similar to the server lifecycle of the + +51 +00:04:22,000 --> 00:04:22,000 +filter. + +52 +00:04:22,000 --> 00:04:27,000 +Maybe be described with three main methods zero in it. + +53 +00:04:27,000 --> 00:04:36,000 +Do filter and destroy the net massive as water type and receives filter config as messages are given + +54 +00:04:37,000 --> 00:04:44,000 +a little bit late things lesson that I'm going to talk about filter config to one container initializes + +55 +00:04:44,000 --> 00:04:51,000 +the filter this is the masses that gets invoke this massive is called only wants in the lifecycle of + +56 +00:04:51,000 --> 00:04:56,000 +the filter and we should initialize any resources in this mess. + +57 +00:04:57,000 --> 00:05:03,000 +Filter config is used by container to provide a need parameters and so that context object is a filter. + +58 +00:05:04,000 --> 00:05:06,000 +We can throw some exceptions. + +59 +00:05:06,000 --> 00:05:13,000 +This method, this method has a default version that means we don't necessarily need to implement. + +60 +00:05:13,000 --> 00:05:19,000 +It will implement and filter interface, but we definitely can if we need. + +61 +00:05:20,000 --> 00:05:24,000 +The next set of the film, The life cycle is called The Filter. + +62 +00:05:25,000 --> 00:05:27,000 +This massive is an abstract one. + +63 +00:05:28,000 --> 00:05:34,000 +It also has what written this massive history parameters Zia. + +64 +00:05:34,000 --> 00:05:43,000 +So that's request, that's response and filter chain and believes that you already know what's worse. + +65 +00:05:43,000 --> 00:05:48,000 +And so what response are from previous lessons and what filter change is. + +66 +00:05:48,000 --> 00:05:52,000 +We're going to learn also in details in this lesson. + +67 +00:05:52,000 --> 00:05:53,000 +Much a little bit later. + +68 +00:05:54,000 --> 00:06:03,000 +This is a massive is it invoked every time by container one it has to apply filter the source filter + +69 +00:06:03,000 --> 00:06:07,000 +chain is used to invoke the next filter in the chain. + +70 +00:06:08,000 --> 00:06:11,000 +This is a great example of chain of responsibility. + +71 +00:06:12,000 --> 00:06:18,000 +If you don't know what chain of responsibility to use, you are welcome to check my course of all the + +72 +00:06:18,000 --> 00:06:23,000 +Gulf parties where I explains all contents with detailed examples. + +73 +00:06:24,000 --> 00:06:26,000 +And the last, but not the least massive insult. + +74 +00:06:26,000 --> 00:06:32,000 +The life cycle is called destroy this massive default implementation. + +75 +00:06:32,000 --> 00:06:39,000 +And also it is not mandatory to implement when you want to implement through the interface. + +76 +00:06:39,000 --> 00:06:44,000 +One container offloads the field, for instance it invokes to destroy mass. + +77 +00:06:45,000 --> 00:06:49,000 +This is a massive where we can close any resources opened by a filter. + +78 +00:06:50,000 --> 00:06:54,000 +This message is called only once in a lifetime of filter. + +79 +00:06:55,000 --> 00:06:57,000 +That's how Filter Interface looks like. + +80 +00:06:58,000 --> 00:07:04,000 +Let's now talk more about Filter API real and filter interface. + +81 +00:07:04,000 --> 00:07:10,000 +But we also have to learn what filter config is and what filter change is. + +82 +00:07:11,000 --> 00:07:15,000 +I open the source code or filter config interface. + +83 +00:07:15,000 --> 00:07:23,000 +As you can see, this interface doesn't have hundreds of masses, so everything is simple and predictable + +84 +00:07:23,000 --> 00:07:32,000 +within a filter configuration object used by similar container to pass information to filter during + +85 +00:07:32,000 --> 00:07:33,000 +initialization. + +86 +00:07:34,000 --> 00:07:43,000 +The interface has the following message get filter neat, get some context net any parameter and yet + +87 +00:07:43,000 --> 00:07:44,000 +need parameter names. + +88 +00:07:45,000 --> 00:07:48,000 +Massive names are self-described zoom. + +89 +00:07:49,000 --> 00:07:53,000 +Things that we didn't discuss here is possibly this is a filters. + +90 +00:07:54,000 --> 00:08:00,000 +Yes, it is similar to some that it is possible to pass the parameters to the filters. + +91 +00:08:01,000 --> 00:08:05,000 +Let me open now another interface that is called filter change. + +92 +00:08:06,000 --> 00:08:13,000 +As you can see, filter change is an interface with one absolute massive that is called the filter. + +93 +00:08:13,000 --> 00:08:21,000 +And that led to a request as to what response the filter chain is an object provided by this web container + +94 +00:08:21,000 --> 00:08:28,000 +that does a developer, given the view into the invocation chain of the field to its request first source. + +95 +00:08:29,000 --> 00:08:33,000 +Filters use the filter chain to invoke the next filter in the chain. + +96 +00:08:34,000 --> 00:08:40,000 +Or if the colon filter is the last field in the chain, it involves the source at the end of the chain. + +97 +00:08:41,000 --> 00:08:48,000 +So you can understand, I can view the chain of filters easier to follow one by one. + +98 +00:08:49,000 --> 00:08:54,000 +Basically, we can have multiple filters joined in one chain. + +99 +00:08:54,000 --> 00:09:02,000 +Imagine that we have four sources that request want to reach and we can have multiple filters on the + +100 +00:09:02,000 --> 00:09:10,000 +way to this source one filter, positive to another filter and the next one to another. + +101 +00:09:10,000 --> 00:09:14,000 +Each filtering chain has its own responsibility. + +102 +00:09:14,000 --> 00:09:18,000 +First one is the chain of civilization of the user, for example. + +103 +00:09:19,000 --> 00:09:24,000 +The second one is to log the details of request and so on and so forth. + +104 +00:09:24,000 --> 00:09:30,000 +The order filters chain will be the order that declared invalid simple file. + +105 +00:09:31,000 --> 00:09:39,000 +As you mentioned before, the chain is clear representation of chain of responsibility designed for + +106 +00:09:39,000 --> 00:09:44,000 +the queen and you and my golf course with all students. + +107 +00:09:44,000 --> 00:09:49,000 +Please refer to that course the even more designed pardons. + +108 +00:09:50,000 --> 00:09:52,000 +Now let's declare that filth. + +109 +00:09:53,000 --> 00:10:01,000 +As you already know, we can have different type of configuration, annotation, base and maximum base. + +110 +00:10:02,000 --> 00:10:07,000 +In this lesson, I'm going to show you both types of web filter configuration. + +111 +00:10:07,000 --> 00:10:11,000 +Let's make our slightly new filter. + +112 +00:10:12,000 --> 00:10:16,000 +Let's change package and call new package filters. + +113 +00:10:17,000 --> 00:10:19,000 +Let's use a name to our filter. + +114 +00:10:20,000 --> 00:10:20,000 +Let's go. + +115 +00:10:20,000 --> 00:10:21,000 +Hello, world. + +116 +00:10:21,000 --> 00:10:22,000 +Filter. + +117 +00:10:24,000 --> 00:10:24,000 +Next. + +118 +00:10:26,000 --> 00:10:27,000 +In the filter map. + +119 +00:10:28,000 --> 00:10:34,000 +We have to consider the earlier part that is going to be used to intercept requests. + +120 +00:10:34,000 --> 00:10:36,000 +Let's put asterisks here. + +121 +00:10:37,000 --> 00:10:38,000 +What does it mean? + +122 +00:10:39,000 --> 00:10:46,000 +This means that our Hello World Field will intercept all requests to our web application. + +123 +00:10:47,000 --> 00:10:50,000 +Here you can see additional interesting configuration. + +124 +00:10:51,000 --> 00:10:59,000 +You can configure a filter based on the dispatcher types zero request forward and delete an error. + +125 +00:11:00,000 --> 00:11:03,000 +In real life it is one more additional dispatcher type. + +126 +00:11:03,000 --> 00:11:04,000 +Is this code assumed? + +127 +00:11:05,000 --> 00:11:06,000 +What does this mean? + +128 +00:11:07,000 --> 00:11:13,000 +The dispatcher type of request is used by the containment to select the filters that need to be applied + +129 +00:11:13,000 --> 00:11:14,000 +to the request. + +130 +00:11:15,000 --> 00:11:21,000 +On the field this was match and dispatch type and euro parties will be applied. + +131 +00:11:22,000 --> 00:11:28,000 +The initial dispatch type of request is defined as dispatch IT type request. + +132 +00:11:28,000 --> 00:11:34,000 +The dispatcher thought of request dispatch where request dispatch for an asset. + +133 +00:11:35,000 --> 00:11:42,000 +Liquidating previous lesson is dispatched at type four and in the case we use method include of request + +134 +00:11:42,000 --> 00:11:47,000 +dispatcher all dispatcher type is include respectively. + +135 +00:11:48,000 --> 00:11:55,000 +What you want to view is you include massive but this also can be used as for was only one difference + +136 +00:11:56,000 --> 00:12:06,000 +for for us in a quest from a select another source and include includes is a content of resources response. + +137 +00:12:07,000 --> 00:12:11,000 +The difference between the two masses is that's it for tomorrow. + +138 +00:12:11,000 --> 00:12:16,000 +I will close out the three after it has been invoked. + +139 +00:12:16,000 --> 00:12:22,000 +Whereas in three mass this is out the stream open includes massive. + +140 +00:12:22,000 --> 00:12:31,000 +It takes content from another resource and includes it in the similar zip for the massive sense is a + +141 +00:12:31,000 --> 00:12:33,000 +request to another resource. + +142 +00:12:34,000 --> 00:12:36,000 +Was a spreadsheet type of that. + +143 +00:12:36,000 --> 00:12:45,000 +The was dispatched in one of the messy context dispatch addresses he's given as dispatch type passing. + +144 +00:12:46,000 --> 00:12:52,000 +Finally dispatch and type of work was dispatched through an error page and was a continuous error handling + +145 +00:12:52,000 --> 00:12:55,000 +mechanism is given as dispatched should that error. + +146 +00:12:56,000 --> 00:13:01,000 +We can select the request, for example, here and click next button. + +147 +00:13:02,000 --> 00:13:05,000 +We don't need constructors from the superclass. + +148 +00:13:05,000 --> 00:13:11,000 +That's why you can uncheck this checkbox and now you can click Finish Button. + +149 +00:13:12,000 --> 00:13:21,000 +We created our first filter and again because of configuration use much we need to change manual gearbox + +150 +00:13:21,000 --> 00:13:25,000 +to Jakarta in import statements in order to avoid compilation errors. + +151 +00:13:26,000 --> 00:13:34,000 +The sake of this demo, we don't need using this store nor any comparisons so far, so let's just remove + +152 +00:13:34,000 --> 00:13:34,000 +them. + +153 +00:13:35,000 --> 00:13:43,000 +You can see that we have that filter annotation and it is used to configure euro parties and dispatch + +154 +00:13:43,000 --> 00:13:44,000 +it types. + +155 +00:13:44,000 --> 00:13:50,000 +Lets reduce the sanitation to none of the attributes we can use to configure our that filter. + +156 +00:13:51,000 --> 00:13:59,000 +If you look at the list of massive names this similar to the maps in that annotation, just some of + +157 +00:13:59,000 --> 00:14:03,000 +them on you find that you focus your attention on different ones. + +158 +00:14:04,000 --> 00:14:12,000 +So with names it allows the least array of select names to which you want to apply current filter field. + +159 +00:14:12,000 --> 00:14:19,000 +Other words, the filter will filter requests to the specified silhouettes only. + +160 +00:14:20,000 --> 00:14:25,000 +And we already briefly discussed with you what this budget types are. + +161 +00:14:25,000 --> 00:14:32,000 +As you can see, we can pass an array of dispatch types and dispatch it type itself isn't enough. + +162 +00:14:33,000 --> 00:14:37,000 +Here are five dispatch types that we have reviewed and discussed. + +163 +00:14:38,000 --> 00:14:42,000 +Let's get back to the source code of our overall filter. + +164 +00:14:42,000 --> 00:14:44,000 +Now in the filter. + +165 +00:14:44,000 --> 00:14:44,000 +Massive. + +166 +00:14:45,000 --> 00:14:48,000 +Let's print system out to our console. + +167 +00:14:48,000 --> 00:14:50,000 +Let's bring Hello World. + +168 +00:14:51,000 --> 00:14:51,000 +That's it. + +169 +00:14:52,000 --> 00:14:57,000 +Do not forget to quote the filter message on the filter chain object. + +170 +00:14:58,000 --> 00:15:03,000 +Without this massive invocations request will not reach targeted resource. + +171 +00:15:04,000 --> 00:15:10,000 +Basically, if you don't want request to use the target resource, you shouldn't call this message. + +172 +00:15:11,000 --> 00:15:19,000 +Every operation performed before and location of the filter and massive that operations happened before + +173 +00:15:19,000 --> 00:15:25,000 +request reaches the source ever in what is written after the filter method. + +174 +00:15:26,000 --> 00:15:29,000 +Those are operations that are done after we left. + +175 +00:15:29,000 --> 00:15:37,000 +So that, for example and moving back to the client, let's run a web application on web server. + +176 +00:15:49,000 --> 00:15:56,000 +And once application is started, we can see messages from our hello world filter and console and even + +177 +00:15:56,000 --> 00:15:57,000 +more. + +178 +00:15:57,000 --> 00:16:04,000 +In case I would wish on those sources it would be created in this lesson I would see the same message + +179 +00:16:04,000 --> 00:16:08,000 +on console and even in case I want each other's resource. + +180 +00:16:08,000 --> 00:16:10,000 +Again, the same message. + +181 +00:16:11,000 --> 00:16:20,000 +This is because our human mapping that we set in our field, we make it intercept all possible requests. + +182 +00:16:21,000 --> 00:16:22,000 +That's how it works. + +183 +00:16:23,000 --> 00:16:29,000 +And the last because the news that I'm going to show you for the days, this configuration of field + +184 +00:16:29,000 --> 00:16:36,000 +that in the X-Men if you're familiar with configuration of the silhouette in fabrics and you didn't + +185 +00:16:36,000 --> 00:16:43,000 +skip previous lesson the configuration of the field there will be like a piece of cake for you will + +186 +00:16:43,000 --> 00:16:50,000 +fill the element with such magnitude it achieves us field, the mean and field and plus also we can + +187 +00:16:50,000 --> 00:16:54,000 +perceive parameters and everything is similar to this. + +188 +00:16:54,000 --> 00:17:01,000 +So that configuration, when we declare that field, we need to map the zero path. + +189 +00:17:01,000 --> 00:17:10,000 +And for this I need to describe another element of ethics and also the school field and I use filter + +190 +00:17:10,000 --> 00:17:11,000 +name and euro pardon. + +191 +00:17:12,000 --> 00:17:21,000 +Now let me navigate back to our Hello World Filter in order to read in program that we need to override + +192 +00:17:21,000 --> 00:17:22,000 +in mass. + +193 +00:17:23,000 --> 00:17:31,000 +Family warned in the message that they feel they can see as massive arguments. + +194 +00:17:32,000 --> 00:17:36,000 +And then signs a massive one to of the consoles. + +195 +00:17:36,000 --> 00:17:41,000 +The value of the new parameter was named the brown one. + +196 +00:17:41,000 --> 00:17:46,000 +The silicon fake reference causing massive gas needs or ram. + +197 +00:17:46,000 --> 00:17:49,000 +And I posit the name of the ram. + +198 +00:17:50,000 --> 00:17:50,000 +That's. + +199 +00:17:52,000 --> 00:17:59,000 +For the sake of the example and with creation of two instances of the same field, then let's command + +200 +00:17:59,000 --> 00:18:05,000 +that field to annotation, because for declaring the same field to envelop x amount that will intercepts + +201 +00:18:05,000 --> 00:18:07,000 +the request to the same part. + +202 +00:18:09,000 --> 00:18:14,000 +Considering the fact that we did change changes of the club in this group, that we need to restart + +203 +00:18:14,000 --> 00:18:21,000 +the server and review of our application in order to make sure all changes were applied. + +204 +00:18:22,000 --> 00:18:28,000 +And after we started the server, we have to cancel the value of of them. + +205 +00:18:29,000 --> 00:18:35,000 +This proves that our field the mapping from WebEx and old works amazing. + +206 +00:18:35,000 --> 00:18:41,000 +Now you know how to configure that filter with the help of that filter annotation. + +207 +00:18:41,000 --> 00:18:42,000 +And we use web. + +208 +00:18:42,000 --> 00:18:43,000 +Excellent file. + +209 +00:18:44,000 --> 00:18:47,000 +That's all what I wanted to share with you in this lesson. + +210 +00:18:48,000 --> 00:18:51,000 +Let's recap what we have learned today. + +211 +00:18:52,000 --> 00:18:55,000 +In this lesson, we learned what that filters are. + +212 +00:18:56,000 --> 00:19:00,000 +I explained why we use them and how we can use them. + +213 +00:19:01,000 --> 00:19:09,000 +We learned to filter lifecycle using the lessons review the filter API including the filter filter config + +214 +00:19:10,000 --> 00:19:12,000 +filter change interfaces. + +215 +00:19:12,000 --> 00:19:16,000 +Real examples of how to configure filter. + +216 +00:19:16,000 --> 00:19:16,000 +Yeah. + +217 +00:19:16,000 --> 00:19:18,000 +That filter annotation. + +218 +00:19:18,000 --> 00:19:20,000 +How do we have habits in on file? + +219 +00:19:21,000 --> 00:19:22,000 +That's all for this lesson. + +220 +00:19:23,000 --> 00:19:25,000 +Thanks a lot for your attention. + +221 +00:19:25,000 --> 00:19:28,000 +Have a great day and see you in the next lesson. + diff --git a/62 - Web Filters/external-links.txt b/62 - Web Filters/external-links.txt new file mode 100644 index 0000000000000000000000000000000000000000..9a1003fc68e7beb897687ca8cf8422fe78d2b7a7 --- /dev/null +++ b/62 - Web Filters/external-links.txt @@ -0,0 +1,6 @@ + +001 Source-code-of-HelloWorldFilter +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/filters/HelloWorldFilter.java + +001 Source-of-web.xml-from-the-lesson +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/WEB-INF/web.xml diff --git a/63 - Session & Cookies/001 Session & Cookies_en.srt b/63 - Session & Cookies/001 Session & Cookies_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..78cd09e9566de7d1ea474fa6f4668d919dc8ecb5 --- /dev/null +++ b/63 - Session & Cookies/001 Session & Cookies_en.srt @@ -0,0 +1,1156 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello, team. + +2 +00:00:07,000 --> 00:00:12,000 +In this lesson, they're going to announce the very important topic that you will use very often on + +3 +00:00:12,000 --> 00:00:12,000 +practice. + +4 +00:00:13,000 --> 00:00:20,000 +So then we're going to learn what session and cookies are and how we can use them in code and in our + +5 +00:00:20,000 --> 00:00:21,000 +application. + +6 +00:00:22,000 --> 00:00:26,000 +We'll start from running Siri and understanding what a session is. + +7 +00:00:26,000 --> 00:00:30,000 +We're going to review different sessions, reacting to cues. + +8 +00:00:30,000 --> 00:00:35,000 +After that, we'll learn what cookies are and what different types of cookies exist. + +9 +00:00:36,000 --> 00:00:38,000 +I will explain what a PR is. + +10 +00:00:39,000 --> 00:00:46,000 +Also, during the lesson, we are going to have a lot of practical activities, just practical examples. + +11 +00:00:46,000 --> 00:00:53,000 +We'll use a source code of a session interface, how to work with a session and practice, how to create + +12 +00:00:53,000 --> 00:00:54,000 +it and invalidate. + +13 +00:00:55,000 --> 00:01:02,000 +And at the end of the lesson they're going to run how to work with cookies, how to read them at new + +14 +00:01:02,000 --> 00:01:04,000 +cookies as a response and remove them. + +15 +00:01:05,000 --> 00:01:06,000 +Let's start our lesson. + +16 +00:01:07,000 --> 00:01:10,000 +Let's start from learn what session is. + +17 +00:01:10,000 --> 00:01:17,000 +Actually, if you watch the course attentively, you have to remember to answer this question because + +18 +00:01:17,000 --> 00:01:23,000 +when we learned HTP protocol, I already explained to you what a session is. + +19 +00:01:23,000 --> 00:01:28,000 +But just in case, let's recap the definition one more time. + +20 +00:01:29,000 --> 00:01:37,000 +In terms of worldwide wrap, a session indicates a period of time that a single user visits a website. + +21 +00:01:38,000 --> 00:01:45,000 +A session starts when the user requests for the first page, and during this session, the user can + +22 +00:01:45,000 --> 00:01:49,000 +view as many pages as he wants the session. + +23 +00:01:49,000 --> 00:01:57,000 +And if the user hasn't requested any pages for a given amount of time, this period of time is called + +24 +00:01:57,000 --> 00:01:59,000 +time of the session. + +25 +00:01:59,000 --> 00:02:07,000 +Time out varies depending on the server configuration, typically from 15 to 30 minutes. + +26 +00:02:08,000 --> 00:02:12,000 +I believe you remember that protocol is stateless protocol. + +27 +00:02:12,000 --> 00:02:14,000 +What does stateless mean? + +28 +00:02:15,000 --> 00:02:23,000 +This means that each request doesn't know the history of all previous requests and each new request + +29 +00:02:23,000 --> 00:02:25,000 +is not connected with the previous ones. + +30 +00:02:26,000 --> 00:02:33,000 +Because of this, we need to have a mechanism that would ensure that we can identify client while it + +31 +00:02:33,000 --> 00:02:34,000 +interacts with us. + +32 +00:02:34,000 --> 00:02:36,000 +Was in one session. + +33 +00:02:36,000 --> 00:02:43,000 +That's why we use session mechanism to identify a single user because the defense requests. + +34 +00:02:44,000 --> 00:02:44,000 +Session. + +35 +00:02:44,000 --> 00:02:49,000 +Tracking is a way to maintain state data of a user. + +36 +00:02:50,000 --> 00:02:57,000 +It is also known as session management in Samat Zen G from techniques used in session tracking. + +37 +00:02:57,000 --> 00:03:05,000 +Zia, who keeps hidden for few months you will write the session. + +38 +00:03:05,000 --> 00:03:14,000 +Tracking using cookies is a primary mechanism in case the user's web browser does supports cookies. + +39 +00:03:14,000 --> 00:03:23,000 +Then you are writing offline form fields can be used in web development program or use session mechanism + +40 +00:03:23,000 --> 00:03:32,000 +to manage users information that focuses on the E particular session such as syndication, state, user + +41 +00:03:32,000 --> 00:03:34,000 +name or any date. + +42 +00:03:34,000 --> 00:03:37,000 +Does that need to be shared across for requests? + +43 +00:03:38,000 --> 00:03:44,000 +So to sum it up, we need to use session tracking in order to recognize the user. + +44 +00:03:44,000 --> 00:03:50,000 +Let's learn techniques of session tracking, and the first technique is cookie. + +45 +00:03:50,000 --> 00:03:58,000 +A cookie is a small piece of information that is persisted between the multiple clients request, and + +46 +00:03:58,000 --> 00:04:06,000 +cookie has a name, a single value and optional attributes such as command pass and the main qualifiers, + +47 +00:04:07,000 --> 00:04:10,000 +a maximum age and a version number. + +48 +00:04:10,000 --> 00:04:17,000 +With the help of cookies, we can pass application related information to the client side, including + +49 +00:04:17,000 --> 00:04:19,000 +the unique identifier of the session. + +50 +00:04:20,000 --> 00:04:27,000 +Taking into account that the cookies are passed with each request as a server, client also sends a + +51 +00:04:27,000 --> 00:04:28,000 +unique session identifier. + +52 +00:04:28,000 --> 00:04:31,000 +It is a server on the server side. + +53 +00:04:31,000 --> 00:04:41,000 +We can map session D with existing session object and in case mapping is successful, we can easily + +54 +00:04:41,000 --> 00:04:47,000 +identify group of the latest requests from the same client this week. + +55 +00:04:47,000 --> 00:04:53,000 +Types of Computer Cookies, Zia Session Persistence and Search Party. + +56 +00:04:54,000 --> 00:05:02,000 +These virtually invisible text files are all very different, each with their own mission. + +57 +00:05:03,000 --> 00:05:10,000 +These cookies are made to track, collect and store annual data application requests. + +58 +00:05:11,000 --> 00:05:16,000 +Session cookies are temporary cookies that memorize your online activities. + +59 +00:05:16,000 --> 00:05:25,000 +Since websites have no sense of memory without these cookies, your side browsing history would always + +60 +00:05:25,000 --> 00:05:32,000 +be that, in fact, with every click you would make, the website will treat you as a completely new + +61 +00:05:32,000 --> 00:05:33,000 +visitor. + +62 +00:05:34,000 --> 00:05:41,000 +A good example of how session cookies are helpful is online shopping when shopping online. + +63 +00:05:41,000 --> 00:05:44,000 +You can check out at any time. + +64 +00:05:44,000 --> 00:05:47,000 +That's because session cookies track your movement. + +65 +00:05:48,000 --> 00:05:54,000 +Without these cookies, whenever you would go to check out your cart would be empty. + +66 +00:05:55,000 --> 00:06:02,000 +Ultimately, session cookies help you maneuvers through the Internet by remembering your actions as + +67 +00:06:02,000 --> 00:06:02,000 +a store. + +68 +00:06:03,000 --> 00:06:06,000 +As soon as you close out of a browser. + +69 +00:06:07,000 --> 00:06:16,000 +Persistent cookies, also known as first party cookies, work by tracking your online preferences when + +70 +00:06:16,000 --> 00:06:18,000 +you visit the website for the first time. + +71 +00:06:18,000 --> 00:06:27,000 +It is at its default setting, but if you personalize the site to fit your preferences, persistent + +72 +00:06:27,000 --> 00:06:32,000 +focus will remember and implement those preferences the next time you visit the site. + +73 +00:06:33,000 --> 00:06:41,000 +This is how computers remember and store your logging information, language selections, menu preferences, + +74 +00:06:41,000 --> 00:06:50,000 +internal bookmarks and more persistent permanent and store ads, cookies and charms used interchangeably + +75 +00:06:51,000 --> 00:06:56,000 +as these cookies are stored in your heart, used for typically a long period of time. + +76 +00:06:56,000 --> 00:07:04,000 +The cookies timeline will vary depending on the expiration date, but once that date is reached yet, + +77 +00:07:04,000 --> 00:07:09,000 +you will be deleted along with everything you customize. + +78 +00:07:10,000 --> 00:07:17,000 +Luckily, websites prefer to employ a long lifespan so that users can make the most of their personal + +79 +00:07:17,000 --> 00:07:18,000 +preferences. + +80 +00:07:19,000 --> 00:07:23,000 +Third party cookies also referred to as tracking cookies. + +81 +00:07:23,000 --> 00:07:29,000 +Collect data based on your online behavior when you visit the website. + +82 +00:07:29,000 --> 00:07:38,000 +Third party cookies collect various types of data that are passed on or sold to advertisers by the website + +83 +00:07:38,000 --> 00:07:40,000 +that created the cookie. + +84 +00:07:40,000 --> 00:07:42,000 +Tracking your interests. + +85 +00:07:42,000 --> 00:07:43,000 +The Location. + +86 +00:07:43,000 --> 00:07:45,000 +Age and search trends. + +87 +00:07:46,000 --> 00:07:52,000 +These cookies collect information so that marketers can provide you with custom advertisements. + +88 +00:07:52,000 --> 00:07:59,000 +These are the ads that appear on the website to visit and display contents relevant to your interests + +89 +00:08:00,000 --> 00:08:03,000 +by tracking your habits and providing targeted ads. + +90 +00:08:04,000 --> 00:08:11,000 +Third party cookies serve as a useful purpose for marketers, but can seem pesky and intrusive to Internet + +91 +00:08:11,000 --> 00:08:12,000 +users. + +92 +00:08:12,000 --> 00:08:15,000 +That's why you have the option to block them. + +93 +00:08:16,000 --> 00:08:21,000 +Because of all this, cookies become part of suite legal regulations. + +94 +00:08:22,000 --> 00:08:30,000 +Some of the most popular legal regulations that most likely heard about these are GBR stands for the + +95 +00:08:30,000 --> 00:08:37,000 +General Data Protection Regulation, is in the European Union legislation that governs all collection + +96 +00:08:37,000 --> 00:08:42,000 +and processing of personal data from individuals inside the European Union. + +97 +00:08:43,000 --> 00:08:51,000 +On my project, I faced with some overhead in order to make our web applications compliant with our + +98 +00:08:51,000 --> 00:08:56,000 +requirements because fines for GDPR violations are huge. + +99 +00:08:57,000 --> 00:09:06,000 +Roughly 40% of Internet users blog said party cookies and under 5% of Internet users block first party + +100 +00:09:06,000 --> 00:09:07,000 +cookies. + +101 +00:09:08,000 --> 00:09:15,000 +Whether you decide to manage your cookies individually by type as a whole or not at all, your browser + +102 +00:09:15,000 --> 00:09:17,000 +settings will always be available. + +103 +00:09:17,000 --> 00:09:19,000 +If you change your mind. + +104 +00:09:20,000 --> 00:09:26,000 +In Java, we have opportunity to programmatically create session or permanent cookies. + +105 +00:09:26,000 --> 00:09:34,000 +We can set explicit age for a cookie and in case there is no explicit age, meaning that they should + +106 +00:09:34,000 --> 00:09:39,000 +apply only in the current browsing session until the user starts the browser. + +107 +00:09:39,000 --> 00:09:46,000 +In other cookies we can call message said Mark's age to stipulate that the browser should write them + +108 +00:09:46,000 --> 00:09:55,000 +to this and that they should persist for that amount of time was set in set max each message, regardless + +109 +00:09:55,000 --> 00:10:02,000 +of whether the user studies the browser or abuse the computer to initiate a new browsing session. + +110 +00:10:03,000 --> 00:10:06,000 +Don't worry about the details so far then go on. + +111 +00:10:06,000 --> 00:10:09,000 +To see all this and real examples is a lesson. + +112 +00:10:10,000 --> 00:10:14,000 +Very different advantages and disadvantages of this mechanism. + +113 +00:10:15,000 --> 00:10:18,000 +Let me just highlight the most important ones. + +114 +00:10:18,000 --> 00:10:25,000 +In my opinion, advantage of countries are simplistic of maintaining the state. + +115 +00:10:26,000 --> 00:10:28,000 +You will be able to compare is by itself. + +116 +00:10:29,000 --> 00:10:36,000 +But this advantage is probably is the reason why cookies mechanism became so popular. + +117 +00:10:37,000 --> 00:10:41,000 +Cookies are maintained at clients side from one side. + +118 +00:10:42,000 --> 00:10:50,000 +This is an advantage because this allows to store some information on one side to work efficiently with + +119 +00:10:50,000 --> 00:10:56,000 +the presentation of the information and ensure smooth communication of client and seven. + +120 +00:10:57,000 --> 00:11:00,000 +But it's also have some disadvantages. + +121 +00:11:01,000 --> 00:11:07,000 +Disadvantages of which is it will not work if Cookie is disabled from the browser. + +122 +00:11:08,000 --> 00:11:08,000 +This is true. + +123 +00:11:09,000 --> 00:11:18,000 +Client can disable cookies on the textual information can be said in cookie object in comparison with + +124 +00:11:18,000 --> 00:11:20,000 +the session and server. + +125 +00:11:20,000 --> 00:11:25,000 +You can put only textual information and cookies on the server. + +126 +00:11:25,000 --> 00:11:30,000 +We can store any object inside our session security. + +127 +00:11:31,000 --> 00:11:37,000 +It is obvious that it is not secure to put sensitive information in cookies and store it on the client + +128 +00:11:37,000 --> 00:11:38,000 +side. + +129 +00:11:38,000 --> 00:11:45,000 +That's why it is critically important to store all sensitive information on the server in session object. + +130 +00:11:46,000 --> 00:11:47,000 +Okay. + +131 +00:11:47,000 --> 00:11:54,000 +So I'm designed to store the amount of information considering the fact that cookies travel with each + +132 +00:11:54,000 --> 00:11:55,000 +request to the server. + +133 +00:11:55,000 --> 00:12:04,000 +It is not a good idea to store heavily on the client side and cookies, so you don't need to store information + +134 +00:12:04,000 --> 00:12:07,000 +about all products in the text presentation. + +135 +00:12:07,000 --> 00:12:08,000 +Presentation a client side. + +136 +00:12:09,000 --> 00:12:13,000 +There is no sense in it and it will increase traffic. + +137 +00:12:14,000 --> 00:12:15,000 +Zazi triggering cookies. + +138 +00:12:16,000 --> 00:12:21,000 +Later in this lesson, we are going to have a live demo with school kids to see how they were. + +139 +00:12:22,000 --> 00:12:27,000 +Regarding other session tracking techniques like hidden form, for example. + +140 +00:12:27,000 --> 00:12:34,000 +I will not dive deep in details here because we're going to have a separate lesson dedicated the optimal + +141 +00:12:34,000 --> 00:12:39,000 +forms and hidden input parameters and we'll review it in details. + +142 +00:12:39,000 --> 00:12:47,000 +In that lesson, I can just explain this technique insurance in case of hidden form field, a hidden + +143 +00:12:47,000 --> 00:12:55,000 +invisible text field is used for maintaining the state of the user in such case was still information + +144 +00:12:55,000 --> 00:13:03,000 +is a hidden field and gathered from another so that this approach is better if we have to submit form + +145 +00:13:03,000 --> 00:13:07,000 +in all the pages and we don't want to expand on the browser. + +146 +00:13:08,000 --> 00:13:13,000 +As I said, we're going to learn more about a team of Forbes in a separate lesson. + +147 +00:13:14,000 --> 00:13:22,000 +And the subject, Nick, of session tracking is you were writing in your rover, writing with a panda + +148 +00:13:22,000 --> 00:13:24,000 +talking or a session identifier. + +149 +00:13:25,000 --> 00:13:26,000 +A you are out of the nest. + +150 +00:13:26,000 --> 00:13:29,000 +So that wasn't next to source. + +151 +00:13:30,000 --> 00:13:34,000 +You already saw in previous lessons that we can send parameters where you. + +152 +00:13:35,000 --> 00:13:42,000 +This is also an option but as a set mechanism is the most popular session tracking technique. + +153 +00:13:44,000 --> 00:13:48,000 +We have enough cereal already to proceed with our practical examples. + +154 +00:13:49,000 --> 00:13:51,000 +So let me start screen sharing. + +155 +00:13:52,000 --> 00:13:57,000 +Let's explore the source code of session interface first. + +156 +00:13:58,000 --> 00:14:01,000 +This interface declares contract for the following masses. + +157 +00:14:02,000 --> 00:14:03,000 +Get creation. + +158 +00:14:03,000 --> 00:14:07,000 +Time is the time when the session was created. + +159 +00:14:07,000 --> 00:14:13,000 +Is returned by this massive is measured in milliseconds since Unix epoch. + +160 +00:14:14,000 --> 00:14:17,000 +Getting the zoo in session. + +161 +00:14:17,000 --> 00:14:19,000 +A user can't buy this message. + +162 +00:14:19,000 --> 00:14:20,000 +This is a use. + +163 +00:14:20,000 --> 00:14:28,000 +It will be used for mapping between and post cookies and actual session objects stored on the server. + +164 +00:14:29,000 --> 00:14:29,000 +Yet. + +165 +00:14:29,000 --> 00:14:37,000 +Last access time is a time when this session was last accessed is returned by this method. + +166 +00:14:37,000 --> 00:14:41,000 +It is measured in milliseconds since Unix equal. + +167 +00:14:42,000 --> 00:14:50,000 +Seth Mark's inactive interval specifies the time in seconds between clients requests before the content + +168 +00:14:50,000 --> 00:14:58,000 +that will invalidate the session and interval value of zero or less indicates that the session should + +169 +00:14:58,000 --> 00:14:59,000 +never time. + +170 +00:15:00,000 --> 00:15:06,000 +Yet inactive interval mass returns the value of such interval. + +171 +00:15:07,000 --> 00:15:13,000 +Also, we can use session as a container where we can store objects related to the current session. + +172 +00:15:14,000 --> 00:15:17,000 +For this we have set attribute and get to the masses. + +173 +00:15:18,000 --> 00:15:22,000 +We have to remove attribute massive attribute from session. + +174 +00:15:23,000 --> 00:15:25,000 +Everything is straightforward here. + +175 +00:15:26,000 --> 00:15:31,000 +Invalidate massive is used to invalidate the session is a massive invalidate. + +176 +00:15:31,000 --> 00:15:35,000 +This session doesn't advance any object bound it. + +177 +00:15:36,000 --> 00:15:38,000 +That's now open. + +178 +00:15:38,000 --> 00:15:41,000 +So that is an appropriate specialty for this lesson. + +179 +00:15:41,000 --> 00:15:43,000 +How we came up with Session Object. + +180 +00:15:44,000 --> 00:15:48,000 +The first lines that you see in this example is get session message. + +181 +00:15:49,000 --> 00:15:54,000 +This message operates session object and returns us is the reference date. + +182 +00:15:55,000 --> 00:16:04,000 +I want also to add that this message is overlord and there is a version was boolean argument true argument + +183 +00:16:04,000 --> 00:16:11,000 +will tell create a new session in case there is no session or returns a current session. + +184 +00:16:12,000 --> 00:16:20,000 +Force will tell the return the current session or return now in case there is no active session. + +185 +00:16:21,000 --> 00:16:24,000 +In other words, the not great session. + +186 +00:16:24,000 --> 00:16:26,000 +If it is not great. + +187 +00:16:27,000 --> 00:16:33,000 +After we have the reference to the session object, let's store some activity a session object. + +188 +00:16:33,000 --> 00:16:40,000 +I will set string attribute was name session attribute and value session attribute. + +189 +00:16:40,000 --> 00:16:43,000 +After that is a new line blueprint that we set. + +190 +00:16:43,000 --> 00:16:44,000 +Session. + +191 +00:16:44,000 --> 00:16:46,000 +Actually, that's it. + +192 +00:16:47,000 --> 00:16:48,000 +These are HTP sessions. + +193 +00:16:48,000 --> 00:16:55,000 +Select the example with a session and between session attribute is a response. + +194 +00:16:56,000 --> 00:17:02,000 +Also let's bring session a these and you want how we explain why we need this. + +195 +00:17:02,000 --> 00:17:10,000 +This will prove that requests made to different resources from one client use the same session, and + +196 +00:17:10,000 --> 00:17:17,000 +I will show you that one will close the second example from another client, from another browser. + +197 +00:17:17,000 --> 00:17:23,000 +The value will be no because there will not be a session with the current actually. + +198 +00:17:24,000 --> 00:17:29,000 +And one more demos to add that I prepared for this example is to invalidate the session. + +199 +00:17:30,000 --> 00:17:34,000 +It is called Session Invalidate, so that lets me open. + +200 +00:17:35,000 --> 00:17:41,000 +Everything is simple here and gives a reference to the session object and call invalidate message. + +201 +00:17:42,000 --> 00:17:48,000 +After this session, object is invalidated and all related objects are lost. + +202 +00:17:49,000 --> 00:17:51,000 +We prepared everything we need for this demo. + +203 +00:17:52,000 --> 00:17:53,000 +Let's test this. + +204 +00:17:54,000 --> 00:17:56,000 +I run application on the seven. + +205 +00:17:57,000 --> 00:18:00,000 +Let's wait a few seconds until the service starts. + +206 +00:18:04,000 --> 00:18:07,000 +Let's reach this and let them get to first. + +207 +00:18:08,000 --> 00:18:16,000 +As you can see, the value is no because session object is not created and we didn't see it actually + +208 +00:18:16,000 --> 00:18:16,000 +in session. + +209 +00:18:17,000 --> 00:18:22,000 +Now, that's why each session demo resource session is created. + +210 +00:18:23,000 --> 00:18:32,000 +And now let's get back to the session demo two and you can see the attribute grade we set out to boot + +211 +00:18:32,000 --> 00:18:33,000 +in this session. + +212 +00:18:34,000 --> 00:18:42,000 +But let's open the same resource now in another browser I open Google Chrome and I open session demo + +213 +00:18:42,000 --> 00:18:52,000 +two and again I can see now here that is because this request is done from another client and there + +214 +00:18:52,000 --> 00:18:56,000 +is no session associated with this client yet. + +215 +00:18:57,000 --> 00:19:06,000 +Now I call session demo and after that session demo two and we can see actually sat again for this client + +216 +00:19:06,000 --> 00:19:07,000 +session. + +217 +00:19:07,000 --> 00:19:15,000 +Now click F12 key on the keyboard will make mouse radically and select inspect element. + +218 +00:19:16,000 --> 00:19:18,000 +These are chrome development tools. + +219 +00:19:19,000 --> 00:19:26,000 +Select application here, find cookies and inspect what is there. + +220 +00:19:26,000 --> 00:19:34,000 +You can see this session and with the values that we also printed on this page, this is exactly session + +221 +00:19:34,000 --> 00:19:38,000 +identifiers that they talked about with each request. + +222 +00:19:39,000 --> 00:19:48,000 +This session is sent to the server and server identifies that this idea is associated with already created + +223 +00:19:48,000 --> 00:19:49,000 +session object. + +224 +00:19:50,000 --> 00:19:53,000 +And thanks a lot Tomcat for this great help. + +225 +00:19:53,000 --> 00:20:00,000 +Let's invalidate the session now for this we need to pursue that this contains code to invalidate the + +226 +00:20:00,000 --> 00:20:01,000 +session. + +227 +00:20:02,000 --> 00:20:11,000 +I change you to session invalidate now session is invalidated and that action that when I will get back + +228 +00:20:11,000 --> 00:20:15,000 +to the session demo example this session they will become deferred. + +229 +00:20:16,000 --> 00:20:21,000 +I navigate to the session them and we can see the session identifier has been changed. + +230 +00:20:22,000 --> 00:20:26,000 +Can you understand now how cookies and session mechanism is connected? + +231 +00:20:27,000 --> 00:20:32,000 +Even in case you still have any questions, you are more than welcome to ask questions. + +232 +00:20:32,000 --> 00:20:33,000 +Me the video. + +233 +00:20:34,000 --> 00:20:41,000 +I will be happy to answer one setting related to this session timeout can be placed in the that XML + +234 +00:20:41,000 --> 00:20:48,000 +file I open WebEx window and here in the bottom you can see an example. + +235 +00:20:49,000 --> 00:20:51,000 +The element is called session config. + +236 +00:20:52,000 --> 00:20:55,000 +It contains session, time out element and minutes. + +237 +00:20:56,000 --> 00:21:01,000 +Here I said this session time out in my application will be 15 minutes. + +238 +00:21:02,000 --> 00:21:09,000 +If you have ever used 19 applications that asks, you log in after being inactive for 5 minutes. + +239 +00:21:10,000 --> 00:21:16,000 +This is exactly the place where developers of banking application come all this session. + +240 +00:21:16,000 --> 00:21:17,000 +Time out. + +241 +00:21:18,000 --> 00:21:22,000 +And the last, but not least example for today is Cookie's example. + +242 +00:21:23,000 --> 00:21:29,000 +I opened the source code of cookies so that let me walk you through the example line by line. + +243 +00:21:30,000 --> 00:21:37,000 +First of all, you have to remember that cookies are passed to the server with each request. + +244 +00:21:38,000 --> 00:21:41,000 +That means that we can get cookies from the request object. + +245 +00:21:42,000 --> 00:21:46,000 +I call get cookies method on the request object. + +246 +00:21:46,000 --> 00:21:50,000 +It returns us array of objects of type cookie. + +247 +00:21:51,000 --> 00:21:55,000 +I recommend you to explore the source code of this class. + +248 +00:21:55,000 --> 00:22:02,000 +I will not do this during the lesson because I'm going to make an overview of main masses during this + +249 +00:22:02,000 --> 00:22:03,000 +example. + +250 +00:22:04,000 --> 00:22:09,000 +She's an example of any response on the response object. + +251 +00:22:09,000 --> 00:22:19,000 +I call that a massive and positive instance of who could talk to the constructor of object, name and + +252 +00:22:19,000 --> 00:22:26,000 +value because it is always a pair of a key and values. + +253 +00:22:26,000 --> 00:22:34,000 +It is associated with this key and tensions at both key and value can be only of type string. + +254 +00:22:34,000 --> 00:22:37,000 +This is a rules that you can write. + +255 +00:22:38,000 --> 00:22:46,000 +After that, I create some email code to the console output in order to make our page look nice. + +256 +00:22:47,000 --> 00:22:49,000 +Let's pay attention to this. + +257 +00:22:49,000 --> 00:22:49,000 +Look. + +258 +00:22:50,000 --> 00:22:54,000 +I eat right over each cookie in a raise that we got from that request. + +259 +00:22:55,000 --> 00:23:03,000 +In case you wanted to leave Cookie on the client side, you have to set Mark's age of 8 to 0, added + +260 +00:23:03,000 --> 00:23:06,000 +as a response and send it back as a client. + +261 +00:23:07,000 --> 00:23:13,000 +Once Cookie will be delivered to the client, it will disappear and will never come back within your + +262 +00:23:13,000 --> 00:23:14,000 +request. + +263 +00:23:14,000 --> 00:23:15,000 +Is it clear? + +264 +00:23:16,000 --> 00:23:21,000 +In case you pass in negative value in Seth Marx h massive. + +265 +00:23:21,000 --> 00:23:27,000 +That would mean that who is not saw it persistently and will be deleted. + +266 +00:23:27,000 --> 00:23:28,000 +One web browser exits. + +267 +00:23:29,000 --> 00:23:36,000 +And the positive value in the case of the cookie will expire after many seconds have passed. + +268 +00:23:37,000 --> 00:23:44,000 +No, the value is a maximum age when the cookie will expire, not the cookies parents age. + +269 +00:23:46,000 --> 00:23:50,000 +And in this demo I played to console who can name and value. + +270 +00:23:50,000 --> 00:23:55,000 +Let's navigate to the browser and token cookies demo euro. + +271 +00:23:56,000 --> 00:24:01,000 +So when I refresh the browser, I see the cookies that we added. + +272 +00:24:02,000 --> 00:24:02,000 +Is it clear? + +273 +00:24:03,000 --> 00:24:12,000 +Basically that's how cookies mechanism of very often cookie mechanism is also used for affiliate marketing + +274 +00:24:13,000 --> 00:24:20,000 +will keep developing our online store and you are going to have very interesting homework to practice + +275 +00:24:20,000 --> 00:24:21,000 +your skills in cookies. + +276 +00:24:22,000 --> 00:24:23,000 +Stay tuned. + +277 +00:24:24,000 --> 00:24:25,000 +That's all for today's lesson. + +278 +00:24:26,000 --> 00:24:29,000 +Let's recap what we have learned today. + +279 +00:24:30,000 --> 00:24:37,000 +This lesson began with a session s then different session tracking techniques. + +280 +00:24:37,000 --> 00:24:41,000 +Zia cookies hidden, fulfilled. + +281 +00:24:41,000 --> 00:24:43,000 +And you are really right. + +282 +00:24:44,000 --> 00:24:48,000 +We learned what cookies are and different types of cookies. + +283 +00:24:49,000 --> 00:24:52,000 +After that, we had a lot of different examples. + +284 +00:24:53,000 --> 00:24:59,000 +By the way, as usual, you can find all examples from the lesson in attachments to the video. + +285 +00:25:00,000 --> 00:25:08,000 +We reviewed the source code of HTP session interface and source code of related examples, and at the + +286 +00:25:08,000 --> 00:25:13,000 +end of the lesson we learned how to work with cookies is a practical example. + +287 +00:25:13,000 --> 00:25:20,000 +We saw how do we add and remove cookies that solve for this lesson? + +288 +00:25:20,000 --> 00:25:22,000 +Thanks a lot for your attention. + +289 +00:25:22,000 --> 00:25:26,000 +Have a great day and see the next lesson. + diff --git a/63 - Session & Cookies/001 Source-code-of-package-with-all-examples-from-the-lesson.url b/63 - Session & Cookies/001 Source-code-of-package-with-all-examples-from-the-lesson.url new file mode 100644 index 0000000000000000000000000000000000000000..1f260518683a35c82c17c374a517c05e6f51cddd --- /dev/null +++ b/63 - Session & Cookies/001 Source-code-of-package-with-all-examples-from-the-lesson.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/tree/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/servlets \ No newline at end of file diff --git a/63 - Session & Cookies/001 Source-of-web.xml-from-the-lesson.url b/63 - Session & Cookies/001 Source-of-web.xml-from-the-lesson.url new file mode 100644 index 0000000000000000000000000000000000000000..bf702f3087c5b4c57f72cfacff4304de28f0f772 --- /dev/null +++ b/63 - Session & Cookies/001 Source-of-web.xml-from-the-lesson.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/WEB-INF/web.xml \ No newline at end of file diff --git a/63 - Session & Cookies/external-links.txt b/63 - Session & Cookies/external-links.txt new file mode 100644 index 0000000000000000000000000000000000000000..fbbdba6e59d12f4a0c7d930b6a757ed485e9e02b --- /dev/null +++ b/63 - Session & Cookies/external-links.txt @@ -0,0 +1,6 @@ + +001 Source-code-of-package-with-all-examples-from-the-lesson +https://github.com/AndriiPiatakha/java-learnit-web-online-store/tree/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/servlets + +001 Source-of-web.xml-from-the-lesson +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/WEB-INF/web.xml diff --git a/64 - Events Handling in Web Application/001 Events Handling in Java Web Application_en.srt b/64 - Events Handling in Web Application/001 Events Handling in Java Web Application_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..8812f8608c03de2848c267208bb8dcced733ee83 --- /dev/null +++ b/64 - Events Handling in Web Application/001 Events Handling in Java Web Application_en.srt @@ -0,0 +1,1188 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello again. + +2 +00:00:06,000 --> 00:00:13,000 +In this lesson, we're going to learn how to handle different events and errors in our application. + +3 +00:00:13,000 --> 00:00:19,000 +We're going to start our lesson from the problem statement and understanding why we need to track and + +4 +00:00:19,000 --> 00:00:23,000 +react on the events inside our main application. + +5 +00:00:24,000 --> 00:00:32,000 +I'll show you what kind of events we can intercept, and I will explain you how events can be intercepted + +6 +00:00:33,000 --> 00:00:34,000 +in this lesson. + +7 +00:00:34,000 --> 00:00:36,000 +Well, now, new concept. + +8 +00:00:36,000 --> 00:00:38,000 +Is that a scope listener? + +9 +00:00:38,000 --> 00:00:45,000 +You're going to understand what the listener objects are and how to register them in the application + +10 +00:00:45,000 --> 00:00:49,000 +will review real life examples in order. + +11 +00:00:49,000 --> 00:00:55,000 +You could understand how to apply knowledge and practice and the essence of the lesson will learn how + +12 +00:00:55,000 --> 00:00:57,000 +to handle errors in the MAP application. + +13 +00:00:58,000 --> 00:01:00,000 +Let's start our lesson here. + +14 +00:01:00,000 --> 00:01:07,000 +In the lifecycle of however different events happen, the global context is created and destroyed. + +15 +00:01:08,000 --> 00:01:12,000 +Attributes are added, removed or replaced inside. + +16 +00:01:13,000 --> 00:01:16,000 +Different sessions are created and destroyed. + +17 +00:01:16,000 --> 00:01:17,000 +As you already know. + +18 +00:01:17,000 --> 00:01:23,000 +Actually, this also can be added or removed or replaced and sessions the same story was requested. + +19 +00:01:24,000 --> 00:01:29,000 +But why we should care about all this things happening in our application? + +20 +00:01:29,000 --> 00:01:32,000 +That's what usually in my students ask me. + +21 +00:01:32,000 --> 00:01:39,000 +The things that are all concerned about is just to make sure that application works per requirements + +22 +00:01:39,000 --> 00:01:42,000 +and that we can reach our business goals. + +23 +00:01:42,000 --> 00:01:49,000 +But we should never forget that our business solution is the technology that we need to monitor and + +24 +00:01:49,000 --> 00:01:50,000 +support. + +25 +00:01:50,000 --> 00:01:57,000 +We want to track all these different events happening in our application because of different reasons. + +26 +00:01:58,000 --> 00:02:05,000 +Some of them are monitoring on the application execution in case we want to control the flow of our + +27 +00:02:05,000 --> 00:02:13,000 +application execution, be able to do our program in case of emergency to detect some issues or just + +28 +00:02:13,000 --> 00:02:14,000 +log the program. + +29 +00:02:14,000 --> 00:02:17,000 +Progress Managed Database Connections. + +30 +00:02:17,000 --> 00:02:24,000 +When a web application is deployed or shuts down, monitor a state of issues to be sessions and the + +31 +00:02:24,000 --> 00:02:24,000 +attributes. + +32 +00:02:25,000 --> 00:02:29,000 +Monitor this state of requests and their attributes. + +33 +00:02:30,000 --> 00:02:35,000 +These are just some of the reasons why we might want to track events in our application. + +34 +00:02:36,000 --> 00:02:43,000 +I have already mentioned grief and what kind of events we want and can track in our application. + +35 +00:02:43,000 --> 00:02:45,000 +That sums them up on this slide. + +36 +00:02:46,000 --> 00:02:54,000 +We have three main entities and events related to XEM that we can technically track in our JavaFX application. + +37 +00:02:55,000 --> 00:03:02,000 +These entities are sort of contacts in the previous Lessons Learned review, what a similar context + +38 +00:03:02,000 --> 00:03:03,000 +is. + +39 +00:03:03,000 --> 00:03:09,000 +So in case you want to learn more about that context, please refer to the previous lessons. + +40 +00:03:09,000 --> 00:03:16,000 +Just to remind you that this is single and level objects, that the existing scope of all application + +41 +00:03:16,000 --> 00:03:17,000 +it exists. + +42 +00:03:17,000 --> 00:03:20,000 +In one instance session object. + +43 +00:03:21,000 --> 00:03:24,000 +We may have multiple session objects in our application. + +44 +00:03:24,000 --> 00:03:27,000 +Again, we have separate lesson about session. + +45 +00:03:28,000 --> 00:03:31,000 +Please refer to that lesson to learn more details about the session. + +46 +00:03:32,000 --> 00:03:38,000 +But session is very important object in terms of ensuring seamless interaction of the client with our + +47 +00:03:38,000 --> 00:03:39,000 +application. + +48 +00:03:39,000 --> 00:03:47,000 +That's why it might be important to monitor interaction and work with all session objects in our application. + +49 +00:03:47,000 --> 00:03:49,000 +And so that's request. + +50 +00:03:50,000 --> 00:03:57,000 +It is also makes sense to monitor the progress of each request and be able to close interaction with + +51 +00:03:57,000 --> 00:03:58,000 +this object. + +52 +00:03:59,000 --> 00:04:04,000 +So we define swimming and that is it will produce events in our application. + +53 +00:04:04,000 --> 00:04:07,000 +What kinds of events is a make or use? + +54 +00:04:08,000 --> 00:04:13,000 +There are similar group of events and some of them are different for specific types. + +55 +00:04:13,000 --> 00:04:16,000 +Let's start with a review of similar events. + +56 +00:04:16,000 --> 00:04:18,000 +There are two main group of events. + +57 +00:04:19,000 --> 00:04:28,000 +They are the first group of events related was lifecycle one instances created and one instance is destroyed. + +58 +00:04:29,000 --> 00:04:35,000 +This is about all types of objects that we have just mentioned, so we can track events once so that + +59 +00:04:35,000 --> 00:04:41,000 +context is created to destroy it once sessions created or destroyed, and when a request is created + +60 +00:04:41,000 --> 00:04:48,000 +to destroy it and the second group of events is connected, that was interactive events, namely with + +61 +00:04:48,000 --> 00:04:51,000 +and in removing or replacing attributes from. + +62 +00:04:51,000 --> 00:04:59,000 +These objects sometimes have specific types of events they can track as a serious request object. + +63 +00:04:59,000 --> 00:05:07,000 +There is also a single events listener that will be notified in the event that an eye synchronous operation + +64 +00:05:07,000 --> 00:05:15,000 +initiated on a service request to reach the listener have been added, has completed timed out or resulted + +65 +00:05:15,000 --> 00:05:18,000 +in an error for session objects. + +66 +00:05:18,000 --> 00:05:26,000 +These are also events related to session migration, object bonding and changes in ID or should it be + +67 +00:05:26,000 --> 00:05:27,000 +session activation? + +68 +00:05:27,000 --> 00:05:35,000 +Listener objects about this session my recent visit containing events notifying them that sessions will + +69 +00:05:35,000 --> 00:05:39,000 +be postulated and the session will be activated. + +70 +00:05:40,000 --> 00:05:47,000 +I contain as it migrates session between the virtual machines or persist session is required to notify + +71 +00:05:47,000 --> 00:05:52,000 +all active is bound to sessions implement and the session activation listener. + +72 +00:05:53,000 --> 00:05:55,000 +Should it be session binding? + +73 +00:05:55,000 --> 00:06:02,000 +This causes an object to be notified when it is bound to or unbound from a session. + +74 +00:06:02,000 --> 00:06:10,000 +This may be as a result of a similar programmer explicitly unwinding an attribute from a session due + +75 +00:06:10,000 --> 00:06:13,000 +to a session being invalidated or due the session. + +76 +00:06:13,000 --> 00:06:14,000 +Time and out. + +77 +00:06:15,000 --> 00:06:22,000 +Actually possession ideally is an interface for receiving notification events and both ACP session ID + +78 +00:06:22,000 --> 00:06:23,000 +changes. + +79 +00:06:23,000 --> 00:06:28,000 +This is a summary of events that we can track in a web application. + +80 +00:06:29,000 --> 00:06:35,000 +You can memorize this easily following the suggested structure, at least for my foreign students. + +81 +00:06:35,000 --> 00:06:42,000 +This presentation works better rather than presentation on the official documentation, which may sound + +82 +00:06:42,000 --> 00:06:43,000 +confusing. + +83 +00:06:44,000 --> 00:06:45,000 +Okay. + +84 +00:06:45,000 --> 00:06:51,000 +By this moment, in our lesson, we learned what objects might trigger events and what kind of events + +85 +00:06:51,000 --> 00:06:53,000 +will track the next scene. + +86 +00:06:54,000 --> 00:06:59,000 +Still remain to learn is how a technique that we will enter sabs events. + +87 +00:07:00,000 --> 00:07:04,000 +The special mechanism of event listeners exist for this. + +88 +00:07:04,000 --> 00:07:11,000 +What are listeners listeners special objects that are great at following specified interfaces? + +89 +00:07:12,000 --> 00:07:19,000 +Instances of listener types are registered in the VAT application in order to be invoked when events + +90 +00:07:19,000 --> 00:07:19,000 +occur. + +91 +00:07:20,000 --> 00:07:25,000 +That service is responsible for orchestration and the listener's invocation. + +92 +00:07:26,000 --> 00:07:31,000 +Masses of listener objects get invoked when lifecycle events occur. + +93 +00:07:32,000 --> 00:07:38,000 +To use this listener objects, you must define and specify the listener class. + +94 +00:07:39,000 --> 00:07:42,000 +The following is an overview of the whole process. + +95 +00:07:42,000 --> 00:07:48,000 +The user creates an event listener plus is it implements one of the least interfaces. + +96 +00:07:48,000 --> 00:07:55,000 +This implementation is registered as a deployment descriptor, and deployment time is a similar container + +97 +00:07:55,000 --> 00:08:00,000 +that constructs an instance of the event plus a torrent times. + +98 +00:08:00,000 --> 00:08:05,000 +This container invokes masses on the instance of this class. + +99 +00:08:05,000 --> 00:08:10,000 +You define the listener class as an implementation of the listener interface. + +100 +00:08:10,000 --> 00:08:12,000 +I'm going to show you how to do this. + +101 +00:08:12,000 --> 00:08:13,000 +Gives them a. + +102 +00:08:14,000 --> 00:08:15,000 +I'm a listener message. + +103 +00:08:15,000 --> 00:08:16,000 +This is the well. + +104 +00:08:16,000 --> 00:08:21,000 +It is both an event that contains information appropriate. + +105 +00:08:21,000 --> 00:08:29,000 +This event for example the masses in the HTP session, the recent interface bus and HTP session event + +106 +00:08:30,000 --> 00:08:37,000 +which contains and they should be session object and there are similar examples with different types. + +107 +00:08:37,000 --> 00:08:43,000 +Feel free to present course to explore other types of events and listeners that are presented on this + +108 +00:08:43,000 --> 00:08:44,000 +slide. + +109 +00:08:45,000 --> 00:08:48,000 +Once you're done with this, let's move on. + +110 +00:08:49,000 --> 00:08:55,000 +Let's proceed with a lot of them now, because now we need to learn how exactly we can implement event + +111 +00:08:55,000 --> 00:08:58,000 +listeners to react on the events. + +112 +00:08:59,000 --> 00:09:05,000 +Considering the fact that the way of the declaration and interface implementation will be absolutely + +113 +00:09:05,000 --> 00:09:12,000 +the same, I don't see a lot of sense making them of this over context session and the request objects. + +114 +00:09:13,000 --> 00:09:17,000 +Anyway, from technical side, the will be the same. + +115 +00:09:17,000 --> 00:09:23,000 +One of the resources of the events will be different, but each instance will have a similar way of + +116 +00:09:23,000 --> 00:09:29,000 +working with attendees added, removed or replaced and the listener interfaces implemented. + +117 +00:09:30,000 --> 00:09:31,000 +Understand what I mean? + +118 +00:09:32,000 --> 00:09:38,000 +That's why, for the sake of the demo, I suggest through example how to track lifecycle events and + +119 +00:09:38,000 --> 00:09:43,000 +events associated with the attributes in session objects to create new listener. + +120 +00:09:44,000 --> 00:09:48,000 +Let's make mouse click then select new and select listener. + +121 +00:09:49,000 --> 00:09:51,000 +Let's change package name the listeners. + +122 +00:09:52,000 --> 00:09:55,000 +Let's call our new listener session listener. + +123 +00:09:56,000 --> 00:09:57,000 +Click Next Button. + +124 +00:09:59,000 --> 00:10:04,000 +And here you have multiple options that you can select in order to listen to different events. + +125 +00:10:05,000 --> 00:10:13,000 +We agreed that we want to and session related events and among all session related events that these + +126 +00:10:13,000 --> 00:10:18,000 +events are related with the session life cycle and with session activities. + +127 +00:10:19,000 --> 00:10:20,000 +Click Next Button. + +128 +00:10:21,000 --> 00:10:25,000 +On this step, we can just confirm interfaces that we want to implement. + +129 +00:10:26,000 --> 00:10:27,000 +That's Lake Finish button. + +130 +00:10:28,000 --> 00:10:34,000 +You don't see a lot of message stuff because all masses have a default implementation in their interfaces. + +131 +00:10:35,000 --> 00:10:42,000 +If you want to override them, let's make mouse click and editor area select source menu item. + +132 +00:10:42,000 --> 00:10:45,000 +After that override implement methods. + +133 +00:10:46,000 --> 00:10:52,000 +We can select all masses from HTP session attribute listener and from HTP session listener. + +134 +00:10:53,000 --> 00:10:56,000 +Now we have stabs that we can override. + +135 +00:10:56,000 --> 00:11:00,000 +As you may already understand, you can implement this masses as you wish. + +136 +00:11:01,000 --> 00:11:08,000 +The scope of this demo will focus only on the fact of triggering this masses to make sure that these + +137 +00:11:08,000 --> 00:11:09,000 +methods are triggering. + +138 +00:11:10,000 --> 00:11:15,000 +Let's just bring message the console in the attribute added to this session. + +139 +00:11:15,000 --> 00:11:17,000 +Let's bring to console. + +140 +00:11:17,000 --> 00:11:20,000 +The attribute is added the session. + +141 +00:11:22,000 --> 00:11:24,000 +The attributes removed. + +142 +00:11:24,000 --> 00:11:27,000 +Let's bring that actually has been removed. + +143 +00:11:29,000 --> 00:11:31,000 +Is that attributes replaced. + +144 +00:11:31,000 --> 00:11:35,000 +Let's pray is it actually is replaced is a session. + +145 +00:11:37,000 --> 00:11:38,000 +When Sessions created. + +146 +00:11:39,000 --> 00:11:42,000 +Let's also make related console out. + +147 +00:11:44,000 --> 00:11:50,000 +And in a similar way let's bring some center console into this session is destroy. + +148 +00:11:52,000 --> 00:11:55,000 +Pay attention also to the massive parameters. + +149 +00:11:55,000 --> 00:12:00,000 +These are parameters that can be used to take additional information. + +150 +00:12:00,000 --> 00:12:03,000 +For example, these activities related events. + +151 +00:12:03,000 --> 00:12:10,000 +We can see the argument of type B session binding event is passed to the message. + +152 +00:12:11,000 --> 00:12:15,000 +You can check the source code to learn more what you can get from this subject. + +153 +00:12:16,000 --> 00:12:22,000 +In this particular case, we can see that we can get the name of the session actually and the value + +154 +00:12:22,000 --> 00:12:23,000 +of session attribute. + +155 +00:12:24,000 --> 00:12:29,000 +This can be important for log in purposes, but be careful. + +156 +00:12:29,000 --> 00:12:37,000 +The logs are also subject of legal regulations in terms of what data is stored there and how it is stored. + +157 +00:12:38,000 --> 00:12:45,000 +Each project through the data retention policy that describes all the details regarding what kinds of + +158 +00:12:45,000 --> 00:12:51,000 +data, where for how long it can be stored, and we should strictly follow it. + +159 +00:12:52,000 --> 00:12:58,000 +So be careful about logging surveillance of the session patches, but in some particular cases this + +160 +00:12:58,000 --> 00:13:02,000 +can be allowed some insights about future lessons. + +161 +00:13:02,000 --> 00:13:08,000 +We are also going to separate less than the mark logging in Java applications where I will share with + +162 +00:13:08,000 --> 00:13:09,000 +you logging tools and techniques. + +163 +00:13:10,000 --> 00:13:14,000 +For the sake of the demo, let's add one more console. + +164 +00:13:15,000 --> 00:13:20,000 +Let's bring the here session attribute name and get a name from the amount. + +165 +00:13:21,000 --> 00:13:23,000 +And another scene that we are going to create here. + +166 +00:13:24,000 --> 00:13:28,000 +This session attributes value that we can also take from the event. + +167 +00:13:29,000 --> 00:13:31,000 +Gray Jones. + +168 +00:13:31,000 --> 00:13:35,000 +It never was supposed to see values here that we put in our. + +169 +00:13:37,000 --> 00:13:43,000 +During the life cycle related events really see if they should be session event argument who can use + +170 +00:13:43,000 --> 00:13:43,000 +it? + +171 +00:13:43,000 --> 00:13:49,000 +The tags and references of parent session object perform any operations we need with it. + +172 +00:13:50,000 --> 00:13:57,000 +So using event object commands and references to the related objects and data that can be helpful on + +173 +00:13:57,000 --> 00:14:02,000 +the specific conditions and the bands union instrumentation of these methods. + +174 +00:14:02,000 --> 00:14:05,000 +You can use method arguments as you need. + +175 +00:14:06,000 --> 00:14:07,000 +Another important scene. + +176 +00:14:08,000 --> 00:14:14,000 +We need to tell the Web server that this is a lease and that is it is needed to be registered and notified + +177 +00:14:14,000 --> 00:14:15,000 +in case of events. + +178 +00:14:16,000 --> 00:14:19,000 +As always, there are two ways to do this. + +179 +00:14:19,000 --> 00:14:23,000 +We can do this with the help of that in annotation. + +180 +00:14:23,000 --> 00:14:31,000 +This annotation does not have any other attributes besides description, but just margins across with + +181 +00:14:31,000 --> 00:14:39,000 +this interface is enough to tell web server that we need to register this class as this and then other + +182 +00:14:39,000 --> 00:14:41,000 +ways to configure least in the web xml. + +183 +00:14:42,000 --> 00:14:44,000 +There is a separate element reserved for this. + +184 +00:14:45,000 --> 00:14:52,000 +You can use this element and specify a listener class in order to register these evap server. + +185 +00:14:53,000 --> 00:14:55,000 +Now let's run our application. + +186 +00:14:56,000 --> 00:15:00,000 +If you watch the previous lesson, we created the use of less. + +187 +00:15:00,000 --> 00:15:08,000 +The demo session works, we have session demo, so that is a great session and sets activity into this + +188 +00:15:08,000 --> 00:15:08,000 +session. + +189 +00:15:09,000 --> 00:15:10,000 +Let's call it. + +190 +00:15:12,000 --> 00:15:19,000 +And you can see and console that session is great and attribute is added the session attribute name + +191 +00:15:19,000 --> 00:15:29,000 +is the ones that we used in our so that that attribute we can open a.s.a.p session so that uncheck session + +192 +00:15:29,000 --> 00:15:30,000 +attributes name and value. + +193 +00:15:31,000 --> 00:15:37,000 +And if you would compare the values in the console and in the source code, you will discover that there + +194 +00:15:37,000 --> 00:15:46,000 +is a scene that proves that we intercepted e man that we are one that now lets calls it so adds it contains + +195 +00:15:46,000 --> 00:15:53,000 +it could invalidate the current session and in console we can see all relevant messages. + +196 +00:15:54,000 --> 00:16:00,000 +Session is destroyed and when it is destroyed related attribute also was removed from. + +197 +00:16:01,000 --> 00:16:09,000 +In a similar way we can create and reduce the for select conflicts and foster lets request the source + +198 +00:16:09,000 --> 00:16:15,000 +code of all examples you will be able to find in attachments to the lesson and in case you would have + +199 +00:16:15,000 --> 00:16:15,000 +some questions. + +200 +00:16:16,000 --> 00:16:20,000 +Please let me know those and I will be happy to answer. + +201 +00:16:21,000 --> 00:16:29,000 +We saw the live demo in order to not duplicate the similar demo for all possible types of events and + +202 +00:16:29,000 --> 00:16:30,000 +event triggers. + +203 +00:16:30,000 --> 00:16:34,000 +Let me present your slides with a summary on this slide. + +204 +00:16:34,000 --> 00:16:37,000 +You can see a list of server context events. + +205 +00:16:38,000 --> 00:16:45,000 +Also, you can see the class of the SNR and the massive to implement just principles for a minute if + +206 +00:16:45,000 --> 00:16:48,000 +needed and read massive names attentively. + +207 +00:16:49,000 --> 00:16:51,000 +In my opinion, massive names are sound. + +208 +00:16:51,000 --> 00:16:55,000 +Describe in terms of what events they intercept. + +209 +00:16:56,000 --> 00:16:59,000 +Even in case some massive reason that remains unclear for you. + +210 +00:17:00,000 --> 00:17:02,000 +Please don't hesitate to ask questions. + +211 +00:17:03,000 --> 00:17:06,000 +Those of you and I will be happy to answer. + +212 +00:17:07,000 --> 00:17:11,000 +On this slide, you can find a similar table, but just for all session. + +213 +00:17:11,000 --> 00:17:15,000 +The related events work with this slide in a similar way. + +214 +00:17:16,000 --> 00:17:23,000 +Press pause, reads the slides, so feel free also to explore the source code of interfaces if you wish. + +215 +00:17:24,000 --> 00:17:27,000 +And once you are ready, proceed to the next slide. + +216 +00:17:28,000 --> 00:17:32,000 +And on this slide you can find all events related to this. + +217 +00:17:32,000 --> 00:17:33,000 +So let's request. + +218 +00:17:34,000 --> 00:17:41,000 +I am sure that after learning all this, you become at parole in events handling in general web applications. + +219 +00:17:41,000 --> 00:17:45,000 +And I want to congratulate you with this zone. + +220 +00:17:45,000 --> 00:17:51,000 +The one thing that we still need to learn today in the lesson is error handling in web applications. + +221 +00:17:52,000 --> 00:17:57,000 +In some degree error handling is similar to events interception. + +222 +00:17:57,000 --> 00:18:05,000 +So basically in the case of the event, which is error server for what is a request is a person's fig. + +223 +00:18:05,000 --> 00:18:10,000 +as source, we can configure error and as a deployment descriptor. + +224 +00:18:10,000 --> 00:18:12,000 +These are rabbits in a file. + +225 +00:18:12,000 --> 00:18:15,000 +What we would consider as an exception. + +226 +00:18:15,000 --> 00:18:23,000 +An exception is an event we should do is use execution of a program which disrupts the normal flow of + +227 +00:18:23,000 --> 00:18:25,000 +the program's instructions. + +228 +00:18:26,000 --> 00:18:32,000 +When assume that generates an error, the developers can handle those exceptions in various ways. + +229 +00:18:33,000 --> 00:18:41,000 +For example, when a user tries to access a euro without proper authorization, a full suite error code + +230 +00:18:41,000 --> 00:18:43,000 +is sent back to the client. + +231 +00:18:44,000 --> 00:18:50,000 +We can handle this exception by describing configuration for error, handling things of that file. + +232 +00:18:51,000 --> 00:18:58,000 +As developers, we have to handle these exceptions in order to describe them or behave as it should + +233 +00:18:58,000 --> 00:18:58,000 +be followed. + +234 +00:18:58,000 --> 00:19:06,000 +In the exceptional case, describing this behavior is called exception handling the different options. + +235 +00:19:06,000 --> 00:19:11,000 +How we can handle exceptions in Java Web applications zero. + +236 +00:19:11,000 --> 00:19:13,000 +We can handle exceptions programmatically. + +237 +00:19:14,000 --> 00:19:20,000 +I mean, with the help of tracking blocks, we can cache exceptional cases and define the logic that + +238 +00:19:20,000 --> 00:19:22,000 +will contain instructions. + +239 +00:19:23,000 --> 00:19:25,000 +How to address exceptional cases. + +240 +00:19:26,000 --> 00:19:33,000 +Another option is a declarative approach with the help of fixing the base configuration of every single + +241 +00:19:33,000 --> 00:19:33,000 +file. + +242 +00:19:33,000 --> 00:19:36,000 +We can configure rules for exception handling. + +243 +00:19:37,000 --> 00:19:41,000 +We can return customized content as a client in case of an error. + +244 +00:19:42,000 --> 00:19:48,000 +On this slide, you can see excellent tugs that can be used to configure resources for fluid you request + +245 +00:19:48,000 --> 00:19:49,000 +in case of the error. + +246 +00:19:50,000 --> 00:19:57,000 +We use error page excellent element that contains the following attributes described in the slide. + +247 +00:19:58,000 --> 00:20:00,000 +Required attribute is the location. + +248 +00:20:01,000 --> 00:20:07,000 +We have to specify the resources that we need to access in case of the exception we can set is a reference + +249 +00:20:07,000 --> 00:20:15,000 +to some static resource, some proposed error HTML page, or we can set the reference to another so + +250 +00:20:15,000 --> 00:20:22,000 +that we can also declare resources for specific Java exceptions or for specific error quotes. + +251 +00:20:23,000 --> 00:20:24,000 +Let's watch demo. + +252 +00:20:24,000 --> 00:20:28,000 +I believe it will be easier for you to understand this on real examples. + +253 +00:20:29,000 --> 00:20:31,000 +I opened that axonal. + +254 +00:20:32,000 --> 00:20:34,000 +The first lesson I prepared two examples here. + +255 +00:20:35,000 --> 00:20:39,000 +The first one verifies is the error code of response. + +256 +00:20:39,000 --> 00:20:47,000 +This is in case we set response code and after that container will be successful to resolve our error + +257 +00:20:47,000 --> 00:20:52,000 +code and forwards at once request to the preconfigured resource. + +258 +00:20:52,000 --> 00:20:58,000 +And another example shows how to configure error handling for this specific error type. + +259 +00:20:58,000 --> 00:21:02,000 +As example, I configure the error handling for now point the exception. + +260 +00:21:03,000 --> 00:21:07,000 +In most cases I first glance request to the error handler source. + +261 +00:21:08,000 --> 00:21:09,000 +Let's look at it. + +262 +00:21:10,000 --> 00:21:12,000 +This is a symbol that was named. + +263 +00:21:12,000 --> 00:21:15,000 +HENDERSON Well, let's look. + +264 +00:21:15,000 --> 00:21:16,000 +What do we have here? + +265 +00:21:17,000 --> 00:21:22,000 +In case of the error, different attributes are placed in the request object. + +266 +00:21:22,000 --> 00:21:30,000 +As you can see, I see special attribute names, flags and details about exception status code, server, + +267 +00:21:30,000 --> 00:21:31,000 +name and request. + +268 +00:21:33,000 --> 00:21:39,000 +After that I format responsive body with the help of email and send it back to the client. + +269 +00:21:40,000 --> 00:21:44,000 +Also, I prepared the service to imitate the exceptional cases. + +270 +00:21:45,000 --> 00:21:47,000 +Let me open stop error course. + +271 +00:21:47,000 --> 00:21:49,000 +So this. + +272 +00:21:49,000 --> 00:21:53,000 +So that sets for all three state of support in this response. + +273 +00:21:54,000 --> 00:22:01,000 +This will make our error and the mechanism to forward the request is an error and that so and another. + +274 +00:22:01,000 --> 00:22:03,000 +So what was the name of the exception? + +275 +00:22:03,000 --> 00:22:06,000 +So it will generate no one exception. + +276 +00:22:07,000 --> 00:22:12,000 +Looking to open a new compact and navigate a stop error euro. + +277 +00:22:14,000 --> 00:22:23,000 +I see status quo and error information that includes name of the somewhat sound error code and based + +278 +00:22:23,000 --> 00:22:24,000 +on the form on it. + +279 +00:22:24,000 --> 00:22:27,000 +You can see that this is not defaults in the page. + +280 +00:22:27,000 --> 00:22:30,000 +This is a page created by us. + +281 +00:22:31,000 --> 00:22:37,000 +Now let's change your role and let's just assume that the generates no point. + +282 +00:22:37,000 --> 00:22:39,000 +The exception I change you. + +283 +00:22:39,000 --> 00:22:41,000 +There's an MP. + +284 +00:22:41,000 --> 00:22:42,000 +I see. + +285 +00:22:42,000 --> 00:22:45,000 +That error is 500 and zero. + +286 +00:22:45,000 --> 00:22:51,000 +A lot of other details that we managed to fetch, as it ought to be from the request object. + +287 +00:22:52,000 --> 00:22:53,000 +You can see all of them here. + +288 +00:22:54,000 --> 00:23:00,000 +I can see certainly an exception because you lie even exception message. + +289 +00:23:01,000 --> 00:23:05,000 +That's how we can handle exceptions in Java map application. + +290 +00:23:05,000 --> 00:23:09,000 +Let's recap what we have learned in this lesson. + +291 +00:23:10,000 --> 00:23:15,000 +In this lesson, you learned why we need events in the IT application. + +292 +00:23:15,000 --> 00:23:23,000 +I explain what event listeners are really used, what kinds of events we can either set a handle. + +293 +00:23:24,000 --> 00:23:29,000 +Together, we implemented our first listener and the essence of the lesson. + +294 +00:23:29,000 --> 00:23:31,000 +We learned how to handle errors. + +295 +00:23:31,000 --> 00:23:33,000 +These are application. + +296 +00:23:34,000 --> 00:23:35,000 +Thanks a lot for your attention. + +297 +00:23:35,000 --> 00:23:38,000 +Have a great day and see you in the next lesson. + diff --git a/64 - Events Handling in Web Application/001 Source-of-web.xml-from-the-lesson.url b/64 - Events Handling in Web Application/001 Source-of-web.xml-from-the-lesson.url new file mode 100644 index 0000000000000000000000000000000000000000..bf702f3087c5b4c57f72cfacff4304de28f0f772 --- /dev/null +++ b/64 - Events Handling in Web Application/001 Source-of-web.xml-from-the-lesson.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/WEB-INF/web.xml \ No newline at end of file diff --git a/64 - Events Handling in Web Application/001 The-source-code-of-examples-from-the-lesson.url b/64 - Events Handling in Web Application/001 The-source-code-of-examples-from-the-lesson.url new file mode 100644 index 0000000000000000000000000000000000000000..5c4bf2f27083c841e13707249fa753edf93553d0 --- /dev/null +++ b/64 - Events Handling in Web Application/001 The-source-code-of-examples-from-the-lesson.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/tree/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/servlets/exceptions \ No newline at end of file diff --git a/64 - Events Handling in Web Application/external-links.txt b/64 - Events Handling in Web Application/external-links.txt new file mode 100644 index 0000000000000000000000000000000000000000..781d04d5fae3aa72c1c9d031213b4ad08a0e0466 --- /dev/null +++ b/64 - Events Handling in Web Application/external-links.txt @@ -0,0 +1,6 @@ + +001 The-source-code-of-examples-from-the-lesson +https://github.com/AndriiPiatakha/java-learnit-web-online-store/tree/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/servlets/exceptions + +001 Source-of-web.xml-from-the-lesson +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/WEB-INF/web.xml diff --git a/65 - HTML & CSS/001 HTML Basics_en.srt b/65 - HTML & CSS/001 HTML Basics_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..d9dc9f95fc55fcfb0a0ae9819099cca9cf7b3cb6 --- /dev/null +++ b/65 - HTML & CSS/001 HTML Basics_en.srt @@ -0,0 +1,1252 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello Tim. + +2 +00:00:07,000 --> 00:00:10,000 +Was this lesson was starts new and very important topic. + +3 +00:00:11,000 --> 00:00:11,000 +Time out. + +4 +00:00:11,000 --> 00:00:14,000 +This topic is important for everyone. + +5 +00:00:14,000 --> 00:00:20,000 +No matter whether you are a friend and developer who is about to start learning JavaScript or you are + +6 +00:00:20,000 --> 00:00:28,000 +a Java developer, learn Java that technologies including GCP and others, you have to know them out. + +7 +00:00:28,000 --> 00:00:32,000 +And this is the first lesson and series of HTML lessons. + +8 +00:00:33,000 --> 00:00:40,000 +We are going to learn what each the amount is, how briefly explains the history of HTML and will tell + +9 +00:00:40,000 --> 00:00:44,000 +you about organizations who support them nowadays? + +10 +00:00:44,000 --> 00:00:47,000 +In this lesson you will understand what a DOM is. + +11 +00:00:48,000 --> 00:00:54,000 +Also, we'll talk about different HTML versions and name email features. + +12 +00:00:54,000 --> 00:00:59,000 +Besides Seri, we are going to practice in our lesson together. + +13 +00:00:59,000 --> 00:01:05,000 +We'll create our custom HTML page and we will learn basic HTML elements. + +14 +00:01:06,000 --> 00:01:09,000 +I will explain what attributes of HTML elements are. + +15 +00:01:10,000 --> 00:01:15,000 +Will learn how to create comments in HTML, how to create tables and this. + +16 +00:01:15,000 --> 00:01:20,000 +And at the end of the lesson, you will learn how to work with Chrome Development Tools. + +17 +00:01:20,000 --> 00:01:22,000 +Let's start our lesson. + +18 +00:01:23,000 --> 00:01:27,000 +The first items that we have to discuss is the definition of HTML. + +19 +00:01:28,000 --> 00:01:29,000 +Let's understand what are these? + +20 +00:01:30,000 --> 00:01:35,000 +Each HTML is an acronym which stands for Hypertext Markup Language. + +21 +00:01:36,000 --> 00:01:38,000 +It is used for creating web pages. + +22 +00:01:38,000 --> 00:01:44,000 +Let's understand this definition better by understanding all chomps mentioned in it. + +23 +00:01:45,000 --> 00:01:47,000 +What does hypertext mean? + +24 +00:01:48,000 --> 00:01:57,000 +Hypertext simply means text within text at tax that has a link within it is a hypertext. + +25 +00:01:58,000 --> 00:02:05,000 +Each time you click on a link which brings you to you that page you have clicked on the hypertext. + +26 +00:02:05,000 --> 00:02:12,000 +Hypertext is a way to link the two or more back pages each HTML documents with each other. + +27 +00:02:13,000 --> 00:02:15,000 +What is a markup language? + +28 +00:02:15,000 --> 00:02:21,000 +A markup language is a computer language that is used to apply layout and formatting conventions to + +29 +00:02:21,000 --> 00:02:23,000 +the tax document. + +30 +00:02:23,000 --> 00:02:29,000 +All web browsers know how to read markup language to present information to the end user. + +31 +00:02:30,000 --> 00:02:37,000 +So markup is a set of rules to indicate the positions of the elements on the web page. + +32 +00:02:38,000 --> 00:02:42,000 +Markup Language makes text more interactive and dynamic. + +33 +00:02:42,000 --> 00:02:47,000 +It can turn text into images, tables, links, etc.. + +34 +00:02:48,000 --> 00:02:49,000 +What is a web page? + +35 +00:02:50,000 --> 00:02:57,000 +Every page is a document which is commonly read in HTML and translated by a web browser. + +36 +00:02:58,000 --> 00:03:06,000 +Like everything else in that web page is a resource, and this resource also has its own indented file, + +37 +00:03:06,000 --> 00:03:10,000 +so that page can be accessed via URL. + +38 +00:03:10,000 --> 00:03:17,000 +That page can produce a static content or dynamic content was interesting. + +39 +00:03:17,000 --> 00:03:19,000 +Now we can create a static map content. + +40 +00:03:20,000 --> 00:03:24,000 +In other words was h html would describe some static content. + +41 +00:03:24,000 --> 00:03:27,000 +Is it stored on the server side? + +42 +00:03:27,000 --> 00:03:35,000 +Also we can write a program code that will help us to generate HTML pages dynamically, so we'll use + +43 +00:03:36,000 --> 00:03:39,000 +them to generate new web content too. + +44 +00:03:39,000 --> 00:03:44,000 +But dynamic content can be created only with the help of programming languages. + +45 +00:03:45,000 --> 00:03:53,000 +Each HTML document is made up of many simple tasks and each email tag contains different content. + +46 +00:03:54,000 --> 00:03:57,000 +Page HTML consists of a series of elements. + +47 +00:03:58,000 --> 00:04:01,000 +External elements tells the browser how to display the content. + +48 +00:04:02,000 --> 00:04:05,000 +This is, in short, what HTML is. + +49 +00:04:05,000 --> 00:04:09,000 +Let's come to you unless known the key points from HTML history. + +50 +00:04:10,000 --> 00:04:19,000 +In the late 1980s, the physicist Tim Berners-Lee, who was a contractor at CERN, proposed the system + +51 +00:04:19,000 --> 00:04:23,000 +for CERN researchers in 1989. + +52 +00:04:23,000 --> 00:04:28,000 +He wrote a memo proposing an Internet based hypertext system. + +53 +00:04:29,000 --> 00:04:33,000 +Tim Berners-Lee is known as the father of simple. + +54 +00:04:33,000 --> 00:04:41,000 +The first available description of HTML was a document called H HTML text proposed by Tim in the late + +55 +00:04:41,000 --> 00:04:48,000 +19/91 Tim Berners-Lee also known as a leader of W3C. + +56 +00:04:49,000 --> 00:04:59,000 +What it is W3C is a World Wide Web consortium, also known as W3C is the main international standards + +57 +00:04:59,000 --> 00:05:00,000 +organisation because of. + +58 +00:05:02,000 --> 00:05:07,000 +Founded in 1994 and currently led by Tim Berners-Lee. + +59 +00:05:07,000 --> 00:05:15,000 +The consortium is made up of member organisations that maintain full time staff working together in + +60 +00:05:15,000 --> 00:05:18,000 +the development of standards for the World Wide Web. + +61 +00:05:19,000 --> 00:05:26,000 +As of 21st March 2002, W3C had 459 members. + +62 +00:05:26,000 --> 00:05:35,000 +W3C also engages in education and outreach, develops software and serves as an open forum for discussion + +63 +00:05:35,000 --> 00:05:36,000 +about the event. + +64 +00:05:37,000 --> 00:05:46,000 +On 28th May 2019, we see announced that Web Hypertext Application Technology Working Group would be + +65 +00:05:46,000 --> 00:05:51,000 +the sole publisher of the H two email and the standards. + +66 +00:05:51,000 --> 00:05:55,000 +ZG oh AM stands for the Document Object Model. + +67 +00:05:55,000 --> 00:05:56,000 +What is it? + +68 +00:05:56,000 --> 00:06:04,000 +It is a cross-platform and language independent interface that creates an X amount or HTML document + +69 +00:06:04,000 --> 00:06:08,000 +as a 2D structure wherein each node is an object. + +70 +00:06:08,000 --> 00:06:16,000 +Representing F course of the document is a map hypertext application technology working group show name + +71 +00:06:16,000 --> 00:06:25,000 +is w h a t WG is a community of people interested in evolving email related technologies. + +72 +00:06:26,000 --> 00:06:34,000 +The w h a t wg was founded by individuals from Apple, Mozilla Foundation and Opera Software. + +73 +00:06:34,000 --> 00:06:43,000 +Leading Web browser vendors in 2000 for the W three W3C and W, H, A, T, W, G, and B publishing + +74 +00:06:43,000 --> 00:06:55,000 +competing standards since 2012, while the W3C standard was identical to the w h 80 WG into 77, the + +75 +00:06:55,000 --> 00:07:00,000 +standards have since progressively diverged due to different design decisions. + +76 +00:07:01,000 --> 00:07:02,000 +W h a. + +77 +00:07:02,000 --> 00:07:02,000 +T. + +78 +00:07:02,000 --> 00:07:03,000 +W g. + +79 +00:07:03,000 --> 00:07:12,000 +Leaving standard and the de facto web standard for some time since the time each HTML was invented. + +80 +00:07:12,000 --> 00:07:15,000 +There are lots of similar versions in market. + +81 +00:07:15,000 --> 00:07:22,000 +The brief introduction about h html version is given on the sly h demo version one. + +82 +00:07:22,000 --> 00:07:30,000 +The first version of H html was 1.0, which was a bare bones version of H html language. + +83 +00:07:31,000 --> 00:07:34,000 +And it was released in 1990. + +84 +00:07:34,000 --> 00:07:34,000 +First. + +85 +00:07:35,000 --> 00:07:37,000 +HMO version 2.0. + +86 +00:07:38,000 --> 00:07:46,000 +This was the next version which was released in 1994, and it was standard language version for website + +87 +00:07:46,000 --> 00:07:46,000 +design. + +88 +00:07:47,000 --> 00:07:56,000 +HTML 2.0 was able to support extra features such as form based file upload form elements such as text + +89 +00:07:56,000 --> 00:07:58,000 +books, option button, etc.. + +90 +00:07:59,000 --> 00:08:01,000 +Extended Version 3.2. + +91 +00:08:02,000 --> 00:08:07,000 +This version was published by W3C in early 1997. + +92 +00:08:07,000 --> 00:08:14,000 +The version was capable of creating tables and providing support for extra options for form elements. + +93 +00:08:15,000 --> 00:08:20,000 +It can also support a map page with complex mathematical equations. + +94 +00:08:21,000 --> 00:08:26,000 +It became an official standards for any browser to generate in 1997. + +95 +00:08:26,000 --> 00:08:34,000 +To date is practically supported by most of the web browsers interest and now 4.01. + +96 +00:08:35,000 --> 00:08:42,000 +This version was released on December 1999 and it is very stable version of a similar language. + +97 +00:08:43,000 --> 00:08:50,000 +This version provides added support for stylesheet and script and ability for various multimedia elements. + +98 +00:08:51,000 --> 00:08:56,000 +H HTML5 is the newest version of Hypertext Markup Language. + +99 +00:08:56,000 --> 00:09:01,000 +The first draft of this version was announced in January 2008. + +100 +00:09:02,000 --> 00:09:11,000 +As we already discussed, the two major organizations, one is World Wide Web consortium and another + +101 +00:09:11,000 --> 00:09:14,000 +one is Web Hypertext Application Technology Working Group. + +102 +00:09:15,000 --> 00:09:24,000 +In July 2000, well W, HKT, WG, and W3C decided on a degree of separation. + +103 +00:09:24,000 --> 00:09:32,000 +Nevertheless, receival continues a system of certification work, focusing on a single definitive standard, + +104 +00:09:33,000 --> 00:09:41,000 +which is considered as a snapshot by w h at wg w h a t w g. + +105 +00:09:41,000 --> 00:09:44,000 +Harmonization will continue its work with h HTML5. + +106 +00:09:44,000 --> 00:09:46,000 +As in living standards. + +107 +00:09:46,000 --> 00:09:54,000 +The concept of living standards is that it is never complete and is always being updated and improved. + +108 +00:09:55,000 --> 00:09:59,000 +New features can be added, but functionality will not be removed. + +109 +00:10:00,000 --> 00:10:10,000 +On October 28th of 2014, H HTML five was released as a stable W3C recommendation, meaning the specification + +110 +00:10:10,000 --> 00:10:11,000 +process is complete. + +111 +00:10:12,000 --> 00:10:16,000 +ZC To begin brief overview of HTML versions. + +112 +00:10:16,000 --> 00:10:22,000 +Now let's review HTML features amongst each HTML features. + +113 +00:10:22,000 --> 00:10:24,000 +It is worth to highlight the following. + +114 +00:10:24,000 --> 00:10:32,000 +The once based email is a very easy and simple then, which can be easily understood and quantified. + +115 +00:10:32,000 --> 00:10:38,000 +Each email is a markup language, so it provides a flexible way to design web pages. + +116 +00:10:38,000 --> 00:10:40,000 +How long was a text? + +117 +00:10:41,000 --> 00:10:48,000 +H HTML is a platform independent because it can be displayed on any platform like Windows, Linux and + +118 +00:10:48,000 --> 00:10:56,000 +Mac or Apps, etc. The main things of the client have to have is a map browser that can, understands + +119 +00:10:56,000 --> 00:11:02,000 +and markup, so HTML can be easy to read on the mobile browser. + +120 +00:11:02,000 --> 00:11:03,000 +Mobile web browsers. + +121 +00:11:04,000 --> 00:11:12,000 +Each HTML is a case insensitive language, which means we can use the user in lowercase or uppercase + +122 +00:11:13,000 --> 00:11:15,000 +and now it is time for a demo. + +123 +00:11:16,000 --> 00:11:23,000 +We are going to create our first HTML page and learn main tasks and its structure. + +124 +00:11:24,000 --> 00:11:27,000 +The first things that we need to do is to create a HTML file. + +125 +00:11:27,000 --> 00:11:34,000 +I'm going to use a clips I.D., but you can use any OSI ID you want or even a notepad. + +126 +00:11:34,000 --> 00:11:39,000 +The only things that you need to do is to create file was HTML extension. + +127 +00:11:39,000 --> 00:11:46,000 +During my java course we great online store with my students and that's why I want to create all demo + +128 +00:11:46,000 --> 00:11:49,000 +files in our project that we created to gather use. + +129 +00:11:49,000 --> 00:11:57,000 +Of course I make my list right click on my source folder as C main bit that I select in view. + +130 +00:11:58,000 --> 00:12:00,000 +And after that I select each HTML. + +131 +00:12:01,000 --> 00:12:04,000 +After that, I need to give a name to the new file. + +132 +00:12:04,000 --> 00:12:06,000 +Let's call it index HTML. + +133 +00:12:07,000 --> 00:12:13,000 +Basically, I would recommend to click finish here because to be honest, there is not so much things + +134 +00:12:13,000 --> 00:12:15,000 +that we can configure in the HTML file. + +135 +00:12:16,000 --> 00:12:20,000 +Most of the changes will be done directly in the source file. + +136 +00:12:21,000 --> 00:12:27,000 +But just for the sake of the demo, let's click next button on the next step. + +137 +00:12:27,000 --> 00:12:31,000 +You can select each HTML template, the one you like the most. + +138 +00:12:31,000 --> 00:12:34,000 +The latest version based on the is HTML class. + +139 +00:12:35,000 --> 00:12:37,000 +So let's select a demo file. + +140 +00:12:38,000 --> 00:12:40,000 +Now we can click finish. + +141 +00:12:41,000 --> 00:12:48,000 +We created template index each HTML file specially for this nascent appropriate example in order to + +142 +00:12:48,000 --> 00:12:52,000 +save time during a video recording and don't make you wait. + +143 +00:12:52,000 --> 00:12:59,000 +And while I will create all necessary text, let me paste my example and walk you through it and leave + +144 +00:12:59,000 --> 00:13:00,000 +my comments as we go through. + +145 +00:13:01,000 --> 00:13:04,000 +In the first line, we can see the time declaration. + +146 +00:13:04,000 --> 00:13:05,000 +What is it? + +147 +00:13:06,000 --> 00:13:08,000 +It defines the document type. + +148 +00:13:08,000 --> 00:13:15,000 +Or in other words, it instructs the browser about the version of each HTML on the screen. + +149 +00:13:15,000 --> 00:13:19,000 +You can see typical declaration of page two amount of version five. + +150 +00:13:20,000 --> 00:13:23,000 +Previous HTML versions have another doctor declaration. + +151 +00:13:24,000 --> 00:13:28,000 +All h html file consists of h html elements. + +152 +00:13:29,000 --> 00:13:37,000 +Whereas the minimal element is everything from the start to the end, top elements can be nested. + +153 +00:13:38,000 --> 00:13:41,000 +This means that elements can contain all the elements. + +154 +00:13:42,000 --> 00:13:51,000 +All h HTML documents consist of nested XAML elements because usually in HMO it is only one element that + +155 +00:13:51,000 --> 00:13:55,000 +is called H HTML, all other elements unmasked at once. + +156 +00:13:56,000 --> 00:13:59,000 +After that we have the core h html. + +157 +00:13:59,000 --> 00:14:01,000 +These are the scrolls h html. + +158 +00:14:01,000 --> 00:14:06,000 +This stuff informs the browser h html documents. + +159 +00:14:07,000 --> 00:14:10,000 +Tags between each HTML tag describes a web document. + +160 +00:14:11,000 --> 00:14:17,000 +It is a container for all other elements of h html except docs type declaration. + +161 +00:14:18,000 --> 00:14:26,000 +The next element is that it should be the first element inside the HTML element which contains the metadata + +162 +00:14:27,000 --> 00:14:28,000 +information about the document. + +163 +00:14:29,000 --> 00:14:35,000 +In this method, metadata usually will place information for search Roberts keywords on this page and + +164 +00:14:35,000 --> 00:14:37,000 +short page description. + +165 +00:14:37,000 --> 00:14:41,000 +Also, we can configure text and image for the short preview. + +166 +00:14:41,000 --> 00:14:49,000 +Do you know the key when you show the is a Facebook or in another place there is an image and short + +167 +00:14:49,000 --> 00:14:52,000 +text description about the meaning you provided. + +168 +00:14:52,000 --> 00:14:54,000 +It is also configured here. + +169 +00:14:55,000 --> 00:15:02,000 +Let me show it to you so you can see how I passed the reference to the image description title. + +170 +00:15:03,000 --> 00:15:11,000 +By the way, there is a difference between title mentioned in the pack and a title tag title from the + +171 +00:15:11,000 --> 00:15:11,000 +separate. + +172 +00:15:11,000 --> 00:15:14,000 +Tag is a name of the top in the browser. + +173 +00:15:15,000 --> 00:15:19,000 +Also, you can see example of keywords for search engines. + +174 +00:15:19,000 --> 00:15:23,000 +This is an element of search engine optimization process. + +175 +00:15:24,000 --> 00:15:29,000 +If you have ever heard about E optimization, this is just small cars. + +176 +00:15:30,000 --> 00:15:36,000 +Also, you can see this declaration, loads of charts that used to read the characters on this page. + +177 +00:15:37,000 --> 00:15:43,000 +These are examples of heart pack and meta information that we can place inside. + +178 +00:15:43,000 --> 00:15:45,000 +Remembers these examples. + +179 +00:15:46,000 --> 00:15:49,000 +The hashtag must be closed because it bought. + +180 +00:15:49,000 --> 00:15:50,000 +It opens. + +181 +00:15:51,000 --> 00:15:59,000 +The next stack is body text between what it describes the content of the page as is visible to the end + +182 +00:15:59,000 --> 00:15:59,000 +user. + +183 +00:16:00,000 --> 00:16:04,000 +This stack contains the main content of the HTML document. + +184 +00:16:05,000 --> 00:16:08,000 +In our example, we place a few different headings. + +185 +00:16:08,000 --> 00:16:17,000 +For example, heading one and heading to each HTML headings I defined was h one to h six tax. + +186 +00:16:17,000 --> 00:16:23,000 +Search engines use the headings to index the structure and content of your web pages. + +187 +00:16:24,000 --> 00:16:27,000 +Users often scheme a page by its headings. + +188 +00:16:28,000 --> 00:16:31,000 +It is important to use headings to show the document structure. + +189 +00:16:32,000 --> 00:16:36,000 +Also, we have two different paragraphs in this document. + +190 +00:16:37,000 --> 00:16:44,000 +Each paragraph is printed from the UI because verse dimensions at some elements will display correctly, + +191 +00:16:45,000 --> 00:16:49,000 +even if you forget the end like this paragraph. + +192 +00:16:50,000 --> 00:16:53,000 +So any case will not close paragraph element here. + +193 +00:16:53,000 --> 00:16:55,000 +Nothing horrible will happen. + +194 +00:16:56,000 --> 00:17:04,000 +But still it is recommended to close each page the amount that you cannot be sure how each HTML will + +195 +00:17:04,000 --> 00:17:04,000 +be displayed. + +196 +00:17:05,000 --> 00:17:12,000 +Large or small screens and resize windows will create different results with each demo. + +197 +00:17:12,000 --> 00:17:19,000 +You can change the display by adding extra spaces or extra lines in a simple code. + +198 +00:17:20,000 --> 00:17:25,000 +The browser will automatically remove any extra spaces and lines when the page is displayed. + +199 +00:17:26,000 --> 00:17:29,000 +This should be done with special styles. + +200 +00:17:30,000 --> 00:17:33,000 +We're going to see assess in a separate lesson. + +201 +00:17:34,000 --> 00:17:40,000 +If you want to make a hyper reference to another page, then we have to use eight elements and each + +202 +00:17:41,000 --> 00:17:47,000 +attribute attributes are used to provide additional information about HTML elements. + +203 +00:17:48,000 --> 00:17:54,000 +For example, in case we want to open a link in the tap, then we have to use another attribute that + +204 +00:17:54,000 --> 00:17:57,000 +is called target and value. + +205 +00:17:57,000 --> 00:18:02,000 +Underscore that how I learned this from the official documentation. + +206 +00:18:03,000 --> 00:18:09,000 +I believe if you manage to get to this lesson, you already know how to find information on the Internet, + +207 +00:18:09,000 --> 00:18:11,000 +especially technical documentation. + +208 +00:18:12,000 --> 00:18:19,000 +You can Google technical documentation for any HTML element and find all possible attributes of the + +209 +00:18:19,000 --> 00:18:21,000 +element and its values. + +210 +00:18:22,000 --> 00:18:26,000 +Then the standard attributes are Let me sum it up. + +211 +00:18:27,000 --> 00:18:29,000 +All elements can have attributes. + +212 +00:18:30,000 --> 00:18:33,000 +Attributes provide additional information about elements. + +213 +00:18:34,000 --> 00:18:37,000 +Attributes are always specified in the start pack. + +214 +00:18:38,000 --> 00:18:43,000 +Attributes usually common name value pairs like name value. + +215 +00:18:44,000 --> 00:18:48,000 +The external standard does not require a lowercase attribute names. + +216 +00:18:49,000 --> 00:18:54,000 +However, W3C recommends lowercase attributes in HTML. + +217 +00:18:54,000 --> 00:18:59,000 +The Asian standard does not require quotes around attributes values. + +218 +00:19:00,000 --> 00:19:04,000 +However, W3C recommends quotes in HMO. + +219 +00:19:05,000 --> 00:19:06,000 +Single Quotes a double quotes. + +220 +00:19:07,000 --> 00:19:09,000 +Double quotes around attributes. + +221 +00:19:09,000 --> 00:19:11,000 +Values are the most common in HTML. + +222 +00:19:12,000 --> 00:19:19,000 +But single quotes can also be used in some situations when the attributes value itself contains double + +223 +00:19:19,000 --> 00:19:19,000 +quotes. + +224 +00:19:19,000 --> 00:19:22,000 +It is necessary to use single quotes. + +225 +00:19:23,000 --> 00:19:27,000 +One more thing that I'd like to know is how to use HTML comments. + +226 +00:19:28,000 --> 00:19:31,000 +There is a specific syntax that looks like this. + +227 +00:19:31,000 --> 00:19:33,000 +The comments are age html content. + +228 +00:19:34,000 --> 00:19:38,000 +You can use this syntax to comment your HTML content. + +229 +00:19:39,000 --> 00:19:45,000 +The image can be inserted easily using the IMG tag and its source attribute. + +230 +00:19:46,000 --> 00:19:49,000 +Images are not technically inserted into that page. + +231 +00:19:50,000 --> 00:19:52,000 +Images are linked to their pages. + +232 +00:19:53,000 --> 00:19:57,000 +The image stack creates a holding space for the referenced image. + +233 +00:19:57,000 --> 00:19:59,000 +The image stack is empty. + +234 +00:19:59,000 --> 00:20:05,000 +It contains attributes only and doesn't have a closing to the image. + +235 +00:20:05,000 --> 00:20:07,000 +Stock has two required attributes. + +236 +00:20:08,000 --> 00:20:08,000 +Zero. + +237 +00:20:09,000 --> 00:20:14,000 +S.A.C. specifies the cost as an image and all. + +238 +00:20:15,000 --> 00:20:21,000 +Specifies an alternate text for the image in case image won't be loaded for some reasons. + +239 +00:20:22,000 --> 00:20:24,000 +This tax will be displayed. + +240 +00:20:25,000 --> 00:20:25,000 +Let me then. + +241 +00:20:25,000 --> 00:20:28,000 +When you image here here you can see image stack. + +242 +00:20:29,000 --> 00:20:35,000 +I will use the reference to the website of my learning online university where I store some media. + +243 +00:20:36,000 --> 00:20:44,000 +Also pay attention to some optional attributes we can configure hide and weeds of the HTML element. + +244 +00:20:44,000 --> 00:20:46,000 +This value is in pixels. + +245 +00:20:47,000 --> 00:20:54,000 +That's why, depending on the screen resolution of the client, the physical size of the image might + +246 +00:20:54,000 --> 00:20:55,000 +be different. + +247 +00:20:55,000 --> 00:21:01,000 +You can also set a relative size in percents, just size in relation with the screen. + +248 +00:21:03,000 --> 00:21:05,000 +WOZA was female. + +249 +00:21:05,000 --> 00:21:08,000 +We can create tables to present data in a structured way. + +250 +00:21:09,000 --> 00:21:10,000 +Everything is simple here. + +251 +00:21:11,000 --> 00:21:12,000 +Let me explain. + +252 +00:21:13,000 --> 00:21:13,000 +Zero. + +253 +00:21:13,000 --> 00:21:14,000 +Table. + +254 +00:21:14,000 --> 00:21:15,000 +Tech is cool. + +255 +00:21:15,000 --> 00:21:15,000 +Table. + +256 +00:21:16,000 --> 00:21:19,000 +This is logically easy to understand. + +257 +00:21:20,000 --> 00:21:25,000 +After that, we have t r that you can read this table. + +258 +00:21:26,000 --> 00:21:29,000 +I believe this will help you to remember it better. + +259 +00:21:29,000 --> 00:21:31,000 +Table row may consist. + +260 +00:21:32,000 --> 00:21:36,000 +These are from table headers or from table data. + +261 +00:21:37,000 --> 00:21:42,000 +Each of these stacks represents new column Z, though one by one. + +262 +00:21:43,000 --> 00:21:44,000 +Table has border attributes. + +263 +00:21:44,000 --> 00:21:47,000 +It can define how second borders will be. + +264 +00:21:48,000 --> 00:21:56,000 +So after the next hour that we have the next role, we're going to see how this looks like in a minute. + +265 +00:21:57,000 --> 00:22:05,000 +And that's because we say that I would like to demo the date of this demo lease can be ordered and on + +266 +00:22:05,000 --> 00:22:15,000 +order an order at least it starts with that you out that each list item starts with a l i fact list + +267 +00:22:15,000 --> 00:22:16,000 +item. + +268 +00:22:17,000 --> 00:22:25,000 +The list items will be marked with bullets by default and order at least starts with a or l tag. + +269 +00:22:26,000 --> 00:22:28,000 +Each list item starts with a l. + +270 +00:22:28,000 --> 00:22:32,000 +I take this same as in an order. + +271 +00:22:32,000 --> 00:22:36,000 +At least the list items will be marked with numbers by default. + +272 +00:22:37,000 --> 00:22:42,000 +Let's open our HTML page now and take into account we are dealing with static content. + +273 +00:22:43,000 --> 00:22:51,000 +We shouldn't run our web server on your file system, usually h html files by default associated with + +274 +00:22:51,000 --> 00:22:53,000 +your default web browser. + +275 +00:22:53,000 --> 00:22:55,000 +So it would be enough. + +276 +00:22:55,000 --> 00:22:59,000 +Just double click them to open them in your favorite browser. + +277 +00:22:59,000 --> 00:23:06,000 +Inside the eclipse only we can make most radically open ways and select the web browser. + +278 +00:23:06,000 --> 00:23:11,000 +Eclipse will use built in web browser to present the content of our web page. + +279 +00:23:12,000 --> 00:23:14,000 +Pay attention to the title of the tab. + +280 +00:23:15,000 --> 00:23:17,000 +You can see different headings. + +281 +00:23:17,000 --> 00:23:19,000 +Paragraph values looks similar. + +282 +00:23:20,000 --> 00:23:23,000 +We can also test hyper references. + +283 +00:23:23,000 --> 00:23:31,000 +The first one or direct us to another website and the second one will open in a new tab. + +284 +00:23:32,000 --> 00:23:36,000 +As you can see, that is how hypertext markup language works. + +285 +00:23:37,000 --> 00:23:42,000 +Here you can see two images with size a set in pixels and with relative size. + +286 +00:23:43,000 --> 00:23:47,000 +Table was configured with precise order and order at least. + +287 +00:23:48,000 --> 00:23:51,000 +Let me also show you one more thing. + +288 +00:23:52,000 --> 00:23:58,000 +Let's open this page in Chrome browser, because browsers usually have advanced tools for debugging + +289 +00:23:58,000 --> 00:24:00,000 +and inspections of the web content. + +290 +00:24:01,000 --> 00:24:05,000 +Make mouse right, click in the area and select inspect. + +291 +00:24:06,000 --> 00:24:08,000 +Or you can just click F12 key. + +292 +00:24:09,000 --> 00:24:14,000 +This will open development tools when you select elements menu. + +293 +00:24:14,000 --> 00:24:17,000 +You can investigate all elements on the web page. + +294 +00:24:17,000 --> 00:24:23,000 +You can even change elements on the fly and see how representation will be changed. + +295 +00:24:24,000 --> 00:24:28,000 +For example, let me change hidden icons ahead in three. + +296 +00:24:29,000 --> 00:24:34,000 +I can do it easily by clicking twice, most likely a little bit late things. + +297 +00:24:34,000 --> 00:24:40,000 +Of course we are going to know what to assess is and you will be able also to change easily. + +298 +00:24:40,000 --> 00:24:46,000 +See, assess here on the fly in order to test how changes will affect current view. + +299 +00:24:47,000 --> 00:24:49,000 +That's all what I wanted to share with you today. + +300 +00:24:49,000 --> 00:24:52,000 +Let's recap what we have learned in this lesson. + +301 +00:24:53,000 --> 00:24:58,000 +In this lesson we'll go to what amount is also explained. + +302 +00:24:58,000 --> 00:25:09,000 +History of h html will support h html and learn such organizations as W3C and w h t WG. + +303 +00:25:10,000 --> 00:25:15,000 +Now you know what the end goal is really different html versions. + +304 +00:25:16,000 --> 00:25:20,000 +During the lesson, I draw attention to the main h html features. + +305 +00:25:21,000 --> 00:25:24,000 +Together, we created our first h html page. + +306 +00:25:25,000 --> 00:25:31,000 +We have used the basic HTML file structure and we learned main HTML elements. + +307 +00:25:31,000 --> 00:25:39,000 +I explained what h html animals attributes are also very simple comments, tables and lists. + +308 +00:25:40,000 --> 00:25:44,000 +And at the end of the lesson I showed you how to work with Chrome. + +309 +00:25:44,000 --> 00:25:45,000 +That's those. + +310 +00:25:45,000 --> 00:25:47,000 +That's all for this lesson. + +311 +00:25:47,000 --> 00:25:49,000 +Thanks a lot for your attention. + +312 +00:25:49,000 --> 00:25:51,000 +Have a great day and see you. + +313 +00:25:51,000 --> 00:25:52,000 +Next lesson. + diff --git a/65 - HTML & CSS/001 Source-code-of-the-HTML-file-example-from-the-lesson.url b/65 - HTML & CSS/001 Source-code-of-the-HTML-file-example-from-the-lesson.url new file mode 100644 index 0000000000000000000000000000000000000000..29d037d7bff4599e299f99ad0600cd008bb8a6ac --- /dev/null +++ b/65 - HTML & CSS/001 Source-code-of-the-HTML-file-example-from-the-lesson.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/index.html \ No newline at end of file diff --git a/65 - HTML & CSS/002 CSS-source-code.url b/65 - HTML & CSS/002 CSS-source-code.url new file mode 100644 index 0000000000000000000000000000000000000000..3aaa5b62b91195cb2d4beb3374d18a76e12ed7de --- /dev/null +++ b/65 - HTML & CSS/002 CSS-source-code.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/css/styles.css \ No newline at end of file diff --git a/65 - HTML & CSS/002 HTML-with-CSS-source-code.url b/65 - HTML & CSS/002 HTML-with-CSS-source-code.url new file mode 100644 index 0000000000000000000000000000000000000000..eb24a6986e4fa703927ca8636001124f6dcbe718 --- /dev/null +++ b/65 - HTML & CSS/002 HTML-with-CSS-source-code.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/css-demo.html \ No newline at end of file diff --git "a/65 - HTML & CSS/002 \320\241SS Basics_en.srt" "b/65 - HTML & CSS/002 \320\241SS Basics_en.srt" new file mode 100644 index 0000000000000000000000000000000000000000..624ebbd3928a002a8fbf9874ebdbb25c1ca60f10 --- /dev/null +++ "b/65 - HTML & CSS/002 \320\241SS Basics_en.srt" @@ -0,0 +1,1312 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello, team. + +2 +00:00:06,000 --> 00:00:10,000 +In this lesson, we're going to learn what Koskinen style sheets are. + +3 +00:00:11,000 --> 00:00:19,000 +We'll start from the of basic definitions, like what is a thesis and what its goals will review advantages + +4 +00:00:19,000 --> 00:00:21,000 +of to assess and why we have to use it. + +5 +00:00:22,000 --> 00:00:29,000 +After learning, this piece of theory will jump to more practical topics and we'll start note and see + +6 +00:00:29,000 --> 00:00:30,000 +syntax. + +7 +00:00:30,000 --> 00:00:35,000 +Important part of this lesson will be understanding of theses selectors. + +8 +00:00:35,000 --> 00:00:44,000 +We're going to learn the element idea plus universal and group and selectors separately will review + +9 +00:00:44,000 --> 00:00:45,000 +attributes selectors. + +10 +00:00:46,000 --> 00:00:53,000 +I will explain what civic classes in CSR we're going to have practical activity today with funeral and + +11 +00:00:53,000 --> 00:01:00,000 +CAC files will learn how the work was in line to assess the child's assessed and external. + +12 +00:01:00,000 --> 00:01:05,000 +To assess, I'm going to show you how to work with sucess in Chrome death. + +13 +00:01:05,000 --> 00:01:11,000 +Those will learn how to use comments and systems and that answers a lesson. + +14 +00:01:11,000 --> 00:01:15,000 +We're going to talk about the whole list of SAS properties. + +15 +00:01:15,000 --> 00:01:17,000 +Let's start our lesson. + +16 +00:01:18,000 --> 00:01:25,000 +Let's learn what a C assess s c says is an acronym that stands for Cascading Style Sheets. + +17 +00:01:26,000 --> 00:01:33,000 +It is a stylesheet language which is used to describe the look and form lining of a document and in + +18 +00:01:33,000 --> 00:01:37,000 +markup language it provides an additional feature to h html. + +19 +00:01:37,000 --> 00:01:46,000 +This is generally used was HTML to change the style of web pages and user either faces to assess is + +20 +00:01:46,000 --> 00:01:53,000 +used together with H, HTML and JavaScript in most websites nowadays to create user interfaces for web + +21 +00:01:53,000 --> 00:02:02,000 +applications and user interfaces for many mobile applications, the name scanning comes from specified + +22 +00:02:02,000 --> 00:02:09,000 +priorities key to determine which style rule applies if more than one launches a particular element, + +23 +00:02:10,000 --> 00:02:13,000 +this cascading priority scale is predictable. + +24 +00:02:14,000 --> 00:02:22,000 +He says, is used to define styles for your pages, including the design, layout and variations in + +25 +00:02:22,000 --> 00:02:30,000 +display for different devices and screen sizes when tasks like form and color are to use for added to + +26 +00:02:30,000 --> 00:02:39,000 +the Asian or 3.2 specification, it started a nightmare for web developers development of large websites + +27 +00:02:39,000 --> 00:02:47,000 +where fonts and color information that added to every single page became a long and expensive process. + +28 +00:02:48,000 --> 00:02:56,000 +To solve this problem, the World Wide Web consortium created to assess, see, assess and remove this + +29 +00:02:56,000 --> 00:02:58,000 +style from modern forms of page. + +30 +00:02:59,000 --> 00:03:03,000 +The style definitions are normally safe in external cases files. + +31 +00:03:04,000 --> 00:03:09,000 +So to sum it up, here are a few important points about assess. + +32 +00:03:10,000 --> 00:03:15,000 +First of all, definition see says stands for canyon style sheets. + +33 +00:03:16,000 --> 00:03:21,000 +These says describes how each HTML elements are to be displayed on the screen. + +34 +00:03:22,000 --> 00:03:24,000 +This saves a lot of work. + +35 +00:03:24,000 --> 00:03:28,000 +You can control the layout of multiple web pages all at once. + +36 +00:03:29,000 --> 00:03:33,000 +External style sheets are stored in CCIS files. + +37 +00:03:34,000 --> 00:03:37,000 +Let's briefly talk about theses versions and variations. + +38 +00:03:38,000 --> 00:03:41,000 +CS SAS has various levels and profiles. + +39 +00:03:41,000 --> 00:03:50,000 +Each level of CS SAS builds upon the last typically and a new features and typically denoted as theses + +40 +00:03:50,000 --> 00:03:58,000 +one two substitutes as a three and C assess, four profiles are typically a subset of one or more levels + +41 +00:03:58,000 --> 00:04:02,000 +of C assessed build for a particular device or user interface. + +42 +00:04:03,000 --> 00:04:09,000 +Currently, there are profiles for mobile devices, printers and television sets. + +43 +00:04:09,000 --> 00:04:15,000 +Profiles should not be confused with media types which were added in C. + +44 +00:04:15,000 --> 00:04:22,000 +Assess to the first user specification to become an official W3C Recommendation Enthusiast Level one + +45 +00:04:23,000 --> 00:04:26,000 +published on 17th December 1996. + +46 +00:04:27,000 --> 00:04:36,000 +Since this Level two specification was developed by W3C and published as a recommendation in May 1998. + +47 +00:04:36,000 --> 00:04:44,000 +Unlike Scissors two, which is a large single specification defined in various features, theses three + +48 +00:04:44,000 --> 00:04:49,000 +is divided into several separate documents called modules. + +49 +00:04:49,000 --> 00:04:59,000 +Each module adds new capabilities or extends features defined in C says to preserve in backwards compatibility. + +50 +00:04:59,000 --> 00:05:06,000 +There is no single integrated services for specification because the specification has been split into + +51 +00:05:06,000 --> 00:05:10,000 +many separate modules which level independently. + +52 +00:05:11,000 --> 00:05:18,000 +Let's now discuss goals of use and to assess the main goal of t assess is to separate concerns between + +53 +00:05:18,000 --> 00:05:21,000 +the presentation and content. + +54 +00:05:22,000 --> 00:05:24,000 +It wasn't always been like this. + +55 +00:05:24,000 --> 00:05:25,000 +Long time ago. + +56 +00:05:25,000 --> 00:05:34,000 +You created each page and you only could style your elements inside the document sets, patterns, colors, + +57 +00:05:34,000 --> 00:05:35,000 +etc.. + +58 +00:05:36,000 --> 00:05:37,000 +Is it so bad? + +59 +00:05:37,000 --> 00:05:39,000 +Let's think about it. + +60 +00:05:39,000 --> 00:05:48,000 +By the way, even today we can style HD elements inside a document by adding style attributes and adding + +61 +00:05:48,000 --> 00:05:51,000 +value to this attribute later today. + +62 +00:05:51,000 --> 00:05:57,000 +As a practical demo, I'm going to show you how to use in Line Sucess. + +63 +00:05:57,000 --> 00:06:01,000 +But this can work with one single page at the university. + +64 +00:06:01,000 --> 00:06:04,000 +This is not the best solution for the production scale. + +65 +00:06:04,000 --> 00:06:05,000 +Why? + +66 +00:06:05,000 --> 00:06:11,000 +Imagine that you have dozens of web pages and you have the same green button on each page. + +67 +00:06:12,000 --> 00:06:12,000 +What should you do? + +68 +00:06:13,000 --> 00:06:18,000 +That style attribute to each element on each page where you have this button. + +69 +00:06:19,000 --> 00:06:20,000 +Okay. + +70 +00:06:20,000 --> 00:06:20,000 +This would be fun. + +71 +00:06:21,000 --> 00:06:28,000 +But even more fun to come when you would realize that you need to make changes to the boss and style. + +72 +00:06:29,000 --> 00:06:33,000 +Imagine the T to change its color from green to the light green. + +73 +00:06:34,000 --> 00:06:40,000 +This would mean that you need to update this style in all documents where you have this element. + +74 +00:06:41,000 --> 00:06:44,000 +This is not the best way to approach this challenge. + +75 +00:06:44,000 --> 00:06:50,000 +That's why separation of concerns between the content and presentation is a good idea. + +76 +00:06:51,000 --> 00:06:58,000 +You have to use scratch styles for elements and you have each HTML file that describes the content of + +77 +00:06:58,000 --> 00:06:59,000 +the page. + +78 +00:07:00,000 --> 00:07:07,000 +When you need to adjust styles, you fix to assess and you can use the same sucess on different HMO + +79 +00:07:07,000 --> 00:07:08,000 +pages. + +80 +00:07:08,000 --> 00:07:15,000 +In this particular example, you can change color of the button in one place in this file, and color + +81 +00:07:15,000 --> 00:07:23,000 +will be changed on all web pages where this element is used, among other goals that you want to reach + +82 +00:07:23,000 --> 00:07:25,000 +with the help of sucess. + +83 +00:07:25,000 --> 00:07:31,000 +It is worth mentioning the following wants this operation to improve content accessibility. + +84 +00:07:32,000 --> 00:07:38,000 +To provide more flexibility and control in the specification of the presentation characteristics is + +85 +00:07:38,000 --> 00:07:46,000 +also can be named as one of the goals to enable multiple web pages to share for modern by specifying + +86 +00:07:46,000 --> 00:07:54,000 +irrelevancy assessed in a separate file, which reduces complexity and repetition in the structural + +87 +00:07:54,000 --> 00:07:54,000 +content. + +88 +00:07:55,000 --> 00:08:00,000 +Enables us to use this file to be cached and improves the page load speed. + +89 +00:08:00,000 --> 00:08:09,000 +The decrease of pages that she has a file is formatted to use us also has rules for alternate for modern + +90 +00:08:09,000 --> 00:08:12,000 +it was a quantum is accessed on a mobile device. + +91 +00:08:13,000 --> 00:08:17,000 +CSX can describe styles for specific events with elements. + +92 +00:08:17,000 --> 00:08:21,000 +For example, the change color of the bottom on hover event. + +93 +00:08:22,000 --> 00:08:28,000 +This when the mouse pointer is over the element on the web page, just as an example. + +94 +00:08:29,000 --> 00:08:32,000 +And now let's discuss advantages of using sucess. + +95 +00:08:33,000 --> 00:08:42,000 +This solves a big problem because you assess facts like font color, background style, element alignments, + +96 +00:08:42,000 --> 00:08:46,000 +water and size have to be repeated on every web page. + +97 +00:08:46,000 --> 00:08:49,000 +This was a very long process. + +98 +00:08:49,000 --> 00:08:55,000 +For example, like we already discussed, when we talk about users goals, if you are developing a large + +99 +00:08:55,000 --> 00:09:04,000 +website where fonts and conservation are added on every single page, it will become a long and expensive + +100 +00:09:04,000 --> 00:09:05,000 +process. + +101 +00:09:06,000 --> 00:09:08,000 +You says was created to solve this problem. + +102 +00:09:08,000 --> 00:09:11,000 +It was a W3C recommendation. + +103 +00:09:12,000 --> 00:09:20,000 +To say so a lot of time since a style definitions are safe and external uses files so it is possible + +104 +00:09:20,000 --> 00:09:28,000 +to change his entire website by changing just one file provides more attributes to assess. + +105 +00:09:28,000 --> 00:09:36,000 +Provides more detailed attributes is in plain HTML two defines the load and feel of the website that + +106 +00:09:36,000 --> 00:09:41,000 +to have gotten see assessing the managers and believes that now we are ready to proceed was not enough + +107 +00:09:41,000 --> 00:09:44,000 +to assess impacts that see. + +108 +00:09:44,000 --> 00:09:52,000 +The SAS rule consists of a selector and the declaration block the selector that points to the H2 element + +109 +00:09:52,000 --> 00:09:53,000 +you want to style. + +110 +00:09:54,000 --> 00:09:59,000 +This declaration law contains one or more declarations separated by semicolons. + +111 +00:10:00,000 --> 00:10:06,000 +Each declaration includes access, property, name and the value separated by column. + +112 +00:10:07,000 --> 00:10:13,000 +Multiple C says declarations are separated with semicolons and declaration. + +113 +00:10:13,000 --> 00:10:16,000 +Blocks are surrounded by candidate bases. + +114 +00:10:16,000 --> 00:10:17,000 +What is? + +115 +00:10:17,000 --> 00:10:18,000 +It's a selector. + +116 +00:10:19,000 --> 00:10:26,000 +Let's use a selector selects each element of musical elements that you want to style. + +117 +00:10:26,000 --> 00:10:32,000 +It is important for us to know how to use these selectors because we are going to use them not only + +118 +00:10:32,000 --> 00:10:38,000 +in those files, we can also use them in JavaScript code and even in Java code. + +119 +00:10:39,000 --> 00:10:41,000 +For example, the surveying of cab driver. + +120 +00:10:42,000 --> 00:10:50,000 +We can search animals by to use a selector from Java code and we will use to assess selectors to find + +121 +00:10:50,000 --> 00:10:53,000 +elements on the map page with the help of JavaScript. + +122 +00:10:54,000 --> 00:11:00,000 +So just believe me, we have to learn how to work the selectors and this is important. + +123 +00:11:01,000 --> 00:11:08,000 +So see us as selectors are used to find will select the each terminal animals we want to style. + +124 +00:11:09,000 --> 00:11:14,000 +We can divide census selectors into five main categories. + +125 +00:11:15,000 --> 00:11:25,000 +C SS element selector CSA selector csa s+ selector to associate reversal selector and C is SAS select. + +126 +00:11:26,000 --> 00:11:30,000 +In this lesson I will explain to SAS selectors. + +127 +00:11:31,000 --> 00:11:33,000 +Let's start from element selector. + +128 +00:11:34,000 --> 00:11:39,000 +The element selector selects elements based on the element name. + +129 +00:11:40,000 --> 00:11:46,000 +It can be absolutely any HTML element and internal embraces will specify its styles. + +130 +00:11:47,000 --> 00:11:55,000 +On this slide you can see example where I use a paragraph element to declare styles for all paragraph + +131 +00:11:55,000 --> 00:11:55,000 +elements. + +132 +00:11:56,000 --> 00:11:59,000 +This is how element selector slide. + +133 +00:12:00,000 --> 00:12:06,000 +Zaidi selector uses ID attributes of an Asian element to select a specific element. + +134 +00:12:07,000 --> 00:12:16,000 +The idea of an element is unique within a page, so the idea selector is used to select one unique element. + +135 +00:12:17,000 --> 00:12:24,000 +This is important to understand because with the help of other selectors like Element Selector, you + +136 +00:12:24,000 --> 00:12:31,000 +can select multiple elements at once, but was a selector only one element per page. + +137 +00:12:31,000 --> 00:12:39,000 +To select an element with a specific A-G has a character followed by the idea of the element like you + +138 +00:12:39,000 --> 00:12:41,000 +see in the example on the slide. + +139 +00:12:42,000 --> 00:12:53,000 +So we have a shimmer element with a car and c ss for the specified element, use the attribute of each + +140 +00:12:53,000 --> 00:12:53,000 +HTML element. + +141 +00:12:54,000 --> 00:12:56,000 +Each element. + +142 +00:12:56,000 --> 00:12:57,000 +Map this actually. + +143 +00:12:58,000 --> 00:13:06,000 +Za cos select a selects HMO animals with a specific class attribute to select elements with a specific + +144 +00:13:06,000 --> 00:13:11,000 +class right and period character followed by the class name. + +145 +00:13:11,000 --> 00:13:15,000 +This selector is used very often, in my opinion. + +146 +00:13:15,000 --> 00:13:19,000 +It also allows us to select multiple HTML elements at once. + +147 +00:13:20,000 --> 00:13:26,000 +Example You can see that my paragraph element has class attribute with value center. + +148 +00:13:27,000 --> 00:13:35,000 +We can also specify that styles apply only to paragraph elements that have class center attention. + +149 +00:13:35,000 --> 00:13:39,000 +There is no space between P and period characters. + +150 +00:13:40,000 --> 00:13:41,000 +Can you see this? + +151 +00:13:42,000 --> 00:13:45,000 +This means paragraph week's class center. + +152 +00:13:46,000 --> 00:13:52,000 +But what will happen in case we'll put space between B and the Earth character? + +153 +00:13:53,000 --> 00:14:00,000 +In this case, this would mean that I want to select all elements with class center that a massive inside + +154 +00:14:00,000 --> 00:14:03,000 +the paragraph element fills a difference. + +155 +00:14:04,000 --> 00:14:11,000 +Usually we use space to build more complex and more unique selectors for our HTML elements. + +156 +00:14:11,000 --> 00:14:16,000 +This is similar to the namespace concept of packages concepts in Java. + +157 +00:14:17,000 --> 00:14:24,000 +We need to find a way to separate one elements from another and we can do it by specifying more concrete. + +158 +00:14:25,000 --> 00:14:25,000 +C assessed. + +159 +00:14:25,000 --> 00:14:26,000 +Selecting. + +160 +00:14:27,000 --> 00:14:30,000 +And what if our animal has more than one class? + +161 +00:14:31,000 --> 00:14:33,000 +By the way, this is pretty a common situation. + +162 +00:14:33,000 --> 00:14:36,000 +One element has more than one class. + +163 +00:14:36,000 --> 00:14:40,000 +Classes are separated by space in the female element. + +164 +00:14:41,000 --> 00:14:49,000 +Our selector also will march this element in case each element has at least one class from our test + +165 +00:14:49,000 --> 00:14:49,000 +selector. + +166 +00:14:50,000 --> 00:14:57,000 +But in case we want to create a selection as it would select only elements that have these two classes + +167 +00:14:57,000 --> 00:14:58,000 +simultaneously. + +168 +00:14:59,000 --> 00:15:03,000 +Then we need to list classes without space in our to test select. + +169 +00:15:04,000 --> 00:15:11,000 +So you should remember that enthusiast selectors space means nested elements. + +170 +00:15:12,000 --> 00:15:16,000 +The next selector we're going to discuss is universal selector. + +171 +00:15:17,000 --> 00:15:21,000 +The universal selector selects all elements on the page. + +172 +00:15:22,000 --> 00:15:28,000 +You can apply the selector when you need to select style properties to all elements on the page. + +173 +00:15:29,000 --> 00:15:34,000 +The group and selector select all the h html elements with the same style definitions. + +174 +00:15:35,000 --> 00:15:42,000 +For example, we can have multiple selectors, but that actually describes the same styles for elements. + +175 +00:15:43,000 --> 00:15:44,000 +Just think of the example in this slide. + +176 +00:15:45,000 --> 00:15:51,000 +We have the same styles for H1, H2 and paragraph elements. + +177 +00:15:52,000 --> 00:15:57,000 +It will be data to group the selectors to minimise code to group selectors. + +178 +00:15:58,000 --> 00:16:02,000 +Separate each selector was a comma and that's it. + +179 +00:16:03,000 --> 00:16:09,000 +There is also one interest the group of selectors that they used not very often, but still I believe + +180 +00:16:09,000 --> 00:16:11,000 +that would be interesting for you to know. + +181 +00:16:12,000 --> 00:16:14,000 +There are so-called attributes selectors. + +182 +00:16:15,000 --> 00:16:21,000 +It is possible to style each female elements as it has specific attributes or attributes, values and + +183 +00:16:21,000 --> 00:16:29,000 +even more we can specify whether we want to select element is the starlet and the specific sequence + +184 +00:16:29,000 --> 00:16:33,000 +of characters or just contains some char sequence. + +185 +00:16:34,000 --> 00:16:38,000 +Please reserve pause for a minute and explore examples from this slide. + +186 +00:16:39,000 --> 00:16:46,000 +Examples of the slides should help you to understand to selectors data and in case you would have any + +187 +00:16:46,000 --> 00:16:53,000 +questions related to add to the selectors, please do not hesitate to ask them in comments below. + +188 +00:16:53,000 --> 00:16:53,000 +This video. + +189 +00:16:55,000 --> 00:16:57,000 +Now let's learn what I see. + +190 +00:16:57,000 --> 00:17:03,000 +Since the classes are the CAC, the class is a keyword, added the selector. + +191 +00:17:03,000 --> 00:17:08,000 +That's insofar as a special state of the selected element or elements. + +192 +00:17:09,000 --> 00:17:14,000 +For example, hover can be used to change your bottle's color. + +193 +00:17:14,000 --> 00:17:23,000 +Once the user point hovers over, you see the classes that you apply styled an element not only in relation + +194 +00:17:23,000 --> 00:17:30,000 +to the content of the documentary, but also in relation to external factors like the history of the + +195 +00:17:30,000 --> 00:17:40,000 +navigator visited, for example, the status of its content like check on certain form elements or the + +196 +00:17:40,000 --> 00:17:47,000 +position of the mouse like hover, which lets you know if the mouse is over an element or not. + +197 +00:17:48,000 --> 00:17:50,000 +There are really a lot of difference to the classes. + +198 +00:17:51,000 --> 00:17:54,000 +I don't see a lot of sense to go over each of them. + +199 +00:17:55,000 --> 00:18:02,000 +I would just leave the least of all the classes on the slide in the most cases, state that is described + +200 +00:18:02,000 --> 00:18:07,000 +by the class is clear by its name in case the name is confusing. + +201 +00:18:08,000 --> 00:18:15,000 +Just find the reference in the internet or ask in commas to this veto and I will be happy to reply. + +202 +00:18:16,000 --> 00:18:18,000 +We have a lot of cereal already. + +203 +00:18:18,000 --> 00:18:21,000 +It is time for practical exercise. + +204 +00:18:22,000 --> 00:18:27,000 +In this practical exercise, we're going to learn how to apply to assess the HTML elements. + +205 +00:18:28,000 --> 00:18:37,000 +There are three possible ways of inserting a style sheet zero in line sucess in child to assess external + +206 +00:18:37,000 --> 00:18:38,000 +sucess. + +207 +00:18:39,000 --> 00:18:41,000 +Let's review these examples one by one. + +208 +00:18:42,000 --> 00:18:48,000 +Especially for this lesson, I created a new team of files at the school to assess them. + +209 +00:18:48,000 --> 00:18:56,000 +TMA If you don't know what a simple file is and how to create it, please refer to a previous lesson + +210 +00:18:56,000 --> 00:19:04,000 +and you will be able to find this demo file in attachments to the lesson in order you would practice + +211 +00:19:04,000 --> 00:19:07,000 +on your local computer in this demo file. + +212 +00:19:07,000 --> 00:19:11,000 +I have three different elements to demonstrate different scenarios. + +213 +00:19:12,000 --> 00:19:20,000 +Let's start from inline sucess and inline style may be used to apply a unique style for a single element. + +214 +00:19:20,000 --> 00:19:27,000 +While it is technically possible, this option is not recommended because as you already know from this + +215 +00:19:27,000 --> 00:19:33,000 +awesome mixing of presentation and content is not the best thing that we can do. + +216 +00:19:34,000 --> 00:19:42,000 +But I believe it is also important to note this technical capability to use inline styles at the start + +217 +00:19:42,000 --> 00:19:43,000 +to the relevant element. + +218 +00:19:44,000 --> 00:19:50,000 +The style activity can contain any serious property like you see in this example. + +219 +00:19:51,000 --> 00:19:58,000 +Our heading two contains inline to assess with set color to the rest. + +220 +00:19:59,000 --> 00:20:02,000 +The next example is an example on channel style. + +221 +00:20:03,000 --> 00:20:05,000 +What is it and how we can use it? + +222 +00:20:06,000 --> 00:20:12,000 +An internal stylesheet may be used if one single HTML page has a unique style. + +223 +00:20:13,000 --> 00:20:19,000 +The internal style is defined inside the style element inside the head section. + +224 +00:20:20,000 --> 00:20:26,000 +In our particular case, we have an channel style sheet and we set what we call potatoes. + +225 +00:20:26,000 --> 00:20:29,000 +That was a class in Charles's SAS demo. + +226 +00:20:31,000 --> 00:20:34,000 +And a set example is about to use an external to assess them. + +227 +00:20:35,000 --> 00:20:39,000 +That tension that in my folder I have another folder. + +228 +00:20:39,000 --> 00:20:44,000 +So the school says this folder is accessible from the Internet. + +229 +00:20:44,000 --> 00:20:51,000 +This is important because in this case clients will be able to reach might see styles. + +230 +00:20:51,000 --> 00:21:00,000 +In that folder I have file was name style to assess this would be the files I can use in different files. + +231 +00:21:00,000 --> 00:21:03,000 +Let's open it inside. + +232 +00:21:03,000 --> 00:21:06,000 +I have declaration only for one class so far. + +233 +00:21:07,000 --> 00:21:09,000 +And pay attention column. + +234 +00:21:09,000 --> 00:21:14,000 +However, as we know already, this is C the class is. + +235 +00:21:14,000 --> 00:21:16,000 +It describes some state of the element. + +236 +00:21:17,000 --> 00:21:25,000 +This means that I select elements with class external to assess them and on hover state with these elements + +237 +00:21:25,000 --> 00:21:26,000 +style will be applied. + +238 +00:21:27,000 --> 00:21:31,000 +Let's change the name on Hover State. + +239 +00:21:32,000 --> 00:21:38,000 +For more practical scenes, I'd like to show you in this exercise our Commons insistence. + +240 +00:21:39,000 --> 00:21:45,000 +Ever since Single Share Commons, I used to explain the code and may have one. + +241 +00:21:45,000 --> 00:21:48,000 +You added the source code at a later date. + +242 +00:21:48,000 --> 00:21:50,000 +Comments are ignored by browsers. + +243 +00:21:51,000 --> 00:21:57,000 +Use slash and asterisk, open common and asterisk and slash to close comma. + +244 +00:21:58,000 --> 00:22:02,000 +But the clearing of styles and externalities says file is not enough. + +245 +00:22:03,000 --> 00:22:09,000 +We also have to tell each team that we want to use this to assess on the page how to do this. + +246 +00:22:10,000 --> 00:22:12,000 +Let's get back to this. + +247 +00:22:12,000 --> 00:22:13,000 +A simple demo. + +248 +00:22:14,000 --> 00:22:18,000 +Pay attention to the increments that I put inside my head. + +249 +00:22:19,000 --> 00:22:28,000 +It has to add to this they are a rule that has a value stylesheet and a graph that contains passed as + +250 +00:22:28,000 --> 00:22:31,000 +a thesis file that I want to use on this page. + +251 +00:22:32,000 --> 00:22:36,000 +Usually this is relative pass to my sucess file. + +252 +00:22:36,000 --> 00:22:44,000 +In our particular case, I refer to the thesis folder that is located on the same level as our demo + +253 +00:22:44,000 --> 00:22:48,000 +html and those are styles to assess file inside. + +254 +00:22:49,000 --> 00:22:55,000 +Let's open our Ishmael demo in browser and make sure that all styles applied successfully. + +255 +00:22:56,000 --> 00:22:58,000 +We can see that first line was in line. + +256 +00:22:58,000 --> 00:23:00,000 +Styles has a red color as expected. + +257 +00:23:01,000 --> 00:23:03,000 +The second line has different forms. + +258 +00:23:03,000 --> 00:23:10,000 +My black reset is in channel two sets and the third line change color to me. + +259 +00:23:10,000 --> 00:23:19,000 +When we hover over Z element, Everson drops and this also proves is that Excel says is present on the + +260 +00:23:19,000 --> 00:23:19,000 +page. + +261 +00:23:20,000 --> 00:23:26,000 +Let me show one more scene in Chrome that is now is the greatest lesson our just showed you how you + +262 +00:23:26,000 --> 00:23:30,000 +can open from dev tools and review elements there. + +263 +00:23:31,000 --> 00:23:39,000 +Now we have to assess first of all, you can check whether something says was loaded or not. + +264 +00:23:39,000 --> 00:23:48,000 +That is important to check in case you see that your styles are not applied on the page formats, tab + +265 +00:23:49,000 --> 00:23:50,000 +and the load page. + +266 +00:23:51,000 --> 00:23:59,000 +You can filter all its users files in order to be sure that your thesis resource is all gray. + +267 +00:23:59,000 --> 00:24:02,000 +We can see the statuses of hundreds. + +268 +00:24:02,000 --> 00:24:02,000 +Okay. + +269 +00:24:02,000 --> 00:24:03,000 +For this resource. + +270 +00:24:04,000 --> 00:24:04,000 +Amazing. + +271 +00:24:05,000 --> 00:24:10,000 +So next thing that I would like to show is that you have separate space here for review of styles. + +272 +00:24:11,000 --> 00:24:14,000 +Let's just click Elements one more time. + +273 +00:24:14,000 --> 00:24:18,000 +You can select Element and explore its styles. + +274 +00:24:19,000 --> 00:24:24,000 +Usually I use this area to test some styles before putting them into the thesis file. + +275 +00:24:25,000 --> 00:24:28,000 +For example, let's see how pattern attribute was. + +276 +00:24:28,000 --> 00:24:32,000 +Value 20 pixels will look like on the element. + +277 +00:24:32,000 --> 00:24:34,000 +The interface is intuitive. + +278 +00:24:35,000 --> 00:24:42,000 +You click with mouse left click and after that specify attribute name and attribute value. + +279 +00:24:42,000 --> 00:24:50,000 +Everything is simple here, so you can either add new styles or modify existing style supply. + +280 +00:24:51,000 --> 00:24:57,000 +Also, you can disable the labels in another cool tweet that I want to teach you. + +281 +00:24:57,000 --> 00:24:59,000 +Pay attention to this half button. + +282 +00:25:00,000 --> 00:25:07,000 +This button will help you to imitate states on the element in order to investigate styles of our see + +283 +00:25:07,000 --> 00:25:08,000 +the classes. + +284 +00:25:09,000 --> 00:25:16,000 +For example, I know this is on whole my element changes color theory, but how to investigate this? + +285 +00:25:16,000 --> 00:25:19,000 +I take the pointer here on top. + +286 +00:25:19,000 --> 00:25:23,000 +After that, I select elements that they need with this pointer. + +287 +00:25:24,000 --> 00:25:28,000 +And now I can imitate State on hover by selecting this checkbox. + +288 +00:25:29,000 --> 00:25:35,000 +Let's now collapse this menu and here I can work with styles that are applied on Hover State. + +289 +00:25:36,000 --> 00:25:42,000 +In case you have different styles applied to this element, you can easily investigate to what exactly + +290 +00:25:42,000 --> 00:25:45,000 +to select selector styles are applied. + +291 +00:25:46,000 --> 00:25:48,000 +Is everything clear for you? + +292 +00:25:48,000 --> 00:25:55,000 +In case you have any questions, please feel free to ask any questions in comments to this video and + +293 +00:25:55,000 --> 00:25:57,000 +I will be happy to answer those. + +294 +00:25:58,000 --> 00:26:01,000 +One more interesting question to discuss in this lesson. + +295 +00:26:01,000 --> 00:26:05,000 +What style will be used once there is more than one style? + +296 +00:26:05,000 --> 00:26:08,000 +Specify one single element. + +297 +00:26:09,000 --> 00:26:16,000 +All the styles in the page will cascade into a new visual style sheet by following the rules. + +298 +00:26:16,000 --> 00:26:25,000 +Where number one is the highest priority one in one style, that is declared inside an external element. + +299 +00:26:26,000 --> 00:26:29,000 +Number two, external and internal style sheets. + +300 +00:26:30,000 --> 00:26:32,000 +And number three, browser default. + +301 +00:26:33,000 --> 00:26:41,000 +So and in one style has the highest priority and will override external and internal styles of browser + +302 +00:26:41,000 --> 00:26:42,000 +defaults. + +303 +00:26:43,000 --> 00:26:50,000 +Regarding all these properties, I'd like to say that this is just impossible to list, all possible + +304 +00:26:50,000 --> 00:26:53,000 +to assess properties, even on a few slots. + +305 +00:26:54,000 --> 00:26:57,000 +That's why I would recommend you refer to this. + +306 +00:26:57,000 --> 00:27:05,000 +He says references is in there that some resources like that from a sealer or that dogs publish their + +307 +00:27:05,000 --> 00:27:06,000 +thesis references. + +308 +00:27:07,000 --> 00:27:15,000 +Therefore, during the course of the most popular says properties, but you see one of them even more + +309 +00:27:15,000 --> 00:27:18,000 +than to explore external resources. + +310 +00:27:19,000 --> 00:27:25,000 +At least after this lesson, you already know how to read the information about says and apply it on + +311 +00:27:25,000 --> 00:27:26,000 +practice. + +312 +00:27:27,000 --> 00:27:30,000 +Let's recap what we have learned in this lesson. + +313 +00:27:31,000 --> 00:27:32,000 +Wow. + +314 +00:27:32,000 --> 00:27:35,000 +We have learned really a lot of different things today. + +315 +00:27:36,000 --> 00:27:38,000 +We learned what is at sea. + +316 +00:27:38,000 --> 00:27:41,000 +Assess now you know the main goals of us. + +317 +00:27:42,000 --> 00:27:48,000 +What discussed advantages of the US after that began to see this violence? + +318 +00:27:48,000 --> 00:27:54,000 +Defensive actors include an element, a deep plus universal group. + +319 +00:27:54,000 --> 00:28:02,000 +And add to this Magnus really and what see the classes are also you saw how we can use common sense + +320 +00:28:02,000 --> 00:28:03,000 +to assess class. + +321 +00:28:03,000 --> 00:28:11,000 +After this lesson, we know how to work was in line to assess internal and external, to assess use + +322 +00:28:11,000 --> 00:28:19,000 +of practical example, how to work with the assess and also how to work with see assess the harm that + +323 +00:28:19,000 --> 00:28:19,000 +flows. + +324 +00:28:20,000 --> 00:28:25,000 +At the end of the last year, you went to find all possible to assess properties. + +325 +00:28:25,000 --> 00:28:26,000 +Description. + +326 +00:28:27,000 --> 00:28:28,000 +That's all for this lesson. + +327 +00:28:29,000 --> 00:28:30,000 +Thanks a lot for your attention. + +328 +00:28:31,000 --> 00:28:33,000 +Have a great day and see you in the next lesson. + diff --git a/65 - HTML & CSS/003 HTML Forms_en.srt b/65 - HTML & CSS/003 HTML Forms_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..e2033b9edcf48378ecf2cd3d19171970461b72b5 --- /dev/null +++ b/65 - HTML & CSS/003 HTML Forms_en.srt @@ -0,0 +1,1380 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello. + +2 +00:00:06,000 --> 00:00:07,000 +Yes, to them. + +3 +00:00:07,000 --> 00:00:13,000 +Then they were going that very important lesson because that they will review topics that this applies + +4 +00:00:13,000 --> 00:00:15,000 +in practice very often. + +5 +00:00:15,000 --> 00:00:18,000 +Today we're going to talk about eight forms. + +6 +00:00:19,000 --> 00:00:23,000 +We'll start from understanding of what a simple form is. + +7 +00:00:23,000 --> 00:00:29,000 +I will explain why we need a system of forms and where we have learned to use them. + +8 +00:00:29,000 --> 00:00:34,000 +After that, we'll start detailed review of a simple form. + +9 +00:00:34,000 --> 00:00:42,000 +Elements will start you from as a form element, and after that we'll discuss nested HTML form elements. + +10 +00:00:43,000 --> 00:00:49,000 +During the lesson, we will review different input types and attributes of the input elements. + +11 +00:00:49,000 --> 00:00:53,000 +Also, we are going to have practice to be unreal. + +12 +00:00:53,000 --> 00:01:01,000 +Example will create our first HTML form in Gaza, will use a difference between disabled and we've only + +13 +00:01:01,000 --> 00:01:08,000 +attribute will answer the question what hidden attributes are and how former said looks. + +14 +00:01:08,000 --> 00:01:13,000 +I will show you to know form, validation and many other differences. + +15 +00:01:14,000 --> 00:01:20,000 +As in the last one, I'm going to show you how to submit form data to the server and process on the + +16 +00:01:20,000 --> 00:01:21,000 +server side. + +17 +00:01:21,000 --> 00:01:23,000 +Let's start our lesson. + +18 +00:01:24,000 --> 00:01:29,000 +Let's understand first what each HTML forms are and why they are so important. + +19 +00:01:30,000 --> 00:01:33,000 +And small form is used to collect the user input. + +20 +00:01:34,000 --> 00:01:38,000 +The user input is most often sent to the Center for processing. + +21 +00:01:39,000 --> 00:01:44,000 +It is important because it was a single form, so we can actually submit information to the web server + +22 +00:01:45,000 --> 00:01:47,000 +for further processing and storage. + +23 +00:01:47,000 --> 00:01:54,000 +That's why some forms are so important for user interaction with our web application. + +24 +00:01:54,000 --> 00:01:55,000 +They send mail. + +25 +00:01:55,000 --> 00:02:00,000 +That form is made up of one or more form controls. + +26 +00:02:00,000 --> 00:02:03,000 +The controls can be single on one. + +27 +00:02:03,000 --> 00:02:08,000 +That's fields, dropdown boxes, buttons, checkboxes or radio buttons and others. + +28 +00:02:09,000 --> 00:02:13,000 +They're mostly created using the equal elements also. + +29 +00:02:13,000 --> 00:02:14,000 +Yes. + +30 +00:02:14,000 --> 00:02:16,000 +Some other elements to learn about to. + +31 +00:02:17,000 --> 00:02:23,000 +Considering the fact that all my students in progress of creation of online store, it is critically + +32 +00:02:23,000 --> 00:02:26,000 +important for us to learn how to use forms. + +33 +00:02:26,000 --> 00:02:29,000 +What are typical examples of using forms? + +34 +00:02:29,000 --> 00:02:38,000 +And one of the simplest examples of using forms it was to mention is a phone was sign in for wanting + +35 +00:02:38,000 --> 00:02:41,000 +to submit information about logging and password to the server. + +36 +00:02:41,000 --> 00:02:49,000 +In order to authenticate the user in our application sign up form, we need to get information from + +37 +00:02:49,000 --> 00:02:56,000 +and the user to create account for him inside our application submit order form. + +38 +00:02:57,000 --> 00:03:03,000 +In case we talk about online store, we need to have opportunity to select the product that we want + +39 +00:03:03,000 --> 00:03:03,000 +to buy. + +40 +00:03:03,000 --> 00:03:12,000 +My specified quantity and other information oh was our purchase and pass information to the server that + +41 +00:03:12,000 --> 00:03:19,000 +we want to buy this product, performing the search, uploading the file, filtering the content and + +42 +00:03:19,000 --> 00:03:21,000 +many other examples. + +43 +00:03:21,000 --> 00:03:28,000 +Without them, of course, it is literally impossible to create web application nowadays and ensure + +44 +00:03:28,000 --> 00:03:32,000 +user interaction is there, but that's not. + +45 +00:03:32,000 --> 00:03:34,000 +Now is a form element. + +46 +00:03:34,000 --> 00:03:44,000 +The basic tags that you need to use to create a system for this form that is a form element is a container + +47 +00:03:44,000 --> 00:03:51,000 +for different types of inputs, elements such as text fields, checkboxes, radio buttons, subnet buttons, + +48 +00:03:51,000 --> 00:03:59,000 +etc. On this slide, you can also see a list of all attributes of the form element, the most popular + +49 +00:03:59,000 --> 00:04:04,000 +among them, and we are going to use and practice our action. + +50 +00:04:04,000 --> 00:04:10,000 +And mass action is to specify of their formal descent and mass. + +51 +00:04:10,000 --> 00:04:16,000 +It is to specify the masses that will be used to send for data. + +52 +00:04:17,000 --> 00:04:25,000 +Also, it is worth mentions of team of all inputs may be validated automatically in case we specify + +53 +00:04:25,000 --> 00:04:35,000 +concrete data type in order to disable such validations we can use to validate add to be present portions + +54 +00:04:35,000 --> 00:04:40,000 +of video to explore these slides and read description of other attributes. + +55 +00:04:40,000 --> 00:04:46,000 +In case you have questions regarding any of these, add to this please ask your question. + +56 +00:04:46,000 --> 00:04:47,000 +You close this video. + +57 +00:04:48,000 --> 00:04:50,000 +Once you wrap all slide. + +58 +00:04:50,000 --> 00:04:52,000 +We are good to proceed with the next slide. + +59 +00:04:53,000 --> 00:05:00,000 +As I already said, one of the key attributes of the fourth element is mass, and I like to have a separate + +60 +00:05:00,000 --> 00:05:04,000 +slide explaining important scenes about central thing of form. + +61 +00:05:05,000 --> 00:05:10,000 +With different masses, we can submit form using again of both mass. + +62 +00:05:11,000 --> 00:05:18,000 +Each option has its important CS to remember scenes that you should remember about some meaningful way + +63 +00:05:18,000 --> 00:05:22,000 +to get mass of all input data sent. + +64 +00:05:22,000 --> 00:05:23,000 +We are get mass. + +65 +00:05:23,000 --> 00:05:27,000 +It will be appended to a euro in name value pairs. + +66 +00:05:27,000 --> 00:05:28,000 +Why? + +67 +00:05:28,000 --> 00:05:32,000 +Because get requests don't have the message body. + +68 +00:05:33,000 --> 00:05:36,000 +That's why there is a very important safety amendment. + +69 +00:05:36,000 --> 00:05:45,000 +He never used to get massive to send sensitive data because the submitted form data is visible in the + +70 +00:05:45,000 --> 00:05:45,000 +euro. + +71 +00:05:46,000 --> 00:05:49,000 +And this is not a secure approach of passing data. + +72 +00:05:50,000 --> 00:05:53,000 +Also with some meaningful news and get the message. + +73 +00:05:53,000 --> 00:06:00,000 +You have to remember that the maxi rise of euro is limited to 2048 characters. + +74 +00:06:00,000 --> 00:06:03,000 +That's why it will be impossible to pass. + +75 +00:06:03,000 --> 00:06:11,000 +Huge amounts of information will get massive using a team of four, but in which cases send inform we + +76 +00:06:11,000 --> 00:06:13,000 +get massive is useful. + +77 +00:06:14,000 --> 00:06:18,000 +Imagine that we search and result in our online store. + +78 +00:06:18,000 --> 00:06:26,000 +In this case, this helpful to store search query in the U around because this allows us to share search + +79 +00:06:26,000 --> 00:06:28,000 +results with other users. + +80 +00:06:28,000 --> 00:06:35,000 +Just by sharing Z, we also we can bookmark such query in order to navigate to the search results first. + +81 +00:06:36,000 --> 00:06:43,000 +And it is also good to use gets massive from non-secure data like where is sweet in Google. + +82 +00:06:44,000 --> 00:06:51,000 +And he refuses to remember about where his foreign data is sent me to post. + +83 +00:06:51,000 --> 00:06:55,000 +My asset is appended inside the body of the ECB request. + +84 +00:06:56,000 --> 00:07:01,000 +That means that submitted form data is not shown in the euro. + +85 +00:07:02,000 --> 00:07:10,000 +On the contrary, to get massive, both mass has no size limitations and can be used to send large amounts + +86 +00:07:10,000 --> 00:07:11,000 +of data. + +87 +00:07:11,000 --> 00:07:19,000 +But we also have to consider that all submissions with force can be bookmarked in browser. + +88 +00:07:20,000 --> 00:07:23,000 +These are important things you have to remember about form. + +89 +00:07:23,000 --> 00:07:25,000 +Submission was get and post message. + +90 +00:07:26,000 --> 00:07:27,000 +Let's move on. + +91 +00:07:28,000 --> 00:07:30,000 +Based on the form may have different elements. + +92 +00:07:31,000 --> 00:07:40,000 +On this slide, you can see the main single form elements that we can use each team for their input. + +93 +00:07:40,000 --> 00:07:48,000 +Tax theory label field set legend select of the group option. + +94 +00:07:48,000 --> 00:07:57,000 +Martin gave the list and actually the form element itself is it can contain any of the mentioned elements. + +95 +00:07:57,000 --> 00:08:00,000 +Let's briefly review each of these elements. + +96 +00:08:01,000 --> 00:08:08,000 +Input element allows us to input some data as it is going to be sent with the form and form. + +97 +00:08:09,000 --> 00:08:11,000 +The input may have different types. + +98 +00:08:11,000 --> 00:08:13,000 +We are going to discuss this separately. + +99 +00:08:14,000 --> 00:08:15,000 +Thanks. + +100 +00:08:15,000 --> 00:08:21,000 +Sarah is a multi line text input label defines the label for an input element. + +101 +00:08:22,000 --> 00:08:24,000 +Was a full set element. + +102 +00:08:24,000 --> 00:08:27,000 +You can create group of related elements in the form. + +103 +00:08:28,000 --> 00:08:35,000 +Legend allows you to achieve different level of presentation of your form to the end user by defining + +104 +00:08:35,000 --> 00:08:37,000 +the caption for the field set element. + +105 +00:08:38,000 --> 00:08:42,000 +So legend element is used inside field set element. + +106 +00:08:43,000 --> 00:08:51,000 +Another interesting element is a select album that can contain different option groups or just different + +107 +00:08:51,000 --> 00:08:51,000 +options. + +108 +00:08:52,000 --> 00:08:57,000 +This regular dropdown is most likely you already saw on different websites. + +109 +00:08:58,000 --> 00:09:06,000 +For example, when you select manufacture of the use car on the website and you have predefined options. + +110 +00:09:07,000 --> 00:09:10,000 +Bottom is just the bottom is a feature. + +111 +00:09:10,000 --> 00:09:15,000 +With the help of JavaScript, we can attach different events lenders to events associated with this + +112 +00:09:15,000 --> 00:09:16,000 +model. + +113 +00:09:17,000 --> 00:09:24,000 +For example, to create a code that will be executed on bottom click event make the least elements somewhat + +114 +00:09:24,000 --> 00:09:26,000 +similar to select element. + +115 +00:09:26,000 --> 00:09:33,000 +It also represents dropdown, but with a select element, we have fixed the list of values to be used + +116 +00:09:33,000 --> 00:09:41,000 +in the input with a data list we have drop down was recommendations, but you still can enter your option + +117 +00:09:41,000 --> 00:09:44,000 +to be on a limited amount of business cases. + +118 +00:09:44,000 --> 00:09:46,000 +One data list element is used. + +119 +00:09:47,000 --> 00:09:51,000 +I would say that the using of select elements is more common. + +120 +00:09:52,000 --> 00:09:55,000 +These are key elements also h html for. + +121 +00:09:56,000 --> 00:09:59,000 +And the inputs may have different types. + +122 +00:09:59,000 --> 00:10:10,000 +The different form controls ensure zero button checkbox color the date time local email file, hidden + +123 +00:10:10,000 --> 00:10:15,000 +image, mos number, password, radio and other types. + +124 +00:10:16,000 --> 00:10:23,000 +You can see on the slide different types may help us with built in HTML validation for the format of + +125 +00:10:23,000 --> 00:10:32,000 +input value and some of the input types may ensure better user experience when you use mobile devices. + +126 +00:10:32,000 --> 00:10:40,000 +For example, when you use number input time and want to input data on your mobile device, your keyboard + +127 +00:10:40,000 --> 00:10:48,000 +is turned into a numbers instead of letters and similar examples with other input types. + +128 +00:10:48,000 --> 00:10:51,000 +As you can see, there really are a lot of them. + +129 +00:10:52,000 --> 00:10:58,000 +Let's not spend time with you and each input type in this lesson we're going to review is the most popular + +130 +00:10:58,000 --> 00:11:00,000 +and widely used input types. + +131 +00:11:01,000 --> 00:11:06,000 +In case you would have any questions related to the input type that we'll talk about during the lesson + +132 +00:11:07,000 --> 00:11:13,000 +or from the least you can see on the screen, please ask your question below the 3D and I will be happy + +133 +00:11:13,000 --> 00:11:14,000 +to answer. + +134 +00:11:15,000 --> 00:11:21,000 +There are some common attributes and restrictions that may be applied to the inputs in the HDMI forum. + +135 +00:11:22,000 --> 00:11:24,000 +Let's use the most popular ones. + +136 +00:11:25,000 --> 00:11:28,000 +All activities from the slide you can use was inputs elements. + +137 +00:11:29,000 --> 00:11:33,000 +-- attitude is simple and very popular. + +138 +00:11:33,000 --> 00:11:39,000 +We can use it was a checkbox or radio bottom little bit that could be used as a live demo. + +139 +00:11:39,000 --> 00:11:41,000 +I'm going to show you how it works. + +140 +00:11:42,000 --> 00:11:45,000 +Ensure it press selects the choice for user. + +141 +00:11:46,000 --> 00:11:49,000 +Disabled is also very popular, actually. + +142 +00:11:49,000 --> 00:11:54,000 +It is used for the same people with updates in the field. + +143 +00:11:54,000 --> 00:12:00,000 +It is used when, for example, we need to present information for a user in the future. + +144 +00:12:01,000 --> 00:12:05,000 +But we can allow a user to change this film. + +145 +00:12:06,000 --> 00:12:13,000 +Still, we should be very careful with this attitude because not only we know how to use the browser + +146 +00:12:14,000 --> 00:12:22,000 +and we can easily make the form input type enabled again just by removing this attribute from the page + +147 +00:12:22,000 --> 00:12:23,000 +source code. + +148 +00:12:23,000 --> 00:12:28,000 +So it is never heard of explanations of back and side. + +149 +00:12:29,000 --> 00:12:35,000 +In most cases, full lions is achieved just for the visual presentation and the indications that editing + +150 +00:12:35,000 --> 00:12:39,000 +of the current input is not needed at the moment. + +151 +00:12:39,000 --> 00:12:44,000 +The only attribute in some degree is similar to the disabled. + +152 +00:12:44,000 --> 00:12:53,000 +It also makes input not editable, but the main difference that with all the elements is just not editable + +153 +00:12:53,000 --> 00:13:01,000 +but gets sent once the form submits and disabled element isn't editable and isn't sent on. + +154 +00:13:01,000 --> 00:13:05,000 +Submit things unless you inside them. + +155 +00:13:05,000 --> 00:13:07,000 +I'm going to show you this difference. + +156 +00:13:08,000 --> 00:13:15,000 +Required does not allow a user to proceed with the form submission until the value will be inserted + +157 +00:13:15,000 --> 00:13:15,000 +into input. + +158 +00:13:16,000 --> 00:13:21,000 +Use this attribute for the input fields important to be sent on the back end. + +159 +00:13:22,000 --> 00:13:25,000 +And never forget that this is just content. + +160 +00:13:25,000 --> 00:13:32,000 +Validation from them can be easily enhanced by modification of the page source code in their files. + +161 +00:13:33,000 --> 00:13:35,000 +Never forget about the consolidation. + +162 +00:13:36,000 --> 00:13:39,000 +We're going to discuss this topic separately to. + +163 +00:13:40,000 --> 00:13:46,000 +Actually there is not so much secret than the best way to know this topic is on practice. + +164 +00:13:47,000 --> 00:13:52,000 +So let me start screen sharing and explanation of practical examples. + +165 +00:13:52,000 --> 00:13:58,000 +As usual, you will be able to find the source code of all examples in attachments to the lesson to + +166 +00:13:58,000 --> 00:14:01,000 +save time during the video recording. + +167 +00:14:01,000 --> 00:14:03,000 +I prepared examples before the lesson. + +168 +00:14:04,000 --> 00:14:05,000 +Let me walk you through the examples. + +169 +00:14:05,000 --> 00:14:07,000 +Line by line. + +170 +00:14:07,000 --> 00:14:09,000 +I open a single file. + +171 +00:14:09,000 --> 00:14:16,000 +Examples of the scope for them or a is simple for and is described is a form tab. + +172 +00:14:16,000 --> 00:14:19,000 +This style has two main attributes. + +173 +00:14:20,000 --> 00:14:26,000 +Zero action contains a resource and address where four will be sent. + +174 +00:14:27,000 --> 00:14:31,000 +In this case, I'll specify form demo address. + +175 +00:14:31,000 --> 00:14:37,000 +I also create a demonstration that that is maps to this address linking this lesson. + +176 +00:14:37,000 --> 00:14:44,000 +I'm going to show the implementation of form demo select and how data from the form is parts is frozen. + +177 +00:14:45,000 --> 00:14:52,000 +The second batch is masked in this image to specify a message that is going to be used to send the data + +178 +00:14:52,000 --> 00:14:55,000 +each time a force may be sent with it. + +179 +00:14:55,000 --> 00:15:01,000 +Yet, of course, the methods in our particular case I want to submit form post message. + +180 +00:15:02,000 --> 00:15:06,000 +This means that the form content will pass in the request body. + +181 +00:15:07,000 --> 00:15:13,000 +Those are attributes of the form pack itself, but form consists of different inputs. + +182 +00:15:13,000 --> 00:15:19,000 +As you already know, the first simple terms that we are going to use today and probably is the most + +183 +00:15:19,000 --> 00:15:21,000 +popular is text. + +184 +00:15:22,000 --> 00:15:28,000 +Use this input type for any text information you need to gather forms a user it can be a is a first + +185 +00:15:28,000 --> 00:15:31,000 +thing unless you use a registration process. + +186 +00:15:31,000 --> 00:15:38,000 +For example, attaching also to the attribute of the equals name actually will be used on the civil + +187 +00:15:38,000 --> 00:15:41,000 +side to extract the value from this. + +188 +00:15:43,000 --> 00:15:43,000 +Systematically. + +189 +00:15:44,000 --> 00:15:51,000 +It allows to speak once a piece of the text improve control in terms of characters marks Landsat to + +190 +00:15:52,000 --> 00:15:57,000 +allow us to specify a maximum number of characters a user can enter into the textbox. + +191 +00:15:58,000 --> 00:16:00,000 +Also, we have a placeholder attribute. + +192 +00:16:01,000 --> 00:16:05,000 +Use this attribute when you use to give a hand to the end user. + +193 +00:16:05,000 --> 00:16:07,000 +What value should be answered here? + +194 +00:16:08,000 --> 00:16:13,000 +In this case, we leave the field to enter the first name in the field. + +195 +00:16:14,000 --> 00:16:19,000 +Let me also open this time allocation, web browser and demo in parallel. + +196 +00:16:20,000 --> 00:16:24,000 +As you can see is a text field has last longer than AWS. + +197 +00:16:25,000 --> 00:16:29,000 +This is because we set special attributes value for this. + +198 +00:16:30,000 --> 00:16:36,000 +And when I try to insert text in this field, I can enter more. + +199 +00:16:36,000 --> 00:16:40,000 +The maximum leave that will be set is achieved with max lengths. + +200 +00:16:41,000 --> 00:16:49,000 +Z Stan characters lets you use a next input that will start from zero review of the source code. + +201 +00:16:50,000 --> 00:16:53,000 +So let's get back to Eclipse. + +202 +00:16:54,000 --> 00:17:01,000 +Parcells in good time will hide from the use or various answer in this field, but they actually will + +203 +00:17:01,000 --> 00:17:02,000 +be sent to the SIM. + +204 +00:17:03,000 --> 00:17:07,000 +It may have similar additional activities as previous input. + +205 +00:17:08,000 --> 00:17:13,000 +I just decided to not copy ZO because we already saw how they may be applied. + +206 +00:17:14,000 --> 00:17:16,000 +Let's now look at the demo. + +207 +00:17:16,000 --> 00:17:17,000 +Is it possible? + +208 +00:17:18,000 --> 00:17:19,000 +Most likely. + +209 +00:17:19,000 --> 00:17:25,000 +You've faced with cases on other websites one user logging or registration. + +210 +00:17:26,000 --> 00:17:27,000 +Your password is hidden. + +211 +00:17:28,000 --> 00:17:29,000 +By the way. + +212 +00:17:29,000 --> 00:17:34,000 +You'll really know how to use tools and what is password input time. + +213 +00:17:35,000 --> 00:17:43,000 +So you're is it takes was it password to check it or in case you use passwords, it distorts as a chrome + +214 +00:17:43,000 --> 00:17:52,000 +storage and to remembering you can inspect this element in dev tools and just to change input type does + +215 +00:17:52,000 --> 00:17:57,000 +attacks and here's password to we enter let's continue. + +216 +00:17:58,000 --> 00:18:01,000 +The next single target is email. + +217 +00:18:01,000 --> 00:18:04,000 +There is nothing special at this stage to demo. + +218 +00:18:05,000 --> 00:18:12,000 +If you have ever noticed on your mobile device, then when you fill out the field, start email, your + +219 +00:18:12,000 --> 00:18:20,000 +keyboard is changed automatically and you have add sign and become key on the keyboard in order to ensure + +220 +00:18:20,000 --> 00:18:26,000 +a nice user experience while entering your email and also before submitting such forms. + +221 +00:18:26,000 --> 00:18:33,000 +The fourth interesting observation of the email field will be done to ensure that the format of female + +222 +00:18:33,000 --> 00:18:38,000 +is visa requirements described as MFC 822. + +223 +00:18:39,000 --> 00:18:41,000 +The following input is data. + +224 +00:18:42,000 --> 00:18:47,000 +It provides us with nice data that simplifies navigation between dates. + +225 +00:18:48,000 --> 00:18:50,000 +Let me show it to you in browser. + +226 +00:18:51,000 --> 00:18:57,000 +So instead of the regular text field, you can use date speaker that means something like this. + +227 +00:18:58,000 --> 00:19:02,000 +It is much easier to select the data you need according to the predefined formats. + +228 +00:19:03,000 --> 00:19:10,000 +Also, I make this input mandatory for the user to fill out by adding the required attribute. + +229 +00:19:10,000 --> 00:19:13,000 +I'm going to show you how this works. + +230 +00:19:13,000 --> 00:19:17,000 +One will submit the for the form controls. + +231 +00:19:17,000 --> 00:19:19,000 +Also popular in several forms. + +232 +00:19:19,000 --> 00:19:22,000 +I'm talking about radio buttons and checkboxes. + +233 +00:19:23,000 --> 00:19:30,000 +Usually radio buttons are used to select one of the proposed options and checkboxes I used. + +234 +00:19:30,000 --> 00:19:37,000 +One Multiple options allow for selection pant actions in case I have two radio buttons with the same + +235 +00:19:37,000 --> 00:19:39,000 +name but with different values. + +236 +00:19:41,000 --> 00:19:41,000 +Move Semaphore. + +237 +00:19:41,000 --> 00:19:48,000 +And we'll understand that in this case, only one radio button should be selected and the value of the + +238 +00:19:48,000 --> 00:19:53,000 +selected radio button will be sent as a seven in my checkbooks input type. + +239 +00:19:53,000 --> 00:20:00,000 +I use check to get this out and it is used to select checkbox by default. + +240 +00:20:01,000 --> 00:20:04,000 +The Chrome browser Xanadu exists. + +241 +00:20:05,000 --> 00:20:12,000 +I believe this equal time is also for me that you let me select the French radio balance. + +242 +00:20:13,000 --> 00:20:21,000 +You can see is that when I select another, I give them the first one become I'm selected and my checkbox + +243 +00:20:21,000 --> 00:20:22,000 +is checked by default. + +244 +00:20:23,000 --> 00:20:26,000 +I can remove checkbox if I don't need it. + +245 +00:20:27,000 --> 00:20:32,000 +Well you thought zero zero view of the slides about disabled and read on the attributes. + +246 +00:20:33,000 --> 00:20:34,000 +Let's see how they work. + +247 +00:20:35,000 --> 00:20:37,000 +I have to include with text type. + +248 +00:20:38,000 --> 00:20:45,000 +One is disabled and another one is where the only was the help of value, attribute and hopefully default + +249 +00:20:45,000 --> 00:20:47,000 +value in these inputs. + +250 +00:20:48,000 --> 00:20:54,000 +If we could explore these inputs in the browser, we are going to find that they look similar in terms + +251 +00:20:54,000 --> 00:20:57,000 +that we can edit names of them. + +252 +00:20:58,000 --> 00:21:06,000 +And you can see one difference disabled input is grayed out while we are going equal to the looks like + +253 +00:21:06,000 --> 00:21:07,000 +all other equals. + +254 +00:21:07,000 --> 00:21:09,000 +We just can edit it. + +255 +00:21:10,000 --> 00:21:14,000 +One will submit the form to the service that we're going to see. + +256 +00:21:14,000 --> 00:21:19,000 +The main difference is the value from the disabled field will be absent. + +257 +00:21:19,000 --> 00:21:21,000 +These are for data. + +258 +00:21:22,000 --> 00:21:29,000 +And that's a really important type of thing is hidden while let me show it to you in the third party + +259 +00:21:29,000 --> 00:21:31,000 +I use hidden thought. + +260 +00:21:31,000 --> 00:21:39,000 +One needs to imagine that you want to update the user or existing problem and user don't care about + +261 +00:21:39,000 --> 00:21:41,000 +its own idea in the system. + +262 +00:21:41,000 --> 00:21:48,000 +Anyway, user can change this ID and the user doesn't want to know it's indeed. + +263 +00:21:48,000 --> 00:21:56,000 +The same story was updated product and product and taking into account shipping protocol has no state + +264 +00:21:56,000 --> 00:22:01,000 +when it tells the server what exactly user in the system or product. + +265 +00:22:01,000 --> 00:22:03,000 +We want to update this one. + +266 +00:22:03,000 --> 00:22:10,000 +I want to pass information is a form but I don't want to make it reasonable for the end user can understand + +267 +00:22:10,000 --> 00:22:17,000 +this user homework when will work on the product that the user update single forms. + +268 +00:22:17,000 --> 00:22:24,000 +You would use this information and you will use hidden form release and yeah, I use similarly achievement + +269 +00:22:24,000 --> 00:22:26,000 +to pass some information in this field. + +270 +00:22:27,000 --> 00:22:32,000 +Let's look at how it looks like in the web browser and use a web browser. + +271 +00:22:32,000 --> 00:22:38,000 +As you can see, zero is and the input because we don't want a browser. + +272 +00:22:38,000 --> 00:22:45,000 +Our end user was information that he or she doesn't need but that we still need because this is server + +273 +00:22:46,000 --> 00:22:47,000 +was all us information. + +274 +00:22:49,000 --> 00:22:57,000 +Next to them is Select Select Input that allows us to create a drop down with different options. + +275 +00:22:57,000 --> 00:23:02,000 +In this example, it is suggested to select a car from the predefined list of options. + +276 +00:23:06,000 --> 00:23:09,000 +And that's the input that is called reset. + +277 +00:23:09,000 --> 00:23:13,000 +And it is used to reset the state of the theme of form. + +278 +00:23:13,000 --> 00:23:14,000 +Let me show it to you. + +279 +00:23:15,000 --> 00:23:23,000 +I also have value achieved here because resetting the top is displayed like a bottom is very active. + +280 +00:23:23,000 --> 00:23:26,000 +It allows me to configure a label on the bottom. + +281 +00:23:26,000 --> 00:23:29,000 +Let's check how reset works on practice. + +282 +00:23:30,000 --> 00:23:35,000 +When I click on the reset button all our equals at zero, obviously. + +283 +00:23:35,000 --> 00:23:38,000 +Besides, we go in and disable inputs. + +284 +00:23:39,000 --> 00:23:42,000 +And so that is because every single type is a submit. + +285 +00:23:43,000 --> 00:23:48,000 +This is one of the key input types that actually allows us to send from data. + +286 +00:23:48,000 --> 00:23:51,000 +Those are similar, similar to the asset input type. + +287 +00:23:52,000 --> 00:23:59,000 +Submit input type is also displayed as a bottom and label key to configure it with the help of value. + +288 +00:24:01,000 --> 00:24:05,000 +For the sake of example, letting it go, sign up next on the bottom. + +289 +00:24:06,000 --> 00:24:14,000 +Actually form submission represents is a creation of the request with the mass specified instant message + +290 +00:24:14,000 --> 00:24:22,000 +attribute of the form tag is a resource specified in the action attribute of the form that the submitting + +291 +00:24:22,000 --> 00:24:25,000 +code is our last element for this form. + +292 +00:24:25,000 --> 00:24:29,000 +Let's now go back to the web browser and submit this form. + +293 +00:24:30,000 --> 00:24:38,000 +Let's include some data and let's put regular text in the mail, but not in the mail address. + +294 +00:24:38,000 --> 00:24:41,000 +Also, let's negate the input empty. + +295 +00:24:42,000 --> 00:24:51,000 +Now let's try to submit the form and you can see that the nation works as expected, because I said + +296 +00:24:51,000 --> 00:24:58,000 +that there's going to be an email in this input, but entering a regular text instead said Let me figure + +297 +00:24:58,000 --> 00:25:00,000 +this math at sign. + +298 +00:25:01,000 --> 00:25:03,000 +That's a means to form one more time. + +299 +00:25:04,000 --> 00:25:07,000 +And this time form tells me that's required. + +300 +00:25:07,000 --> 00:25:09,000 +Equal is not populated. + +301 +00:25:09,000 --> 00:25:10,000 +Was equal. + +302 +00:25:11,000 --> 00:25:15,000 +Do you remember that we used to acquired our TV was the input. + +303 +00:25:16,000 --> 00:25:19,000 +I need to fix this by selecting a date picker. + +304 +00:25:20,000 --> 00:25:22,000 +Now we can submit the form. + +305 +00:25:23,000 --> 00:25:29,000 +The first reasons are for I want to draw attention to one more additional fact. + +306 +00:25:29,000 --> 00:25:34,000 +The first lesson I started as a server and pay attention to the address. + +307 +00:25:35,000 --> 00:25:41,000 +I opened my demo HTML form on the server but not on the file system. + +308 +00:25:42,000 --> 00:25:49,000 +I need to have my server up and running in order to process that data from the, for instance, a web. + +309 +00:25:50,000 --> 00:25:52,000 +Now let's submit the form. + +310 +00:25:53,000 --> 00:26:00,000 +And we see the data from the form published on another source, Beth mentions that we see all the data + +311 +00:26:00,000 --> 00:26:05,000 +that we search for besides disabled input. + +312 +00:26:06,000 --> 00:26:12,000 +How we managed to take this information from the form of data and send it back and as a response. + +313 +00:26:12,000 --> 00:26:15,000 +Let's explore the source code of the server. + +314 +00:26:15,000 --> 00:26:17,000 +So this map is a form demo euro. + +315 +00:26:18,000 --> 00:26:25,000 +I open the source code of the form demo so that you can find the source code of this server in attachments + +316 +00:26:25,000 --> 00:26:26,000 +to the lesson. + +317 +00:26:27,000 --> 00:26:33,000 +EMERSON What I do here is just overriding, of course the message because the for the Sydney was it + +318 +00:26:33,000 --> 00:26:39,000 +was the message and the from the request parameters using Tsarnaevs. + +319 +00:26:40,000 --> 00:26:47,000 +So the name specific here is a gift from the massive should be the same as the value of the name attribute + +320 +00:26:47,000 --> 00:26:52,000 +of input element in our estimate for is it's clear. + +321 +00:26:53,000 --> 00:26:54,000 +Just look at here. + +322 +00:26:54,000 --> 00:27:04,000 +I have email from the name in the cell that sends email parental needs to know form and legs is I printed + +323 +00:27:04,000 --> 00:27:06,000 +all the input photos. + +324 +00:27:07,000 --> 00:27:13,000 +If you understand this example, this is great because you already know what to do next. + +325 +00:27:13,000 --> 00:27:14,000 +This is data. + +326 +00:27:15,000 --> 00:27:23,000 +Just imagine that once you get various forms of food, you can perceive user was user registration or + +327 +00:27:23,000 --> 00:27:32,000 +was user log into the app and redirection to another pages or was returning some error message you can + +328 +00:27:32,000 --> 00:27:37,000 +proceed was in any court and implementation of any business logic in the. + +329 +00:27:38,000 --> 00:27:44,000 +You're got to have opportunity to practice your skills in writing HTML forms during the home task. + +330 +00:27:45,000 --> 00:27:50,000 +But as of now, that's all what I wanted to discuss with you in scope of this lesson. + +331 +00:27:50,000 --> 00:27:53,000 +Let's recap what we have learned today. + +332 +00:27:54,000 --> 00:27:59,000 +In this lesson, we learn what a simple form is and when to use it. + +333 +00:28:00,000 --> 00:28:06,000 +We learned main form elements include an input element and different input types. + +334 +00:28:07,000 --> 00:28:11,000 +We learn key input element attributes and restrictions. + +335 +00:28:12,000 --> 00:28:17,000 +After this lesson, you know, what is the difference between disabled and remotely activist? + +336 +00:28:18,000 --> 00:28:23,000 +Also together, we created our first H demo for you. + +337 +00:28:23,000 --> 00:28:28,000 +In the demo we reviewed many different things, including the demo of Human Achievements. + +338 +00:28:29,000 --> 00:28:31,000 +You saw how former set verbs. + +339 +00:28:32,000 --> 00:28:38,000 +We learned how h item of validation can prevent invalid user input on the from them. + +340 +00:28:39,000 --> 00:28:47,000 +After that, we saw how we can submit full data to this server and learned how to process from input + +341 +00:28:47,000 --> 00:28:47,000 +on the back end. + +342 +00:28:48,000 --> 00:28:49,000 +On the seller side. + +343 +00:28:50,000 --> 00:28:51,000 +That's all for this lesson. + +344 +00:28:51,000 --> 00:28:53,000 +Thanks a lot for your attention. + +345 +00:28:53,000 --> 00:28:56,000 +Have a great day and see you in the next lesson. + diff --git a/65 - HTML & CSS/003 Source-code-of-HTML-example-from-the-lesson.url b/65 - HTML & CSS/003 Source-code-of-HTML-example-from-the-lesson.url new file mode 100644 index 0000000000000000000000000000000000000000..1a4b068f26fb27407eaef87f8c062bb804914efd --- /dev/null +++ b/65 - HTML & CSS/003 Source-code-of-HTML-example-from-the-lesson.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/form-demo.html \ No newline at end of file diff --git a/65 - HTML & CSS/003 Source-code-of-the-Java-Servlet-example-from-the-lesson.url b/65 - HTML & CSS/003 Source-code-of-the-Java-Servlet-example-from-the-lesson.url new file mode 100644 index 0000000000000000000000000000000000000000..a5d28ac8341613673e0fce243041c434c1f5c250 --- /dev/null +++ b/65 - HTML & CSS/003 Source-code-of-the-Java-Servlet-example-from-the-lesson.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/servlets/FormDemoServlet.java \ No newline at end of file diff --git a/65 - HTML & CSS/external-links.txt b/65 - HTML & CSS/external-links.txt new file mode 100644 index 0000000000000000000000000000000000000000..448615ca72964244de347aac49f36abdcb81553b --- /dev/null +++ b/65 - HTML & CSS/external-links.txt @@ -0,0 +1,15 @@ + +001 Source-code-of-the-HTML-file-example-from-the-lesson +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/index.html + +002 HTML-with-CSS-source-code +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/css-demo.html + +002 CSS-source-code +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/css/styles.css + +003 Source-code-of-HTML-example-from-the-lesson +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/form-demo.html + +003 Source-code-of-the-Java-Servlet-example-from-the-lesson +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/servlets/FormDemoServlet.java diff --git a/66 - ===== HTML & CSS Interview Preparation =====/001 Part 1 HTML Interview - Questions and Answers.html b/66 - ===== HTML & CSS Interview Preparation =====/001 Part 1 HTML Interview - Questions and Answers.html new file mode 100644 index 0000000000000000000000000000000000000000..a8993af57b2e873e55eac6fbd3540d4bf4b3c9c0 --- /dev/null +++ b/66 - ===== HTML & CSS Interview Preparation =====/001 Part 1 HTML Interview - Questions and Answers.html @@ -0,0 +1,69 @@ + + + + + + Part 1 HTML Interview - Questions and Answers + + + + +
+
+
Part 1 HTML Interview - Questions and Answers
+
  • WHAT IS HTML?


HTML (HyperText Markup Language, HTML) is a markup language. You are using HTML to mark up a text document. In other words, it is responsible for the location in the document of your texts, drawings, tables intended for life on the Internet - this is in simple words.

In other words, web page consists from different elements, and HTML helps to define the placement of web page elements relatively to each other.



  • WHAT IS A DOCTYPE AND WHY IS IT NEEDED?


DOCTYPE is a Document Type Definition (DTD), the rules by which a particular XML or (X)HTML document (web page) is validated. Through this entry, the browser determines which version of the DTD is used in a given document. And it is needed so that browsers correctly display the markup of the document. If you do not specify DOCTYPE, then the browser will add "something from itself", and each browser will add its own "something from itself". As a result, there can be no talk of any cross-browser compatibility.




  • HOW DOES DIV DIFFERENT FROM SPAN?


div is a block container and span is inline. Containers are something that anything else can be nested in. div is used for block layout and span is for text. div forms a block from what is in it from a new line and after it the element comes from a new line (if you do not change the behavior with CSS), and the span does not create new line and "fits".



  • HOW ARE COMMENTS IN HTML?


<!-- like this→



  • LINKS. HOW TO SET THE ADDRESS OF THE DOCUMENT TO GO TO?


<a href="https://it-bulls.com/example/example.html">Absolute Link</a>

<a href="../../example/example.html">Relative link</a>



  • HOW TO MAKE A LINK TO EMAIL?


<a href="mailto:testmail@mail.com">E-mail me</a>



  • WHAT DO THE <EM></EM> TAGS DO?


Display enclosed text in italics.



  • WHAT IS <OL></OL>, <UL></UL> AND <LI></LI> ?


The <ol><ol> tag sets up an ordered list. Each list item must begin and end with <li><li> tags. If a style sheet is applied to the <ol> tag, then the <li> elements inherit these properties. The <ul> tag sets up an unordered (bulleted) list.



  • WHAT DO WE USUALLY PUT INTO THE HEAD TAG?


This tag includes:

  • The title tag: This is a very important tag, especially from an SEO standpoint. How is it prescribed? With <title></title> tags. That is, it turns out something like this: <title>The title of your web document</title>;

  • Meta tags. Meta tags are mainly needed for three things: to register the encoding, description and keywords.

  • Also, inside the head tags, the path to the style sheet is written, this is how the web page and the style sheet are linked, or CSS is written directly on the page, inside the style tags.

  • All kinds of scripts are listed inside the head tag. How do they connect to the HTML page? Script tags are written indicating the type of language, and inside them, either the script code is written, or the src attribute is used with a value that indicates the path to the script.




  • WHY ARE THE TAGS <DL>,<DT>,<DD> NEEDED?


The <dl>,<dt>,<dd> tags are designed to create a list of definitions. Each such list begins with a <dl> container, which includes a <dt> tag that creates a term and a <dd> tag that defines that term. The closing </dd> tag is optional because the next tag signals the end of the previous element. However, it is good practice to close all tags.


For example:

<dl>

<dt>Coffee</dt>

<dd>Black hot drink</dd>

<dt>Milk</dt>

<dd>White cold drink</dd>

</dl>



  • WHY DO THE <TR>, <TH>, <TD> TAGS NEED?


The <tr> tag serves as a container for creating a table row. Each cell within such a row can be specified using the <th> or <td> tag. <th> is designed to create one table cell, which is designated as a header cell. The text in such a cell is displayed by the browser usually in bold and centered. The <th> tag must be placed inside the <tr> container, which in turn is placed inside the <table> tag. <td> is for creating one table cell. The <td> tag must be placed inside the <tr> container, which in turn is placed inside the <table> tag.



  • IN WHICH CASE IS IT BETTER TO WRITE HTML CODE?


Previously, it was thought to be irrelevant. But with the advent of XHTML, this question has a definite answer - we write all tags, attributes and predefined values in lower case.



  • IS IT MANDATORY TO WRITE ALT IN <IMG>?


Yes. This is required by the standard, and common sense, as well. Some users still disable pictures and some use text or even voice browsers. If the picture does not carry any semantic load (design element, "spacer", etc.), then you can put the value alt="" in the <img> tag.



  • WHAT IS ENTITIES?


Entities are combinations of the & sign and an alphabetic or numeric code after it, designed to replace characters that cannot occur "pure" in HTML text, such as the "<" character.


+
+
+ + diff --git a/66 - ===== HTML & CSS Interview Preparation =====/002 Part 2 CSS Interview - Questions and Answers.html b/66 - ===== HTML & CSS Interview Preparation =====/002 Part 2 CSS Interview - Questions and Answers.html new file mode 100644 index 0000000000000000000000000000000000000000..acf856103783e8e051b538b42757aae982194fbd --- /dev/null +++ b/66 - ===== HTML & CSS Interview Preparation =====/002 Part 2 CSS Interview - Questions and Answers.html @@ -0,0 +1,69 @@ + + + + + + Part 2 CSS Interview - Questions and Answers + + + + +
+
+
Part 2 CSS Interview - Questions and Answers
+
  • WHAT IS CSS?


Cascading Style Sheets (CSS) - cascading style sheets, is a formal language for describing the appearance of a document written using a markup language. Stylesheets are an attempt to separate page design details from its structure and content.



  • WHAT IS THE DIFFERENCE BETWEEN #MY AND .MY?


#my - id CSS selector.

.my is a class CSS selector.



  • WHAT IS THE DIFFERENCE BETWEEN MARGIN AND PADDING?


margin - outer margin (outside from the block borders to the rest of the page elements);


padding - inner padding (inside from block borders to content).


Let's say we have an object with a border around it. Here margin is the outer margin and padding is the inner margin. Or we have a paragraph of text. Therefore, margin is an indent from other neighboring objects (left, right side of the screen, neighboring paragraphs, various surrounding pictures). And padding is inner padding. If we set padding: 50px for this paragraph, then the letters themselves will not start from the edge of the paragraph, but with an indent of 50 pixels.



  • WHY ARE CSS STYLESHEETS CALLED CASCADE?


The word "cascading" means that the output of each tag in a document can be influenced by several style specifications at once, forming a hierarchical system. For example, document-specific specifications can be overridden by a style file that is common to all documents on the server.



  • WHAT IS ALTERNATIVE STYLESHEETS?


An alternate style sheet is a style sheet that defines styles to be used instead of the default styles. For example, the user can make a choice, depending on their preferences, if we prepare one style sheet for the small screen and another for the visually impaired (with large fonts). Alternative styles allow the user to make a choice of the most appropriate of them.




  • WHAT IS THE DIFFERENCE BETWEEN THE VALUES 0 AND AUTO IN THE MARGIN PROPERTY?


In vertical margins, auto always means 0. In horizontal margins, auto means 0 only if the width property is also auto.



  • WHAT PROPERTY DOES THE BACK COLOR SET?


background-color.



  • HOW ARE COMMENTS ARE USED IN CSS?


/* like this */




  • HOW TO SET RED COLOR FOR ALL ELEMENTS WITH CLASS RED?


.red { background-color:red; }



  • HOW TO REMOVE THE UNDERLINE FOR ALL LINKS ON THE PAGE?


a { text-decoration:none; }



  • HOW TO BOLD TEXT IN ALL <P> ELEMENTS?


p { font-weight: bold; }



  • WHAT DOES THE CLEAR PROPERTY DO?


Sets which side of an element is not allowed to be wrapped around by other elements. If float is set to wrap around an element, then clear overrides its effect for the specified sides.


+
+
+ + diff --git a/67 - ===== Exam HTML, CSS, Servlets, Web Filter & Web Server =====/001 Exam HTML, CSS, Servlets, Web Filters & Web Server_en.srt b/67 - ===== Exam HTML, CSS, Servlets, Web Filter & Web Server =====/001 Exam HTML, CSS, Servlets, Web Filters & Web Server_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..43f21290e7f3ef3c007cf86fa046553c4c2a150a --- /dev/null +++ b/67 - ===== Exam HTML, CSS, Servlets, Web Filter & Web Server =====/001 Exam HTML, CSS, Servlets, Web Filters & Web Server_en.srt @@ -0,0 +1,1276 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello, Jim. + +2 +00:00:07,000 --> 00:00:09,000 +And this video we're going to you a whole cast. + +3 +00:00:09,000 --> 00:00:12,000 +And also we'll reveal the solution to the home dustbin. + +4 +00:00:13,000 --> 00:00:13,000 +After this video. + +5 +00:00:13,000 --> 00:00:20,000 +You will realize how much things you already can do because in this home task, we'll use all the noise + +6 +00:00:20,000 --> 00:00:24,000 +that we got in previous lessons to create our own online store web application. + +7 +00:00:25,000 --> 00:00:28,000 +You as a whole course go from zero to the first job. + +8 +00:00:28,000 --> 00:00:30,000 +We welcome creation of this online store. + +9 +00:00:30,000 --> 00:00:34,000 +From the very beginning, we learned a lot of basics. + +10 +00:00:34,000 --> 00:00:42,000 +We created our console online store after the learned databases and many other different topics, including + +11 +00:00:42,000 --> 00:00:46,000 +Build Tools, Now Garden and many other different things. + +12 +00:00:46,000 --> 00:00:51,000 +And now when we learned HTML, CSS, yes, web server. + +13 +00:00:51,000 --> 00:00:57,000 +So this technology, we're good to proceed with the creation and deployment of our first online store. + +14 +00:00:58,000 --> 00:01:04,000 +As a prerequisite for this home task, you have to be sure that you completed home task about databases + +15 +00:01:04,000 --> 00:01:06,000 +and now cart. + +16 +00:01:06,000 --> 00:01:12,000 +And if not, it seems that you have enough knowledge about relational databases and DBC to implement + +17 +00:01:12,000 --> 00:01:14,000 +this piece of the functionality. + +18 +00:01:15,000 --> 00:01:17,000 +I already completed this homework. + +19 +00:01:17,000 --> 00:01:21,000 +I have all the details described in the Google Docs as usual. + +20 +00:01:22,000 --> 00:01:25,000 +You can find this Google doc in attachments to the lesson. + +21 +00:01:26,000 --> 00:01:29,000 +Take your time to read through very attentively. + +22 +00:01:30,000 --> 00:01:33,000 +I shared with you a lot of the details about the implementation. + +23 +00:01:33,000 --> 00:01:35,000 +Gave you a lot of hints. + +24 +00:01:36,000 --> 00:01:42,000 +This document also contains the designs and a reference to the source code as a solution at the bottom. + +25 +00:01:43,000 --> 00:01:44,000 +So pay attention. + +26 +00:01:44,000 --> 00:01:49,000 +My solution of this task here is the bottom of the file. + +27 +00:01:49,000 --> 00:01:57,000 +You can click on the reference and open is accompanied with all changes on the top or to open the project + +28 +00:01:57,000 --> 00:01:58,000 +on the top. + +29 +00:01:59,000 --> 00:02:05,000 +The difference is obvious considering that the project will be modified and we have as classes do and + +30 +00:02:05,000 --> 00:02:07,000 +we have other topics to review and to learn. + +31 +00:02:08,000 --> 00:02:12,000 +All this means that the project will be modified as it goes through the course. + +32 +00:02:13,000 --> 00:02:19,000 +As you may understand, the project become more complex in comparison with console application and it + +33 +00:02:19,000 --> 00:02:25,000 +is really hard to create templates for each home task and keep each solution separately. + +34 +00:02:26,000 --> 00:02:32,000 +What I recommend you instead is to explore commit history of the project, to understand how project + +35 +00:02:32,000 --> 00:02:36,000 +evolved and check content of the specific commit. + +36 +00:02:37,000 --> 00:02:43,000 +Like with this home task for example, to free to check out as a specific commit to explore the state + +37 +00:02:43,000 --> 00:02:44,000 +of the system. + +38 +00:02:45,000 --> 00:02:45,000 +All that to me. + +39 +00:02:46,000 --> 00:02:53,000 +Let me explain your whole task and what I want you to implement in the real example and was my solution + +40 +00:02:54,000 --> 00:02:55,000 +this task. + +41 +00:02:55,000 --> 00:03:01,000 +I wanted to implement a few pages, zero homepage signing and sign up. + +42 +00:03:01,000 --> 00:03:02,000 +That's it. + +43 +00:03:03,000 --> 00:03:10,000 +Besides your implementation, we also need to make some of the you can use some UI templates and adjust + +44 +00:03:10,000 --> 00:03:18,000 +them to match your needs or you can create UI from scratch in case you want to use estimates your system + +45 +00:03:18,000 --> 00:03:18,000 +needs. + +46 +00:03:19,000 --> 00:03:22,000 +I shared a link with you in the home task Google doc. + +47 +00:03:23,000 --> 00:03:27,000 +We have to implement the home page with header in header. + +48 +00:03:27,000 --> 00:03:31,000 +We should have two models signing and sign up. + +49 +00:03:32,000 --> 00:03:34,000 +We also can have place for logo here. + +50 +00:03:34,000 --> 00:03:39,000 +Surgical language switcher and main content area. + +51 +00:03:40,000 --> 00:03:43,000 +Pay attention that each page developed during this task should have. + +52 +00:03:44,000 --> 00:03:45,000 +Nice looking fabric. + +53 +00:03:45,000 --> 00:03:51,000 +Com fabric is something what is located in the top in browser. + +54 +00:03:51,000 --> 00:04:00,000 +You can see that I called page nice so far online store and here is an icon of sofa nearby that sits + +55 +00:04:00,000 --> 00:04:02,000 +on the home page for this task. + +56 +00:04:02,000 --> 00:04:10,000 +Let's continue in case we are not locked in and we try to access admin panel resource map directly, + +57 +00:04:11,000 --> 00:04:13,000 +then we resurrect the design name for. + +58 +00:04:14,000 --> 00:04:17,000 +But before signing me, let's create our user. + +59 +00:04:17,000 --> 00:04:21,000 +Here we have leave to navigate to the sign that page. + +60 +00:04:21,000 --> 00:04:26,000 +Or we can navigate to the sign up page from the home page. + +61 +00:04:26,000 --> 00:04:30,000 +This is also a requirement for the task that you have to implement. + +62 +00:04:31,000 --> 00:04:36,000 +Implement this for good reaction to the signing page for not logged in users. + +63 +00:04:36,000 --> 00:04:38,000 +With the help of that filters. + +64 +00:04:39,000 --> 00:04:43,000 +So the next stage that we need to implement is a sign up page. + +65 +00:04:44,000 --> 00:04:48,000 +When I click on the sign up page, I'm redirected to another page. + +66 +00:04:49,000 --> 00:04:54,000 +We'll learn a element and we have examples with direction to. + +67 +00:04:54,000 --> 00:04:57,000 +So you have to know how to implement this direction. + +68 +00:04:58,000 --> 00:05:02,000 +Q We have simple registration for the following fields. + +69 +00:05:02,000 --> 00:05:10,000 +First name, last name, email, password, repeat password and submit button. + +70 +00:05:11,000 --> 00:05:19,000 +Also, I have a link to the signing page in case user already has an account and wants to sign me. + +71 +00:05:20,000 --> 00:05:23,000 +You need to implement a regular registration seasonality. + +72 +00:05:24,000 --> 00:05:30,000 +I will not dive deep into the logic of the registration flow because I am sure you already pass through + +73 +00:05:30,000 --> 00:05:33,000 +the registration flow multiple times on different websites. + +74 +00:05:34,000 --> 00:05:36,000 +Let's just register an account. + +75 +00:05:37,000 --> 00:05:38,000 +First name. + +76 +00:05:39,000 --> 00:05:40,000 +Last name. + +77 +00:05:41,000 --> 00:05:42,000 +First email. + +78 +00:05:43,000 --> 00:05:44,000 +Address password. + +79 +00:05:45,000 --> 00:05:47,000 +Let's go the sign up button. + +80 +00:05:48,000 --> 00:05:53,000 +In case of a successful registration, I'm redirected to the signing page. + +81 +00:05:54,000 --> 00:05:56,000 +Here is how sending page looks like. + +82 +00:05:57,000 --> 00:06:00,000 +But the slogan prison lets me command whatever just happened. + +83 +00:06:01,000 --> 00:06:07,000 +My jump from zero at the first job cause we learned how to work with a relational database. + +84 +00:06:08,000 --> 00:06:10,000 +Will learn what that part is. + +85 +00:06:10,000 --> 00:06:13,000 +And we also had a whole task to implement. + +86 +00:06:13,000 --> 00:06:16,000 +Now for different entities in our application. + +87 +00:06:16,000 --> 00:06:18,000 +So what is happening? + +88 +00:06:18,000 --> 00:06:20,000 +Action on the backend. + +89 +00:06:20,000 --> 00:06:22,000 +I use that solution. + +90 +00:06:23,000 --> 00:06:25,000 +One when was restriction forms submitted? + +91 +00:06:25,000 --> 00:06:32,000 +It is sent to server that I use the code that takes parameters from the form and process data. + +92 +00:06:32,000 --> 00:06:38,000 +Does it now or is that any can since my new user is a database. + +93 +00:06:39,000 --> 00:06:44,000 +So the scope of this task I use a solution from the previous task about database. + +94 +00:06:45,000 --> 00:06:52,000 +In case you skipped lessons about databases and now partner, you should also consider database implementation + +95 +00:06:53,000 --> 00:06:56,000 +and persistence of the implementation in your application. + +96 +00:06:57,000 --> 00:07:01,000 +Because in scope of this task, we need to use persistence storage. + +97 +00:07:01,000 --> 00:07:07,000 +So once we register with the user, we can log in using our credentials. + +98 +00:07:07,000 --> 00:07:12,000 +I use the emails that I use for registration and associated passwords. + +99 +00:07:13,000 --> 00:07:16,000 +After a successful log in, I redirected to the home page. + +100 +00:07:17,000 --> 00:07:17,000 +Amazing. + +101 +00:07:18,000 --> 00:07:20,000 +Everything works as expected. + +102 +00:07:20,000 --> 00:07:21,000 +That's great. + +103 +00:07:22,000 --> 00:07:29,000 +By default, each new registered user is assigned to the customer role, and one of the requirements + +104 +00:07:29,000 --> 00:07:35,000 +application is that users with a role customer can't access admin related resources. + +105 +00:07:36,000 --> 00:07:43,000 +So in case I will try to reach my panel now I have to see forbidden status. + +106 +00:07:44,000 --> 00:07:46,000 +I thought admin panel and euro. + +107 +00:07:46,000 --> 00:07:47,000 +I'll click enter. + +108 +00:07:48,000 --> 00:07:51,000 +And I see custom error page that we created. + +109 +00:07:51,000 --> 00:07:58,000 +And one of the lessons is, of course, about error handled in web application for full suite status + +110 +00:07:58,000 --> 00:07:59,000 +called. + +111 +00:08:00,000 --> 00:08:07,000 +In case we will be lucky with the user who has admin role, that user should have access to admin resources + +112 +00:08:08,000 --> 00:08:12,000 +not necessary to create admin panel resource on this stage. + +113 +00:08:13,000 --> 00:08:19,000 +The goal of this task is to configure restrictions based on the user role for the time being. + +114 +00:08:19,000 --> 00:08:23,000 +I recommend you to change roles in the database manually. + +115 +00:08:24,000 --> 00:08:25,000 +It is a common practice. + +116 +00:08:26,000 --> 00:08:31,000 +I mean to create any user manual, even considering security concerns. + +117 +00:08:32,000 --> 00:08:36,000 +We shouldn't have a page that allows us to register a user with admin role. + +118 +00:08:36,000 --> 00:08:37,000 +It is nonsense. + +119 +00:08:38,000 --> 00:08:41,000 +We can only create admin user manually on the server. + +120 +00:08:42,000 --> 00:08:45,000 +For this demo already created admin user. + +121 +00:08:46,000 --> 00:08:48,000 +Let me open signing page. + +122 +00:08:49,000 --> 00:08:54,000 +I enter admin add email dot com and password. + +123 +00:08:55,000 --> 00:09:02,000 +After successful one user was enrolled should be automatically redirected to the admin panel resource. + +124 +00:09:03,000 --> 00:09:09,000 +I do not recommend it to create additional HTML page because soon we're going to learn new architectural + +125 +00:09:10,000 --> 00:09:14,000 +qualities that will impact the way how we move our public map resources. + +126 +00:09:15,000 --> 00:09:21,000 +So there is no need to create additional resources at this moment to consider security rules. + +127 +00:09:22,000 --> 00:09:27,000 +Use that field that we had a separate lesson about of that filters. + +128 +00:09:27,000 --> 00:09:31,000 +And we also had examples of that filters configuration. + +129 +00:09:32,000 --> 00:09:36,000 +So this is an opportunity to practice your skills in web filters. + +130 +00:09:37,000 --> 00:09:43,000 +And the last but not least, this requirement is that we have to implement this part of code enable + +131 +00:09:43,000 --> 00:09:46,000 +affiliate marketing in our online store. + +132 +00:09:46,000 --> 00:09:53,000 +In case you don't know what affiliate marketing is, I left the meeting as a home task to read about + +133 +00:09:53,000 --> 00:10:00,000 +it because it is important to understand the business context before implementation of the logic. + +134 +00:10:01,000 --> 00:10:03,000 +I'm explaining single words. + +135 +00:10:03,000 --> 00:10:12,000 +Imagine that I am already a customer of our online store and you know I want to earn extra cash. + +136 +00:10:12,000 --> 00:10:20,000 +I tell you about amazing online store with great services, high quality and many other good things. + +137 +00:10:20,000 --> 00:10:24,000 +And I gave you the link that looks like this. + +138 +00:10:24,000 --> 00:10:25,000 +That tension. + +139 +00:10:25,000 --> 00:10:29,000 +It contains very parameter partner code. + +140 +00:10:30,000 --> 00:10:36,000 +After you navigated to this page calculus, pertinent code has been added to your browser. + +141 +00:10:36,000 --> 00:10:39,000 +Let me open the chrome dev tools. + +142 +00:10:39,000 --> 00:10:41,000 +Navigate to the application menu. + +143 +00:10:42,000 --> 00:10:44,000 +How many of your cookies can you see this? + +144 +00:10:44,000 --> 00:10:45,000 +We have. + +145 +00:10:45,000 --> 00:10:47,000 +Who was my partner code. + +146 +00:10:48,000 --> 00:10:50,000 +This is the user registration. + +147 +00:10:50,000 --> 00:10:55,000 +My application will recognize that you came to the online store. + +148 +00:10:55,000 --> 00:10:59,000 +We are my live and I will earn some money. + +149 +00:11:00,000 --> 00:11:03,000 +Usually some percentage from the audit. + +150 +00:11:03,000 --> 00:11:08,000 +Total money amount I will earn from each your purchase in the shop. + +151 +00:11:09,000 --> 00:11:13,000 +That is how affiliate marketing works. + +152 +00:11:13,000 --> 00:11:18,000 +So let's sum it up to understand what should be done from the technical side. + +153 +00:11:19,000 --> 00:11:23,000 +We need to generate unique report for new user user registration. + +154 +00:11:24,000 --> 00:11:27,000 +This unique partner code will be used to create partner. + +155 +00:11:28,000 --> 00:11:35,000 +We when you to check was a you wrote contains personal code parameter and if this is then we need to + +156 +00:11:35,000 --> 00:11:37,000 +place cookie on the client side. + +157 +00:11:38,000 --> 00:11:40,000 +Use the registration. + +158 +00:11:40,000 --> 00:11:47,000 +We have to check and establish connection between users in the database in order to make affiliate programs + +159 +00:11:47,000 --> 00:11:49,000 +work during the checkout. + +160 +00:11:50,000 --> 00:11:53,000 +Will implement checkout later in other tasks. + +161 +00:11:53,000 --> 00:11:56,000 +Afternoon in a few more topics. + +162 +00:11:57,000 --> 00:12:04,000 +That's what you have to do to implement a fitness program in the App Store now and also sets all the + +163 +00:12:04,000 --> 00:12:05,000 +requirements for your homework. + +164 +00:12:06,000 --> 00:12:07,000 +How does it look like? + +165 +00:12:08,000 --> 00:12:09,000 +Can you imagine? + +166 +00:12:09,000 --> 00:12:13,000 +How much do you already knows that you already can implement things like this? + +167 +00:12:14,000 --> 00:12:22,000 +And the coolest thing about all this is that with all the related examples you just need to play was + +168 +00:12:22,000 --> 00:12:29,000 +all examples from previous lessons like was causal and puts them together in the right order to get + +169 +00:12:29,000 --> 00:12:31,000 +things like I have just demoed. + +170 +00:12:32,000 --> 00:12:36,000 +So now I recommend you to present both in this video lesson. + +171 +00:12:37,000 --> 00:12:44,000 +Also check the document and attachments was full list of requirements and start the implementation. + +172 +00:12:45,000 --> 00:12:52,000 +Once you implemented your own solution, come back to this video and proceed with watching the video + +173 +00:12:52,000 --> 00:12:52,000 +lesson. + +174 +00:12:53,000 --> 00:12:59,000 +Because now we are going to use my solution and I'm going to share with you the details of the implementation. + +175 +00:13:00,000 --> 00:13:04,000 +As you saw in the whole task, I shared with your resources. + +176 +00:13:04,000 --> 00:13:08,000 +Well, we can then load some basic issue email and see assess templates. + +177 +00:13:08,000 --> 00:13:15,000 +It also works just fine because at the end of the day, you need to be able to adjust the source code + +178 +00:13:15,000 --> 00:13:23,000 +of the template and sometimes you to create your own elements or styles that make things work together. + +179 +00:13:23,000 --> 00:13:27,000 +Working with templates is also one of the ways to know the topic better. + +180 +00:13:28,000 --> 00:13:33,000 +I give you templates and modified them a little bit to meet the requirements of the task. + +181 +00:13:34,000 --> 00:13:37,000 +Let's start from the review of UI resources. + +182 +00:13:38,000 --> 00:13:46,000 +Here are a few pages that we created in scope of this task home page each demo, sign in each demo and + +183 +00:13:46,000 --> 00:13:48,000 +sign up each demo. + +184 +00:13:49,000 --> 00:13:54,000 +That's all H2O page was created for this lesson taking into account. + +185 +00:13:54,000 --> 00:13:58,000 +I use as templates for implementation of the home task. + +186 +00:13:58,000 --> 00:14:09,000 +I copied also all the resources that work together with templates, namely to assess gas images, force + +187 +00:14:09,000 --> 00:14:17,000 +and other resources provided directly by vendors, then needed to make website responsive and good looking. + +188 +00:14:18,000 --> 00:14:22,000 +Taking into account some animations and custom design solutions. + +189 +00:14:23,000 --> 00:14:28,000 +Let me open the home page when you will use the source code of this example. + +190 +00:14:28,000 --> 00:14:33,000 +Pay attention to the top parts of the file, namely all content. + +191 +00:14:33,000 --> 00:14:37,000 +And this element was G+ page content product. + +192 +00:14:39,000 --> 00:14:43,000 +There are no quick and not clear technical decisions here. + +193 +00:14:43,000 --> 00:14:47,000 +So feel free to explore the source code of this solution by yourself. + +194 +00:14:49,000 --> 00:14:57,000 +Regarding Sign-Up page pay attention deserves an HTML form with a separate lesson dedicated to HTML + +195 +00:14:57,000 --> 00:14:58,000 +forms. + +196 +00:14:58,000 --> 00:15:05,000 +I configure its action and method for it and similar story was signed in page. + +197 +00:15:06,000 --> 00:15:10,000 +Again, there is a form where I can see with another action. + +198 +00:15:11,000 --> 00:15:19,000 +On the back end in our online store VAP module, I create a different that's zen located in the controllers + +199 +00:15:19,000 --> 00:15:20,000 +package. + +200 +00:15:21,000 --> 00:15:22,000 +Let me open sign up server. + +201 +00:15:23,000 --> 00:15:30,000 +If you are a student of my Joe from zero 2/1 draft course or my course about golf partners, then you + +202 +00:15:30,000 --> 00:15:33,000 +should remember such pardon s facade. + +203 +00:15:34,000 --> 00:15:36,000 +Here is exactly a great place to use the spot. + +204 +00:15:37,000 --> 00:15:43,000 +I created my user facade that I use inside my select of request. + +205 +00:15:43,000 --> 00:15:48,000 +I take all necessary parameters needed to create a user on the backend. + +206 +00:15:49,000 --> 00:15:56,000 +Also, as you remember from the requirements, I need to check who kisses a request to make sure that + +207 +00:15:56,000 --> 00:16:00,000 +there is a causal code to consider this user registration. + +208 +00:16:01,000 --> 00:16:06,000 +Once we found or didn't find the partner code, we created our user orbs. + +209 +00:16:07,000 --> 00:16:10,000 +We can use facade to register our user. + +210 +00:16:11,000 --> 00:16:19,000 +In the meantime, response is redirected to the signing age demo and builds base URLs that consist of + +211 +00:16:19,000 --> 00:16:27,000 +the currency URL and resource name where I want to redirect zero quest because request forwarding doesn't + +212 +00:16:27,000 --> 00:16:29,000 +work in this particular case. + +213 +00:16:29,000 --> 00:16:31,000 +I need to use regular. + +214 +00:16:32,000 --> 00:16:34,000 +Let's explore register user. + +215 +00:16:34,000 --> 00:16:39,000 +Massive facade is a part of our business layouts application. + +216 +00:16:40,000 --> 00:16:47,000 +This was this facade is not enough of this module, but it is in our core module. + +217 +00:16:47,000 --> 00:16:53,000 +This interface has one implementation which is called default, ease or facade. + +218 +00:16:54,000 --> 00:16:55,000 +Let's look at it. + +219 +00:16:56,000 --> 00:17:06,000 +As you can see, default user facade feature aggregates user DAO user to convert to an affiliate marketing + +220 +00:17:06,000 --> 00:17:09,000 +service insights register user method. + +221 +00:17:09,000 --> 00:17:12,000 +We said the customer role by default. + +222 +00:17:12,000 --> 00:17:20,000 +We also generate unique partner code and sends a referee user in case the current user was attracted + +223 +00:17:20,000 --> 00:17:25,000 +by some other user and there was caught in cookies. + +224 +00:17:26,000 --> 00:17:34,000 +After we call say user on user DAO object user DAO is on the persistence level. + +225 +00:17:35,000 --> 00:17:43,000 +That's why we need to convert our business object user is due to object to user detail. + +226 +00:17:44,000 --> 00:17:46,000 +That's why I use conversion. + +227 +00:17:47,000 --> 00:17:50,000 +You can ask me why all this stuff is. + +228 +00:17:51,000 --> 00:17:52,000 +Answer to this question. + +229 +00:17:52,000 --> 00:17:55,000 +We have used a clean architecture course. + +230 +00:17:55,000 --> 00:18:03,000 +The short answer is this a scalable architecture that helps us deal with many different problems in + +231 +00:18:03,000 --> 00:18:03,000 +the future. + +232 +00:18:04,000 --> 00:18:12,000 +And this kind of additional classes will clearly separate our persistence, our business plan, and + +233 +00:18:12,000 --> 00:18:13,000 +our grappling. + +234 +00:18:14,000 --> 00:18:15,000 +Can you see how good it is? + +235 +00:18:16,000 --> 00:18:23,000 +We can substitute the whole modules if we need without impact on the rest of our application in case + +236 +00:18:23,000 --> 00:18:29,000 +we would need funds in relation to no school database, we need to substitute persistence more than + +237 +00:18:30,000 --> 00:18:34,000 +update the user due to our CONVERSA and use another don't alimentation. + +238 +00:18:34,000 --> 00:18:35,000 +That's it. + +239 +00:18:36,000 --> 00:18:38,000 +But the interfaces will remain the same. + +240 +00:18:39,000 --> 00:18:42,000 +The business logic will still remain the same. + +241 +00:18:43,000 --> 00:18:49,000 +The business entities will lose the same z z benefit of this architecture. + +242 +00:18:49,000 --> 00:18:54,000 +We have clear separation of concerns and we don't mess up. + +243 +00:18:54,000 --> 00:18:59,000 +Business objects and clauses contain business logic with persistence. + +244 +00:19:00,000 --> 00:19:02,000 +Just to remind you is an average. + +245 +00:19:02,000 --> 00:19:11,000 +What goes after the now objects and actions is a database SQL queries in certain users database. + +246 +00:19:11,000 --> 00:19:17,000 +All this was already covered and I reviewed the scope of the solution of another homework. + +247 +00:19:17,000 --> 00:19:22,000 +Feel free to insert as a homework solution about the objects and database connections. + +248 +00:19:23,000 --> 00:19:30,000 +Affiliate Marketing Service is an interface that declares a contract for one message, but that doesn't + +249 +00:19:30,000 --> 00:19:34,000 +mean that we can't add new masses here in the future. + +250 +00:19:34,000 --> 00:19:36,000 +This interface has one implementation. + +251 +00:19:37,000 --> 00:19:38,000 +It is default a few. + +252 +00:19:38,000 --> 00:19:40,000 +It's market and service. + +253 +00:19:40,000 --> 00:19:47,000 +As you can see, it just contains custom implementation of the generation of the unique partner code. + +254 +00:19:48,000 --> 00:19:57,000 +Now let's review and let us assume that that is code signing so that this will also use a user facade + +255 +00:19:57,000 --> 00:20:01,000 +to extract user by email and compare passwords. + +256 +00:20:02,000 --> 00:20:08,000 +We need to make sure that the password answered by user is equal to the password from the database. + +257 +00:20:09,000 --> 00:20:13,000 +One more importance and I need to highlight the story. + +258 +00:20:13,000 --> 00:20:18,000 +This password is a database without encryption is not a good practice. + +259 +00:20:19,000 --> 00:20:25,000 +Don't do exists in production but taking into account wouldn't learn encryption yet. + +260 +00:20:26,000 --> 00:20:28,000 +We are not bothering about this too much. + +261 +00:20:29,000 --> 00:20:36,000 +Also redirection logic is here in place just to remind you in case user has any role. + +262 +00:20:37,000 --> 00:20:43,000 +We are redirecting to the admin panel resource in case user has a customer role. + +263 +00:20:43,000 --> 00:20:51,000 +We originally came to the homepage and in case credentials are invalid, the resurrection quest is a + +264 +00:20:51,000 --> 00:20:53,000 +me page one more time. + +265 +00:20:54,000 --> 00:20:55,000 +All of the error. + +266 +00:20:55,000 --> 00:21:02,000 +Henderson errors, including the font consolidation, will be implemented in scope of the whole tasks. + +267 +00:21:02,000 --> 00:21:04,000 +One will learn new topics. + +268 +00:21:05,000 --> 00:21:06,000 +Pay attention that ALSA. + +269 +00:21:06,000 --> 00:21:13,000 +In case of the successful signing, we create a session object and we put the logged in user into the + +270 +00:21:13,000 --> 00:21:14,000 +session. + +271 +00:21:14,000 --> 00:21:15,000 +This is needed in order. + +272 +00:21:15,000 --> 00:21:21,000 +We could access the user object in other places of our app in scope of one session. + +273 +00:21:21,000 --> 00:21:23,000 +This is clear, by the way. + +274 +00:21:24,000 --> 00:21:30,000 +In case you have any questions, please ask them below this video and I will be happy to answer all + +275 +00:21:30,000 --> 00:21:31,000 +your questions. + +276 +00:21:33,000 --> 00:21:36,000 +Now let's review two filters that are implemented. + +277 +00:21:37,000 --> 00:21:39,000 +Filters are located in the app. + +278 +00:21:39,000 --> 00:21:41,000 +More you use a filters package. + +279 +00:21:42,000 --> 00:21:46,000 +The first filter is to secure access to all resources. + +280 +00:21:46,000 --> 00:21:55,000 +It is called admin filter inside do filter mass at weekdays in reference to the session object and after + +281 +00:21:55,000 --> 00:21:57,000 +that with takes a look in use. + +282 +00:21:57,000 --> 00:22:04,000 +It is it is stored as an active session, but then shows that it is also a service. + +283 +00:22:04,000 --> 00:22:07,000 +And what we have discussed here is a lesson about that filters. + +284 +00:22:08,000 --> 00:22:14,000 +But I'm not sure whether you've paid enough attention to my words in the filter mass that we get. + +285 +00:22:14,000 --> 00:22:22,000 +So let's request as an argument, but we can get session object from you from that should be so request + +286 +00:22:22,000 --> 00:22:23,000 +object. + +287 +00:22:23,000 --> 00:22:31,000 +That's why I need to cast massive argument to the space to be so let's request and only after that I + +288 +00:22:31,000 --> 00:22:33,000 +can extract a reference to the session. + +289 +00:22:33,000 --> 00:22:41,000 +Object is a clear dependent on the user role perform different actions in case user has any role. + +290 +00:22:42,000 --> 00:22:49,000 +We allow clients to proceed with the request and to reach admin resource successfully in case user doesn't + +291 +00:22:49,000 --> 00:22:58,000 +have any role virtual for all three status quo in case there was no user in the session, that means + +292 +00:22:58,000 --> 00:23:01,000 +there is no locked in the user yet. + +293 +00:23:01,000 --> 00:23:04,000 +Then we redirect user to the signing page. + +294 +00:23:05,000 --> 00:23:05,000 +That's it. + +295 +00:23:06,000 --> 00:23:15,000 +Also pay attention is a new filter method takes select response object as my argument and the call center + +296 +00:23:15,000 --> 00:23:15,000 +direct message. + +297 +00:23:15,000 --> 00:23:20,000 +We need to cast this argument to be so let's star. + +298 +00:23:21,000 --> 00:23:29,000 +After that we can call sense redirect message and another filter is called called filter. + +299 +00:23:30,000 --> 00:23:36,000 +This filter will listen all incoming requests to our server and we are going to check partner. + +300 +00:23:37,000 --> 00:23:44,000 +The request in each request is the application in case we find such parameter is a URL. + +301 +00:23:44,000 --> 00:23:47,000 +We asked you who was the partner quote. + +302 +00:23:48,000 --> 00:23:52,000 +Basically that's all what is needed to be done according to requirements. + +303 +00:23:53,000 --> 00:23:57,000 +Anyway, team I have shared we use a source code of my solution. + +304 +00:23:58,000 --> 00:24:00,000 +Take your time explores the solution. + +305 +00:24:01,000 --> 00:24:06,000 +Runs a court on your computer, compare your solution in months and ask questions. + +306 +00:24:07,000 --> 00:24:12,000 +The more time you spend thinking about this task, does it matter for you? + +307 +00:24:12,000 --> 00:24:18,000 +If you're watching this lesson, that means you already passed the hard way of knowing the program. + +308 +00:24:19,000 --> 00:24:27,000 +And that means that, you know, that program is a continuous process of exploring new solutions and + +309 +00:24:27,000 --> 00:24:31,000 +exploring of how to use waste to implement the same thing. + +310 +00:24:31,000 --> 00:24:33,000 +We may have different solution. + +311 +00:24:33,000 --> 00:24:38,000 +That doesn't mean that the solution is wrong and my solution is correct. + +312 +00:24:38,000 --> 00:24:42,000 +One because different ways to achieve the same result. + +313 +00:24:43,000 --> 00:24:43,000 +Program. + +314 +00:24:44,000 --> 00:24:49,000 +Ask yourself why you did it this way and I did it in another way. + +315 +00:24:50,000 --> 00:24:56,000 +Ask me in case you have questions regarding my solution, and that's how we will improve our skills + +316 +00:24:56,000 --> 00:24:57,000 +and knowledge. + +317 +00:24:58,000 --> 00:25:04,000 +I'm sure that this whole task was useful for you, and I hope that overview of my solution was helpful + +318 +00:25:04,000 --> 00:25:05,000 +for you too. + +319 +00:25:06,000 --> 00:25:12,000 +Do need to learn a lot of new things, so stay tuned and see things in the next lesson. + diff --git a/67 - ===== Exam HTML, CSS, Servlets, Web Filter & Web Server =====/001 Hometask-and-link-to-the-solution.url b/67 - ===== Exam HTML, CSS, Servlets, Web Filter & Web Server =====/001 Hometask-and-link-to-the-solution.url new file mode 100644 index 0000000000000000000000000000000000000000..e2e62d03376b5615a966844611d5216a326ba1fb --- /dev/null +++ b/67 - ===== Exam HTML, CSS, Servlets, Web Filter & Web Server =====/001 Hometask-and-link-to-the-solution.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://docs.google.com/document/d/1JrQh95wgj_UKvT7ASCh1XOXLMd9TB5QDaGd2AhHqOm0/edit?usp=sharing \ No newline at end of file diff --git a/67 - ===== Exam HTML, CSS, Servlets, Web Filter & Web Server =====/external-links.txt b/67 - ===== Exam HTML, CSS, Servlets, Web Filter & Web Server =====/external-links.txt new file mode 100644 index 0000000000000000000000000000000000000000..e24dd2b73185b75c013db58f77f2a01402cc2f2c --- /dev/null +++ b/67 - ===== Exam HTML, CSS, Servlets, Web Filter & Web Server =====/external-links.txt @@ -0,0 +1,3 @@ + +001 Hometask-and-link-to-the-solution +https://docs.google.com/document/d/1JrQh95wgj_UKvT7ASCh1XOXLMd9TB5QDaGd2AhHqOm0/edit?usp=sharing diff --git a/68 - JSP/001 JSP Overview_en.srt b/68 - JSP/001 JSP Overview_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..e11e6ac5ec5d6f085d3170b1230b6030399fb45d --- /dev/null +++ b/68 - JSP/001 JSP Overview_en.srt @@ -0,0 +1,1192 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello. + +2 +00:00:06,000 --> 00:00:10,000 +Yesterday was this lesson which starts new and very important topic. + +3 +00:00:11,000 --> 00:00:13,000 +We're going to continue speed technology. + +4 +00:00:13,000 --> 00:00:22,000 +We'll start from the definitions, an overview of what GCP is to help you understand what is will hold + +5 +00:00:22,000 --> 00:00:26,000 +comparative analysis between the GCP HMO. + +6 +00:00:26,000 --> 00:00:33,000 +So let's in JavaScript after that we're going to have huge advantages and disadvantages. + +7 +00:00:33,000 --> 00:00:36,000 +Well known GCP lifecycle. + +8 +00:00:36,000 --> 00:00:41,000 +Also, we'll review GCP elements to understand GCP syntax. + +9 +00:00:41,000 --> 00:00:45,000 +I will explain what directives, declarations, script. + +10 +00:00:45,000 --> 00:00:48,000 +That's expressions and many other things. + +11 +00:00:49,000 --> 00:00:56,000 +We'll discuss what implicit objects are and what implicit objects are available for us on GCP page, + +12 +00:00:57,000 --> 00:01:04,000 +I'm going to show you how the process of translation of GCP page into so that Java source code looks + +13 +00:01:04,000 --> 00:01:07,000 +like and advances in medicine. + +14 +00:01:07,000 --> 00:01:10,000 +We're going to use p expression language. + +15 +00:01:11,000 --> 00:01:12,000 +Let's start our lesson. + +16 +00:01:13,000 --> 00:01:19,000 +And the first things that we're going to learn today is the definition of the P just stands for Java + +17 +00:01:19,000 --> 00:01:21,000 +several pages technology. + +18 +00:01:21,000 --> 00:01:22,000 +What is it? + +19 +00:01:22,000 --> 00:01:29,000 +It is a server side technology from Java for enterprise technology stack for the creation of dynamic + +20 +00:01:29,000 --> 00:01:31,000 +platform independent web pages. + +21 +00:01:32,000 --> 00:01:36,000 +This is integrated with entire family of the Java eight. + +22 +00:01:37,000 --> 00:01:42,000 +GCP allows create both static and dynamic map content. + +23 +00:01:43,000 --> 00:01:46,000 +After this lesson you may ask me, Andre, wait a minute. + +24 +00:01:47,000 --> 00:01:51,000 +In this course, we already know h html for creation of the static web content. + +25 +00:01:51,000 --> 00:01:54,000 +Most of the notes are less to create dynamic web content. + +26 +00:01:55,000 --> 00:01:57,000 +On top of that, we have JavaScript to learn. + +27 +00:01:58,000 --> 00:02:00,000 +Then why do we need GCP? + +28 +00:02:00,000 --> 00:02:02,000 +Let me explain this to you. + +29 +00:02:02,000 --> 00:02:09,000 +By comparing GCP was as a technologist, I believe this will help you better understand what it is. + +30 +00:02:10,000 --> 00:02:13,000 +Let's compare GSP with HMO. + +31 +00:02:13,000 --> 00:02:17,000 +If you skipped lessons about HMO and you don't know, what is it? + +32 +00:02:17,000 --> 00:02:20,000 +I am recommended to watch classes about HMO first. + +33 +00:02:21,000 --> 00:02:28,000 +But if you already watched my lessons about HMO, then you already know that with the help of HMO, + +34 +00:02:28,000 --> 00:02:30,000 +we can create static content only. + +35 +00:02:31,000 --> 00:02:36,000 +But with the help of the GSP technology, we can create dynamic web content. + +36 +00:02:36,000 --> 00:02:44,000 +Moreover, GSP also supports such features as expression, language and integration with Java API that + +37 +00:02:44,000 --> 00:02:47,000 +makes GSP super powerful tool for web development. + +38 +00:02:48,000 --> 00:02:54,000 +Okay, but if GSP helps us to create dynamic web content, then what is the difference between the GSP + +39 +00:02:54,000 --> 00:02:55,000 +and Seurat's? + +40 +00:02:56,000 --> 00:02:58,000 +If you remember, let's stop it then. + +41 +00:02:58,000 --> 00:03:04,000 +You should also remember that to generate dynamic content, we have to take create writers from the + +42 +00:03:04,000 --> 00:03:09,000 +response and after that, print out with the help of free offering to learn. + +43 +00:03:09,000 --> 00:03:10,000 +Oh, right. + +44 +00:03:11,000 --> 00:03:18,000 +On the other hand, GSP may have HTML look and feel and have powerful features at the same time. + +45 +00:03:18,000 --> 00:03:24,000 +Can you imagine any frontend developer opens a separate class and tries to move through the serious + +46 +00:03:24,000 --> 00:03:32,000 +of the free to land message invocations in order to find the required output to add some class HTML + +47 +00:03:32,000 --> 00:03:33,000 +element or just stunning. + +48 +00:03:34,000 --> 00:03:42,000 +It is hard to imagine with servers, but frontend engineers can easily navigate these a B file because + +49 +00:03:42,000 --> 00:03:44,000 +it makes you that is out. + +50 +00:03:44,000 --> 00:03:49,000 +It also may have markup and it is easy to adjust the visual presentation of the content. + +51 +00:03:49,000 --> 00:03:55,000 +These are GSP edges, but page consists of simple tax and GSP tops. + +52 +00:03:56,000 --> 00:04:04,000 +The GSP pages are easier to maintains and so that because we can separate design and development, it + +53 +00:04:04,000 --> 00:04:10,000 +provides some additional features such as expression, language, custom tags, etc.. + +54 +00:04:10,000 --> 00:04:13,000 +We are going to run all GSP features in this course. + +55 +00:04:14,000 --> 00:04:21,000 +We didn't have lessons about JavaScript yet, but if you heard something about it, you may be wondering + +56 +00:04:22,000 --> 00:04:25,000 +what is the difference between the GSP and the JavaScript? + +57 +00:04:26,000 --> 00:04:31,000 +Ever since simple here, JavaScript allows us to modify Dom. + +58 +00:04:31,000 --> 00:04:37,000 +This is the main object model on the client side and this is the key difference. + +59 +00:04:38,000 --> 00:04:45,000 +JavaScript is executed on the client side in browser, whereas GSP generates content on the service + +60 +00:04:45,000 --> 00:04:50,000 +on the great amazing web solutions with the Java platform. + +61 +00:04:50,000 --> 00:04:58,000 +We need to know both GSP and JavaScript, but is it created for different purposes to address different + +62 +00:04:58,000 --> 00:04:58,000 +challenges? + +63 +00:04:59,000 --> 00:05:05,000 +So I hope that after holding such comparative analysis, it becomes a little bit clear. + +64 +00:05:05,000 --> 00:05:06,000 +It would just be technology is. + +65 +00:05:07,000 --> 00:05:08,000 +Let's continue. + +66 +00:05:08,000 --> 00:05:15,000 +Now let's review the advantages of GSP technology over a similar web development while addressing specific + +67 +00:05:15,000 --> 00:05:15,000 +challenges. + +68 +00:05:16,000 --> 00:05:21,000 +GSP complements and extends capabilities of several technology. + +69 +00:05:22,000 --> 00:05:28,000 +With the GSP, we can use all features that we had in service, and even more than that, in addition + +70 +00:05:28,000 --> 00:05:34,000 +to those features, we can use implicit objects on the page, predefined tags, expression, language, + +71 +00:05:34,000 --> 00:05:38,000 +custom GSP tags to simplify development and others. + +72 +00:05:38,000 --> 00:05:46,000 +That doesn't mean that from now on we'll use GSP instead of so let's Z develop for different purposes. + +73 +00:05:46,000 --> 00:05:50,000 +But it is worse to be highlighted as an advantage here in this comparison. + +74 +00:05:51,000 --> 00:05:53,000 +Easiness of maintenance. + +75 +00:05:53,000 --> 00:05:59,000 +It is relatively easy to maintain the GSP because we can easily separate our business logic with the + +76 +00:05:59,000 --> 00:06:01,000 +presentation logic. + +77 +00:06:01,000 --> 00:06:08,000 +And so that technology makes our business logic was the presentation logic by writing both of those + +78 +00:06:08,000 --> 00:06:10,000 +points is the right to object. + +79 +00:06:11,000 --> 00:06:14,000 +Having GSP simplifies our life. + +80 +00:06:14,000 --> 00:06:17,000 +Usually that GSP is used for the presentation lan. + +81 +00:06:18,000 --> 00:06:23,000 +This doesn't mean we don't have technical opportunities to use on the GSP instead of select. + +82 +00:06:24,000 --> 00:06:32,000 +But as I already said, GSP technology is used nowadays for the presentation we now need in reconciliation + +83 +00:06:32,000 --> 00:06:39,000 +and redeployment in comparison to so that we don't need to redeploy our application in case we changed + +84 +00:06:39,000 --> 00:06:40,000 +our GSP page. + +85 +00:06:41,000 --> 00:06:47,000 +You already know that in case we declare new massive things so that for the new import statement or + +86 +00:06:47,000 --> 00:06:52,000 +things like that, we need to recompile and redeploy our application. + +87 +00:06:52,000 --> 00:06:59,000 +Since a difference was a few pages and I believe we can consider this as advantage of as a semblance. + +88 +00:07:00,000 --> 00:07:09,000 +The next advantage is still GM still stands for GSP Standard Tack Library all like it is also called + +89 +00:07:09,000 --> 00:07:14,000 +Java Standard Tack Library or Jakarta Standard Text Library. + +90 +00:07:14,000 --> 00:07:16,000 +All these names about the same thing. + +91 +00:07:17,000 --> 00:07:19,000 +GST provides a set of tax. + +92 +00:07:20,000 --> 00:07:22,000 +It simplifies development and more. + +93 +00:07:22,000 --> 00:07:29,000 +These stocks we can find tax is it helps us to format out the change locale of the application. + +94 +00:07:30,000 --> 00:07:36,000 +So look was the x amount and even the work was A, B, C and establish connection to the database. + +95 +00:07:36,000 --> 00:07:38,000 +This is really impressive. + +96 +00:07:39,000 --> 00:07:41,000 +Possibility to use custom tax. + +97 +00:07:42,000 --> 00:07:45,000 +We're going to learn how we can create custom tax as GSP. + +98 +00:07:46,000 --> 00:07:54,000 +But what I can say already is this a significant advantage of a separate and HMO because it can speed + +99 +00:07:54,000 --> 00:07:56,000 +up our development process significantly. + +100 +00:07:57,000 --> 00:08:03,000 +Imagine that instead of repeating zip code in different files, you can create custom tat. + +101 +00:08:03,000 --> 00:08:07,000 +And after that, you can use it wherever you need. + +102 +00:08:08,000 --> 00:08:09,000 +In my opinion. + +103 +00:08:09,000 --> 00:08:13,000 +These are just some of the advantages of the GSP technology. + +104 +00:08:13,000 --> 00:08:16,000 +More advantages we will be able to learn. + +105 +00:08:16,000 --> 00:08:18,000 +We will come to the practical exercises. + +106 +00:08:19,000 --> 00:08:23,000 +It is also worth to highlight the disadvantages of the GSP technology. + +107 +00:08:24,000 --> 00:08:32,000 +The first disadvantage is that it is difficult to do more footrace errors in GSP because she spit pages + +108 +00:08:32,000 --> 00:08:35,000 +at translated and then compiled into Java. + +109 +00:08:35,000 --> 00:08:43,000 +So that's errors that creep in your pages are rarely seen as errors arising from the coding of GSP pages. + +110 +00:08:44,000 --> 00:08:50,000 +It's also not possible to use the market as a traditional way that we can use it was a jao a source + +111 +00:08:50,000 --> 00:08:52,000 +code to the potential errors. + +112 +00:08:53,000 --> 00:09:00,000 +This is one of the key reasons why put code and a lot of business logic inside that GSP page is not + +113 +00:09:00,000 --> 00:09:01,000 +consider it as a good practice. + +114 +00:09:02,000 --> 00:09:09,000 +GSP takes additional time to be this place when access is the first time in comparison to the surveillance. + +115 +00:09:10,000 --> 00:09:16,000 +This happens because GSP pages are compiled into the seamless ones that first access and this takes + +116 +00:09:16,000 --> 00:09:20,000 +some time depending on the size of the GSP page. + +117 +00:09:21,000 --> 00:09:29,000 +This time may be different, but in most cases this is not a showstopper and it is not a critical disadvantage. + +118 +00:09:29,000 --> 00:09:38,000 +But still good to know GSP requires double disk space in comparison with surveillance because GSP pages + +119 +00:09:38,000 --> 00:09:45,000 +are translated into Java source code and after that compiled to the cost files this server has to store + +120 +00:09:45,000 --> 00:09:47,000 +request files was reduced by pages. + +121 +00:09:48,000 --> 00:09:53,000 +Also, there is a reason to delegate a lot of the responsibilities of GSP pages. + +122 +00:09:54,000 --> 00:09:58,000 +As we already discussed, GSP technology is really powerful. + +123 +00:09:58,000 --> 00:10:03,000 +You can do the same things as in some ads and even more than that. + +124 +00:10:04,000 --> 00:10:12,000 +But I hope that we will be wise enough to not use all these opportunities because our speech is it. + +125 +00:10:12,000 --> 00:10:18,000 +It can be channeled into some monster that manages markup with all presentation. + +126 +00:10:18,000 --> 00:10:24,000 +That's a basic connection, contains some simple calculations, error handles, and many other different + +127 +00:10:24,000 --> 00:10:25,000 +things. + +128 +00:10:25,000 --> 00:10:32,000 +Yes, it is technically possible, but we should always remember about separation of concerns between + +129 +00:10:32,000 --> 00:10:37,000 +different scenarios in our application and full clean architecture design. + +130 +00:10:38,000 --> 00:10:43,000 +I believe these are the key disadvantages that we should consider while working with GSP. + +131 +00:10:44,000 --> 00:10:47,000 +Now we know advantages and disadvantages of the juice, but technology. + +132 +00:10:48,000 --> 00:10:48,000 +Let's move on. + +133 +00:10:49,000 --> 00:10:55,000 +Let's learn GSP Lifecycle translation of GSP page is a first step. + +134 +00:10:55,000 --> 00:11:01,000 +Basically e.g. Spanish is translated into a Java code of frag less and less. + +135 +00:11:02,000 --> 00:11:08,000 +After we will learn GSP Animals, I will show you how translation from GSP to start with happens. + +136 +00:11:09,000 --> 00:11:13,000 +The next step is compilation of GSP page. + +137 +00:11:13,000 --> 00:11:18,000 +Once GSP is translated into the Java source code, it should be compiled. + +138 +00:11:19,000 --> 00:11:25,000 +Compiles like regular Java file to convert Java source code into the Java bytecode. + +139 +00:11:26,000 --> 00:11:28,000 +After that gross class loading. + +140 +00:11:29,000 --> 00:11:32,000 +During this phase, cross is loaded into a JVM. + +141 +00:11:33,000 --> 00:11:35,000 +The next phase is instantiation. + +142 +00:11:36,000 --> 00:11:39,000 +Java is object oriented platform by design. + +143 +00:11:40,000 --> 00:11:45,000 +That's why after learning class in Digimon, we need to create object. + +144 +00:11:46,000 --> 00:11:49,000 +The next step in the lifecycle is initialization. + +145 +00:11:50,000 --> 00:11:53,000 +The container invokes GSP and it's massive. + +146 +00:11:53,000 --> 00:11:56,000 +And after that we have similar lifecycle too. + +147 +00:11:56,000 --> 00:12:02,000 +So we have the initialization phase was invocation of JSP needs mass. + +148 +00:12:03,000 --> 00:12:04,000 +Then we have request processing. + +149 +00:12:05,000 --> 00:12:11,000 +On this face, container invokes JSP service message and destroy phase. + +150 +00:12:11,000 --> 00:12:15,000 +During this phase, container invokes GSP destroy message. + +151 +00:12:16,000 --> 00:12:19,000 +This whole lifecycle of the GCP looks like. + +152 +00:12:20,000 --> 00:12:24,000 +And now let's run key GCP elements in the GCP. + +153 +00:12:24,000 --> 00:12:30,000 +We can use the following elements legitimate code and all related elements. + +154 +00:12:30,000 --> 00:12:32,000 +GCP talks. + +155 +00:12:32,000 --> 00:12:35,000 +This includes GSL talks and custom docs. + +156 +00:12:35,000 --> 00:12:38,000 +We are going to have a separate lesson about docs. + +157 +00:12:39,000 --> 00:12:43,000 +I'm going to teach you how to use them and how to create custom taps. + +158 +00:12:44,000 --> 00:12:51,000 +GSP comments is that you can use both to email comments and use becomes well. + +159 +00:12:51,000 --> 00:13:00,000 +You learn how to email comments slack and the lesson about HTML and tons just like you can see how GSP + +160 +00:13:00,000 --> 00:13:01,000 +comments look like. + +161 +00:13:02,000 --> 00:13:03,000 +Directives. + +162 +00:13:03,000 --> 00:13:08,000 +GSP directives are used for controlling the quality of a GSP page. + +163 +00:13:09,000 --> 00:13:15,000 +Directives provide information to the seller on how the page should be processed. + +164 +00:13:15,000 --> 00:13:19,000 +The directives are used during translation phase. + +165 +00:13:20,000 --> 00:13:28,000 +There are three types of directives in GSP page directive include directive to lead directive during + +166 +00:13:28,000 --> 00:13:31,000 +the course of events and the most popular directives. + +167 +00:13:32,000 --> 00:13:34,000 +We are going to see some examples. + +168 +00:13:36,000 --> 00:13:40,000 +The next stop of elements is GSP Action Star. + +169 +00:13:40,000 --> 00:13:44,000 +GSP actions lets you perform some action. + +170 +00:13:45,000 --> 00:13:53,000 +The difference between directives and action talks is simple directives work on the face of translation + +171 +00:13:54,000 --> 00:13:58,000 +and action packs work on the face of request processing. + +172 +00:13:59,000 --> 00:14:08,000 +For example, GSP includes action tag allows to insert as a GSP file is a current, while GSP forward + +173 +00:14:08,000 --> 00:14:11,000 +is used for redirect request. + +174 +00:14:11,000 --> 00:14:19,000 +When this action is encountered on a JCP page, the control gets transferred to the page mentioned in + +175 +00:14:19,000 --> 00:14:19,000 +this section. + +176 +00:14:20,000 --> 00:14:27,000 +There are also some actions to interact with properties of jellybeans, but Z lies out of the scope + +177 +00:14:27,000 --> 00:14:28,000 +of the current lesson. + +178 +00:14:29,000 --> 00:14:30,000 +In any way. + +179 +00:14:30,000 --> 00:14:34,000 +I don't expect you to learn all possible g speed tax. + +180 +00:14:35,000 --> 00:14:39,000 +Only in this lesson will learn all of them greatly. + +181 +00:14:39,000 --> 00:14:41,000 +The same case is during the interview. + +182 +00:14:42,000 --> 00:14:49,000 +Most likely you will be asked about the most popular and widely used tax, but not about all possible + +183 +00:14:49,000 --> 00:14:51,000 +tax declarations. + +184 +00:14:52,000 --> 00:14:52,000 +Declaration. + +185 +00:14:52,000 --> 00:14:58,000 +That is a piece of Java code for declaring variables, masses or classes. + +186 +00:14:58,000 --> 00:15:06,000 +If we declare variable a massive inside declaration that it means the declaration is made inside the + +187 +00:15:06,000 --> 00:15:07,000 +service class. + +188 +00:15:07,000 --> 00:15:15,000 +But outside the service method we can declare a static member and the instance variable and masses inside + +189 +00:15:15,000 --> 00:15:22,000 +the declaration that after this declaration we can use all these things on the GCP page. + +190 +00:15:23,000 --> 00:15:23,000 +Script. + +191 +00:15:23,000 --> 00:15:29,000 +That's a script that allows to write Java code into the GCP file. + +192 +00:15:30,000 --> 00:15:35,000 +GCP contained most statements from the script that's in GCP service. + +193 +00:15:35,000 --> 00:15:38,000 +Massive world generated so that from GCP. + +194 +00:15:39,000 --> 00:15:44,000 +For each request of the client serviceman gets involved. + +195 +00:15:45,000 --> 00:15:50,000 +Hence is a code inside the street that executes for every request. + +196 +00:15:51,000 --> 00:15:54,000 +The script contains a quote is of this entity. + +197 +00:15:54,000 --> 00:16:03,000 +Every time GCB is involved expressions expression back evaluates the expression placed in it. + +198 +00:16:04,000 --> 00:16:08,000 +The result of expression is directed in the response out. + +199 +00:16:08,000 --> 00:16:14,000 +What that means is a result of expression will be printed directly to the response body. + +200 +00:16:15,000 --> 00:16:20,000 +I want to highlight one more time that it is not recommended to you script. + +201 +00:16:20,000 --> 00:16:23,000 +Let's expressions and declarations introduce me. + +202 +00:16:24,000 --> 00:16:24,000 +Why? + +203 +00:16:25,000 --> 00:16:27,000 +Because of the very simple disadvantages. + +204 +00:16:27,000 --> 00:16:30,000 +In case of errors, it is hard to deposit code. + +205 +00:16:31,000 --> 00:16:35,000 +Also, it is hard to identify where error comes from. + +206 +00:16:36,000 --> 00:16:42,000 +Now, when you know JSP elements, it will be easier for you to understand the following example. + +207 +00:16:42,000 --> 00:16:50,000 +On this slide, you can see example of GCP file translation into Java Source Code Path actions at the + +208 +00:16:50,000 --> 00:16:55,000 +page import directive was translated as an import statement, which is a Java source code. + +209 +00:16:56,000 --> 00:17:04,000 +Declarations examples were translated and pasted outside of the service as a class property. + +210 +00:17:04,000 --> 00:17:12,000 +In this case, and as masses of the class code of the script that was translated into the code of the + +211 +00:17:12,000 --> 00:17:17,000 +service message and the rest of the page is written directly. + +212 +00:17:17,000 --> 00:17:20,000 +Is a print writer using words message? + +213 +00:17:20,000 --> 00:17:22,000 +Is it for you? + +214 +00:17:22,000 --> 00:17:24,000 +How was the first phase of the GCP lifecycle? + +215 +00:17:24,000 --> 00:17:25,000 +Looks like? + +216 +00:17:26,000 --> 00:17:32,000 +After we create a Java source code, we compile it and that was important things that we just can skip + +217 +00:17:32,000 --> 00:17:33,000 +in this lesson. + +218 +00:17:34,000 --> 00:17:39,000 +We have to know that there are implicit references to some objects on GCP page. + +219 +00:17:39,000 --> 00:17:42,000 +Is it always present on the page? + +220 +00:17:42,000 --> 00:17:45,000 +They're called implicit objects. + +221 +00:17:45,000 --> 00:17:52,000 +These objects are created by GCP container while translating as a page to server. + +222 +00:17:53,000 --> 00:18:00,000 +These objects are present inside service masses so we can directly use them without declaration. + +223 +00:18:01,000 --> 00:18:07,000 +On this slide you can see implicit objects and Zac are spawning classes out. + +224 +00:18:08,000 --> 00:18:15,000 +This reference is used for writing content as a response, but it has several masses which can be used + +225 +00:18:16,000 --> 00:18:21,000 +properly for modern output message as a browser and for dealing with the buffer. + +226 +00:18:22,000 --> 00:18:23,000 +Request. + +227 +00:18:23,000 --> 00:18:30,000 +The main purpose of request implicit object is to get the data on a GSP page which has been entered + +228 +00:18:30,000 --> 00:18:34,000 +by user on the previous JSP page or insert. + +229 +00:18:35,000 --> 00:18:39,000 +For example, one similar to receives a request. + +230 +00:18:39,000 --> 00:18:47,000 +We can place some data into the request activities and after that forward to request this page. + +231 +00:18:47,000 --> 00:18:55,000 +In this case, we will be able to get those request attributes on the page with the help of the request + +232 +00:18:55,000 --> 00:18:58,000 +in place and object response. + +233 +00:18:58,000 --> 00:19:05,000 +It is basically used for modifying or dealing with the response which is being sent to the client after + +234 +00:19:05,000 --> 00:19:06,000 +processing the request. + +235 +00:19:07,000 --> 00:19:14,000 +It has to be somewhat response time and we already learned how we can work with response objects in + +236 +00:19:14,000 --> 00:19:16,000 +the section about stress. + +237 +00:19:17,000 --> 00:19:18,000 +Session. + +238 +00:19:18,000 --> 00:19:25,000 +It is most frequently used in place at Object, which is used for storing the user's data to make it + +239 +00:19:25,000 --> 00:19:29,000 +available on other GSP pages to the user's session. + +240 +00:19:29,000 --> 00:19:31,000 +Use Active Application. + +241 +00:19:32,000 --> 00:19:39,000 +This is used for an application like initialization parameters and to maintain user flow data across + +242 +00:19:39,000 --> 00:19:41,000 +all GCP application. + +243 +00:19:41,000 --> 00:19:48,000 +To be honest, this one is not used very often in comparison to session requests. + +244 +00:19:48,000 --> 00:19:49,000 +Exception. + +245 +00:19:50,000 --> 00:19:50,000 +Exception. + +246 +00:19:50,000 --> 00:19:55,000 +Implicit object is use and exception handling for the explains the error messages. + +247 +00:19:55,000 --> 00:20:00,000 +This object is only available to the GCP pages which has this error page. + +248 +00:20:00,000 --> 00:20:04,000 +Set the true page page. + +249 +00:20:04,000 --> 00:20:10,000 +Implicit object is a reference to the current select instance, which is actually a converted space. + +250 +00:20:11,000 --> 00:20:14,000 +It is rarely used and not in place. + +251 +00:20:14,000 --> 00:20:19,000 +Implicit object while building in GCP application page context. + +252 +00:20:19,000 --> 00:20:25,000 +It is used for accessing page request, application and session attributes. + +253 +00:20:26,000 --> 00:20:27,000 +Config. + +254 +00:20:28,000 --> 00:20:34,000 +This is so that's configuration object and mainly use for accessing getting configuration information + +255 +00:20:35,000 --> 00:20:39,000 +such as select contacts, service name configuration parameters, etc.. + +256 +00:20:40,000 --> 00:20:45,000 +We also do the review of that config type in our SO that's section of the course. + +257 +00:20:46,000 --> 00:20:50,000 +Those are all implicit objects that are available on the page. + +258 +00:20:51,000 --> 00:20:57,000 +In case you have questions, please, all of them below the reader and I will be happy to answer. + +259 +00:20:58,000 --> 00:21:05,000 +And last but not least, that I'd like to cover today in the context of the GSP overview GSP expression + +260 +00:21:05,000 --> 00:21:06,000 +range years. + +261 +00:21:06,000 --> 00:21:09,000 +Of course I I'm going to teach you how to use it. + +262 +00:21:10,000 --> 00:21:17,000 +But this is definitely one of the key features of the GSP expression level, which has been introduced + +263 +00:21:17,000 --> 00:21:18,000 +in GSP 2.0. + +264 +00:21:19,000 --> 00:21:26,000 +The main purpose of me to simplify the process of x some data from one place it objects expression one + +265 +00:21:26,000 --> 00:21:33,000 +which includes arithmetic, relational and logical operators to see ethics of expression. + +266 +00:21:33,000 --> 00:21:37,000 +Language is very simple and you can see it on this slide. + +267 +00:21:37,000 --> 00:21:45,000 +Whatever is present inside races gets evaluated at trial time and being sent to the output stream. + +268 +00:21:46,000 --> 00:21:53,000 +The expression is a valid expression, language, expression, and it can be mixed with a static text + +269 +00:21:53,000 --> 00:22:00,000 +and can be combined with other expression to form large expression on this log. + +270 +00:22:00,000 --> 00:22:08,000 +You can also see, as a least of all operators, was there a precedence that can be used in the expression + +271 +00:22:08,000 --> 00:22:08,000 +language? + +272 +00:22:09,000 --> 00:22:14,000 +Also, there are different implicit objects that are available in the expression language. + +273 +00:22:14,000 --> 00:22:20,000 +On this slide, you can see a list of the implicit objects that you can use in the expression language. + +274 +00:22:21,000 --> 00:22:27,000 +Press a pause for a minute and explore names of implicit objects and their usage. + +275 +00:22:27,000 --> 00:22:34,000 +Probably the most popular and widely used implicit objects in practice are request, scope and session + +276 +00:22:34,000 --> 00:22:34,000 +scope. + +277 +00:22:35,000 --> 00:22:40,000 +Once you reviewed all implicit objects, feel free to proceed with the next slide. + +278 +00:22:41,000 --> 00:22:46,000 +There are some reserved words is that you can use in the expression, language or this slide. + +279 +00:22:46,000 --> 00:22:49,000 +You can see it was reserved for us in the expression language. + +280 +00:22:50,000 --> 00:22:56,000 +In this example, you can see how I use AMP to observe key verbs in the expression language. + +281 +00:22:56,000 --> 00:23:00,000 +I also have a reference to the implicit object session. + +282 +00:23:00,000 --> 00:23:04,000 +The reason that you do this is to scold users. + +283 +00:23:04,000 --> 00:23:10,000 +This action is a collection of users and it is placed inside the session object. + +284 +00:23:11,000 --> 00:23:18,000 +We can return to perforce using empty keyword that acts as a unitary operator. + +285 +00:23:18,000 --> 00:23:20,000 +That's all for this lesson. + +286 +00:23:20,000 --> 00:23:23,000 +Let's recap what we have learned today. + +287 +00:23:24,000 --> 00:23:27,000 +In this lesson, we learned what GSP is. + +288 +00:23:28,000 --> 00:23:35,000 +We have used the advantages and disadvantages of the GSP vs GSP lifecycle. + +289 +00:23:36,000 --> 00:23:39,000 +Also today, the now defunct GSP elements. + +290 +00:23:40,000 --> 00:23:43,000 +Now we are ready to proceed with the practical examples. + +291 +00:23:43,000 --> 00:23:50,000 +I explained what implicit objects are and what implicit objects present on the speech. + +292 +00:23:51,000 --> 00:23:58,000 +I showed you how the process of translation of the speech is a Java, so that loops life and the dance + +293 +00:23:58,000 --> 00:23:58,000 +as a lesson. + +294 +00:23:58,000 --> 00:24:01,000 +We learned what expression language is. + +295 +00:24:02,000 --> 00:24:03,000 +That's all for today. + +296 +00:24:04,000 --> 00:24:05,000 +Thanks a lot for your attention. + +297 +00:24:05,000 --> 00:24:07,000 +Have a great day and see you. + +298 +00:24:08,000 --> 00:24:08,000 +Next lesson. + diff --git a/68 - JSP/002 First JSP Page & Practical Examples_en.srt b/68 - JSP/002 First JSP Page & Practical Examples_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..0fe0fd94753b8cabe85ca6157cf893984cd5d11a --- /dev/null +++ b/68 - JSP/002 First JSP Page & Practical Examples_en.srt @@ -0,0 +1,1004 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello, Tim. + +2 +00:00:06,000 --> 00:00:10,000 +In this lesson, we proceed with none of GCP technology. + +3 +00:00:10,000 --> 00:00:15,000 +And this lesson is going to be more about practice rather than about Siri. + +4 +00:00:15,000 --> 00:00:22,000 +We learned enough Siri in previous lesson, and I want to highlight that it is important you watch previous + +5 +00:00:22,000 --> 00:00:29,000 +lesson because today you, in a practical activity, will rely on the information learned in previous + +6 +00:00:29,000 --> 00:00:29,000 +lesson. + +7 +00:00:30,000 --> 00:00:37,000 +In this video we're going to create our first JSP page on real examples will learn how to create G space + +8 +00:00:37,000 --> 00:00:41,000 +using GCP elements that we reviewed into this lesson. + +9 +00:00:42,000 --> 00:00:48,000 +I'm going to show you examples of GCP comments, directives, declarations, expressions, scripts. + +10 +00:00:48,000 --> 00:00:51,000 +That's action, text and expression, language. + +11 +00:00:52,000 --> 00:00:55,000 +You can find all source code examples in attachments. + +12 +00:00:55,000 --> 00:00:58,000 +This lesson let's set our lesson. + +13 +00:00:58,000 --> 00:01:01,000 +And as I promised you, no more talks. + +14 +00:01:01,000 --> 00:01:05,000 +Let me start screen share and straight away and jump to practical examples. + +15 +00:01:06,000 --> 00:01:08,000 +Let's create our first GCP page. + +16 +00:01:09,000 --> 00:01:17,000 +We'll put our new GCP file into the root of our web resources to create GCP page, make mouse right. + +17 +00:01:17,000 --> 00:01:21,000 +Click, Select New and select GCP. + +18 +00:01:22,000 --> 00:01:25,000 +Let's call our new file speed demo. + +19 +00:01:26,000 --> 00:01:30,000 +Usually this is enough and you can click Finish Button to create a new file. + +20 +00:01:31,000 --> 00:01:35,000 +But just out of curiosity, let's click on the next button. + +21 +00:01:36,000 --> 00:01:40,000 +Here you can select one out of many GSP file templates. + +22 +00:01:40,000 --> 00:01:43,000 +I don't use neither of these options. + +23 +00:01:43,000 --> 00:01:47,000 +I prefer to build GCP file according my needs by myself. + +24 +00:01:48,000 --> 00:01:54,000 +That's why let's select the default templates suggested to me and click Finish Button. + +25 +00:01:55,000 --> 00:02:02,000 +As you can see, new file was a GCP extension was created in my laptop folder by default. + +26 +00:02:02,000 --> 00:02:10,000 +I have only one page narrative here declared on top of the file and from previous lesson you already + +27 +00:02:10,000 --> 00:02:14,000 +know that there are three types of GCP directives. + +28 +00:02:14,000 --> 00:02:15,000 +Let's check yourself. + +29 +00:02:16,000 --> 00:02:17,000 +What are they? + +30 +00:02:18,000 --> 00:02:21,000 +Zap Beach Include and Target. + +31 +00:02:22,000 --> 00:02:29,000 +And on the screen you can see a form of after the directive itself with our to use was values. + +32 +00:02:30,000 --> 00:02:32,000 +We can change it if we need. + +33 +00:02:33,000 --> 00:02:40,000 +Also, you can use auto completion to offer clips we can control and space together and use attributes + +34 +00:02:40,000 --> 00:02:42,000 +from the auto suggestions list. + +35 +00:02:42,000 --> 00:02:49,000 +On the rest of the page, the plain H2 email list will read and learned in previous lessons before this + +36 +00:02:49,000 --> 00:02:51,000 +lesson, especially for my students. + +37 +00:02:52,000 --> 00:02:56,000 +I prepared examples that I'd like to go through with you. + +38 +00:02:56,000 --> 00:03:01,000 +So let me paste my examples here in order to save time during the video recording. + +39 +00:03:02,000 --> 00:03:05,000 +Now we are ready to go over all examples here. + +40 +00:03:06,000 --> 00:03:08,000 +The first example is example of comments. + +41 +00:03:09,000 --> 00:03:18,000 +In GCP we can use HTML comments and GCP comments, so feel free to use any syntax you like the most + +42 +00:03:18,000 --> 00:03:21,000 +in order to leave some comments in your code if needed. + +43 +00:03:22,000 --> 00:03:26,000 +The next example here is example of the GCP declaration. + +44 +00:03:27,000 --> 00:03:34,000 +What declare variable ten means value and also what declare a mass that takes in the parameter and increase + +45 +00:03:34,000 --> 00:03:35,000 +it by ten. + +46 +00:03:36,000 --> 00:03:42,000 +Basically, we can put here any code that will be placed outside of the GCP service method during the + +47 +00:03:42,000 --> 00:03:44,000 +translation phase. + +48 +00:03:45,000 --> 00:03:48,000 +Pay attention to make sure that the second message will work. + +49 +00:03:49,000 --> 00:03:52,000 +I need to add import statement in the directives. + +50 +00:03:52,000 --> 00:03:58,000 +In my second message, I use our race class to get student representation of an array. + +51 +00:03:58,000 --> 00:04:02,000 +You already know Java and you have to understand how it works. + +52 +00:04:03,000 --> 00:04:12,000 +I have to use a full class name here and in Java to arrays or I have to add income statement, import + +53 +00:04:12,000 --> 00:04:17,000 +statement that can be added using page directive and here you can see it on top. + +54 +00:04:18,000 --> 00:04:23,000 +Now we are sure that this code will be compiled and will be executed as expected. + +55 +00:04:24,000 --> 00:04:27,000 +So you can see the drawback of using declarations. + +56 +00:04:27,000 --> 00:04:31,000 +How you can test this code results running on the G space. + +57 +00:04:31,000 --> 00:04:34,000 +How you can track any changes done in this code. + +58 +00:04:34,000 --> 00:04:38,000 +And be sure that changes made will not affect business logic. + +59 +00:04:39,000 --> 00:04:41,000 +There are no clear answers to this question. + +60 +00:04:42,000 --> 00:04:47,000 +Using declarations in the GCP page is one of the signs of good design. + +61 +00:04:48,000 --> 00:04:49,000 +And I teach. + +62 +00:04:49,000 --> 00:04:54,000 +How did enterprises and why is this is considered to be as bad practice? + +63 +00:04:54,000 --> 00:04:56,000 +So never do like this. + +64 +00:04:57,000 --> 00:05:03,000 +The next thing that I'd like to tell you is expressions as you remember from the previous lesson. + +65 +00:05:03,000 --> 00:05:07,000 +Expressions print is a result of expressions into the response body. + +66 +00:05:08,000 --> 00:05:16,000 +In the example, I invoke masses that we have just declared inside declarations and I expect that the + +67 +00:05:16,000 --> 00:05:20,000 +results of the masses will be printed directly in the response money. + +68 +00:05:21,000 --> 00:05:25,000 +Let's look in the browser how the expressions world will look like. + +69 +00:05:26,000 --> 00:05:33,000 +As you can see, I already have a web server up and running and pay attention to this fact because this + +70 +00:05:33,000 --> 00:05:37,000 +is important without having a web server up and running. + +71 +00:05:37,000 --> 00:05:45,000 +You won't be able to enjoy all the power of the GCP because you already know the GCP lifecycle and you + +72 +00:05:45,000 --> 00:05:53,000 +understand how GCP files are different from H.M. and it is not enough to open GCP file directly and + +73 +00:05:53,000 --> 00:06:01,000 +the browser GCP should be translated, compiled, instantiated, initialized, and after that GCP service + +74 +00:06:01,000 --> 00:06:06,000 +message should process our request and you can see the results of the masses. + +75 +00:06:06,000 --> 00:06:14,000 +Invocations is a response, but in the first example we want to increase warning by ten and we receive + +76 +00:06:14,000 --> 00:06:14,000 +30. + +77 +00:06:15,000 --> 00:06:18,000 +And in the second example we want to create string array. + +78 +00:06:18,000 --> 00:06:22,000 +So as you can see, everything works as expected. + +79 +00:06:23,000 --> 00:06:27,000 +Let's get back to the eclipse and look at the examples. + +80 +00:06:27,000 --> 00:06:34,000 +So far we learned how to use directives, declarations and expressions into GCP. + +81 +00:06:34,000 --> 00:06:36,000 +Let's look at the script. + +82 +00:06:36,000 --> 00:06:40,000 +Let's examples similar to declarations and expressions. + +83 +00:06:40,000 --> 00:06:42,000 +It is not recommended to use script. + +84 +00:06:42,000 --> 00:06:47,000 +Let's but still in some old project you can find them. + +85 +00:06:48,000 --> 00:06:53,000 +Once you find them, it is recommended to make the refactor to get rid of them. + +86 +00:06:53,000 --> 00:07:01,000 +In this lesson, basically we know what scripts are and how to use them and in the following lessons + +87 +00:07:01,000 --> 00:07:03,000 +we are going to know how to use. + +88 +00:07:03,000 --> 00:07:10,000 +G is still g is still supposed to help us to substitute to use enough street screengrabs at least some + +89 +00:07:10,000 --> 00:07:11,000 +degree. + +90 +00:07:11,000 --> 00:07:14,000 +We're going to discuss this in the following lesson. + +91 +00:07:14,000 --> 00:07:16,000 +First of all, I have to admit that. + +92 +00:07:17,000 --> 00:07:20,000 +Using a street less usually chance is a nightmare. + +93 +00:07:21,000 --> 00:07:22,000 +But it is what it is. + +94 +00:07:23,000 --> 00:07:28,000 +You have to see it with your own eyes at least once in your life to never use it in the future. + +95 +00:07:29,000 --> 00:07:31,000 +Imagine that we have the following task. + +96 +00:07:32,000 --> 00:07:38,000 +We have a list of users of our application, let's say list of customers of our online shop. + +97 +00:07:39,000 --> 00:07:45,000 +And we need to bring the main information about our customers in the table on the admin panel. + +98 +00:07:46,000 --> 00:07:52,000 +Main information includes in the system first name, last name and email. + +99 +00:07:53,000 --> 00:07:54,000 +What shall we do? + +100 +00:07:55,000 --> 00:08:02,000 +First of all, we need to extract information about users from the persistent storage, from our database. + +101 +00:08:02,000 --> 00:08:08,000 +After that, we need to display this information on the phone, then how we can do this. + +102 +00:08:08,000 --> 00:08:14,000 +First of all, we send a request to speed them a server specially for this lesson. + +103 +00:08:15,000 --> 00:08:18,000 +I create a demo, so let let me show it to you. + +104 +00:08:18,000 --> 00:08:26,000 +It is located in the server lets package and it is called GCP Demo Silva and this so that I implement + +105 +00:08:26,000 --> 00:08:28,000 +do get message. + +106 +00:08:28,000 --> 00:08:34,000 +So understand this example it is important you what is the solution of the home task about? + +107 +00:08:34,000 --> 00:08:37,000 +So let's insert homework review. + +108 +00:08:37,000 --> 00:08:43,000 +I explained using all of the facade object here and why we need it. + +109 +00:08:43,000 --> 00:08:48,000 +My facade object has massive to extract all users from the database. + +110 +00:08:49,000 --> 00:08:54,000 +Don't worry, you will be able also to expose this code on your local computer. + +111 +00:08:55,000 --> 00:08:59,000 +Feel free to find a reference to the source code in attachments to this lesson. + +112 +00:09:00,000 --> 00:09:08,000 +Once I extracted all the users from the database, I set them as attribute requests and the request + +113 +00:09:08,000 --> 00:09:10,000 +is forwarded to the GCP resource. + +114 +00:09:11,000 --> 00:09:14,000 +Let's now navigate back again to the GCP file. + +115 +00:09:14,000 --> 00:09:23,000 +Here you can see each statement is a script that I check was a user's attribute in request is not equal + +116 +00:09:23,000 --> 00:09:23,000 +to no. + +117 +00:09:24,000 --> 00:09:26,000 +And if not, then we print. + +118 +00:09:26,000 --> 00:09:33,000 +They both tagged in the next script that we extract users attribute from the request and create for + +119 +00:09:33,000 --> 00:09:36,000 +each look on each iteration of the loop. + +120 +00:09:37,000 --> 00:09:44,000 +We create table row and in each call we use expressions to print out use of each user object. + +121 +00:09:45,000 --> 00:09:49,000 +And after that we use one more script left to close races. + +122 +00:09:50,000 --> 00:09:55,000 +Also, please do not forget to add all required import statements into the file. + +123 +00:09:55,000 --> 00:10:01,000 +I need to import list, type and user time because I use them in script less. + +124 +00:10:02,000 --> 00:10:04,000 +Otherwise it will be a compilation error. + +125 +00:10:05,000 --> 00:10:10,000 +And though just look at all this is it's readable, I believe. + +126 +00:10:10,000 --> 00:10:11,000 +No. + +127 +00:10:11,000 --> 00:10:13,000 +Is it scannable also? + +128 +00:10:13,000 --> 00:10:14,000 +No. + +129 +00:10:14,000 --> 00:10:15,000 +Does it work? + +130 +00:10:15,000 --> 00:10:17,000 +Yes, it works. + +131 +00:10:17,000 --> 00:10:18,000 +Let me show it to you. + +132 +00:10:19,000 --> 00:10:21,000 +I open the browser one more time. + +133 +00:10:21,000 --> 00:10:23,000 +Pay attention to this time. + +134 +00:10:23,000 --> 00:10:30,000 +I need to send a request not as a GCP page, but there's a similar app that will forward my request + +135 +00:10:30,000 --> 00:10:31,000 +to the GCP resource. + +136 +00:10:32,000 --> 00:10:35,000 +After all of this will be added to the request. + +137 +00:10:35,000 --> 00:10:36,000 +Is it clear? + +138 +00:10:37,000 --> 00:10:44,000 +Because if I send a request directly to the GCP page, no attributes I extracted from the database. + +139 +00:10:44,000 --> 00:10:51,000 +That's why I need to change your ID to make sure that my request will hit GCP demo so well. + +140 +00:10:52,000 --> 00:10:54,000 +And now we can see a table of my users. + +141 +00:10:55,000 --> 00:10:59,000 +This is data from the persistent storage, from the database. + +142 +00:11:00,000 --> 00:11:00,000 +Can you see? + +143 +00:11:01,000 --> 00:11:05,000 +This proves that this not readable sync made of script. + +144 +00:11:05,000 --> 00:11:07,000 +That's an expressions works. + +145 +00:11:08,000 --> 00:11:09,000 +Just remember this example. + +146 +00:11:10,000 --> 00:11:16,000 +In the next lesson, I'm going to show you incredibly elegant solution of the same task with the help + +147 +00:11:16,000 --> 00:11:17,000 +of the Giusto. + +148 +00:11:18,000 --> 00:11:21,000 +But at least now you can understand how script. + +149 +00:11:21,000 --> 00:11:25,000 +Let's look how they look like and why it is not recommended to use them. + +150 +00:11:26,000 --> 00:11:33,000 +And in case you have questions, please do not hesitate to ask them below this video and I will be happy + +151 +00:11:33,000 --> 00:11:33,000 +to answer those. + +152 +00:11:34,000 --> 00:11:38,000 +Let me show how Action Tech looks like in this demo. + +153 +00:11:38,000 --> 00:11:42,000 +I'm going to show you how to use GCP include action path. + +154 +00:11:43,000 --> 00:11:53,000 +Basically every single here you just write GCP include and is a page parameter you can pass as a relative + +155 +00:11:53,000 --> 00:11:54,000 +pass to speak. + +156 +00:11:55,000 --> 00:11:56,000 +That's it. + +157 +00:11:56,000 --> 00:12:04,000 +In this particular case I passed as a reference to another GCP file example lets you open the file with + +158 +00:12:04,000 --> 00:12:07,000 +the name GCP includes demo GCP. + +159 +00:12:08,000 --> 00:12:13,000 +As you can see, it doesn't have regular HTML structures that we used to have. + +160 +00:12:13,000 --> 00:12:14,000 +I did this on purpose. + +161 +00:12:15,000 --> 00:12:16,000 +Just in this case. + +162 +00:12:16,000 --> 00:12:25,000 +The page will be built into another page, so I don't need to have hat and body tax one more time. + +163 +00:12:25,000 --> 00:12:31,000 +I just need to have some piece of the markup that can be built into another file. + +164 +00:12:32,000 --> 00:12:36,000 +In this file, we have the heading suite element with this text. + +165 +00:12:36,000 --> 00:12:44,000 +Let's take a look inside of that browser and see you can see a few tips for the elements in Chrome dev + +166 +00:12:44,000 --> 00:12:45,000 +tools. + +167 +00:12:45,000 --> 00:12:50,000 +We are going to find that element is just inserted into the HTML page. + +168 +00:12:51,000 --> 00:12:54,000 +That's how GCP includes action that looks like. + +169 +00:12:55,000 --> 00:13:01,000 +And the last but not least see that I'd like the demo in this lesson is expression language as you remember + +170 +00:13:02,000 --> 00:13:05,000 +expression, language, specific syntax. + +171 +00:13:05,000 --> 00:13:12,000 +We use dollar sign and cherry braces inside curly braces we can use expression language. + +172 +00:13:13,000 --> 00:13:16,000 +Let me show you was a help a few examples. + +173 +00:13:16,000 --> 00:13:20,000 +First example here is a demo of simple operations. + +174 +00:13:21,000 --> 00:13:26,000 +The result of the expression will be evaluated and created in the response body. + +175 +00:13:27,000 --> 00:13:33,000 +In this particular example, we may condition and we want to see the result is a response demo. + +176 +00:13:34,000 --> 00:13:36,000 +Let's check the result of addition and subrosa. + +177 +00:13:37,000 --> 00:13:41,000 +And as you can see, so E plus five equals eight. + +178 +00:13:42,000 --> 00:13:43,000 +Everson works here. + +179 +00:13:43,000 --> 00:13:44,000 +Amazing. + +180 +00:13:45,000 --> 00:13:52,000 +Now let me show you how we can extract value from the request scope ever since. + +181 +00:13:52,000 --> 00:13:52,000 +Simple here. + +182 +00:13:53,000 --> 00:14:03,000 +First of all, let me show you that we add a few more to this request inside our so we added hello attribute + +183 +00:14:03,000 --> 00:14:11,000 +was some tasks also was set one more achieve this is called user was the first user from the user list. + +184 +00:14:12,000 --> 00:14:15,000 +After that we forward the request to the GCP resource. + +185 +00:14:16,000 --> 00:14:19,000 +Now let's get back to the GCP page and look at it. + +186 +00:14:20,000 --> 00:14:24,000 +You can extract property from the request, scope or session scope. + +187 +00:14:24,000 --> 00:14:30,000 +For example, using the implicit objects is that we can use an expression, language, the least of + +188 +00:14:30,000 --> 00:14:37,000 +all possible implicit objects that we can use and expression language were used in the previous lesson. + +189 +00:14:38,000 --> 00:14:44,000 +The interesting thing here is that you can automate request, scope or session scope, and instead of + +190 +00:14:44,000 --> 00:14:46,000 +writing the request scope. + +191 +00:14:46,000 --> 00:14:47,000 +DART Hello. + +192 +00:14:47,000 --> 00:14:54,000 +And just to remind you that hello is just in that name, instead of all this we can use just name of + +193 +00:14:54,000 --> 00:14:55,000 +the property. + +194 +00:14:55,000 --> 00:14:57,000 +It will work in both cases. + +195 +00:14:57,000 --> 00:15:04,000 +You can chat with me, opens a web browser and here you can see the same message extracted. + +196 +00:15:05,000 --> 00:15:10,000 +With the help of some place object and just by using attribute name. + +197 +00:15:11,000 --> 00:15:16,000 +The next example analogy epidermal file is a demo of usage of reserved keywords. + +198 +00:15:17,000 --> 00:15:22,000 +From the previous lesson, you already know that there are different keywords reserved in expression, + +199 +00:15:22,000 --> 00:15:26,000 +language and can be used to form an expression. + +200 +00:15:26,000 --> 00:15:33,000 +In this particular example, I want to use empty keywords in order to check whether users collection + +201 +00:15:33,000 --> 00:15:34,000 +is empty or not. + +202 +00:15:35,000 --> 00:15:39,000 +In case I want to check that Caesar's collection is not empty. + +203 +00:15:39,000 --> 00:15:48,000 +I can add another Q or two before empty, and I have not empty user expressions here, even without + +204 +00:15:48,000 --> 00:15:51,000 +knowledge of any programming, language and operators. + +205 +00:15:51,000 --> 00:15:56,000 +It is crystal clear what is verified in this expression, isn't it? + +206 +00:15:57,000 --> 00:16:01,000 +This is one of the benefits of using Cuba as an expression language. + +207 +00:16:02,000 --> 00:16:07,000 +Let's get back to CNN.com browser and explore the results of expression. + +208 +00:16:08,000 --> 00:16:11,000 +And we can see that in the first case, we see false. + +209 +00:16:12,000 --> 00:16:15,000 +That means that users collection is not empty. + +210 +00:16:16,000 --> 00:16:19,000 +In case we ask was a user's collection is not empty. + +211 +00:16:20,000 --> 00:16:24,000 +We receive true because our collection contains users. + +212 +00:16:25,000 --> 00:16:31,000 +Is there simply a hint in case you want a learn more reserved keywords in expression language? + +213 +00:16:32,000 --> 00:16:34,000 +Please refer to the previous lesson. + +214 +00:16:35,000 --> 00:16:39,000 +Also, feel free to ask any questions you have below this video. + +215 +00:16:40,000 --> 00:16:47,000 +Now let's review how we can work with properties of the object inside the expression language and what + +216 +00:16:47,000 --> 00:16:48,000 +rules we should follow. + +217 +00:16:49,000 --> 00:16:51,000 +Let's get back to the eclipse. + +218 +00:16:51,000 --> 00:16:52,000 +To use the next example. + +219 +00:16:53,000 --> 00:16:57,000 +If you remember, we put into our request object one more attribute. + +220 +00:16:58,000 --> 00:17:05,000 +I am talking about user attribute use an expression and I can refer not just to the user object itself, + +221 +00:17:06,000 --> 00:17:08,000 +but also to its properties. + +222 +00:17:08,000 --> 00:17:09,000 +How? + +223 +00:17:09,000 --> 00:17:17,000 +Just by using the, for example, windows that our user attributes should have email to the expression + +224 +00:17:17,000 --> 00:17:22,000 +and we will just start user dot email in order to sync here. + +225 +00:17:22,000 --> 00:17:29,000 +If you want to express properties in this way, you need to make sure that you have got a massive created + +226 +00:17:29,000 --> 00:17:32,000 +for this property and it should be created. + +227 +00:17:32,000 --> 00:17:34,000 +According to the John naming convention. + +228 +00:17:34,000 --> 00:17:38,000 +This means you should have an asset called get email. + +229 +00:17:39,000 --> 00:17:45,000 +What I get is sort of some of the lower keys and the email is stuff from the capital case. + +230 +00:17:45,000 --> 00:17:47,000 +This is important requirement. + +231 +00:17:48,000 --> 00:17:54,000 +Otherwise, in case you wouldn't have proper get a message for the attribute, you would receive compilation + +232 +00:17:54,000 --> 00:17:56,000 +error on the GCP page. + +233 +00:17:56,000 --> 00:18:01,000 +You would see that property email is not readable on type user and that's it. + +234 +00:18:03,000 --> 00:18:06,000 +Take into account we have all necessary those masses created. + +235 +00:18:07,000 --> 00:18:13,000 +Let's check in the web browser how this expression is evolving and Chrome browser. + +236 +00:18:13,000 --> 00:18:17,000 +You can see that our expression is evaluated as expected. + +237 +00:18:18,000 --> 00:18:19,000 +Now we can see the image of the user. + +238 +00:18:20,000 --> 00:18:23,000 +That's all what I wanted to share with you today in our lesson. + +239 +00:18:24,000 --> 00:18:26,000 +Let's recap what we have learned today. + +240 +00:18:27,000 --> 00:18:30,000 +Today with lessons full of practical examples. + +241 +00:18:31,000 --> 00:18:34,000 +Most of the same seminars improve this lesson. + +242 +00:18:34,000 --> 00:18:39,000 +But you can be sure you know something until you try it on practice. + +243 +00:18:40,000 --> 00:18:43,000 +We created our first GCP page on Praxis. + +244 +00:18:43,000 --> 00:18:54,000 +We saw how we can use GCP elements to build GCP page, namely used GCP, common GCP Directives, Declarations, + +245 +00:18:54,000 --> 00:18:54,000 +Expressions. + +246 +00:18:54,000 --> 00:18:58,000 +Scrip class action packs and expression. + +247 +00:18:58,000 --> 00:18:59,000 +Language Examples. + +248 +00:19:00,000 --> 00:19:01,000 +That's all for this lesson. + +249 +00:19:01,000 --> 00:19:03,000 +Thank you all for your attention. + +250 +00:19:03,000 --> 00:19:05,000 +Have a great day and see you. + +251 +00:19:05,000 --> 00:19:06,000 +Next lesson. + diff --git a/68 - JSP/002 JSP-demo-file.url b/68 - JSP/002 JSP-demo-file.url new file mode 100644 index 0000000000000000000000000000000000000000..aa33c91c653ad238f99c7bba5ff00ccdeba0c5d1 --- /dev/null +++ b/68 - JSP/002 JSP-demo-file.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/jsp-demo.jsp \ No newline at end of file diff --git a/68 - JSP/002 Servlet-source-code-from-the-lesson.url b/68 - JSP/002 Servlet-source-code-from-the-lesson.url new file mode 100644 index 0000000000000000000000000000000000000000..c475be4f2ef8b2612263dd17c3715bdcdfdaf7bb --- /dev/null +++ b/68 - JSP/002 Servlet-source-code-from-the-lesson.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/servlets/JspDemoServlet.java \ No newline at end of file diff --git a/68 - JSP/003 JSTL Part 1_en.srt b/68 - JSP/003 JSTL Part 1_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..e47c29bc166be96abd2f42fe77f424d6882c2cff --- /dev/null +++ b/68 - JSP/003 JSTL Part 1_en.srt @@ -0,0 +1,860 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello, team. + +2 +00:00:07,000 --> 00:00:13,000 +In this lesson, we're going to learn what GSL is and review practical examples to learn how we can + +3 +00:00:13,000 --> 00:00:16,000 +use G cell tags in our application. + +4 +00:00:17,000 --> 00:00:22,000 +We'll start our lesson from learning what GSL is and why we need it. + +5 +00:00:22,000 --> 00:00:26,000 +I'm going to explain advantages and disadvantages of GSL. + +6 +00:00:27,000 --> 00:00:32,000 +After that, we'll go deep in learning different groups of GSL attacks. + +7 +00:00:32,000 --> 00:00:40,000 +Zia cortex for modern tasks, still functions, sequel tags and x small packs. + +8 +00:00:41,000 --> 00:00:43,000 +Together, we'll configure GSL in our project. + +9 +00:00:44,000 --> 00:00:50,000 +After reviewing all practical examples that I prepared for you, you will become a true professional + +10 +00:00:50,000 --> 00:00:52,000 +in just now, I promise you. + +11 +00:00:53,000 --> 00:00:55,000 +So let's not waste our time. + +12 +00:00:56,000 --> 00:00:57,000 +Let's start our lesson. + +13 +00:00:58,000 --> 00:01:01,000 +Let's understand first what GSL is. + +14 +00:01:02,000 --> 00:01:05,000 +Just two stands for Java Standard Stack Library. + +15 +00:01:06,000 --> 00:01:13,000 +It is also maybe known as GCP Standard Pick Library or Jakarta Standard Tech Library. + +16 +00:01:14,000 --> 00:01:17,000 +All these names describe the same thing. + +17 +00:01:18,000 --> 00:01:25,000 +G Sale is a collection of useful GCP dogs, which encapsulates the core functionality common to meninges + +18 +00:01:25,000 --> 00:01:26,000 +applications. + +19 +00:01:27,000 --> 00:01:33,000 +G has support for common structural tasks such as iteration and conditionals. + +20 +00:01:34,000 --> 00:01:41,000 +Thanks for manipulating SML documents, internationalization tags and school tax lets you use a key + +21 +00:01:41,000 --> 00:01:44,000 +advantage of the still packs of a script. + +22 +00:01:44,000 --> 00:01:47,000 +That's expressions and declarations since a GCP. + +23 +00:01:48,000 --> 00:01:52,000 +First of all, still talks are more readable. + +24 +00:01:52,000 --> 00:01:55,000 +I hope you watched the previous lesson. + +25 +00:01:55,000 --> 00:01:56,000 +An example was script class. + +26 +00:01:57,000 --> 00:01:58,000 +I see you would agree with me. + +27 +00:01:58,000 --> 00:02:00,000 +So that example was Greek. + +28 +00:02:00,000 --> 00:02:02,000 +Let's wasn't straightforward and clear. + +29 +00:02:03,000 --> 00:02:08,000 +I believe each developer should investigate very attentively code with script. + +30 +00:02:08,000 --> 00:02:11,000 +That's to make sure that nothing important was missed. + +31 +00:02:12,000 --> 00:02:19,000 +On the other hand, just to brings more the devil team to our code and this is a very important one. + +32 +00:02:19,000 --> 00:02:25,000 +We develop enterprise applications that are going to be supported and scaled for many years. + +33 +00:02:26,000 --> 00:02:29,000 +The second advantage is a stealth tax, a reusable. + +34 +00:02:30,000 --> 00:02:33,000 +You could compare yourself tax with scrip less. + +35 +00:02:33,000 --> 00:02:40,000 +It is clear across the screen plans should be written manually and we should create scrip lets each + +36 +00:02:40,000 --> 00:02:40,000 +time. + +37 +00:02:40,000 --> 00:02:47,000 +We need to add some logic and be very attentive to make sure that page will be compiled and we don't + +38 +00:02:47,000 --> 00:02:51,000 +accidentally assume a column basis to close the book. + +39 +00:02:52,000 --> 00:02:58,000 +On the other hand, sales tax is something which can be reused over and over again. + +40 +00:02:58,000 --> 00:03:06,000 +There is a quote algorithm that may stand behind each tack and you don't need to think about how to + +41 +00:03:06,000 --> 00:03:08,000 +implement that each time from scratch. + +42 +00:03:09,000 --> 00:03:10,000 +You already have that. + +43 +00:03:10,000 --> 00:03:15,000 +That has clear API and can be used multiple times in similar cases. + +44 +00:03:16,000 --> 00:03:17,000 +No need to test. + +45 +00:03:17,000 --> 00:03:23,000 +You still can just be scripts that can be tested with unit tests, for example. + +46 +00:03:24,000 --> 00:03:25,000 +Those await the test script. + +47 +00:03:25,000 --> 00:03:33,000 +Less is to implement your eye test and verify how presentation is changed based on the different conditions. + +48 +00:03:34,000 --> 00:03:37,000 +But since a different was GST tax. + +49 +00:03:37,000 --> 00:03:39,000 +You don't need to test them. + +50 +00:03:39,000 --> 00:03:43,000 +They already work as expected and this is guarantee. + +51 +00:03:44,000 --> 00:03:52,000 +So using Gestalt that we can be sure that the behavior of the G cell tax will be as it is specified + +52 +00:03:52,000 --> 00:03:53,000 +in the documentation. + +53 +00:03:54,000 --> 00:03:56,000 +GSL can substitute script. + +54 +00:03:56,000 --> 00:03:58,000 +That's in some cases, yes. + +55 +00:03:58,000 --> 00:04:01,000 +This is also the advantage of the sales tax. + +56 +00:04:02,000 --> 00:04:06,000 +Definitely not in all cases, just sales tax. + +57 +00:04:06,000 --> 00:04:07,000 +Conservative is correct. + +58 +00:04:07,000 --> 00:04:09,000 +Let's look a script. + +59 +00:04:09,000 --> 00:04:12,000 +Let's allow us to describe a range of a code. + +60 +00:04:12,000 --> 00:04:17,000 +But still tax covers the most popular operations and algorithms. + +61 +00:04:17,000 --> 00:04:21,000 +Let's sue for the cases that can be covered by just. + +62 +00:04:21,000 --> 00:04:25,000 +Still, it is recommended to create custom tax. + +63 +00:04:25,000 --> 00:04:30,000 +Make sure that this property and use custom tax instead of script. + +64 +00:04:30,000 --> 00:04:33,000 +That's how to create and how to use custom tax. + +65 +00:04:33,000 --> 00:04:35,000 +We're going to love these. + +66 +00:04:35,000 --> 00:04:35,000 +A separate lesson. + +67 +00:04:36,000 --> 00:04:38,000 +That's no disadvantage or subsidy. + +68 +00:04:38,000 --> 00:04:46,000 +You still do still is not so flexible, as scrupulous as we already discuss with squeak less. + +69 +00:04:46,000 --> 00:04:52,000 +You can basically implement any algorithm you need because you write any Java code needed. + +70 +00:04:53,000 --> 00:04:58,000 +Do you still has this amount of text length its number of operations? + +71 +00:04:59,000 --> 00:05:00,000 +Request. + +72 +00:05:00,000 --> 00:05:00,000 +Not enough tax. + +73 +00:05:01,000 --> 00:05:04,000 +Probably the biggest disadvantage. + +74 +00:05:04,000 --> 00:05:09,000 +But still imagine you're a Java developer who never worked was due still times before. + +75 +00:05:10,000 --> 00:05:14,000 +You know you have a syntax and you know how to solve your task was java code. + +76 +00:05:15,000 --> 00:05:23,000 +So why don't you just use quick to do the things that you have to do and skip a step whereas you know + +77 +00:05:23,000 --> 00:05:24,000 +you still tax. + +78 +00:05:25,000 --> 00:05:28,000 +From this point of view, learning of do you still tax me? + +79 +00:05:28,000 --> 00:05:30,000 +Sounds like it's disadvantage. + +80 +00:05:31,000 --> 00:05:36,000 +But if you would accept and understand all of the advantages, is it still tax greatness? + +81 +00:05:37,000 --> 00:05:40,000 +Then you have more motivation to just tell. + +82 +00:05:41,000 --> 00:05:45,000 +So these are the main advantages and disadvantages of the GST. + +83 +00:05:46,000 --> 00:05:47,000 +Let's continue. + +84 +00:05:48,000 --> 00:05:57,000 +While you still tax can be grouped in five different groups to see how course tax for online tax do + +85 +00:05:57,000 --> 00:06:01,000 +still functions school tax and amount tax. + +86 +00:06:02,000 --> 00:06:05,000 +Let's review different groups of tax. + +87 +00:06:06,000 --> 00:06:06,000 +Core. + +88 +00:06:06,000 --> 00:06:15,000 +That's just how core tech library contains stacks for performing basic operations such as printing values, + +89 +00:06:15,000 --> 00:06:21,000 +variables, declaration exception, hand performing durations and declarant conditional statements among + +90 +00:06:21,000 --> 00:06:22,000 +others. + +91 +00:06:23,000 --> 00:06:26,000 +On this slide, you can see the most popular course tax. + +92 +00:06:27,000 --> 00:06:35,000 +If you would ask me what facts are most popular from these ones, I would name said these choose to + +93 +00:06:35,000 --> 00:06:38,000 +be as together was when and otherwise for each. + +94 +00:06:39,000 --> 00:06:40,000 +So they do in the demo. + +95 +00:06:40,000 --> 00:06:43,000 +I'm going to show you examples with Z stats. + +96 +00:06:45,000 --> 00:06:46,000 +Sir Martin. + +97 +00:06:46,000 --> 00:06:46,000 +Thanks. + +98 +00:06:47,000 --> 00:06:56,000 +Do you still for modern talk library provides a convenient way for for Martin text members these times + +99 +00:06:56,000 --> 00:06:58,000 +and other variables for better display. + +100 +00:06:59,000 --> 00:07:06,000 +In my job from zero to first jump course, we also learned localization and internationalization topics. + +101 +00:07:07,000 --> 00:07:13,000 +With the help of full mining tax, you can implement internationalization approach on your presentation + +102 +00:07:13,000 --> 00:07:14,000 +letter of application. + +103 +00:07:15,000 --> 00:07:21,000 +Please feel free to present course on the video player to explore this slide with. + +104 +00:07:21,000 --> 00:07:21,000 +Thanks. + +105 +00:07:22,000 --> 00:07:26,000 +Take your time to read tax reserve descriptions. + +106 +00:07:27,000 --> 00:07:28,000 +The danger is of them. + +107 +00:07:28,000 --> 00:07:32,000 +I also want to share different thoughts on practice. + +108 +00:07:33,000 --> 00:07:38,000 +Once he reviewed the facts on this side, feel free to proceed with the next level. + +109 +00:07:40,000 --> 00:07:41,000 +Do you still functions? + +110 +00:07:42,000 --> 00:07:48,000 +Do you still includes a number of standard functions, most of which are common street manipulation + +111 +00:07:48,000 --> 00:07:49,000 +functions? + +112 +00:07:49,000 --> 00:07:55,000 +As you can see on this slide, the name of functions in most cases are similar to the masses from string + +113 +00:07:55,000 --> 00:07:56,000 +class. + +114 +00:07:57,000 --> 00:08:03,000 +While these functions definitely useful, I wouldn't say that all of them are used as an escort. + +115 +00:08:03,000 --> 00:08:04,000 +For example. + +116 +00:08:05,000 --> 00:08:11,000 +Let's look at this slide in a similar way as the slides or as of course we did. + +117 +00:08:12,000 --> 00:08:14,000 +You shouldn't even remember all of them by heart. + +118 +00:08:15,000 --> 00:08:18,000 +You should just be aware about the presence of these stats. + +119 +00:08:19,000 --> 00:08:23,000 +And once you've finished your meeting, proceed with the next slide. + +120 +00:08:24,000 --> 00:08:33,000 +Sequel Tax Due Sales Sequel Tech Library provides stats for interacting with relational databases about + +121 +00:08:33,000 --> 00:08:40,000 +this group of stacks I want to seize the next thing this great is a juice tale provides us with stacks + +122 +00:08:40,000 --> 00:08:47,000 +to work with the database from the juice page, but I hope you are smart enough to never use these stacks. + +123 +00:08:48,000 --> 00:08:48,000 +Why? + +124 +00:08:49,000 --> 00:08:53,000 +I would say that interaction was a persistence layer from the presentation. + +125 +00:08:53,000 --> 00:08:55,000 +There is not. + +126 +00:08:55,000 --> 00:08:56,000 +Consider that this is best practice. + +127 +00:08:57,000 --> 00:09:03,000 +I can't imagine a case where the logic of the interaction was that database was a presentation. + +128 +00:09:03,000 --> 00:09:09,000 +There definitely learned architecture is not the one portal in the world. + +129 +00:09:10,000 --> 00:09:16,000 +But I would say that basic principles in reference architecture make sense. + +130 +00:09:17,000 --> 00:09:23,000 +So with respect to the separation of concerns between different layers of our application, I don't + +131 +00:09:23,000 --> 00:09:26,000 +recommend it to use SQL do so. + +132 +00:09:26,000 --> 00:09:32,000 +Thanks, but definitely let's none of these what options that we have with SQL tax. + +133 +00:09:33,000 --> 00:09:37,000 +Once you look through the slide, feel free to proceed with the next one. + +134 +00:09:38,000 --> 00:09:46,000 +ExxonMobil tax due is still ExxonMobil tax provides a speed centric way of creating and manipulating + +135 +00:09:46,000 --> 00:09:47,000 +the excellent documents. + +136 +00:09:48,000 --> 00:09:54,000 +G Cell Excellent Title Library provides convenient ways for interaction with XML data. + +137 +00:09:55,000 --> 00:09:56,000 +Who is engaging speech? + +138 +00:09:57,000 --> 00:10:03,000 +Deduce XML to collaborate has custom tax for interacting with XML data. + +139 +00:10:04,000 --> 00:10:13,000 +This includes courses that Excel transforms XML data in the flow control based on the X plus expressions. + +140 +00:10:14,000 --> 00:10:21,000 +And again, definitely this is a great feature of the still and it is great to have opportunity to work + +141 +00:10:21,000 --> 00:10:26,000 +with Exmouth on the GSP, but probably that's not how you will work was excellent. + +142 +00:10:26,000 --> 00:10:32,000 +Most of the times it is very unlikely that you work with X amount of people. + +143 +00:10:32,000 --> 00:10:37,000 +Very often that's all groups of G sales tax. + +144 +00:10:38,000 --> 00:10:40,000 +So we learned enough. + +145 +00:10:40,000 --> 00:10:40,000 +Syria about you. + +146 +00:10:40,000 --> 00:10:41,000 +So thanks. + +147 +00:10:42,000 --> 00:10:47,000 +It is time to have a live demo to see how we can use this to tax and practice. + +148 +00:10:48,000 --> 00:10:52,000 +We've used all groups of G still tats and there's a slide. + +149 +00:10:52,000 --> 00:10:56,000 +I tried to summarize all possible sales tax. + +150 +00:10:57,000 --> 00:11:04,000 +I believe that there is no sense to them on each possible tack as I have them because of a few reasons. + +151 +00:11:05,000 --> 00:11:09,000 +First of all, not all tax I use very often. + +152 +00:11:09,000 --> 00:11:14,000 +Most likely that there are a lot of taxes that you will never use in production. + +153 +00:11:15,000 --> 00:11:22,000 +And the second reason is that from technical side set up and using of different group of tax is similar. + +154 +00:11:23,000 --> 00:11:30,000 +So once we learned how to set up for tax and work with school tax, this become clear for you how to + +155 +00:11:30,000 --> 00:11:32,000 +use OSM tax. + +156 +00:11:33,000 --> 00:11:38,000 +That's why in today's demo we're going to use the most popular use cases of using GST sales. + +157 +00:11:38,000 --> 00:11:39,000 +That's. + +158 +00:11:40,000 --> 00:11:45,000 +Before I start using Gestalt, we have to configure it in our application. + +159 +00:11:46,000 --> 00:11:53,000 +This is a separate library and if you want to use, you still need to include it into our boot. + +160 +00:11:54,000 --> 00:11:56,000 +I already did this before the lesson. + +161 +00:11:57,000 --> 00:12:00,000 +During the course we did the thousands of times already. + +162 +00:12:01,000 --> 00:12:04,000 +And you as a whole course java from zero to first job. + +163 +00:12:04,000 --> 00:12:08,000 +I showed you how to find dependencies of maven repository. + +164 +00:12:09,000 --> 00:12:19,000 +We can also use Google search to find the dependencies that we need, so we need that dependency attention + +165 +00:12:19,000 --> 00:12:20,000 +in this tutorial. + +166 +00:12:20,000 --> 00:12:26,000 +I use Jakarta implementation of GCM because I use Tomcat server version tab. + +167 +00:12:27,000 --> 00:12:34,000 +In case you use Tomcat version low in tab, you need to use a nozzle DSL implementation here. + +168 +00:12:35,000 --> 00:12:40,000 +Once we configure with our dependency, let's look at the source code of our examples. + +169 +00:12:41,000 --> 00:12:45,000 +Before this lesson, I prepared few examples to review with you. + +170 +00:12:45,000 --> 00:12:52,000 +First of all, this is just a demo, so let's look at the similar lesson. + +171 +00:12:52,000 --> 00:13:00,000 +I extract all users from the database, set users as an attribute in my request object, and forwards + +172 +00:13:00,000 --> 00:13:02,000 +the request to the GCP. + +173 +00:13:03,000 --> 00:13:05,000 +I need these users to them. + +174 +00:13:05,000 --> 00:13:09,000 +A similar examples of I'll read them to you in previous lesson request. + +175 +00:13:10,000 --> 00:13:16,000 +But in this lesson, I'm going to show you an elegant solution with the help of GST, so that since + +176 +00:13:16,000 --> 00:13:21,000 +we're getting demos so that now let's open demo files of contents. + +177 +00:13:21,000 --> 00:13:22,000 +Just how. + +178 +00:13:23,000 --> 00:13:26,000 +I also filed was named Damages. + +179 +00:13:27,000 --> 00:13:31,000 +Today, we're going to go over examples from this file again. + +180 +00:13:31,000 --> 00:13:37,000 +So first things that we need to do is to include still library in our speech. + +181 +00:13:37,000 --> 00:13:38,000 +How to do this? + +182 +00:13:39,000 --> 00:13:47,000 +With this tag directive, we use prefix attribute in order to censor graphics that will be used inside + +183 +00:13:47,000 --> 00:13:48,000 +the P file. + +184 +00:13:49,000 --> 00:13:56,000 +It can be different, but there is some conventional naming for prefixes and just usually for course + +185 +00:13:56,000 --> 00:13:57,000 +packs. + +186 +00:13:57,000 --> 00:14:07,000 +We use C for for Martin F T for function percent for sequels we use sequel graphics and for x-mode that + +187 +00:14:07,000 --> 00:14:13,000 +we use X preference on the other right is that assumption would have to be equal. + +188 +00:14:13,000 --> 00:14:23,000 +Exactly these values why it is so important to each group of g still tax has its own tax library descriptors. + +189 +00:14:24,000 --> 00:14:30,000 +That clever descriptor contains definition of all tax inclusions, the reference to the Java classes + +190 +00:14:31,000 --> 00:14:35,000 +that describes the logic of each stack attack library. + +191 +00:14:35,000 --> 00:14:43,000 +This is an excellent document that contains information on the library as a whole and about each stack + +192 +00:14:43,000 --> 00:14:44,000 +contained in the library. + +193 +00:14:45,000 --> 00:14:48,000 +Another to includes that you still stack of specific group. + +194 +00:14:49,000 --> 00:14:51,000 +You have to specify you array of zip. + +195 +00:14:51,000 --> 00:14:54,000 +Exactly just to the library. + +196 +00:14:55,000 --> 00:15:00,000 +If you're interested how talk library looks like, we can check the sources. + +197 +00:15:01,000 --> 00:15:07,000 +Taken into account Maven then loaded all required dependencies we can find in our dependencies. + +198 +00:15:08,000 --> 00:15:10,000 +Just click on the maven dependencies. + +199 +00:15:11,000 --> 00:15:16,000 +After that, click on Jakarta so that GSP is still here. + +200 +00:15:17,000 --> 00:15:25,000 +Expand matter in the recovery and insights method and you will be able to find a lot of different library + +201 +00:15:25,000 --> 00:15:26,000 +descriptors. + +202 +00:15:26,000 --> 00:15:34,000 +For example, let's select C to the Z, the stack library descriptor for our core facts. + +203 +00:15:34,000 --> 00:15:43,000 +And here you can find a uniform or a source identifier that we used in our file is colloquial now and + +204 +00:15:43,000 --> 00:15:47,000 +this the file contains a description of all cortex. + +205 +00:15:48,000 --> 00:15:50,000 +For example, here is a catch stack. + +206 +00:15:51,000 --> 00:15:52,000 +Here is descriptions. + +207 +00:15:52,000 --> 00:15:55,000 +It contains description of its main goal and purpose. + +208 +00:15:56,000 --> 00:16:01,000 +Here's the full name of that class and description of its attributes. + +209 +00:16:02,000 --> 00:16:05,000 +The next stack issues and so on. + +210 +00:16:06,000 --> 00:16:13,000 +If you have time, I would recommend it to looks with you view files of the GST tax we review because + +211 +00:16:13,000 --> 00:16:16,000 +you will be able to find a lot of interesting descriptions. + +212 +00:16:16,000 --> 00:16:18,000 +And then just how bad? + +213 +00:16:19,000 --> 00:16:23,000 +I will not show you positively files, but all of them are here. + +214 +00:16:24,000 --> 00:16:30,000 +You can also see some key sequel, excellent function descriptors. + +215 +00:16:30,000 --> 00:16:34,000 +And now let's get back to the GSP files to review examples. + diff --git a/68 - JSP/003 JSTL-Dependency-to-add-in-Maven.url b/68 - JSP/003 JSTL-Dependency-to-add-in-Maven.url new file mode 100644 index 0000000000000000000000000000000000000000..c5d3582bb437ee817c5188dda2e2975765ec37a3 --- /dev/null +++ b/68 - JSP/003 JSTL-Dependency-to-add-in-Maven.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://mvnrepository.com/artifact/org.glassfish.web/jakarta.servlet.jsp.jstl/2.0.0 \ No newline at end of file diff --git a/68 - JSP/003 Source-code-of-JSP-file-with-the-JSTL-code-examples.url b/68 - JSP/003 Source-code-of-JSP-file-with-the-JSTL-code-examples.url new file mode 100644 index 0000000000000000000000000000000000000000..910bed746bfcab79a3ef6fbc12c5334a535066e9 --- /dev/null +++ b/68 - JSP/003 Source-code-of-JSP-file-with-the-JSTL-code-examples.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/jstl-demo.jsp \ No newline at end of file diff --git a/68 - JSP/003 Source-code-of-Servlet-for-JSTL-Examples.url b/68 - JSP/003 Source-code-of-Servlet-for-JSTL-Examples.url new file mode 100644 index 0000000000000000000000000000000000000000..9a1b9e81449e05315be82c9b8be8598a8766b86a --- /dev/null +++ b/68 - JSP/003 Source-code-of-Servlet-for-JSTL-Examples.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/servlets/JstlDemoServlet.java \ No newline at end of file diff --git a/68 - JSP/004 JSTL Part 2_en.srt b/68 - JSP/004 JSTL Part 2_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..87cc7c3794322408df31d3399676d645645af3f7 --- /dev/null +++ b/68 - JSP/004 JSTL Part 2_en.srt @@ -0,0 +1,1004 @@ +1 +00:00:02,000 --> 00:00:09,000 +So once we configure so that's to be used on this speech, we're going to proceed with using them. + +2 +00:00:10,000 --> 00:00:14,000 +Let me start to review some of the most popular core facts. + +3 +00:00:15,000 --> 00:00:22,000 +As I said, probably this is the most popular group of facts is that you are going to use more often + +4 +00:00:22,000 --> 00:00:23,000 +than others attacks. + +5 +00:00:24,000 --> 00:00:26,000 +Most likely this is true. + +6 +00:00:27,000 --> 00:00:34,000 +The first thing that I am going to demonstrate is a set that yeah, attention to the syntax. + +7 +00:00:34,000 --> 00:00:43,000 +We use graphics first and after that we use that name when we use attack from Attack Library. + +8 +00:00:43,000 --> 00:00:47,000 +Then use graphics defined for attacks. + +9 +00:00:47,000 --> 00:00:57,000 +In our case, this is C similar to all other attacks that should be closed set that allows us to set + +10 +00:00:57,000 --> 00:00:59,000 +variable within the defined scope. + +11 +00:01:00,000 --> 00:01:08,000 +Scope can be a a page or request or session or application depending on the scope defined here. + +12 +00:01:08,000 --> 00:01:13,000 +Potentially, you can access the variable from different places in your program. + +13 +00:01:14,000 --> 00:01:17,000 +For the sake of a demo, let's keep request scope. + +14 +00:01:18,000 --> 00:01:23,000 +The value of my test variable is equal to 100 ZC. + +15 +00:01:24,000 --> 00:01:32,000 +The next popular callback is if that it is and another of the statements in Java. + +16 +00:01:32,000 --> 00:01:41,000 +So instead of writing script, that was if we can just use the stack, if stack has test attribute, + +17 +00:01:41,000 --> 00:01:44,000 +it basically evaluates some test condition. + +18 +00:01:45,000 --> 00:01:47,000 +We can use expression language to evaluate condition. + +19 +00:01:48,000 --> 00:01:50,000 +Well, you can see grid test the variable. + +20 +00:01:51,000 --> 00:01:59,000 +Let's make sure that our test variable is greater than five in case results of expression will be true. + +21 +00:01:59,000 --> 00:02:01,000 +Will enter this graph. + +22 +00:02:02,000 --> 00:02:07,000 +Let me open the browser to make sure that this statement works as expected. + +23 +00:02:08,000 --> 00:02:15,000 +I send a request to my SO that I show you and you can see that there is a paragraph printed. + +24 +00:02:15,000 --> 00:02:21,000 +This confirms that our expression or account drew and we created this paragraph. + +25 +00:02:22,000 --> 00:02:29,000 +Let's get back to tweets and reviews for an example there remember example was users and scriptures + +26 +00:02:29,000 --> 00:02:30,000 +from previous lesson. + +27 +00:02:31,000 --> 00:02:35,000 +In short, we need to please a table with all our users. + +28 +00:02:36,000 --> 00:02:40,000 +I'm going to show how reason solves this task with the help of how. + +29 +00:02:41,000 --> 00:02:52,000 +First of all we check was a user's attendance present is a request so we can use that for this in case + +30 +00:02:52,000 --> 00:03:02,000 +users owns a page with red table tag and after that we use it for each tag that there is a syntax for + +31 +00:03:02,000 --> 00:03:06,000 +each stack has such attributes, items and var. + +32 +00:03:07,000 --> 00:03:10,000 +We have to pass collection to the items. + +33 +00:03:10,000 --> 00:03:13,000 +We have to give a variable to save or to do. + +34 +00:03:14,000 --> 00:03:23,000 +We'll use variable name on each iteration to refer to each element in our collection using expression, + +35 +00:03:23,000 --> 00:03:26,000 +which we extract the user properties that we need. + +36 +00:03:27,000 --> 00:03:28,000 +And that's it. + +37 +00:03:29,000 --> 00:03:34,000 +This solution is more readable and reliable than the solution or the script. + +38 +00:03:34,000 --> 00:03:36,000 +That's if we want to compare. + +39 +00:03:37,000 --> 00:03:41,000 +Then I can open example from previous lessons and use demo file. + +40 +00:03:42,000 --> 00:03:48,000 +Do remember how attentive we're about to put all necessary braces and sinks like this. + +41 +00:03:49,000 --> 00:03:54,000 +I believe you can understand why you still solution is better for solving this stuff. + +42 +00:03:55,000 --> 00:03:56,000 +It is more readable. + +43 +00:03:56,000 --> 00:04:00,000 +It works as expected and it is already tested. + +44 +00:04:00,000 --> 00:04:04,000 +It is reliable, it is shorter and loops better. + +45 +00:04:05,000 --> 00:04:06,000 +Would you agree with me? + +46 +00:04:06,000 --> 00:04:08,000 +Let me show is this table is a browser. + +47 +00:04:09,000 --> 00:04:17,000 +So as you can see, the output table looks similar to the table from previous lesson that proves that + +48 +00:04:17,000 --> 00:04:20,000 +you still tax work as expected. + +49 +00:04:21,000 --> 00:04:23,000 +Let's continue and you're using that stack. + +50 +00:04:24,000 --> 00:04:31,000 +Remember that as the beginning of the lesson we declared a variable we're set that let's now we're moving + +51 +00:04:32,000 --> 00:04:40,000 +for such purposes we have removed them and to prove that the variable doesn't exist anymore, we created + +52 +00:04:40,000 --> 00:04:41,000 +the response button. + +53 +00:04:42,000 --> 00:04:46,000 +Considering that the variable was removed, we were receiving some care. + +54 +00:04:47,000 --> 00:04:52,000 +By the way, here is in you task to discuss out time. + +55 +00:04:52,000 --> 00:04:54,000 +It is also relative of popular. + +56 +00:04:55,000 --> 00:05:00,000 +For example, we can consider the default value to display in case of values. + +57 +00:05:00,000 --> 00:05:04,000 +Its value will be empty and we can escape tax infinite. + +58 +00:05:04,000 --> 00:05:11,000 +Well now let's use three examples was out there and understand what will be present on the page. + +59 +00:05:12,000 --> 00:05:21,000 +In the first case, we operate on the tax and will ignore a no tax because escape maximum attitude is + +60 +00:05:21,000 --> 00:05:22,000 +set to false. + +61 +00:05:23,000 --> 00:05:30,000 +In the second scenario, we would create all content of value add to including impact. + +62 +00:05:31,000 --> 00:05:34,000 +Because Escape X-Mode is set to tour. + +63 +00:05:34,000 --> 00:05:40,000 +And in this case, we're going to print a default value because value will be invalidated. + +64 +00:05:40,000 --> 00:05:44,000 +This snow and in this case will prevent default value. + +65 +00:05:45,000 --> 00:05:52,000 +One more thing that I didn't share with you before that Daniels at all tracks are closed. + +66 +00:05:52,000 --> 00:05:59,000 +You can also close that without additional act in case it has all the attributes. + +67 +00:05:59,000 --> 00:06:03,000 +You can just use at the end of the attack to close it. + +68 +00:06:03,000 --> 00:06:11,000 +Instead of having separate closing time basically out, that is closed in the search example, the same + +69 +00:06:11,000 --> 00:06:13,000 +as in the first and second. + +70 +00:06:14,000 --> 00:06:20,000 +Let's open Google Chrome to check out my predictions about the results of evaluation are correct. + +71 +00:06:21,000 --> 00:06:28,000 +And as we have just discussed in the first example, we can see that all value is evaluated and printed + +72 +00:06:28,000 --> 00:06:29,000 +as a response body. + +73 +00:06:30,000 --> 00:06:38,000 +In the second example, we printed average besides attack and in the search example we printed on the + +74 +00:06:38,000 --> 00:06:39,000 +default value. + +75 +00:06:39,000 --> 00:06:43,000 +Let's navigate back to eclipse using that example. + +76 +00:06:44,000 --> 00:06:46,000 +The next example is Catch Nemo. + +77 +00:06:47,000 --> 00:06:49,000 +We can catch exceptions. + +78 +00:06:49,000 --> 00:06:56,000 +I would say that this is very popular tack, but just in case you decided to use class and you need + +79 +00:06:56,000 --> 00:07:01,000 +to build error handling around script that you can use to catch that. + +80 +00:07:02,000 --> 00:07:07,000 +In this case, we expect to get to runtime exception because of division by zero. + +81 +00:07:08,000 --> 00:07:16,000 +We surround lack of growth potentially can throw an exception with catch tech and give a name to Venmo. + +82 +00:07:16,000 --> 00:07:22,000 +With the help of this wearable, we can get access to the exception object in case exception is not + +83 +00:07:22,000 --> 00:07:23,000 +empty. + +84 +00:07:23,000 --> 00:07:27,000 +We print exception and exception message to the response buddy. + +85 +00:07:28,000 --> 00:07:33,000 +Let's look in the browser how we handle the exception on here. + +86 +00:07:33,000 --> 00:07:40,000 +You can see that our recent exception was cough and we bring that exception details and exception message + +87 +00:07:40,000 --> 00:07:41,000 +to console. + +88 +00:07:41,000 --> 00:07:42,000 +That's great. + +89 +00:07:43,000 --> 00:07:47,000 +Now you know how to catch exceptions with the help of the still. + +90 +00:07:48,000 --> 00:07:50,000 +Let's review a massive popular path. + +91 +00:07:50,000 --> 00:07:53,000 +I'm talking about Chu Stack now. + +92 +00:07:53,000 --> 00:07:57,000 +This stack is analogue to switch statement in Java. + +93 +00:07:57,000 --> 00:08:02,000 +We can have different cases in case conditions are met. + +94 +00:08:02,000 --> 00:08:04,000 +We enter said law. + +95 +00:08:04,000 --> 00:08:07,000 +That's why insights choose that. + +96 +00:08:07,000 --> 00:08:10,000 +We have one that evaluates some condition. + +97 +00:08:11,000 --> 00:08:19,000 +I set value to the salary variable and after that I describe conditions inside, choose their in case + +98 +00:08:19,000 --> 00:08:23,000 +salary is less than or equal to 1000. + +99 +00:08:23,000 --> 00:08:25,000 +Zeller Parenthesis. + +100 +00:08:25,000 --> 00:08:35,000 +Thanks in case salary is greater than 1000 and less than 5000, then we print this tax and in all other + +101 +00:08:35,000 --> 00:08:37,000 +cases we print this. + +102 +00:08:38,000 --> 00:08:43,000 +Otherwise is similar to the default law in speech statement in Java. + +103 +00:08:44,000 --> 00:08:48,000 +In case these are conditions that we enter. + +104 +00:08:48,000 --> 00:08:49,000 +Otherwise the. + +105 +00:08:50,000 --> 00:08:51,000 +Let's look in the browser. + +106 +00:08:52,000 --> 00:08:53,000 +How is that possible? + +107 +00:08:54,000 --> 00:08:57,000 +And in the browser we see expect this result. + +108 +00:08:58,000 --> 00:08:59,000 +That's great. + +109 +00:09:00,000 --> 00:09:03,000 +Let's get back to the eclipse to review the next example. + +110 +00:09:04,000 --> 00:09:08,000 +Let's now review example of Euro on the import tax. + +111 +00:09:09,000 --> 00:09:11,000 +You wrote that is very useful. + +112 +00:09:11,000 --> 00:09:12,000 +What do you need to create? + +113 +00:09:12,000 --> 00:09:18,000 +Your was different attributes and saw it as a variable in order to reuse multiple times. + +114 +00:09:19,000 --> 00:09:24,000 +We can also store the euro into the variable within the consumers scope. + +115 +00:09:25,000 --> 00:09:30,000 +Adding of multiple parameters can become an easy and reasonable sync. + +116 +00:09:30,000 --> 00:09:35,000 +Because of the forma, we use parameter to add parameter to zero. + +117 +00:09:36,000 --> 00:09:41,000 +That's how we build URLs that we can use in other places within the session scope. + +118 +00:09:42,000 --> 00:09:45,000 +The next stack here is important. + +119 +00:09:46,000 --> 00:09:52,000 +In this case, it retrieves an absolute relative and exposes its contents to the page. + +120 +00:09:53,000 --> 00:09:59,000 +You can read the communication for this stack on the slide that I have already presented in the beginning + +121 +00:09:59,000 --> 00:10:06,000 +of this lesson, and you will find that content also may be extracted into the three variable to. + +122 +00:10:07,000 --> 00:10:08,000 +In this case. + +123 +00:10:08,000 --> 00:10:14,000 +We want to import examples from previous lesson GCP include demo contains on the one line. + +124 +00:10:15,000 --> 00:10:17,000 +Let me open this file to show it to you. + +125 +00:10:18,000 --> 00:10:21,000 +As you can see on the one line was held in three elements. + +126 +00:10:22,000 --> 00:10:29,000 +Let's navigate the browser to see how our final euro looks like and what was included. + +127 +00:10:30,000 --> 00:10:38,000 +As you can see here is our single run in anticipation and those so you can see final look of the euros + +128 +00:10:38,000 --> 00:10:41,000 +that we created was all its parameters. + +129 +00:10:42,000 --> 00:10:46,000 +Probably these are main tracks from core libraries that I wanted to show you. + +130 +00:10:47,000 --> 00:10:53,000 +Let's get some examples of for Martin Tax for the sake of the demo. + +131 +00:10:53,000 --> 00:11:01,000 +I said some balance variables here was helpful for mining tax reform on this value in different ways. + +132 +00:11:01,000 --> 00:11:05,000 +Is the first examples here related to the form of number. + +133 +00:11:06,000 --> 00:11:11,000 +As you can see, this stack may have different attributes that will impact our formatting. + +134 +00:11:12,000 --> 00:11:16,000 +For example, the maximum integer digits. + +135 +00:11:16,000 --> 00:11:18,000 +Maximum fraction digits. + +136 +00:11:18,000 --> 00:11:21,000 +You can use part analysis. + +137 +00:11:21,000 --> 00:11:25,000 +You can find the source quotes of this example in attachments to a media. + +138 +00:11:26,000 --> 00:11:32,000 +I encourage you to take your time after watching this video and look through these examples on your + +139 +00:11:32,000 --> 00:11:33,000 +local computer. + +140 +00:11:34,000 --> 00:11:36,000 +Likewise, change. + +141 +00:11:36,000 --> 00:11:37,000 +Attribute Values. + +142 +00:11:37,000 --> 00:11:41,000 +Explore how the for market value is changed. + +143 +00:11:41,000 --> 00:11:44,000 +This will help you to understand topic better. + +144 +00:11:45,000 --> 00:11:51,000 +Another important and useful taxon for Montana Library is set locale. + +145 +00:11:52,000 --> 00:11:55,000 +We can change locale from the presentation there. + +146 +00:11:55,000 --> 00:12:03,000 +This might be needed to consider specifics of region during the formatting if you don't know what localization + +147 +00:12:03,000 --> 00:12:06,000 +and internationalization is. + +148 +00:12:06,000 --> 00:12:13,000 +I have a long and very comprehensive lesson about localization and internationalization in my course, + +149 +00:12:13,000 --> 00:12:20,000 +go from zero to first job watching and asking in case you have any questions in this case will change + +150 +00:12:20,000 --> 00:12:26,000 +local in order to change for mining of currency according to the U.S. standards. + +151 +00:12:26,000 --> 00:12:30,000 +It will also add a local specific currency item. + +152 +00:12:30,000 --> 00:12:37,000 +In this case, I can also American dollar also zeros very powerful tack to form a base. + +153 +00:12:37,000 --> 00:12:45,000 +This stack also may have friends attributes like for example type because we can afford the time of + +154 +00:12:45,000 --> 00:12:46,000 +both. + +155 +00:12:46,000 --> 00:12:51,000 +And one other option this are date style, time, store and party. + +156 +00:12:52,000 --> 00:12:59,000 +And again, I encourage you to spend some time with this example to understand that how foreign modern + +157 +00:12:59,000 --> 00:13:01,000 +energy still works. + +158 +00:13:01,000 --> 00:13:02,000 +This may open Brazil. + +159 +00:13:02,000 --> 00:13:08,000 +Now to show you how our number and date was for model is a browser. + +160 +00:13:08,000 --> 00:13:15,000 +We can see the the same number and the same date have different presentation because different rules + +161 +00:13:15,000 --> 00:13:16,000 +apply to. + +162 +00:13:17,000 --> 00:13:23,000 +Here you can see also example when we change local printed currency in the U.S. for money. + +163 +00:13:24,000 --> 00:13:27,000 +Let's continue with the review of function. + +164 +00:13:27,000 --> 00:13:30,000 +That's as we already discussed. + +165 +00:13:30,000 --> 00:13:34,000 +Most of the text from function group works with means. + +166 +00:13:34,000 --> 00:13:42,000 +We perform operations with strings and name of the text also may be familiar to you because in most + +167 +00:13:42,000 --> 00:13:43,000 +cases yes. + +168 +00:13:43,000 --> 00:13:45,000 +Similar to the masses from JDK. + +169 +00:13:46,000 --> 00:13:55,000 +Choose example of contains contain signal case and squeeze index off split joint lengths. + +170 +00:13:55,000 --> 00:13:57,000 +Replace stars with functions. + +171 +00:13:58,000 --> 00:14:03,000 +Also pay attention to how functions are used in these examples. + +172 +00:14:03,000 --> 00:14:10,000 +I use them in the expression language, thus an example of how these functions may be used. + +173 +00:14:10,000 --> 00:14:19,000 +Some practice the way how they work is also similar to the way how they work in Java in case names of + +174 +00:14:19,000 --> 00:14:21,000 +functions look strange to you. + +175 +00:14:21,000 --> 00:14:24,000 +Feel free to check this example and just in case. + +176 +00:14:25,000 --> 00:14:26,000 +Watch lesson about strings start. + +177 +00:14:27,000 --> 00:14:32,000 +So my job of course in this lesson we discussed a lot of string related methods. + +178 +00:14:33,000 --> 00:14:37,000 +The next group of attacks that I'd like to DMU is sequel. + +179 +00:14:38,000 --> 00:14:44,000 +We already discussed that sending queries to the persistence live from the presentation that these are + +180 +00:14:45,000 --> 00:14:47,000 +the best architectural decision. + +181 +00:14:47,000 --> 00:14:54,000 +And I never did like this in practice, but just in case and for the purposes, I'm going to show how + +182 +00:14:54,000 --> 00:14:55,000 +you can do this. + +183 +00:14:56,000 --> 00:15:00,000 +First of all, we have to set data source for this. + +184 +00:15:00,000 --> 00:15:04,000 +We need to pass the your real to our database username and password. + +185 +00:15:05,000 --> 00:15:13,000 +Once we create a data source and give it a name, we can create and execute SQL Query Using Data Source + +186 +00:15:13,000 --> 00:15:13,000 +created. + +187 +00:15:14,000 --> 00:15:16,000 +Let's extract all users. + +188 +00:15:17,000 --> 00:15:22,000 +The result of the query will be stored in a variable whose name are s. + +189 +00:15:23,000 --> 00:15:29,000 +The object of this type has actually the rows that it contains information that we need. + +190 +00:15:29,000 --> 00:15:33,000 +I create for each stack to iterate over all rows. + +191 +00:15:34,000 --> 00:15:40,000 +You'll really know how to use for each stack and with the expression one which I select fields is a + +192 +00:15:40,000 --> 00:15:42,000 +thing needs from the result. + +193 +00:15:42,000 --> 00:15:42,000 +Set. + +194 +00:15:43,000 --> 00:15:44,000 +Let me open browser. + +195 +00:15:45,000 --> 00:15:53,000 +Here is our table with results extracted from the database and you can see that we get absolutely the + +196 +00:15:53,000 --> 00:15:55,000 +same result as the previous example. + +197 +00:15:55,000 --> 00:16:04,000 +One of the work was the user activity is a previous example we extracted from the database in our facade. + +198 +00:16:04,000 --> 00:16:12,000 +And you may be wondering, Andrey, why do we need so many classes if we can send necessary request + +199 +00:16:12,000 --> 00:16:13,000 +from the GSB? + +200 +00:16:14,000 --> 00:16:21,000 +Because in case you change the database or table name or data structure, you would need to make changes + +201 +00:16:21,000 --> 00:16:27,000 +on all pages where you use sequel tag from GSP directory. + +202 +00:16:27,000 --> 00:16:35,000 +This may cause defects and it's also time consuming with the market actions that we have a view on most + +203 +00:16:35,000 --> 00:16:36,000 +of this structure. + +204 +00:16:37,000 --> 00:16:42,000 +You build scalable applications that is easy to scale and easy to support. + +205 +00:16:42,000 --> 00:16:50,000 +You have only one place to make appropriate changes, but with sequel tax things are different. + +206 +00:16:50,000 --> 00:16:54,000 +That's why using single use sales tax, I'm not recommending. + +207 +00:16:56,000 --> 00:16:58,000 +And the last, but not the least examples for today. + +208 +00:16:58,000 --> 00:17:01,000 +I related to the x-mode you steal tax. + +209 +00:17:02,000 --> 00:17:04,000 +We're going to have a separate lesson about ExxonMobil. + +210 +00:17:05,000 --> 00:17:12,000 +But I believe you already for me was of ExxonMobil files because we used it many times. + +211 +00:17:12,000 --> 00:17:18,000 +For example, we use EXIM, a form of in and build to inform Excel. + +212 +00:17:18,000 --> 00:17:23,000 +We also use Excel in WebEx and I'll file our deployment. + +213 +00:17:23,000 --> 00:17:31,000 +This group we declare here variable employees with value of excellent simple structure with these two + +214 +00:17:31,000 --> 00:17:35,000 +for employees the first names, last names, roles and salaries. + +215 +00:17:36,000 --> 00:17:40,000 +By the way, theoretically we can import x amount from external file. + +216 +00:17:41,000 --> 00:17:44,000 +After we have x amount we pass. + +217 +00:17:44,000 --> 00:17:46,000 +It was excellent to pass. + +218 +00:17:47,000 --> 00:17:56,000 +We store pass into the variable and after that with the help of weeks pass, we can print zeros from + +219 +00:17:56,000 --> 00:17:57,000 +exynos that we need. + +220 +00:17:58,000 --> 00:18:01,000 +If you don't know what its boss is, I was explaining. + +221 +00:18:02,000 --> 00:18:02,000 +Sure. + +222 +00:18:03,000 --> 00:18:07,000 +This is syntax that allows me to navigate the XML file. + +223 +00:18:08,000 --> 00:18:12,000 +It's like an analogue of CSA selectors with just four. + +224 +00:18:12,000 --> 00:18:12,000 +Simple. + +225 +00:18:13,000 --> 00:18:19,000 +I hope that this competition will help you to understand what makes is. + +226 +00:18:19,000 --> 00:18:26,000 +Anyway, we're going to have a separate lesson about eczema, where we'll will learn what exposure is. + +227 +00:18:27,000 --> 00:18:29,000 +In this particular example, I want to point. + +228 +00:18:29,000 --> 00:18:33,000 +First name and last name of the first employee from the eczema. + +229 +00:18:34,000 --> 00:18:35,000 +First employee is Jon Snow. + +230 +00:18:36,000 --> 00:18:41,000 +Let's check on the browser whether we created our plus expression correctly. + +231 +00:18:42,000 --> 00:18:45,000 +And as we can see grows it reprinted. + +232 +00:18:45,000 --> 00:18:46,000 +John Smith. + +233 +00:18:47,000 --> 00:18:47,000 +Amazing. + +234 +00:18:48,000 --> 00:18:55,000 +This is a simple example of how we can use this to flex to work with external inside our speak. + +235 +00:18:55,000 --> 00:19:02,000 +And again, I never use them in production quote and I would recommend you to use more powerful tools + +236 +00:19:02,000 --> 00:19:05,000 +to work with external inside Java. + +237 +00:19:05,000 --> 00:19:09,000 +Cope with them to learn them to in a separate lesson. + +238 +00:19:09,000 --> 00:19:14,000 +Working with external directly from the GCP is not considered as best practice. + +239 +00:19:15,000 --> 00:19:17,000 +That's why I don't recommend you to do so. + +240 +00:19:18,000 --> 00:19:21,000 +That's all what I wanted to share with you today. + +241 +00:19:21,000 --> 00:19:24,000 +Let's recap what we have learned in this lesson. + +242 +00:19:25,000 --> 00:19:28,000 +In this lesson, we learned what Jesus tale is. + +243 +00:19:28,000 --> 00:19:32,000 +We discussed advantages and disadvantages of Jesus. + +244 +00:19:32,000 --> 00:19:34,000 +Then also years. + +245 +00:19:34,000 --> 00:19:38,000 +The lesson we configure still in our core and learned core. + +246 +00:19:38,000 --> 00:19:44,000 +Thanks for modern text just so functions sequel tax and axonal tax. + +247 +00:19:45,000 --> 00:19:49,000 +After this lesson, you can work with due still tax like a true professional. + +248 +00:19:50,000 --> 00:19:52,000 +And I want to congratulate you on this. + +249 +00:19:53,000 --> 00:19:55,000 +Thank you for your attention. + +250 +00:19:55,000 --> 00:19:57,000 +Have a great day and see you. + +251 +00:19:57,000 --> 00:19:58,000 +Next lesson. + diff --git a/68 - JSP/005 Custom Tags in JSP_en.srt b/68 - JSP/005 Custom Tags in JSP_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..58edc56c147df2dc3cd5d296b3e3a5b5de5f99a1 --- /dev/null +++ b/68 - JSP/005 Custom Tags in JSP_en.srt @@ -0,0 +1,1576 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello, team. + +2 +00:00:06,000 --> 00:00:12,000 +In this lesson, we're going to learn how to create custom G speed tags and use them on GSP pages. + +3 +00:00:13,000 --> 00:00:19,000 +We'll start from General Ivory to understand what GSP custom talks are and why we need them. + +4 +00:00:20,000 --> 00:00:27,000 +We're going to run some new definitions like that library that have the simple tag and classic tag items + +5 +00:00:27,000 --> 00:00:34,000 +that will have the advantages of custom text in the lesson will review API of custom text and we're + +6 +00:00:34,000 --> 00:00:39,000 +going to review main interfaces and classes from the Custom Text API. + +7 +00:00:39,000 --> 00:00:46,000 +Also review attacks with different kinds of attributes, select simple fragment and dynamic attributes. + +8 +00:00:47,000 --> 00:00:53,000 +And after we learn all this, we're going to have a lot of practical activities to learn how to work + +9 +00:00:53,000 --> 00:00:56,000 +with stacks and create custom tax in practice. + +10 +00:00:57,000 --> 00:00:58,000 +Let's start our lesson. + +11 +00:00:59,000 --> 00:01:03,000 +Let's learn what the definition of the custom to the custom pack is. + +12 +00:01:03,000 --> 00:01:11,000 +The user defined the GCP language element when a page containing a custom pack it is translated into. + +13 +00:01:11,000 --> 00:01:19,000 +So when the attack is converted to operations on an object called Attack Handler, the web campaign + +14 +00:01:19,000 --> 00:01:24,000 +that invokes those operations once a GSP page's silhouette is executed. + +15 +00:01:25,000 --> 00:01:31,000 +The great thing about custom packs is that with the help of custom packs look in the woods. + +16 +00:01:31,000 --> 00:01:37,000 +One of the still disadvantage we talked about in the previous lesson, we thought that still covers + +17 +00:01:37,000 --> 00:01:43,000 +only basic operations and scripts that allow us to read any custom algorithm. + +18 +00:01:44,000 --> 00:01:50,000 +This is no more a problem for you if you know how to work with custom text, because if you need to + +19 +00:01:50,000 --> 00:01:57,000 +describe very custom algorithm and we need to use it on the GSP page, we can create custom tag and + +20 +00:01:57,000 --> 00:01:59,000 +don't use script for that at all. + +21 +00:02:00,000 --> 00:02:08,000 +GSP Tag Extensions lets you create new text that you can insert directly in the Java seven page. + +22 +00:02:09,000 --> 00:02:15,000 +Let's know some important vocabulary that we are going to use the lesson because there are multiple + +23 +00:02:15,000 --> 00:02:18,000 +new terms of words that you are going to hear today. + +24 +00:02:19,000 --> 00:02:28,000 +Custom Text A distributed tag library which defines a set of related custom text and contains the objects + +25 +00:02:28,000 --> 00:02:29,000 +it implements. + +26 +00:02:29,000 --> 00:02:31,000 +It tops that library. + +27 +00:02:31,000 --> 00:02:34,000 +It usually has a form of library descriptor. + +28 +00:02:35,000 --> 00:02:36,000 +This is a file. + +29 +00:02:36,000 --> 00:02:42,000 +Still, the extension is it contains all information related to custom tax. + +30 +00:02:43,000 --> 00:02:44,000 +Is it objects it implements? + +31 +00:02:44,000 --> 00:02:47,000 +A custom tag is called dog handler. + +32 +00:02:48,000 --> 00:02:54,000 +GSP technology defines two types of dog handlers simple and class. + +33 +00:02:55,000 --> 00:03:01,000 +Simple tax handlers can be used only for packs that do not use scripts and elements. + +34 +00:03:01,000 --> 00:03:07,000 +The attributes, values or the tag buddy classic dog handlers must be used. + +35 +00:03:07,000 --> 00:03:09,000 +This creates the elements required. + +36 +00:03:09,000 --> 00:03:17,000 +The body of a single tag is processed as a GSP fragment type, which can only convey template packs + +37 +00:03:17,000 --> 00:03:19,000 +and GSP action elements. + +38 +00:03:19,000 --> 00:03:24,000 +So it must not contain let's postscript expressions. + +39 +00:03:25,000 --> 00:03:33,000 +Whereas a classic pack doesn't have this restriction as its, but it is processed as by company type + +40 +00:03:33,000 --> 00:03:35,000 +which is a subclass of GSP. + +41 +00:03:35,000 --> 00:03:35,000 +Right. + +42 +00:03:36,000 --> 00:03:42,000 +In a minute we're going to announce these types and I will tell you more about these types. + +43 +00:03:43,000 --> 00:03:44,000 +In the last. + +44 +00:03:44,000 --> 00:03:48,000 +We're going to talk mostly about simple talk handlers. + +45 +00:03:48,000 --> 00:03:56,000 +We'll cover review of types that helps us create classic dog handlers, but will not use them on practice + +46 +00:03:56,000 --> 00:03:58,000 +because of a few reasons. + +47 +00:03:59,000 --> 00:04:03,000 +First of all, in most cases we use simple talk Henderson practice. + +48 +00:04:04,000 --> 00:04:09,000 +The second reason scripting in on GSP pages is generally discouraged. + +49 +00:04:09,000 --> 00:04:14,000 +That's why I don't even focus your attention on none in CS. + +50 +00:04:14,000 --> 00:04:17,000 +It is not recommended to use nowadays. + +51 +00:04:17,000 --> 00:04:19,000 +But you will have enough knowledge to provide. + +52 +00:04:19,000 --> 00:04:21,000 +And I'll see you in the interview. + +53 +00:04:21,000 --> 00:04:26,000 +So let's proceed further with discussion about simple dog handlers. + +54 +00:04:27,000 --> 00:04:34,000 +You can write simple dog handlers using the GCP knowledge or using the Java language with the help of + +55 +00:04:34,000 --> 00:04:35,000 +the GSP. + +56 +00:04:35,000 --> 00:04:37,000 +And we can create files. + +57 +00:04:37,000 --> 00:04:38,000 +Start extension. + +58 +00:04:39,000 --> 00:04:46,000 +The talk file is a source file containing every usable fragment of juice because that is translated + +59 +00:04:46,000 --> 00:04:49,000 +into a single handler by the container. + +60 +00:04:50,000 --> 00:04:58,000 +That files can be used to develop a custom text that the presentation centric or that can take advantage + +61 +00:04:58,000 --> 00:05:04,000 +of existing tax libraries or by page authors who do not know Java. + +62 +00:05:04,000 --> 00:05:12,000 +For example, we can describe GSP code that we will insert into another page stacks in order to use + +63 +00:05:12,000 --> 00:05:14,000 +some piece of presentation. + +64 +00:05:14,000 --> 00:05:17,000 +Let's take online shop as an example. + +65 +00:05:17,000 --> 00:05:24,000 +Most likely is a folder of all the pages will look the same on all pages, no matter whether you are + +66 +00:05:24,000 --> 00:05:30,000 +on the product page or on the part of the details page or on the home page. + +67 +00:05:30,000 --> 00:05:33,000 +The footer looks the same on all pages. + +68 +00:05:34,000 --> 00:05:41,000 +That's why it makes sense to create a separate footer that is going to be reused across your app on + +69 +00:05:41,000 --> 00:05:42,000 +different pages. + +70 +00:05:43,000 --> 00:05:50,000 +And in case one, the flexibility of the Java programming language is needed to define that use. + +71 +00:05:50,000 --> 00:05:56,000 +P technology provides a simple API for developing a talk handler in the Java programming language. + +72 +00:05:57,000 --> 00:06:00,000 +Now let's review the advantages of using custom. + +73 +00:06:00,000 --> 00:06:02,000 +That's the first advantage. + +74 +00:06:03,000 --> 00:06:09,000 +Custom tech eliminates the need of separate that that which is considered that programming approach + +75 +00:06:09,000 --> 00:06:09,000 +in use. + +76 +00:06:10,000 --> 00:06:18,000 +The second advantage separation of business logic from GSP is a custom that separates the business logic + +77 +00:06:18,000 --> 00:06:23,000 +from the juice page, making it easier to maintain and to support. + +78 +00:06:23,000 --> 00:06:30,000 +Imagine if you have a huge GSP page and you need to scroll 10 minutes in order to find a place on the + +79 +00:06:30,000 --> 00:06:32,000 +page that you need. + +80 +00:06:32,000 --> 00:06:35,000 +It might be challenging or imagine huge screen. + +81 +00:06:35,000 --> 00:06:41,000 +Glad that you can't carry with you this, but you can do so with the custom pack. + +82 +00:06:42,000 --> 00:06:45,000 +And the disadvantage is for usability. + +83 +00:06:46,000 --> 00:06:52,000 +The custom text makes a possibility to use the same business logic again and again. + +84 +00:06:53,000 --> 00:06:58,000 +They haven't tax maybe customers looking at this from the column page. + +85 +00:06:59,000 --> 00:07:02,000 +These are main advantages of custom tax. + +86 +00:07:03,000 --> 00:07:05,000 +Let's now review custom tax API. + +87 +00:07:06,000 --> 00:07:11,000 +I must admit that this is not the easiest topic and we need to know a few more types. + +88 +00:07:11,000 --> 00:07:13,000 +From Jakarta Enterprise Edition. + +89 +00:07:14,000 --> 00:07:22,000 +Let's move user key types that will support us in the creation of custom tax new speed interface. + +90 +00:07:22,000 --> 00:07:26,000 +It serves as a base type for tax and simple tax. + +91 +00:07:27,000 --> 00:07:33,000 +Simple attack interface interface for defined and single pack handlers. + +92 +00:07:33,000 --> 00:07:40,000 +Simple tasks handlers differ from the classic handlers in that instead of supporting the start dock + +93 +00:07:41,000 --> 00:07:49,000 +and the end talk masses, this simple attack interface provides a simple the attack message, which + +94 +00:07:49,000 --> 00:07:58,000 +is called once and only once for any given fact invocation, all tack, logic, iteration, body evaluations, + +95 +00:07:58,000 --> 00:08:02,000 +etc. are to be performed in this single message. + +96 +00:08:02,000 --> 00:08:10,000 +Thus simple text handlers have the equivalent power of attack, but with a much simpler lifecycle from + +97 +00:08:10,000 --> 00:08:10,000 +the interface. + +98 +00:08:11,000 --> 00:08:17,000 +This one's implementation of this interface is used most often for creation of back handlers. + +99 +00:08:18,000 --> 00:08:23,000 +Simple Tax Support, class and base clause for defining implement. + +100 +00:08:23,000 --> 00:08:26,000 +Simple attack is a simple text. + +101 +00:08:26,000 --> 00:08:33,000 +Support equals is a utility class intended to be used as a base class for use simple attack handlers. + +102 +00:08:33,000 --> 00:08:39,000 +The simple attacks support equals implement the single thought interface and adds additional convenience + +103 +00:08:39,000 --> 00:08:45,000 +message, including get analysis for the properties suitable to talk interface. + +104 +00:08:46,000 --> 00:08:51,000 +The interface of a classic talk handler that doesn't want to manipulate its buddy. + +105 +00:08:52,000 --> 00:08:59,000 +The Duck interface difference is a basic protocol between a talk and speech implementation class. + +106 +00:09:00,000 --> 00:09:03,000 +It defines the lifecycle and the masses to be invoked. + +107 +00:09:03,000 --> 00:09:04,000 +Head Start. + +108 +00:09:04,000 --> 00:09:04,000 +And. + +109 +00:09:04,000 --> 00:09:05,000 +And the. + +110 +00:09:06,000 --> 00:09:08,000 +Iteration tech interface. + +111 +00:09:08,000 --> 00:09:17,000 +This one extends tech interface by defining one additional massive controls at validation of its body. + +112 +00:09:17,000 --> 00:09:25,000 +Attack handler is an implement situation that is treated as once it implements stock runs at the start + +113 +00:09:25,000 --> 00:09:27,000 +dock and the end dock methods. + +114 +00:09:28,000 --> 00:09:32,000 +Iteration dock provides a new message do after body. + +115 +00:09:33,000 --> 00:09:42,000 +The do after button is invoked after every body revelation to control whether the body will be rehabilitated + +116 +00:09:42,000 --> 00:09:42,000 +or not. + +117 +00:09:43,000 --> 00:09:51,000 +If the after body message features evolve body again constant, then the body will be evaluated. + +118 +00:09:52,000 --> 00:09:59,000 +If the after body, which has key body zones in body will escape, then to enter will be invalidated + +119 +00:09:59,000 --> 00:09:59,000 +and set. + +120 +00:10:00,000 --> 00:10:10,000 +Fox class at race class for the final week implement into the tech support class easy to attack was + +121 +00:10:10,000 --> 00:10:14,000 +intended to be used as a base course for new handlers. + +122 +00:10:15,000 --> 00:10:22,000 +The tech support plus implements the talk and iteration package interfaces and adds additional convenience + +123 +00:10:22,000 --> 00:10:26,000 +masses, including getting matches for the properties in back. + +124 +00:10:27,000 --> 00:10:34,000 +But attacking the face is a modern tech interface extends iteration tech by defining additional masses + +125 +00:10:34,000 --> 00:10:39,000 +that let a talk handler manipulate the content of the bullet in its body. + +126 +00:10:40,000 --> 00:10:48,000 +It is the responsibility of the tough candidate to manipulate the body content, for example, to make + +127 +00:10:48,000 --> 00:10:55,000 +things in body content converted into something that uses the body count and gets to transcend using + +128 +00:10:55,000 --> 00:11:04,000 +or make things in body content and write it out into be right sprite using the body content right out + +129 +00:11:04,000 --> 00:11:05,000 +message. + +130 +00:11:06,000 --> 00:11:14,000 +Jesus provides the interface, the actions and template data in the space is written using a g speechwriter + +131 +00:11:14,000 --> 00:11:21,000 +object that is referenced was implicit variable out which is initialized automatically using masses + +132 +00:11:22,000 --> 00:11:23,000 +a page context object. + +133 +00:11:24,000 --> 00:11:28,000 +This absent plus emulates some of the functionality found. + +134 +00:11:28,000 --> 00:11:32,000 +These are buffer right and write the classes. + +135 +00:11:32,000 --> 00:11:38,000 +However, in the first that it slows by oh exception from the masses. + +136 +00:11:38,000 --> 00:11:40,000 +While print writer does not. + +137 +00:11:41,000 --> 00:11:48,000 +So as you can see, there is a big tree of different types that provides you with tons of flexibility + +138 +00:11:48,000 --> 00:11:51,000 +in creation and configuration of you attack. + +139 +00:11:52,000 --> 00:11:57,000 +If you ask me what is the most popular way to create toxin production? + +140 +00:11:57,000 --> 00:12:04,000 +My answer would be the next one based on my experience, simple facts and reasonable plan, which I + +141 +00:12:04,000 --> 00:12:13,000 +use just with quantification and insurance tax immunity of the font and components in case customizations + +142 +00:12:13,000 --> 00:12:14,000 +are needed. + +143 +00:12:14,000 --> 00:12:16,000 +Simple tax support cost is used. + +144 +00:12:17,000 --> 00:12:23,000 +The rest of the types still can be used, but I would say that zero is not so big amount of business + +145 +00:12:23,000 --> 00:12:29,000 +cases, so it can be only undressed with all other types but still. + +146 +00:12:29,000 --> 00:12:29,000 +Right. + +147 +00:12:29,000 --> 00:12:30,000 +Parachute. + +148 +00:12:30,000 --> 00:12:34,000 +That shows that you show the communication of the package that we have just reviewed. + +149 +00:12:35,000 --> 00:12:38,000 +Looks for the source code and just learn more details. + +150 +00:12:39,000 --> 00:12:41,000 +This should help you to understand the topic better. + +151 +00:12:43,000 --> 00:12:45,000 +Let's talk now about types of simple tax. + +152 +00:12:46,000 --> 00:12:54,000 +Simple tax maybe was money who was out by a single tack and have to use that to customize the behavior + +153 +00:12:54,000 --> 00:13:03,000 +of a custom that justice parameters customize the behavior of mass Zazi types of objects, simple attributes, + +154 +00:13:03,000 --> 00:13:06,000 +fragment attributes and dynamic attributes. + +155 +00:13:07,000 --> 00:13:10,000 +What are the difference between all these kinds of items? + +156 +00:13:10,000 --> 00:13:11,000 +Let me explain. + +157 +00:13:12,000 --> 00:13:17,000 +Simple items are evaluated by the company before being passed to the dog handler. + +158 +00:13:18,000 --> 00:13:24,000 +Simple attributes at listed in the start that have the syntax of key value pair. + +159 +00:13:25,000 --> 00:13:32,000 +Basically, these are regular attributes that we are all used to this point circle symbol. + +160 +00:13:32,000 --> 00:13:40,000 +For example, you can set a simple adjective value from a string constant or an expression lounge expression. + +161 +00:13:41,000 --> 00:13:49,000 +A GCP fragment is a portion of despicable past, the toxin that can be invoked as many times as needed. + +162 +00:13:49,000 --> 00:13:57,000 +You can see of a fragment as a template that is used by dog handler to produce customized content. + +163 +00:13:58,000 --> 00:14:06,000 +Thus, unlike a single item which is evaluated by the containment, the fragment is evaluated by a toxin + +164 +00:14:06,000 --> 00:14:11,000 +that the exact location where the fragments are too. + +165 +00:14:11,000 --> 00:14:14,000 +You use the fragments of the article directly. + +166 +00:14:15,000 --> 00:14:24,000 +Or use the fragment some element of the attribute to the element uniform the value of a fragment by + +167 +00:14:24,000 --> 00:14:33,000 +using a GCP attribute element when used to specify a fragment attribute z body of GSP attributes animal + +168 +00:14:33,000 --> 00:14:38,000 +can contain on the static text Winston and custom tats. + +169 +00:14:38,000 --> 00:14:41,000 +It can contain scripting elements. + +170 +00:14:42,000 --> 00:14:50,000 +Luke And the example in the slides and imagine Z mixing, you have custom product details and we can + +171 +00:14:50,000 --> 00:14:58,000 +have normal price and special price for sale and will read code of detail stack to decide which of the + +172 +00:14:58,000 --> 00:14:59,000 +fragments to use. + +173 +00:15:00,000 --> 00:15:09,000 +You can see that with the help of the GCP attribute that we pass portion of GCP code, the tag executes + +174 +00:15:09,000 --> 00:15:14,000 +the normal price fragment using the values from the price expression language variable. + +175 +00:15:15,000 --> 00:15:23,000 +If the product is full price, if the product is on sale, the pack executes all sale fragments using + +176 +00:15:23,000 --> 00:15:25,000 +zip price and sale price variables. + +177 +00:15:26,000 --> 00:15:33,000 +GCP fragments are represented in Java by an instance of the fragment absolute class. + +178 +00:15:34,000 --> 00:15:42,000 +Pieces of GSP code are translated into GSP fragments in the context of that invocation, these fragments + +179 +00:15:42,000 --> 00:15:43,000 +are created. + +180 +00:15:43,000 --> 00:15:50,000 +One provides a body of GCP attribute standards action for an attribute that is defined as a fragment + +181 +00:15:50,000 --> 00:15:58,000 +of Type B fragment, or when providing the body of attack invocation handled by a simple talk handler + +182 +00:15:59,000 --> 00:15:59,000 +user demo. + +183 +00:15:59,000 --> 00:16:02,000 +We are also going to cover GSP fragments. + +184 +00:16:03,000 --> 00:16:07,000 +And the last but not least, time is stuck with the dynamic attitude. + +185 +00:16:07,000 --> 00:16:13,000 +A dynamic cultivate is a narrative that is not specified in the definition of attack. + +186 +00:16:13,000 --> 00:16:19,000 +Then I refer to this I use promoted by tax, whose activists are treated in a uniform manner. + +187 +00:16:20,000 --> 00:16:24,000 +But those names are not necessarily known and development time. + +188 +00:16:25,000 --> 00:16:32,000 +For example, this statute accepts an arbitrary number of atoms whose values, colours and outputs are + +189 +00:16:32,000 --> 00:16:36,000 +both at least of the artist colour according to the values. + +190 +00:16:36,000 --> 00:16:43,000 +You can also set the value of dynamic attributes using an expression, language, expression, or using + +191 +00:16:43,000 --> 00:16:47,000 +the GSP attribute time in order to make dynamic heart in its work. + +192 +00:16:47,000 --> 00:16:49,000 +We also need to enable them. + +193 +00:16:49,000 --> 00:16:52,000 +Is it that library descriptor then for it? + +194 +00:16:52,000 --> 00:16:55,000 +I'm going to show you the details in the example. + +195 +00:16:55,000 --> 00:17:02,000 +At least now you're aware of what the name attributes are, and now it is time of live demo and practical + +196 +00:17:02,000 --> 00:17:03,000 +activities. + +197 +00:17:03,000 --> 00:17:08,000 +Let me start screen sharing and walk you through the examples that I've prepared for you. + +198 +00:17:09,000 --> 00:17:12,000 +We're going to have a lot of examples today. + +199 +00:17:12,000 --> 00:17:16,000 +Let me describe the plan of our demo at the beginning. + +200 +00:17:16,000 --> 00:17:19,000 +We're going to create simple pack with a sponge. + +201 +00:17:20,000 --> 00:17:23,000 +After that, we'll add simple activists to them. + +202 +00:17:23,000 --> 00:17:26,000 +We're going to create simple talk handlers. + +203 +00:17:26,000 --> 00:17:29,000 +After that, let's create simple talk with fragments. + +204 +00:17:30,000 --> 00:17:36,000 +Once we learn these kinds of attacks, we're going to view attacks with the enemy activists. + +205 +00:17:36,000 --> 00:17:40,000 +Let's stick to the plan and start with the first example. + +206 +00:17:40,000 --> 00:17:41,000 +That's the beginning. + +207 +00:17:41,000 --> 00:17:44,000 +We're going to create a simple that was a sponge. + +208 +00:17:45,000 --> 00:17:52,000 +I opened files and I prepared specially for this lesson that the school could use be tax damages. + +209 +00:17:53,000 --> 00:17:55,000 +I will walk you through examples from this file. + +210 +00:17:56,000 --> 00:17:58,000 +Let's start from the top lead directive. + +211 +00:17:59,000 --> 00:18:02,000 +We need to declare profits, then talk directly. + +212 +00:18:03,000 --> 00:18:04,000 +Attention to the boss. + +213 +00:18:04,000 --> 00:18:06,000 +This is important for us. + +214 +00:18:06,000 --> 00:18:10,000 +Is equal to that is that's after it. + +215 +00:18:11,000 --> 00:18:13,000 +Any folder that we created. + +216 +00:18:13,000 --> 00:18:18,000 +Web tax is a conventional name that is mandatory to follow. + +217 +00:18:18,000 --> 00:18:25,000 +If you want to use custom tax, it was GCP language and described the files with stock extension. + +218 +00:18:26,000 --> 00:18:30,000 +Zip pass is it goes after map and stats can be different. + +219 +00:18:31,000 --> 00:18:35,000 +In our particular case, let's call it fold it general. + +220 +00:18:35,000 --> 00:18:37,000 +Our prefix is simply g. + +221 +00:18:38,000 --> 00:18:40,000 +G stands for general tax. + +222 +00:18:41,000 --> 00:18:48,000 +Let's expand verb in folder sheet and find tax folder and general folder inside it. + +223 +00:18:49,000 --> 00:18:53,000 +So this is true and relevant to our tax. + +224 +00:18:53,000 --> 00:18:55,000 +Inside we have our tax. + +225 +00:18:56,000 --> 00:19:01,000 +Look, Milka file was named filter and was extension their attention. + +226 +00:19:01,000 --> 00:19:07,000 +So this file doesn't have GSP extension, but talk extension. + +227 +00:19:08,000 --> 00:19:17,000 +And then our before we can refer to the folder tag using our prefix just like this looks super simple. + +228 +00:19:18,000 --> 00:19:19,000 +Would you agree with me? + +229 +00:19:20,000 --> 00:19:23,000 +And like this you can have multiple tags on GCP. + +230 +00:19:23,000 --> 00:19:26,000 +Page is like named and made from bricks. + +231 +00:19:26,000 --> 00:19:29,000 +You can change the order of Greeks. + +232 +00:19:29,000 --> 00:19:30,000 +We use them and so on. + +233 +00:19:31,000 --> 00:19:33,000 +My Web server already up and running. + +234 +00:19:34,000 --> 00:19:41,000 +Let me send the request to this GSP file and show you as a result in browser is the other line. + +235 +00:19:41,000 --> 00:19:49,000 +You can see address of our JSP page and here we see markup from the footer to let's continue. + +236 +00:19:50,000 --> 00:19:51,000 +Now let's create that. + +237 +00:19:51,000 --> 00:19:59,000 +That takes attributes with the help of the still an expression and I declare an array variable and after + +238 +00:19:59,000 --> 00:20:04,000 +it I use custom tech and pass my array as an attribute. + +239 +00:20:04,000 --> 00:20:07,000 +My new custom task is called Queen three. + +240 +00:20:08,000 --> 00:20:12,000 +Let's look at the source code of the attack in that file. + +241 +00:20:12,000 --> 00:20:15,000 +I can use this same GSP directives. + +242 +00:20:15,000 --> 00:20:24,000 +For example, I can use core g still tags inside my to define need to declare attribute in the attack. + +243 +00:20:24,000 --> 00:20:26,000 +I use this patching directive. + +244 +00:20:27,000 --> 00:20:30,000 +The rest here is pretty clear and intuitive. + +245 +00:20:31,000 --> 00:20:32,000 +We declare the name of the attribute. + +246 +00:20:33,000 --> 00:20:34,000 +It's type. + +247 +00:20:34,000 --> 00:20:40,000 +And in this particular case I also declare it is a this such a is going to be required for this attack. + +248 +00:20:41,000 --> 00:20:47,000 +That means that I can use this attack without passing value to this attack. + +249 +00:20:48,000 --> 00:20:51,000 +And after that I use collection of cells to fields. + +250 +00:20:51,000 --> 00:20:54,000 +The table that I agree with for each. + +251 +00:20:55,000 --> 00:20:55,000 +That's it. + +252 +00:20:56,000 --> 00:20:59,000 +Let's look in the browser how it looks like. + +253 +00:21:00,000 --> 00:21:05,000 +In the browser you can see how I printed table with values for my array. + +254 +00:21:05,000 --> 00:21:07,000 +In case you have any questions. + +255 +00:21:08,000 --> 00:21:14,000 +Please hesitate to ask you questions and comments below this video and I will be happy to answer those. + +256 +00:21:15,000 --> 00:21:17,000 +Let's continue this example. + +257 +00:21:17,000 --> 00:21:21,000 +Let's create now simple to convert within this Java. + +258 +00:21:22,000 --> 00:21:29,000 +For this we talk library descriptor and talk handler and then Java in the page directive. + +259 +00:21:29,000 --> 00:21:37,000 +I declare that I want to use text from this stack library descriptor will convert know what that library + +260 +00:21:37,000 --> 00:21:46,000 +descriptor is and also in the lesson but just still review do of cortex do remember this from previous + +261 +00:21:46,000 --> 00:21:50,000 +lesson I specified past as a to the file. + +262 +00:21:50,000 --> 00:21:51,000 +Let's take a look at it. + +263 +00:21:52,000 --> 00:21:54,000 +Here it is in web folder. + +264 +00:21:55,000 --> 00:22:03,000 +It is called custom two of the that's open this target file should have one root element is a scroll + +265 +00:22:04,000 --> 00:22:04,000 +target. + +266 +00:22:05,000 --> 00:22:08,000 +This file contains multiple elements. + +267 +00:22:09,000 --> 00:22:11,000 +TAC and channel should specify name. + +268 +00:22:12,000 --> 00:22:17,000 +This is the name of the tag that we will use on the GCP page top class. + +269 +00:22:17,000 --> 00:22:20,000 +This is a complete plus name of the dog handler. + +270 +00:22:21,000 --> 00:22:23,000 +We're going to review it in a minute. + +271 +00:22:24,000 --> 00:22:31,000 +We also specify that this stack will not have any body content in case this stack will have any content + +272 +00:22:31,000 --> 00:22:34,000 +in the tag body, an exception will throw. + +273 +00:22:35,000 --> 00:22:42,000 +And we can see that this stack may have different activities all at once by default after three thought. + +274 +00:22:43,000 --> 00:22:51,000 +That's why when I described the message on TV, I didn't specify it vividly that it has to start not + +275 +00:22:51,000 --> 00:22:55,000 +the activities collection but attention to. + +276 +00:22:55,000 --> 00:23:03,000 +One more important element is that the scope party expression value can be used a true or false the + +277 +00:23:03,000 --> 00:23:08,000 +false value means is a static value can be specified for this. + +278 +00:23:08,000 --> 00:23:14,000 +Actually, a true value means that a request time achieve its value can be specified. + +279 +00:23:14,000 --> 00:23:21,000 +When we say request time value, we can mean also values that will be evaluated by the expression, + +280 +00:23:21,000 --> 00:23:24,000 +language, for example, request or session. + +281 +00:23:24,000 --> 00:23:28,000 +That to me was having this element set to true. + +282 +00:23:29,000 --> 00:23:33,000 +We can use expression language to pass values to this attribute. + +283 +00:23:34,000 --> 00:23:41,000 +And in a similar way you can describe whatever tax you want and again you can use still defaults of + +284 +00:23:41,000 --> 00:23:43,000 +still library as a reference. + +285 +00:23:44,000 --> 00:23:50,000 +In the previous lesson, I explained you how you can explore the source code of the files from the g + +286 +00:23:50,000 --> 00:23:58,000 +is still knowledge of G still to do files to help you use creation of your own custom text library descriptors. + +287 +00:23:59,000 --> 00:24:02,000 +Now let's review ahead of itself. + +288 +00:24:03,000 --> 00:24:06,000 +I created a plus and put it in the docs package. + +289 +00:24:07,000 --> 00:24:09,000 +It is called Pillow Talk Hymnal. + +290 +00:24:10,000 --> 00:24:17,000 +As we already learned, the great tax hamlet we need to send you cloth from as a single tax support + +291 +00:24:17,000 --> 00:24:19,000 +and override the tax message. + +292 +00:24:20,000 --> 00:24:22,000 +In this class we have two fields. + +293 +00:24:23,000 --> 00:24:30,000 +These are fields where the references to the art of this post to the tax will be stored in order to + +294 +00:24:30,000 --> 00:24:32,000 +initialize these variables with values. + +295 +00:24:33,000 --> 00:24:36,000 +We need to make sure that we create setters for these fields. + +296 +00:24:37,000 --> 00:24:41,000 +You can see setter for my message attribute and setter for collection activity. + +297 +00:24:42,000 --> 00:24:45,000 +And here is implementation of the do tax message. + +298 +00:24:46,000 --> 00:24:53,000 +I get the reference to the GCP writer in order to write about how you use context against the reference + +299 +00:24:53,000 --> 00:24:54,000 +residues. + +300 +00:24:54,000 --> 00:24:54,000 +Right. + +301 +00:24:55,000 --> 00:24:58,000 +Get GCP context message from simple tasks. + +302 +00:24:58,000 --> 00:25:02,000 +Support class can help me to get zero flows to the GCP context. + +303 +00:25:03,000 --> 00:25:06,000 +And here we actually write and Java a quote. + +304 +00:25:06,000 --> 00:25:08,000 +We need to describe any algorithm we need. + +305 +00:25:09,000 --> 00:25:18,000 +In our case, if collection attribute is now, then would just hello from custom task and message even + +306 +00:25:18,000 --> 00:25:24,000 +in case through below no difference and in case collection achievement is passed is as that. + +307 +00:25:25,000 --> 00:25:30,000 +Then we eliminate the size of the collection and its size as a response body. + +308 +00:25:31,000 --> 00:25:38,000 +It is very complicated logic and I believe this is more than enough to custom tax from the very beginning. + +309 +00:25:39,000 --> 00:25:46,000 +At least you can understand the principle how the value of the tax will be evaluated, and you can create + +310 +00:25:46,000 --> 00:25:48,000 +tax of any complexities that you need. + +311 +00:25:49,000 --> 00:25:51,000 +So we are going to use this tax. + +312 +00:25:51,000 --> 00:25:54,000 +Let's get back to our speech. + +313 +00:25:54,000 --> 00:25:56,000 +On our speech. + +314 +00:25:56,000 --> 00:26:04,000 +I'm going to use this tax three times without actually this was Massachusetts and it was message and + +315 +00:26:04,000 --> 00:26:07,000 +collection activities as a collection achievement. + +316 +00:26:07,000 --> 00:26:11,000 +I'm going to use a phrase that we used in our previous example. + +317 +00:26:12,000 --> 00:26:18,000 +Let me navigate to the browser and explore how our custom thoughts were evaluated on the frontend. + +318 +00:26:18,000 --> 00:26:24,000 +And as you can see, we get what we expect without message attribute. + +319 +00:26:24,000 --> 00:26:30,000 +We print it now with the message attribute, which means that the content of the message that triggered + +320 +00:26:30,000 --> 00:26:32,000 +and was correction attribute. + +321 +00:26:32,000 --> 00:26:34,000 +We also bring the size of the collection. + +322 +00:26:34,000 --> 00:26:41,000 +Is it clear if no, please ask questions below this video and I will be happy to answer. + +323 +00:26:41,000 --> 00:26:43,000 +If yes, that's more. + +324 +00:26:44,000 --> 00:26:47,000 +The next example is about that was fragment. + +325 +00:26:48,000 --> 00:26:50,000 +So imagine that we have element. + +326 +00:26:50,000 --> 00:26:52,000 +Is it supposed to create modules, attack that. + +327 +00:26:53,000 --> 00:26:56,000 +And one of the fragments provided based on the condition. + +328 +00:26:56,000 --> 00:27:02,000 +In this particular case, we need to select one out of two possible photos. + +329 +00:27:02,000 --> 00:27:06,000 +We have let go of photo and photos, context form. + +330 +00:27:07,000 --> 00:27:08,000 +Just imagine that. + +331 +00:27:08,000 --> 00:27:14,000 +And then also you can imagine that we have some condition is it is passed from the outside of attack. + +332 +00:27:15,000 --> 00:27:18,000 +These are from some similar or from the request form. + +333 +00:27:18,000 --> 00:27:19,000 +It doesn't matter. + +334 +00:27:20,000 --> 00:27:26,000 +The main thing is that there is something which will define which photo we have to print and we have + +335 +00:27:26,000 --> 00:27:29,000 +to cross this condition into the future style. + +336 +00:27:31,000 --> 00:27:36,000 +As you can see, the fragments past was reduced to zero. + +337 +00:27:37,000 --> 00:27:38,000 +Photo regular. + +338 +00:27:38,000 --> 00:27:40,000 +These are future contact form. + +339 +00:27:41,000 --> 00:27:42,000 +Separately, we have GCP body. + +340 +00:27:43,000 --> 00:27:44,000 +So let me know. + +341 +00:27:44,000 --> 00:27:46,000 +Opens attack itself. + +342 +00:27:47,000 --> 00:27:50,000 +Here's our fragment them back on top. + +343 +00:27:50,000 --> 00:27:51,000 +You can see that. + +344 +00:27:51,000 --> 00:27:52,000 +I digress. + +345 +00:27:52,000 --> 00:27:54,000 +We are to use Fortress style. + +346 +00:27:55,000 --> 00:27:56,000 +It is a required one. + +347 +00:27:57,000 --> 00:28:00,000 +Foods are regular and foods are contact form of fragments. + +348 +00:28:01,000 --> 00:28:07,000 +You can understand this because fragment thought of it is set to true to point to body. + +349 +00:28:08,000 --> 00:28:13,000 +I coat the body action type and based on the condition post foods. + +350 +00:28:14,000 --> 00:28:19,000 +A fragment is that they need principles if needed and explore this example. + +351 +00:28:20,000 --> 00:28:24,000 +By the way, you can find source for the full examples in attachments to the lesson. + +352 +00:28:25,000 --> 00:28:27,000 +Ends of the speech. + +353 +00:28:27,000 --> 00:28:33,000 +I have two versions of the stack with regular footer and contact form for the. + +354 +00:28:34,000 --> 00:28:38,000 +Lithium navigate into the browser now and show you how it looks like. + +355 +00:28:39,000 --> 00:28:46,000 +Here you can see the difference body in both cases and based on the condition icons in different fragments. + +356 +00:28:47,000 --> 00:28:48,000 +That's how it works. + +357 +00:28:48,000 --> 00:28:49,000 +Let's come to you. + +358 +00:28:50,000 --> 00:28:55,000 +And the last but not least example for this example was dynamic attitudes. + +359 +00:28:55,000 --> 00:29:03,000 +You can see that in my speech I used to visit the school cooler at least items was a practice custom + +360 +00:29:03,000 --> 00:29:04,000 +and they was different. + +361 +00:29:05,000 --> 00:29:05,000 +This was values. + +362 +00:29:06,000 --> 00:29:11,000 +The key thing here is that it doesn't matter how much you achieve this I will pass. + +363 +00:29:11,000 --> 00:29:15,000 +Here is the same as it doesn't matter how they will be called. + +364 +00:29:16,000 --> 00:29:20,000 +This is that was dynamic attitudes working to navigate. + +365 +00:29:20,000 --> 00:29:24,000 +Now does it attack library descriptor in this still defile file? + +366 +00:29:24,000 --> 00:29:26,000 +I have one more talk this quiet. + +367 +00:29:27,000 --> 00:29:33,000 +You can see the similar attributes as we have in the previous description, but he is a difference. + +368 +00:29:34,000 --> 00:29:37,000 +We set true value in dynamic attributes element. + +369 +00:29:37,000 --> 00:29:38,000 +This is important. + +370 +00:29:39,000 --> 00:29:43,000 +Now let's navigate to the source code of the handler class. + +371 +00:29:44,000 --> 00:29:51,000 +This class also stands simple tax handler, but it also implements dynamic action to see the face. + +372 +00:29:52,000 --> 00:29:59,000 +This interface makes us implement set dynamic attributes massive where a local name is the name of the + +373 +00:29:59,000 --> 00:30:04,000 +attributes and the value is a value of the attribute you arrive. + +374 +00:30:04,000 --> 00:30:07,000 +Parameter is the namespace of the attribute. + +375 +00:30:07,000 --> 00:30:09,000 +It will be now is it attribute? + +376 +00:30:09,000 --> 00:30:11,000 +This is a default namespace. + +377 +00:30:12,000 --> 00:30:19,000 +This setter is invoked each time new attributes is discovered is attacked, and one new attribute is + +378 +00:30:19,000 --> 00:30:19,000 +added. + +379 +00:30:19,000 --> 00:30:27,000 +I pulled active with name and attributes value into the map and during the implementation of the task + +380 +00:30:27,000 --> 00:30:35,000 +message I iterate over all entries and use name of the attribute and its value in order to build the + +381 +00:30:35,000 --> 00:30:36,000 +color list. + +382 +00:30:36,000 --> 00:30:39,000 +Let me open the browser to show you how it looks like. + +383 +00:30:40,000 --> 00:30:44,000 +And in the bottom of the file you can see color list. + +384 +00:30:45,000 --> 00:30:52,000 +This is example of the dynamic nuttiness that so what I wanted to show you today, let's recap what + +385 +00:30:52,000 --> 00:30:57,000 +we have learned in this lesson, learned a lot of things. + +386 +00:30:57,000 --> 00:31:00,000 +Now you know what custom GCP talks are. + +387 +00:31:00,000 --> 00:31:03,000 +We learned what that library is. + +388 +00:31:03,000 --> 00:31:10,000 +Also, we learned what Canva is, you know, with simple talk and classic dog handlers. + +389 +00:31:11,000 --> 00:31:16,000 +We reviewed main classes and interfaces from GCP, Custom Tax API. + +390 +00:31:17,000 --> 00:31:25,000 +We learned different kinds of attributes in GCP tax like single fragment and dynamic catchiness and + +391 +00:31:25,000 --> 00:31:30,000 +the examples of lesson you used real life examples to learn how to use taxable practice. + +392 +00:31:31,000 --> 00:31:32,000 +That's all for today. + +393 +00:31:33,000 --> 00:31:34,000 +Thanks a lot for your attention. + +394 +00:31:35,000 --> 00:31:37,000 +Have a great day and see you in the next lesson. + diff --git a/68 - JSP/005 Folder-with-custom-tags.url b/68 - JSP/005 Folder-with-custom-tags.url new file mode 100644 index 0000000000000000000000000000000000000000..4fe7a309cd69cefd86af06ae4878cbcbf6053475 --- /dev/null +++ b/68 - JSP/005 Folder-with-custom-tags.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/tree/master/online-store.web/src/main/webapp/WEB-INF/tags/general \ No newline at end of file diff --git a/68 - JSP/005 JSP-File-Source-Code-from-the-lesson.url b/68 - JSP/005 JSP-File-Source-Code-from-the-lesson.url new file mode 100644 index 0000000000000000000000000000000000000000..39ef64f5891552286c6ba62580ce62cd53be8b30 --- /dev/null +++ b/68 - JSP/005 JSP-File-Source-Code-from-the-lesson.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/jsp-tags-demo.jsp \ No newline at end of file diff --git a/68 - JSP/005 Package-with-Java-Handlers-implementations.url b/68 - JSP/005 Package-with-Java-Handlers-implementations.url new file mode 100644 index 0000000000000000000000000000000000000000..24a1278ab55b002fdd1e019ae47fdf5822c50139 --- /dev/null +++ b/68 - JSP/005 Package-with-Java-Handlers-implementations.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/tree/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/tags \ No newline at end of file diff --git a/68 - JSP/005 TLD-file-example.url b/68 - JSP/005 TLD-file-example.url new file mode 100644 index 0000000000000000000000000000000000000000..33f84555769a0770b6a4b535d3950c45aa2fbf62 --- /dev/null +++ b/68 - JSP/005 TLD-file-example.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/WEB-INF/custom.tld \ No newline at end of file diff --git a/68 - JSP/external-links.txt b/68 - JSP/external-links.txt new file mode 100644 index 0000000000000000000000000000000000000000..56a8b17b3e10ad055f3f239cce9747e052531f79 --- /dev/null +++ b/68 - JSP/external-links.txt @@ -0,0 +1,27 @@ + +002 JSP-demo-file +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/jsp-demo.jsp + +002 Servlet-source-code-from-the-lesson +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/servlets/JspDemoServlet.java + +003 JSTL-Dependency-to-add-in-Maven +https://mvnrepository.com/artifact/org.glassfish.web/jakarta.servlet.jsp.jstl/2.0.0 + +003 Source-code-of-JSP-file-with-the-JSTL-code-examples +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/jstl-demo.jsp + +003 Source-code-of-Servlet-for-JSTL-Examples +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/servlets/JstlDemoServlet.java + +005 JSP-File-Source-Code-from-the-lesson +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/jsp-tags-demo.jsp + +005 Folder-with-custom-tags +https://github.com/AndriiPiatakha/java-learnit-web-online-store/tree/master/online-store.web/src/main/webapp/WEB-INF/tags/general + +005 Package-with-Java-Handlers-implementations +https://github.com/AndriiPiatakha/java-learnit-web-online-store/tree/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/tags + +005 TLD-file-example +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/WEB-INF/custom.tld diff --git a/69 - Web Application Design Patterns/001 MVC Design Pattern_en.srt b/69 - Web Application Design Patterns/001 MVC Design Pattern_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..64a78caa214a8fc07d81742861e3df779cdb02f1 --- /dev/null +++ b/69 - Web Application Design Patterns/001 MVC Design Pattern_en.srt @@ -0,0 +1,744 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello, Jim. + +2 +00:00:06,000 --> 00:00:12,000 +Today we're going to learn embassy part and also we're going to review how to apply that practice. + +3 +00:00:13,000 --> 00:00:19,000 +We're going to start from the general overview of family support, and you're going to understand what + +4 +00:00:19,000 --> 00:00:19,000 +it is. + +5 +00:00:20,000 --> 00:00:21,000 +And why do we need it? + +6 +00:00:21,000 --> 00:00:27,000 +After that, we're going to learn more about each element of this part, and we're going to talk about + +7 +00:00:27,000 --> 00:00:33,000 +the controller model and view to understand better what MVC is. + +8 +00:00:33,000 --> 00:00:36,000 +Well, also its advantages and disadvantages. + +9 +00:00:37,000 --> 00:00:42,000 +And at the end of the lesson, we're going to have practical activity and we'll give you practical code + +10 +00:00:42,000 --> 00:00:43,000 +examples. + +11 +00:00:44,000 --> 00:00:45,000 +Let's start our lesson. + +12 +00:00:46,000 --> 00:00:51,000 +Let's learn first what a, b, c point is in general and why we need it. + +13 +00:00:52,000 --> 00:00:54,000 +MVC stands for Model View Controller. + +14 +00:00:55,000 --> 00:01:02,000 +The model view controller design partner specifies is that an application consists of a data model, + +15 +00:01:02,000 --> 00:01:06,000 +presentation information and control information. + +16 +00:01:06,000 --> 00:01:12,000 +The partner requires that each of these be separated into different objects. + +17 +00:01:12,000 --> 00:01:19,000 +Each architecture component is built to handle specific development aspects of an application. + +18 +00:01:20,000 --> 00:01:25,000 +MVC separates is a business logic and the presentation layer from each other. + +19 +00:01:25,000 --> 00:01:32,000 +It was traditionally used for desktop graphical user interfaces nowadays, and we see architecture and + +20 +00:01:32,000 --> 00:01:39,000 +web technology has become very popular as a software design for that can be used across many frameworks + +21 +00:01:40,000 --> 00:01:48,000 +with many programming languages commonly Java, Python, Rob, HP, JavaScript, and the more it is + +22 +00:01:48,000 --> 00:01:55,000 +popularly used to design web applications and mobile apps, what we see is more of an architectural + +23 +00:01:55,000 --> 00:01:58,000 +pattern, but not for complete application. + +24 +00:01:59,000 --> 00:02:04,000 +And we see most of it relates to the UI interaction layer of an application. + +25 +00:02:04,000 --> 00:02:10,000 +You're still going to use business logically, maybe some service layer and data access layer. + +26 +00:02:10,000 --> 00:02:18,000 +Then we see design part serves to separate the presentation layer from the business logic and this model + +27 +00:02:18,000 --> 00:02:21,000 +was first introduced in the Smalltalk programming language. + +28 +00:02:22,000 --> 00:02:26,000 +Let's now review each element of the MVC framework one by one. + +29 +00:02:27,000 --> 00:02:29,000 +Let's start from controllers. + +30 +00:02:29,000 --> 00:02:33,000 +The controller is a part of the applications that handles the user interaction. + +31 +00:02:34,000 --> 00:02:41,000 +The controller interprets the inputs from the user information model and the view to change. + +32 +00:02:41,000 --> 00:02:48,000 +As appropriate, a controller sends commands to the model to update its state. + +33 +00:02:48,000 --> 00:02:55,000 +The controller also sends commands to its associated view to change ease of use presentation. + +34 +00:02:56,000 --> 00:03:03,000 +The controller receives input from view, uses logic to translate that input to a demand for the model. + +35 +00:03:04,000 --> 00:03:12,000 +The model grabs the data, the controller passes data from the model back to view for the user to see + +36 +00:03:12,000 --> 00:03:13,000 +in a nice display. + +37 +00:03:13,000 --> 00:03:16,000 +Now let's discuss model insurance. + +38 +00:03:16,000 --> 00:03:20,000 +The main goal of the model is storing and managing data. + +39 +00:03:21,000 --> 00:03:26,000 +The model component stores, the data and needs related logic. + +40 +00:03:26,000 --> 00:03:34,000 +It represents data that is being transferred between controller components or any other related business + +41 +00:03:34,000 --> 00:03:34,000 +logic. + +42 +00:03:35,000 --> 00:03:41,000 +For example, a controller object will retrieve the customer info from the database. + +43 +00:03:42,000 --> 00:03:50,000 +It manipulates data and sends back to the database or uses it to render the same data by sending it + +44 +00:03:50,000 --> 00:03:51,000 +to the view. + +45 +00:03:52,000 --> 00:03:58,000 +It's also the lowest level of the poor, which is responsible for maintaining data. + +46 +00:03:58,000 --> 00:04:06,000 +And finally, let's talk about view, element of see current view is that part of the application is + +47 +00:04:06,000 --> 00:04:09,000 +it is in charge of the presentation of data. + +48 +00:04:10,000 --> 00:04:18,000 +Views are created by the data collected from the model data and view requests as a model to give information + +49 +00:04:18,000 --> 00:04:21,000 +so that it presents as an output presentation to the user. + +50 +00:04:22,000 --> 00:04:28,000 +The view also represents the data from charts, diagrams and tables. + +51 +00:04:28,000 --> 00:04:37,000 +For example, any customer view will include all the UI components like text boxes, dropdowns, etc.. + +52 +00:04:37,000 --> 00:04:45,000 +The view contains all functionalities that directly interacts with user, like click in the bottom or + +53 +00:04:45,000 --> 00:04:52,000 +enter events lets them know advantages and disadvantages of use an embassy architecture application. + +54 +00:04:52,000 --> 00:04:54,000 +Let's start from advantages. + +55 +00:04:55,000 --> 00:04:58,000 +The first one, separation of concerns. + +56 +00:04:59,000 --> 00:05:06,000 +The court is divided based on function two eases a module view or controller backing each book. + +57 +00:05:06,000 --> 00:05:08,000 +It can act independently. + +58 +00:05:09,000 --> 00:05:14,000 +The model view and controller does depend on each other. + +59 +00:05:14,000 --> 00:05:16,000 +Why does this matter? + +60 +00:05:16,000 --> 00:05:21,000 +A team might have a designer, engineer and database architect. + +61 +00:05:21,000 --> 00:05:28,000 +Separation of concerns means that each team member can work on their piece at the same time. + +62 +00:05:28,000 --> 00:05:31,000 +Because logic has been separated into buckets. + +63 +00:05:32,000 --> 00:05:36,000 +Separation of concerns is also great for maintenance. + +64 +00:05:37,000 --> 00:05:44,000 +Developers can fix a bug in one piece of code without having to check how the other pieces of code. + +65 +00:05:45,000 --> 00:05:47,000 +Low coupling though. + +66 +00:05:47,000 --> 00:05:54,000 +Coplan means that each piece is a model, view and controller act independently of each other. + +67 +00:05:55,000 --> 00:06:01,000 +Developers can modify one of the pieces and the other two pieces should keep working and not require + +68 +00:06:01,000 --> 00:06:02,000 +modifications. + +69 +00:06:03,000 --> 00:06:09,000 +When designing MVC software, the logic in each of the three buckets is independent. + +70 +00:06:10,000 --> 00:06:15,000 +Everything in view acts independently of the model and vice versa. + +71 +00:06:15,000 --> 00:06:19,000 +If you want to have any logic dependent on the model. + +72 +00:06:20,000 --> 00:06:29,000 +Make an independent models and use makes code organization simple and easy to understand and keeps maintenance + +73 +00:06:29,000 --> 00:06:30,000 +easier. + +74 +00:06:30,000 --> 00:06:35,000 +Programmers can see symbol and Z view without changing the model code. + +75 +00:06:36,000 --> 00:06:44,000 +Among all Z's advantages, I believe that this also works to highlight such advantages as MVC makes + +76 +00:06:44,000 --> 00:06:52,000 +model classes reusable without modification extendable code easier to maintain or modify. + +77 +00:06:52,000 --> 00:06:55,000 +Each course can be tested independently. + +78 +00:06:56,000 --> 00:07:03,000 +And even despite this solid list of advantages, there are some disadvantages of the MVC architecture + +79 +00:07:03,000 --> 00:07:04,000 +that we should be aware about. + +80 +00:07:05,000 --> 00:07:11,000 +To be honest, in the literature and things that these are and that are numerous of and we see disadvantages. + +81 +00:07:11,000 --> 00:07:17,000 +But I just don't want to even list all of them in this lesson because they are ridiculous. + +82 +00:07:18,000 --> 00:07:23,000 +For example, such disadvantages need to work in parallel in multiple files. + +83 +00:07:23,000 --> 00:07:30,000 +I wouldn't consider this as a disadvantage because how, in a perfect world for all of this disadvantages + +84 +00:07:30,000 --> 00:07:37,000 +should look like these are two both coding errors in one single file, one after another, a limited + +85 +00:07:37,000 --> 00:07:44,000 +amount of times without possibility of skill, as there are multiple of such so-called disadvantages + +86 +00:07:44,000 --> 00:07:45,000 +of MVC. + +87 +00:07:45,000 --> 00:07:53,000 +PA is that I don't want to consider as a true disadvantage, but still let me name just one standard + +88 +00:07:53,000 --> 00:07:55,000 +disadvantage of the MVC partner. + +89 +00:07:56,000 --> 00:07:58,000 +Relatively complex. + +90 +00:07:58,000 --> 00:08:05,000 +For some people, this design part might look complex, but I would say that it depends on the scale. + +91 +00:08:05,000 --> 00:08:11,000 +If you have few classes and few frontend pages that you can connect with each other, you don't need + +92 +00:08:11,000 --> 00:08:18,000 +such sweet separation of concerns because all employees in your company knows the code and you in place + +93 +00:08:18,000 --> 00:08:26,000 +can now within one hour the project navigation can become complex because it introduces new layers of + +94 +00:08:26,000 --> 00:08:33,000 +abstraction and requires users to adapt the composition criteria of MVC. + +95 +00:08:34,000 --> 00:08:38,000 +But still, in my opinion, this portal is relatively easy for understanding. + +96 +00:08:39,000 --> 00:08:46,000 +There is not so much the disadvantages because of the architecture, and the disadvantages are not so + +97 +00:08:46,000 --> 00:08:49,000 +huge and are very easy to ignore. + +98 +00:08:49,000 --> 00:08:51,000 +In comparison was all the benefits we get. + +99 +00:08:52,000 --> 00:08:58,000 +Now, before we jump to quote examples, let me illustrate things that we are going to learn and review + +100 +00:08:58,000 --> 00:08:59,000 +today. + +101 +00:09:00,000 --> 00:09:01,000 +Today you enslaved them. + +102 +00:09:01,000 --> 00:09:03,000 +I am going to show you a simple example. + +103 +00:09:04,000 --> 00:09:12,000 +In order to help you understand this part and after it, you are going to have a homework where an example + +104 +00:09:12,000 --> 00:09:15,000 +of a lunch you would need to implement. + +105 +00:09:15,000 --> 00:09:16,000 +And we see part of. + +106 +00:09:17,000 --> 00:09:26,000 +So in our example, we need to make simple, sane display first thing, plus an email of the user with + +107 +00:09:26,000 --> 00:09:33,000 +a specific the client's request controller to provide information about the user with a one. + +108 +00:09:34,000 --> 00:09:37,000 +Requests might be sent from some of that page. + +109 +00:09:38,000 --> 00:09:40,000 +It doesn't matter in scope of this example. + +110 +00:09:41,000 --> 00:09:47,000 +The main thing here is that the controller is in charge of handling of all client's requests. + +111 +00:09:48,000 --> 00:09:53,000 +We need to interact with our view, our model directly. + +112 +00:09:53,000 --> 00:09:55,000 +All interactions go through the controller. + +113 +00:09:56,000 --> 00:09:58,000 +Controller passes the request. + +114 +00:09:59,000 --> 00:10:01,000 +After the controller uses model. + +115 +00:10:02,000 --> 00:10:06,000 +We need to download information about the user from the database. + +116 +00:10:07,000 --> 00:10:13,000 +Once we received the model, controller passes the model to the view to present the data. + +117 +00:10:14,000 --> 00:10:17,000 +That's how a request will reach presentation layer. + +118 +00:10:18,000 --> 00:10:24,000 +Presentation is sent back to the controller and controller is a view back to decline. + +119 +00:10:25,000 --> 00:10:31,000 +Important thing about this part is that model and you never interacts with each. + +120 +00:10:32,000 --> 00:10:34,000 +We learned already a lot of things. + +121 +00:10:34,000 --> 00:10:38,000 +Now it is time to review how MVC Ironworks on practice. + +122 +00:10:39,000 --> 00:10:44,000 +I'm going to implement the code according to the design presented on previous slide. + +123 +00:10:45,000 --> 00:10:48,000 +I agree that the example in Genoa was the hub of solar technology. + +124 +00:10:49,000 --> 00:10:52,000 +In our case, to perform the role of a controller. + +125 +00:10:53,000 --> 00:10:56,000 +Our business model objects will institute role of models. + +126 +00:10:57,000 --> 00:11:00,000 +Ontologies files will execute the role of use. + +127 +00:11:01,000 --> 00:11:03,000 +Let me start from the controller. + +128 +00:11:03,000 --> 00:11:09,000 +I opened the several heads of the so-called user controller in this particular case. + +129 +00:11:09,000 --> 00:11:17,000 +Is this a regular similar to this map to the user's address when the client sends a request to get information + +130 +00:11:17,000 --> 00:11:17,000 +about the user? + +131 +00:11:18,000 --> 00:11:21,000 +This so that handles the request first. + +132 +00:11:21,000 --> 00:11:24,000 +We have user facade declared in this controller. + +133 +00:11:25,000 --> 00:11:31,000 +We get a parameter from the request and we use facade to get the user. + +134 +00:11:32,000 --> 00:11:35,000 +In this case, our facade is on the business layer. + +135 +00:11:36,000 --> 00:11:45,000 +Facade contains reference to the now object, the knows how to extract entity from that persistent storage. + +136 +00:11:45,000 --> 00:11:52,000 +In our case, this is relational database and I use controller to extract model. + +137 +00:11:53,000 --> 00:12:01,000 +Our user object in this case is a model after we successfully extracted the user object from the database. + +138 +00:12:01,000 --> 00:12:04,000 +What shall we do next quarter? + +139 +00:12:05,000 --> 00:12:09,000 +We have to pass this request together with data. + +140 +00:12:09,000 --> 00:12:11,000 +Was more though possible. + +141 +00:12:11,000 --> 00:12:20,000 +Those of you so I could use it as a request, attribute and forwards request does a view important sync + +142 +00:12:20,000 --> 00:12:20,000 +here. + +143 +00:12:21,000 --> 00:12:24,000 +I hide all views from direct access from the internet. + +144 +00:12:25,000 --> 00:12:25,000 +Why? + +145 +00:12:26,000 --> 00:12:31,000 +Because access to all resources should be controlled by controllers. + +146 +00:12:31,000 --> 00:12:40,000 +I don't want allow direct requests to use because as you can see, before rendering the view, we need + +147 +00:12:40,000 --> 00:12:44,000 +to prepare a model and data that should be populated on this view. + +148 +00:12:45,000 --> 00:12:53,000 +That's why Controller should be the one who receives requests and processes to have views from direct + +149 +00:12:53,000 --> 00:12:55,000 +access from the internet. + +150 +00:12:55,000 --> 00:12:58,000 +I could all use in that means folder. + +151 +00:12:59,000 --> 00:13:07,000 +If you think of my java from zero 2/1 job, of course then you are aware that the content of that folder + +152 +00:13:07,000 --> 00:13:12,000 +is not accessible from the internet and only accessed on the server. + +153 +00:13:13,000 --> 00:13:15,000 +That's why I created Call Center. + +154 +00:13:15,000 --> 00:13:18,000 +This is called views whatsoever. + +155 +00:13:18,000 --> 00:13:26,000 +This is equal to the graphics of the rectory where all my views are stored in this case. + +156 +00:13:26,000 --> 00:13:30,000 +This is web views pass in my controller. + +157 +00:13:30,000 --> 00:13:37,000 +After this preface, I add the name of my view where I want to follow this request. + +158 +00:13:38,000 --> 00:13:45,000 +In this case, my role will remain the same and user even reading understands that the passes request + +159 +00:13:45,000 --> 00:13:50,000 +is a service and after it four of it, it does a GSP page. + +160 +00:13:51,000 --> 00:13:53,000 +All of this is page. + +161 +00:13:53,000 --> 00:13:56,000 +I display request information to the end user. + +162 +00:13:56,000 --> 00:14:03,000 +Considering the fact that I already have all the necessary data for presentation prepared because I + +163 +00:14:03,000 --> 00:14:10,000 +add this model to the request, I can use expressions and needs to get access to the data that I need. + +164 +00:14:11,000 --> 00:14:14,000 +And here I print firstname, last name and email. + +165 +00:14:14,000 --> 00:14:15,000 +That's it. + +166 +00:14:16,000 --> 00:14:20,000 +Where is used is a source code of controller, model and view. + +167 +00:14:21,000 --> 00:14:23,000 +I have my server up and running. + +168 +00:14:23,000 --> 00:14:28,000 +So let me just open the browser and show you the end to end flow. + +169 +00:14:29,000 --> 00:14:35,000 +In the browser, I sent request to the user several app and pass this query parameter. + +170 +00:14:36,000 --> 00:14:44,000 +Once I sends a request requested, the controller model is extracted and prepared model is passed to + +171 +00:14:44,000 --> 00:14:49,000 +the view and here will use returned back to the client. + +172 +00:14:50,000 --> 00:14:54,000 +Here is the first name last name and email of user. + +173 +00:14:54,000 --> 00:15:03,000 +Was a want is ever clear you can find source code of examples I showed in this lesson in attachments + +174 +00:15:03,000 --> 00:15:04,000 +this video. + +175 +00:15:04,000 --> 00:15:10,000 +And in case something is still not clear, please do not hesitate to ask your questions. + +176 +00:15:11,000 --> 00:15:11,000 +Those of you who. + +177 +00:15:13,000 --> 00:15:15,000 +That's what I wanted to discuss with you. + +178 +00:15:15,000 --> 00:15:16,000 +Today's lesson. + +179 +00:15:16,000 --> 00:15:20,000 +Let's recap what we have learned in this lesson. + +180 +00:15:21,000 --> 00:15:25,000 +The lesson learned definition of the MVC design car. + +181 +00:15:26,000 --> 00:15:30,000 +We talked about advantages and disadvantages of the MVC car. + +182 +00:15:30,000 --> 00:15:34,000 +After that, we learned the goal of each MVC element. + +183 +00:15:35,000 --> 00:15:38,000 +Namely, we talked about controller, model and view. + +184 +00:15:39,000 --> 00:15:40,000 +That's all for today. + +185 +00:15:41,000 --> 00:15:42,000 +Thanks a lot for your attention. + +186 +00:15:42,000 --> 00:15:45,000 +Have a great day and see you in the next lesson. + diff --git a/69 - Web Application Design Patterns/001 Source-code-of-Controller.url b/69 - Web Application Design Patterns/001 Source-code-of-Controller.url new file mode 100644 index 0000000000000000000000000000000000000000..92b5770124bb118d69b126d1854258940149e6f4 --- /dev/null +++ b/69 - Web Application Design Patterns/001 Source-code-of-Controller.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/servlets/UserController.java \ No newline at end of file diff --git a/69 - Web Application Design Patterns/001 Source-code-of-Model.url b/69 - Web Application Design Patterns/001 Source-code-of-Model.url new file mode 100644 index 0000000000000000000000000000000000000000..02f8965c4fe8a73ea767bcaf0d8cd1bbc329a18f --- /dev/null +++ b/69 - Web Application Design Patterns/001 Source-code-of-Model.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.persistence/src/main/java/com/itbulls/learnit/onlinestore/persistence/enteties/impl/DefaultUser.java \ No newline at end of file diff --git a/69 - Web Application Design Patterns/001 Source-code-of-View.url b/69 - Web Application Design Patterns/001 Source-code-of-View.url new file mode 100644 index 0000000000000000000000000000000000000000..3a79178c2b1a74400a2998739a33a1ebf5e117b7 --- /dev/null +++ b/69 - Web Application Design Patterns/001 Source-code-of-View.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/WEB-INF/views/generalUserInfo.jsp \ No newline at end of file diff --git a/69 - Web Application Design Patterns/002 Layered Architecture_en.srt b/69 - Web Application Design Patterns/002 Layered Architecture_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..90f159bbc160cd753950ff288a6c3ecf6242bda2 --- /dev/null +++ b/69 - Web Application Design Patterns/002 Layered Architecture_en.srt @@ -0,0 +1,1216 @@ +1 +00:00:05,000 --> 00:00:06,000 +Hello again, students. + +2 +00:00:06,000 --> 00:00:09,000 +In this lesson, we're going to run their architecture. + +3 +00:00:10,000 --> 00:00:16,000 +We're going to start from the overview of their architecture and understanding of why we need it. + +4 +00:00:17,000 --> 00:00:24,000 +Also will learn such important concepts of their architecture as closed layers, layer sophistication + +5 +00:00:24,000 --> 00:00:26,000 +and open layers. + +6 +00:00:26,000 --> 00:00:34,000 +To help you understand this part and that, we're going to put examples of online shop and specific + +7 +00:00:34,000 --> 00:00:38,000 +user entrance flows to see how their architecture works. + +8 +00:00:39,000 --> 00:00:46,000 +I want to explain what a sinkhole onto part of this and what to do in case we found this part in the + +9 +00:00:46,000 --> 00:00:47,000 +now application. + +10 +00:00:47,000 --> 00:00:53,000 +Also, we'll talk about connection between layer architecture and monolithic architecture. + +11 +00:00:53,000 --> 00:00:59,000 +And at the end of the lesson, we'll sum up all knowledge gained during the lesson to describe advantages + +12 +00:01:00,000 --> 00:01:02,000 +and disadvantages of the layer architecture. + +13 +00:01:03,000 --> 00:01:04,000 +Let's start our lesson. + +14 +00:01:05,000 --> 00:01:09,000 +Let us know first what layers architecture is and why we need it. + +15 +00:01:09,000 --> 00:01:15,000 +Where it's architecture is probably the most common and widely used architecture approach nowadays. + +16 +00:01:16,000 --> 00:01:24,000 +This also known as Empire Architecture and describes an architectural portal composed of several separate + +17 +00:01:24,000 --> 00:01:29,000 +horizontal layers that function together as a single unit of software. + +18 +00:01:29,000 --> 00:01:37,000 +This part is the fact the standard for most Java applications and therefore is widely known by most + +19 +00:01:37,000 --> 00:01:40,000 +architects, designers and developers. + +20 +00:01:41,000 --> 00:01:48,000 +The architecture part of the closed in March is traditional I.T communication now of used structures + +21 +00:01:48,000 --> 00:01:54,000 +found in most companies, making it a natural choice for most business application development. + +22 +00:01:54,000 --> 00:02:03,000 +The for each layer is a logical separation of components or code according to this approach, components + +23 +00:02:03,000 --> 00:02:07,000 +that are related or that a similar are usually placed on the same layers. + +24 +00:02:08,000 --> 00:02:15,000 +However, each layer is different and contributes to different parts of the overall system components + +25 +00:02:15,000 --> 00:02:22,000 +within the architecture palm organized into horizontal layers, each layer performing a specific role + +26 +00:02:22,000 --> 00:02:27,000 +within the application, such as presentation logic or business logic. + +27 +00:02:28,000 --> 00:02:36,000 +The land architecture part doesn't specify the number and types of this that must exist in Zapata. + +28 +00:02:37,000 --> 00:02:38,000 +And this is important point. + +29 +00:02:39,000 --> 00:02:45,000 +That's why in learning literature and the internet, you wouldn't see one conventional diagram that + +30 +00:02:45,000 --> 00:02:49,000 +tells you that you should have all this kind of layers and nothing else. + +31 +00:02:50,000 --> 00:02:54,000 +This separation of concerns makes logical and physical. + +32 +00:02:54,000 --> 00:03:00,000 +When I say logical, I means that when you create architecture of your application, then you logically + +33 +00:03:00,000 --> 00:03:04,000 +separate more just from each other on different layers. + +34 +00:03:04,000 --> 00:03:11,000 +This can also be done physically by separation of code into packages and separate subprojects components + +35 +00:03:11,000 --> 00:03:12,000 +or modules. + +36 +00:03:13,000 --> 00:03:17,000 +But still even this, there is no single approach in names of layers. + +37 +00:03:17,000 --> 00:03:22,000 +Most layer architectures consist of four standard layers. + +38 +00:03:22,000 --> 00:03:27,000 +Zia presentation business persistence and database. + +39 +00:03:28,000 --> 00:03:35,000 +Smaller applications may have only three layers with a similar theoretical may become more and more + +40 +00:03:35,000 --> 00:03:37,000 +as larger and more complex. + +41 +00:03:37,000 --> 00:03:41,000 +Business applications may contain five or more layers. + +42 +00:03:42,000 --> 00:03:48,000 +Each layer of the architecture part has a specific role and responsibility within the application. + +43 +00:03:49,000 --> 00:03:55,000 +For example, the presentation that would be responsible for handling all user interface and browser + +44 +00:03:55,000 --> 00:04:02,000 +communication, logic, virus and business layer would be responsible for executing specific business + +45 +00:04:02,000 --> 00:04:05,000 +rules associated with the request. + +46 +00:04:05,000 --> 00:04:12,000 +Each LANs architecture forms an abstraction around the world that needs to be done to satisfy a particular + +47 +00:04:12,000 --> 00:04:13,000 +business request. + +48 +00:04:13,000 --> 00:04:20,000 +For example, the presentation layer doesn't need to know or worry about how to get customer data from + +49 +00:04:20,000 --> 00:04:21,000 +database. + +50 +00:04:21,000 --> 00:04:26,000 +It only needs to display that information on a screen in a particular format. + +51 +00:04:26,000 --> 00:04:33,000 +Similarly, the business layer doesn't need to be concerned about how to find the customer data for + +52 +00:04:33,000 --> 00:04:37,000 +display on the screen, or even where the customer data is coming from. + +53 +00:04:37,000 --> 00:04:40,000 +It only needs to get the data from the persistence layer. + +54 +00:04:41,000 --> 00:04:48,000 +This business logic against the data, for example, some calculation of different values or aggregation + +55 +00:04:48,000 --> 00:04:49,000 +of data. + +56 +00:04:49,000 --> 00:04:52,000 +And plus is that information after presentation layer. + +57 +00:04:53,000 --> 00:04:54,000 +Okay. + +58 +00:04:54,000 --> 00:05:00,000 +I believe you already understood from the high level what architecture is, but why did you need it? + +59 +00:05:01,000 --> 00:05:02,000 +Probably. + +60 +00:05:02,000 --> 00:05:08,000 +The key feature of the Laird's architecture and why it is so popular is a separation of concerns and + +61 +00:05:08,000 --> 00:05:09,000 +or components. + +62 +00:05:10,000 --> 00:05:12,000 +Components from a specific way to interact. + +63 +00:05:12,000 --> 00:05:15,000 +Only with the components comes enable it. + +64 +00:05:16,000 --> 00:05:23,000 +But usually components try to focus only on the responsibilities located on Z specific travel. + +65 +00:05:24,000 --> 00:05:31,000 +For example, components from business layer use only with business logic and interact with persistence + +66 +00:05:31,000 --> 00:05:36,000 +to extract some data and also interact with the presentation. + +67 +00:05:36,000 --> 00:05:39,000 +That is a to get some requests for sense, some process. + +68 +00:05:39,000 --> 00:05:42,000 +The interactions happen. + +69 +00:05:42,000 --> 00:05:45,000 +We have different interfaces is in the school. + +70 +00:05:46,000 --> 00:05:53,000 +This make it easy to build effective roles and responsibility models into our application architecture + +71 +00:05:54,000 --> 00:06:02,000 +and also makes it easier to develop tests, govern and maintain applications using this architecture + +72 +00:06:02,000 --> 00:06:07,000 +partly due to well-defined component interfaces of its components. + +73 +00:06:07,000 --> 00:06:14,000 +Scope Heavens, this architecture also make it easier to substitute the whole layer because the impact + +74 +00:06:14,000 --> 00:06:22,000 +on the neighbor layers is minimized because we use abstractions to interact with each layer and it is + +75 +00:06:22,000 --> 00:06:25,000 +only a matter of substitution of implementation on each layer. + +76 +00:06:26,000 --> 00:06:32,000 +For example, in case you decided to substitute database, this will not impact user presentation. + +77 +00:06:32,000 --> 00:06:37,000 +There no business where it might impact persistence there and that's it. + +78 +00:06:38,000 --> 00:06:41,000 +And similar story with other layers. + +79 +00:06:41,000 --> 00:06:48,000 +Let's keep learning layers, architecture and now it is time to know the key concepts of layers architecture + +80 +00:06:48,000 --> 00:06:52,000 +like closed layers, layer sophistication and open layers. + +81 +00:06:53,000 --> 00:06:56,000 +Let's start from learning of closed layers. + +82 +00:06:56,000 --> 00:06:57,000 +Now this is it. + +83 +00:06:57,000 --> 00:07:00,000 +On this slide, each layer is marked as being closed. + +84 +00:07:01,000 --> 00:07:03,000 +This is very important concept. + +85 +00:07:03,000 --> 00:07:04,000 +Insulate its architecture partner. + +86 +00:07:05,000 --> 00:07:14,000 +It closely means that as a request from layer to layer, it must go through that right below to get + +87 +00:07:14,000 --> 00:07:16,000 +to the next layer below. + +88 +00:07:16,000 --> 00:07:23,000 +Set one for example I request originating from the presentation layer must first go through the business + +89 +00:07:23,000 --> 00:07:29,000 +layer and is persistence there before finally is a database layer. + +90 +00:07:29,000 --> 00:07:35,000 +This also important to highlight that the same rule applies all the way back. + +91 +00:07:36,000 --> 00:07:38,000 +One response comes back to the client. + +92 +00:07:39,000 --> 00:07:47,000 +It also should go through each of the closed layers, so why not allows the presentation that direct + +93 +00:07:47,000 --> 00:07:47,000 +access? + +94 +00:07:47,000 --> 00:07:50,000 +The ease is a persistence layer or database layer. + +95 +00:07:51,000 --> 00:07:58,000 +After all, direct database access becomes a presentation that is much faster than was a bunch of unnecessary + +96 +00:07:58,000 --> 00:08:02,000 +layers just to retrieve or save that information. + +97 +00:08:03,000 --> 00:08:08,000 +The answer to this question arise in the key concept known as layers of isolation. + +98 +00:08:09,000 --> 00:08:11,000 +What are layers of isolation? + +99 +00:08:11,000 --> 00:08:12,000 +Let me explain. + +100 +00:08:12,000 --> 00:08:13,000 +Layers. + +101 +00:08:13,000 --> 00:08:15,000 +Self-isolation describes a case. + +102 +00:08:15,000 --> 00:08:21,000 +One layer of architecture generally don't impact or affect components in oscillators. + +103 +00:08:22,000 --> 00:08:31,000 +The change is related to the components was in that layer and possibly another associated layer such + +104 +00:08:31,000 --> 00:08:33,000 +as persistence layer contains sequel. + +105 +00:08:34,000 --> 00:08:41,000 +If you browse the presentation direct access to the persistence layer, then changes made to sequel. + +106 +00:08:41,000 --> 00:08:49,000 +What was that persistence layer would impact both is a business layer and the presentation that is there + +107 +00:08:49,000 --> 00:08:57,000 +by producing a very tightly coupled application was loss of interdependencies between components this + +108 +00:08:57,000 --> 00:09:02,000 +type of architectures and becomes very hard and expensive to change. + +109 +00:09:03,000 --> 00:09:09,000 +If you are still out of my job from zero to first, of course, then you should understand why I was + +110 +00:09:09,000 --> 00:09:14,000 +against of use and still to connect to the database directly from the GC pages. + +111 +00:09:15,000 --> 00:09:20,000 +This is exactly because of the violation of rules of layers architecture. + +112 +00:09:21,000 --> 00:09:28,000 +The layers of examination concept also means that each layer is independent of the opposite layers, + +113 +00:09:28,000 --> 00:09:35,000 +thereby having little or no knowledge of the inner workings of other layers of architecture. + +114 +00:09:36,000 --> 00:09:43,000 +To understand the power and the importance of this concept, consider a large Rifaximin effort to convert + +115 +00:09:43,000 --> 00:09:51,000 +the presentation framework from GCP Java server pages to GSF Java server faces. + +116 +00:09:51,000 --> 00:09:56,000 +Assume that contrast is used between the presentation and the business. + +117 +00:09:56,000 --> 00:09:57,000 +There remains a see. + +118 +00:09:58,000 --> 00:10:04,000 +The business layer is not affected by the factory and it remains completely independent of the type + +119 +00:10:04,000 --> 00:10:08,000 +of user interface framework used by the presentation layer. + +120 +00:10:09,000 --> 00:10:10,000 +Okay. + +121 +00:10:10,000 --> 00:10:15,000 +We learned already what closed layers and layers of association are. + +122 +00:10:15,000 --> 00:10:18,000 +Now let's zoom what open layers are. + +123 +00:10:19,000 --> 00:10:27,000 +While closed layers facilitate layers of facilitation and therefore help to easily change wasn't architecture + +124 +00:10:27,000 --> 00:10:31,000 +the times when it makes sense for certain layers to be open. + +125 +00:10:32,000 --> 00:10:39,000 +For example, suppose you want to add a shared services flat, an architecture something in common service + +126 +00:10:39,000 --> 00:10:47,000 +components accessed by components was in the business layer, like for example, data and sensitivity + +127 +00:10:47,000 --> 00:10:49,000 +classes or some logging classes. + +128 +00:10:50,000 --> 00:10:55,000 +Creating an open lens allows requests to parse the services there. + +129 +00:10:55,000 --> 00:10:59,000 +Once there was no need and this is a good solution of this challenge. + +130 +00:11:00,000 --> 00:11:02,000 +So we pass the request. + +131 +00:11:02,000 --> 00:11:08,000 +So as a service layer only when need needed and we are not obligated to do so. + +132 +00:11:09,000 --> 00:11:15,000 +In this example, zoos use services that would likely reside below that business layer to indicate that + +133 +00:11:15,000 --> 00:11:20,000 +components exist, services that are not accessible from the presentation there. + +134 +00:11:21,000 --> 00:11:28,000 +However, this presents a problem in that the business flair is now required to go through the services + +135 +00:11:28,000 --> 00:11:28,000 +there. + +136 +00:11:28,000 --> 00:11:32,000 +To get to the persistence which make no sense at all. + +137 +00:11:33,000 --> 00:11:40,000 +This is an age old problem, the architecture and is sold by creating open layers within the architecture. + +138 +00:11:41,000 --> 00:11:48,000 +On this slide you can see that the services layer in this case is marked as open, meaning a request + +139 +00:11:48,000 --> 00:11:52,000 +allowed by pass is this open letter and go directly to the land below. + +140 +00:11:53,000 --> 00:12:00,000 +In the following example Since the service there is open, the business is now allowed to bypass it + +141 +00:12:01,000 --> 00:12:05,000 +and go directly to the persistence there, which makes perfect sense. + +142 +00:12:06,000 --> 00:12:12,000 +Leveraging the concept of open and close awareness helps defines the relationship between architecture + +143 +00:12:12,000 --> 00:12:19,000 +layers and the request flows, and also provides designers and developers with the necessary information + +144 +00:12:19,000 --> 00:12:27,000 +to understand the various access restrictions within the architecture, saying that the document appropriately + +145 +00:12:27,000 --> 00:12:33,000 +communicates which layers of architecture are open and closed and why they are closed. + +146 +00:12:33,000 --> 00:12:40,000 +Usually that results in tightly coupled and brief architectures that are very difficult to test, maintain + +147 +00:12:41,000 --> 00:12:41,000 +and deploy. + +148 +00:12:42,000 --> 00:12:46,000 +Now let's discuss the examples of the prevalence of you in this lesson. + +149 +00:12:47,000 --> 00:12:52,000 +Let's discuss the architecture of online shop and then registration. + +150 +00:12:52,000 --> 00:13:01,000 +So on the presentation there we have in the registration form with fill it out was data and we send + +151 +00:13:01,000 --> 00:13:04,000 +data to the application on the business there. + +152 +00:13:04,000 --> 00:13:08,000 +We get this data with the backend validations. + +153 +00:13:08,000 --> 00:13:15,000 +For example, we check that passwords meets security rules and passwords and check password fields are + +154 +00:13:15,000 --> 00:13:16,000 +equal. + +155 +00:13:16,000 --> 00:13:22,000 +Also, according to our business logic, we need to assign customer all to all users. + +156 +00:13:22,000 --> 00:13:24,000 +We use the registration form for registration. + +157 +00:13:25,000 --> 00:13:28,000 +We need to generate unique partner code. + +158 +00:13:28,000 --> 00:13:31,000 +We add all this information before passing user. + +159 +00:13:31,000 --> 00:13:39,000 +It is a persistence that we also check whether there is some person we found to understand was a new + +160 +00:13:39,000 --> 00:13:45,000 +user come to the online store they are referencing and we need to send bonuses to other user. + +161 +00:13:45,000 --> 00:13:49,000 +No, we can also add any other logic on the business plan. + +162 +00:13:50,000 --> 00:13:57,000 +Once we need all this looking POS data for us, it is a persistent slap on the persistence that we did + +163 +00:13:57,000 --> 00:14:04,000 +all necessary things like establishing database connection, converting business subject to a data model + +164 +00:14:04,000 --> 00:14:05,000 +object. + +165 +00:14:05,000 --> 00:14:12,000 +Because, for example, it is not enough to know that the user has customer role in a relational database. + +166 +00:14:12,000 --> 00:14:20,000 +We need to store I.D. of customer all into the database to ensure proper relations between all and user + +167 +00:14:20,000 --> 00:14:20,000 +tables. + +168 +00:14:21,000 --> 00:14:23,000 +You can use relational database in the back end. + +169 +00:14:24,000 --> 00:14:32,000 +After that, we execute the inserts request on the database that will restore the user we receive confirmation + +170 +00:14:32,000 --> 00:14:33,000 +we pass. + +171 +00:14:33,000 --> 00:14:39,000 +Is this confirmation back to the persistence layer on this layer will convert the data model back to + +172 +00:14:40,000 --> 00:14:40,000 +the business subject. + +173 +00:14:41,000 --> 00:14:44,000 +After that we pass some business object as a business. + +174 +00:14:44,000 --> 00:14:50,000 +There was said business object in the session scope and create a session for the second and after that + +175 +00:14:50,000 --> 00:14:57,000 +returns the data back to the client and the user is redirected to the use we see in his name. + +176 +00:14:57,000 --> 00:14:58,000 +Invoke message. + +177 +00:14:58,000 --> 00:15:02,000 +This is example of a plan architecture in real life. + +178 +00:15:03,000 --> 00:15:05,000 +We'll do like to see this example in code. + +179 +00:15:06,000 --> 00:15:08,000 +It is not a problem at all. + +180 +00:15:08,000 --> 00:15:15,000 +Was my students from the course go from zero to first job to create online shop web application from + +181 +00:15:15,000 --> 00:15:20,000 +scratch, following best practices and discussing different approaches. + +182 +00:15:20,000 --> 00:15:26,000 +Let me share with you my screen and show you how we use architecture inside application. + +183 +00:15:27,000 --> 00:15:30,000 +Well, we describe the use case of the registration. + +184 +00:15:31,000 --> 00:15:35,000 +Let me show it to you how it is actually separated in my application. + +185 +00:15:36,000 --> 00:15:41,000 +First of all, I have three Maven modules in this single application. + +186 +00:15:41,000 --> 00:15:49,000 +They are called core persistence and that map module contains all logic related to the presentation + +187 +00:15:49,000 --> 00:15:53,000 +there, including all my user interaction pages. + +188 +00:15:53,000 --> 00:15:58,000 +Core module contains all business related logic and persistence. + +189 +00:15:58,000 --> 00:16:05,000 +Module contains all the code that is in charge of the tasks related to persistence storage of data. + +190 +00:16:05,000 --> 00:16:12,000 +In my application separately I have local my SQL Server database deployed on my local computer. + +191 +00:16:13,000 --> 00:16:15,000 +This is actually my database thing. + +192 +00:16:15,000 --> 00:16:19,000 +This registration flow is started from the sign up page. + +193 +00:16:20,000 --> 00:16:30,000 +Here it is is a form of suddenly that to a signed up controller and here is sign up controller interacts + +194 +00:16:30,000 --> 00:16:35,000 +with the business there and here is a reference to the facade object from the core module. + +195 +00:16:36,000 --> 00:16:40,000 +When I call a register user massive, I like to use them. + +196 +00:16:41,000 --> 00:16:43,000 +I also generate a unique personal code. + +197 +00:16:44,000 --> 00:16:51,000 +I set a reference user in case of a found one based on user cookies, and after that we send request + +198 +00:16:51,000 --> 00:16:55,000 +persistence to my the object to save user. + +199 +00:16:56,000 --> 00:17:02,000 +If you are not familiar with our portal, please refer to the nonetheless where we are and how that + +200 +00:17:03,000 --> 00:17:03,000 +works. + +201 +00:17:04,000 --> 00:17:09,000 +My now implementation sends the request direct, which is a database. + +202 +00:17:09,000 --> 00:17:11,000 +That's how this flow looks like. + +203 +00:17:12,000 --> 00:17:17,000 +Therefore, you can use different technical steps to implement its architecture. + +204 +00:17:18,000 --> 00:17:21,000 +This is just one of the possible examples created with Java. + +205 +00:17:21,000 --> 00:17:28,000 +And so this technology, by the way, you're going to find links to the source code of this example, + +206 +00:17:29,000 --> 00:17:30,000 +attachments to the lesson. + +207 +00:17:30,000 --> 00:17:33,000 +Feel free to explore the code itself. + +208 +00:17:33,000 --> 00:17:37,000 +Please ask me the most expedient in case you have any questions. + +209 +00:17:38,000 --> 00:17:42,000 +Let's do a few more things that we need to consider while working with the architecture. + +210 +00:17:43,000 --> 00:17:49,000 +I'd like to discuss with you on two parter that you definitely need to consider when you are dealing + +211 +00:17:49,000 --> 00:17:50,000 +with the architecture column. + +212 +00:17:51,000 --> 00:17:58,000 +This unsupported describes a situation where requests flow, so multiple layers of the architecture + +213 +00:17:58,000 --> 00:18:04,000 +as simple as possible, consistent with little or no logic performed with each layer. + +214 +00:18:05,000 --> 00:18:12,000 +This one department is called Sinkhole and passing, for example, assumes a presentation layer. + +215 +00:18:12,000 --> 00:18:20,000 +Response to request from the user to retrieve customer data is a presentation that passes request to + +216 +00:18:20,000 --> 00:18:26,000 +the business layer, which simply passes as a request to the persistence layer, which then makes a + +217 +00:18:26,000 --> 00:18:31,000 +single sequel call to the database layer to retrieve the customer data. + +218 +00:18:32,000 --> 00:18:39,000 +The data is then passed all the way back up the stack with no additional processing for logic to aggregate, + +219 +00:18:39,000 --> 00:18:42,000 +calculate or transforms the data. + +220 +00:18:42,000 --> 00:18:50,000 +And in this case it is not clear why do we need all these layers at all just to have them? + +221 +00:18:50,000 --> 00:18:53,000 +This definitely makes no sense in this case. + +222 +00:18:54,000 --> 00:19:01,000 +Also, you have to understand that this architecture will have at least some scenarios that fall into + +223 +00:19:01,000 --> 00:19:04,000 +the architecture sinkhole and support them. + +224 +00:19:04,000 --> 00:19:12,000 +But the main thing here is to calculate and analyze the percentage of requests that fall into this category. + +225 +00:19:13,000 --> 00:19:17,000 +And again, there is no golden standards here for these numbers. + +226 +00:19:17,000 --> 00:19:24,000 +But based on my experience, I can make an assumption that around 1% of requests a simple pass through + +227 +00:19:24,000 --> 00:19:30,000 +processing and 80% of requests have some business logic associated with request. + +228 +00:19:31,000 --> 00:19:33,000 +This can be considered as an appropriate situation. + +229 +00:19:34,000 --> 00:19:40,000 +In case after analysis, you would discover that you have higher ratio of pass through requests. + +230 +00:19:40,000 --> 00:19:44,000 +You might want to consider making some of the architecture less open. + +231 +00:19:45,000 --> 00:19:48,000 +Keep in mind that it will be more difficult to control. + +232 +00:19:48,000 --> 00:19:55,000 +Change uses a lot of layer isolation and this should be a wise and recent decision. + +233 +00:19:56,000 --> 00:20:02,000 +Another thing that I'd like to talk with you today is the connection between rare and monolithic architecture. + +234 +00:20:03,000 --> 00:20:08,000 +If you are not familiar with monolithic and microservices architecture, let me explain. + +235 +00:20:08,000 --> 00:20:09,000 +Use this in sharp. + +236 +00:20:10,000 --> 00:20:16,000 +I will not cover all the differences because we are going to have a separate lesson about microservices + +237 +00:20:16,000 --> 00:20:17,000 +architecture. + +238 +00:20:17,000 --> 00:20:25,000 +Ensure a monolithic architecture describes software application in which is a user interface and data + +239 +00:20:25,000 --> 00:20:29,000 +access code are combined into a single program from a single platform. + +240 +00:20:30,000 --> 00:20:37,000 +The responsibility can be separate even into different modules or so called layers, but still is a + +241 +00:20:37,000 --> 00:20:38,000 +deployment process. + +242 +00:20:38,000 --> 00:20:45,000 +Development process and actually connections between the different models don't allow to work with each + +243 +00:20:45,000 --> 00:20:46,000 +component separately. + +244 +00:20:47,000 --> 00:20:50,000 +Instead, we can work with the application as was whole. + +245 +00:20:51,000 --> 00:20:58,000 +Monza had a microservices architecture, arranges an application as a collection of mostly complex services. + +246 +00:20:59,000 --> 00:21:04,000 +The goal is that teams can bring the services to life independent of others. + +247 +00:21:05,000 --> 00:21:08,000 +To achieve such level of independence is not a trivial task. + +248 +00:21:09,000 --> 00:21:17,000 +But as I said, we're going to talk about this in a separate lesson Xencor is seeing here is that architecture + +249 +00:21:17,000 --> 00:21:24,000 +tends to be applied in monolithic applications, even if you split the presentation and business layers + +250 +00:21:24,000 --> 00:21:25,000 +into separate deployable units. + +251 +00:21:26,000 --> 00:21:33,000 +While this may not be a concern for some applications, this may cause some potential challenges in + +252 +00:21:33,000 --> 00:21:35,000 +terms of deployment. + +253 +00:21:35,000 --> 00:21:35,000 +Just. + +254 +00:21:36,000 --> 00:21:39,000 +Robustness, reliability, performance and scalability. + +255 +00:21:40,000 --> 00:21:46,000 +We learned a lot about Laird's architecture, and now we have enough information to make conclusions + +256 +00:21:47,000 --> 00:21:51,000 +and describe advantages and disadvantages of these kinds of architecture. + +257 +00:21:52,000 --> 00:21:57,000 +Let's review now the most obvious advantages and disadvantages of using their architecture. + +258 +00:21:58,000 --> 00:22:04,000 +Let's start from advantages and what advantages it is worth to highlight the following ones. + +259 +00:22:04,000 --> 00:22:06,000 +Simple and logical. + +260 +00:22:06,000 --> 00:22:10,000 +The architecture is simple and easy to learn and implement. + +261 +00:22:10,000 --> 00:22:16,000 +It provides some of the clarity and clear interfaces, low coupling and high cohesion. + +262 +00:22:17,000 --> 00:22:21,000 +This architecture facilitates low carbon and high diffusion. + +263 +00:22:22,000 --> 00:22:24,000 +Love a dependency between components. + +264 +00:22:25,000 --> 00:22:31,000 +There is reduce dependence because the function of each layer is separate from the ozone layer. + +265 +00:22:32,000 --> 00:22:33,000 +Easier to test. + +266 +00:22:34,000 --> 00:22:37,000 +This is easier because of the separated components. + +267 +00:22:38,000 --> 00:22:40,000 +Each component can be tested individually. + +268 +00:22:41,000 --> 00:22:49,000 +Cost, overheads and low robustness LEDs architecture ensure stability. + +269 +00:22:50,000 --> 00:22:55,000 +Also, it is time tested approach and one disadvantage is let me names. + +270 +00:22:55,000 --> 00:22:58,000 +The next wants overheads of operations. + +271 +00:22:59,000 --> 00:23:02,000 +In most cases it is not possible to schemes of there. + +272 +00:23:02,000 --> 00:23:10,000 +We learned that the request response should gross or each closed than to ensure isolation of layers. + +273 +00:23:10,000 --> 00:23:18,000 +This is done in order to achieve scalability, stability and some clear structure, but at the same + +274 +00:23:18,000 --> 00:23:21,000 +time sometimes less than us. + +275 +00:23:21,000 --> 00:23:24,000 +Rather than just pass data from one to another. + +276 +00:23:25,000 --> 00:23:33,000 +And you talked about second part of today day to imagine that the information about order on the presentation + +277 +00:23:33,000 --> 00:23:36,000 +there without any modification. + +278 +00:23:36,000 --> 00:23:43,000 +In this case, you need to send requests, extract order data from the database, pass it to the persistence + +279 +00:23:43,000 --> 00:23:50,000 +layer processes in business, and after that, pass it to the presentation then for some group of engineers. + +280 +00:23:50,000 --> 00:23:57,000 +This approach may sound like overwhelming and can be treated as a disadvantage because of the layer + +281 +00:23:57,000 --> 00:23:58,000 +architecture. + +282 +00:23:58,000 --> 00:24:02,000 +Zero might be some minor delays in performance in some cases. + +283 +00:24:03,000 --> 00:24:09,000 +I wouldn't say that this is the most critical disadvantage because the delay is not huge in most cases, + +284 +00:24:10,000 --> 00:24:15,000 +but having multiple layers, definitely it takes additional time from massive rotations. + +285 +00:24:16,000 --> 00:24:21,000 +But as I said, in most cases this is a matter of milliseconds. + +286 +00:24:22,000 --> 00:24:27,000 +The use of layers helps the control and copes with the complexity of large applications. + +287 +00:24:28,000 --> 00:24:31,000 +But that's complexity to single applications. + +288 +00:24:32,000 --> 00:24:40,000 +Potentially, applying this layer architecture can lead us to the sinkhole and to palm what it is already + +289 +00:24:40,000 --> 00:24:40,000 +discussed. + +290 +00:24:41,000 --> 00:24:48,000 +For the fans of microservices architecture, this part may become useless because there is no need to + +291 +00:24:48,000 --> 00:24:55,000 +spend time on the logical separation of this because all services already are separate and independent. + +292 +00:24:57,000 --> 00:25:00,000 +The advantages and disadvantages are clear for you. + +293 +00:25:00,000 --> 00:25:04,000 +You're going to understand them better when you actually apply. + +294 +00:25:04,000 --> 00:25:06,000 +It's architecture part on practice. + +295 +00:25:07,000 --> 00:25:09,000 +That's all what I wanted to share with you today. + +296 +00:25:10,000 --> 00:25:13,000 +Let's recap what we have learned in this lesson. + +297 +00:25:14,000 --> 00:25:19,000 +This lesson learned what this architecture is and why we needed. + +298 +00:25:20,000 --> 00:25:28,000 +You used such important concepts in architecture as closely as their self distillation and openness. + +299 +00:25:29,000 --> 00:25:36,000 +What is cost, what a sinkhole is, and what to do in case we discover it is in our application. + +300 +00:25:37,000 --> 00:25:44,000 +I explained how a connection between architecture and one of the second architecture looks like, and + +301 +00:25:44,000 --> 00:25:49,000 +that answers to some of the advantages and disadvantages of its architecture. + +302 +00:25:50,000 --> 00:25:51,000 +That's all for this lesson. + +303 +00:25:52,000 --> 00:25:53,000 +Thanks a lot for your attention. + +304 +00:25:53,000 --> 00:25:56,000 +Have a great day and see you in the next lesson. + diff --git a/69 - Web Application Design Patterns/002 Source-code-of-application-from-the-lesson-with-layered-architecture.url b/69 - Web Application Design Patterns/002 Source-code-of-application-from-the-lesson-with-layered-architecture.url new file mode 100644 index 0000000000000000000000000000000000000000..262b8c4d5c275e08ca8113239c214b4c32b8b4c7 --- /dev/null +++ b/69 - Web Application Design Patterns/002 Source-code-of-application-from-the-lesson-with-layered-architecture.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store \ No newline at end of file diff --git a/69 - Web Application Design Patterns/external-links.txt b/69 - Web Application Design Patterns/external-links.txt new file mode 100644 index 0000000000000000000000000000000000000000..39d273c84afb12ba832622be904fc9d5ab302a04 --- /dev/null +++ b/69 - Web Application Design Patterns/external-links.txt @@ -0,0 +1,12 @@ + +001 Source-code-of-Controller +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/servlets/UserController.java + +001 Source-code-of-View +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.web/src/main/webapp/WEB-INF/views/generalUserInfo.jsp + +001 Source-code-of-Model +https://github.com/AndriiPiatakha/java-learnit-web-online-store/blob/master/online-store.persistence/src/main/java/com/itbulls/learnit/onlinestore/persistence/enteties/impl/DefaultUser.java + +002 Source-code-of-application-from-the-lesson-with-layered-architecture +https://github.com/AndriiPiatakha/java-learnit-web-online-store diff --git a/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/001 How to be prepared for the interview.html b/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/001 How to be prepared for the interview.html new file mode 100644 index 0000000000000000000000000000000000000000..af8073331ac38a8a7242fb06700725a597386488 --- /dev/null +++ b/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/001 How to be prepared for the interview.html @@ -0,0 +1,69 @@ + + + + + + How to be prepared for the interview + + + + +
+
+
How to be prepared for the interview
+

I gathered for you the most popular questions during the Java Interview in JAVA WEB, SERVLETS, JSP & JSTL topics. How you can be prepared for the interview?

Just read the question first. Try to answer the question by yourself. After that, compare your answer with the answer provided. Remember, that this is just a reference to the answer. Because sometimes the topic is big, and you can go really deep with your answer. In case you feel like you don’t understand what the answer is about - feel free to get back in the course and review the relevant section, and relevant lesson one more time.

Also, you are always welcome to ask your questions and I will be happy to answer. I’m sure that these questions will help you to be prepared for the JAVA WEB, SERVLETS, JSP, JSTL interview. You need to be ready to answer perfectly on these questions.

In case there are questions that you don't know the answers to, please, feel free to check my full and the most complete course "Java From Zero to First Job".


+
+
+ + diff --git a/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/002 Part 1 Java Servlets Interview - Questions and Answers.html b/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/002 Part 1 Java Servlets Interview - Questions and Answers.html new file mode 100644 index 0000000000000000000000000000000000000000..cd0003c7c2579bb6220769210d2bb7979d3ec8f7 --- /dev/null +++ b/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/002 Part 1 Java Servlets Interview - Questions and Answers.html @@ -0,0 +1,69 @@ + + + + + + Part 1 Java Servlets Interview - Questions and Answers + + + + +
+
+
Part 1 Java Servlets Interview - Questions and Answers
+
  • WHAT IS A SERVLET?


Servlets are Java programs that run on the server side of a Web application. Just as applets dynamically extend the functionality of a Web browser, servlets dynamically extend the functionality of a Web server. Although servlets can serve any request, they are commonly used to extend web servers. For such applications, Java Servlet technology defines HTTP-specific servlet classes. The javax.servlet and javax.servlet.http packages provide interfaces and classes for building servlets.



  • WHAT IS A SERVLET CONTAINER? DESCRIBE SERVLET LIFE CYCLE.


A servlet container is a program that manages the life cycle of servlets.

Servlet life cycle: it is managed by the servlet container, the first time the servlet is accessed, it is loaded into memory and the init() method is called. As the application runs, service() methods are called to process client requests. When the application terminates, the destroy() method is called and the servlet is unloaded from memory.




  • WHAT IS THE PURPOSE, FUNCTIONALITY OF A SERVLET CONTAINER?


A servlet container can act as a full standalone web server, provide pages to another web server such as Apache, or integrate into a Java EE application server. Provides data exchange between the servlet and clients, performs such functions as creating a software environment for a functioning servlet, identifying and authorizing clients, organizing a session for each of them.




  • HOW IS SENDREDIRECT() DIFFERENT FROM FORWARD()?


The difference between these methods is that an already existing request object is passed with the forward() method, and a new request is formed when the sendRedirect() method is called. Information in the latter case should be transmitted with other objects. In addition, the forward() method is faster.




  • WHAT DO YOU KNOW ABOUT SERVLET FILTERS?


The implementation of the Filter interface allows you to create an object that intercepts the request. It can transform the header and content of the client request. Filters do not create a request or response, but only modify them. The filter preprocesses the request before it hits the servlet, and then (if necessary) processes the response from the servlet. The filter can interact with different types of resources, in particular, with both servlets and JSP pages.


Servlet filters can:

  • determine the content of the request before the servlet is invoked.

  • modify the headers and request data in which the incoming request is packaged.

  • modify the headers and response data in which the received response is packed.

  • intercept servlet initiation after a call to the servlet.


A servlet filter can be configured to work on a single servlet or a group of servlets. The basis for the formation of filters is the javax.servlet.Filter interface, which implements three methods:

  • void init(FilterConfig config) throws ServletException;

  • void destroy();

  • void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException;


The init() method is called before the filter starts running and sets up the filter's configuration object. The doFilter method does the actual work of the filter. Thus, the server calls init() once to run the filter, and then calls doFilter() as many times as there are requests made directly to that filter. After the filter finishes its work, the destroy() method is called.




  • WHY DO YOU NEED LISTENERS IN SERVLETS?


Context and session listeners are classes that can keep track of when a context or session was initialized, or keep track of when it should be destroyed and when attributes were added to or removed from the context or session. Servlet 2.4 extends the request listener model to track how a request is created and destroyed, and how attributes are added to and removed from a servlet. Servlet 2.4 added the following classes:

  • ServletRequestListener

  • ServletRequestEvent

  • ServletRequestAttributeListener

  • ServletRequestAttributeEvent



  • HOW TO HANDLE EXCEPTIONS THROWED BY ANOTHER SERVLET IN THE APPLICATION?


Since the browser only understands HTML, when an application throws an exception, the servlet container will handle the exception and generate an HTML response. This is similar to what happens with error codes like 404, 403, etc. The Servlet API provides support for native servlets to handle exceptions and errors that we can set in the deployment descriptor.


The main task of such servlets is to handle the error or exception and send a human-readable HTML response to the user. For example, you can provide a link to the main page, as well as a description of some details about the error.


To configure this you need to configure <error-page> element, and specify inside <error-code> or <exception-type> and <location> where request should be redirected in case of exception.



  • WHAT IS A DEPLOYMENT DESCRIPTOR?


The deployment descriptor is the artifact, configuration file that will be deployed to the servlet container. In the Java Platform, Enterprise Edition specification, a deployment descriptor describes how a component, module, or application (such as a web or enterprise application) should to be deployed.


This configuration file specifies deployment options for a module or application with specific settings, security options, and describes specific configuration requirements. The syntax for deployment descriptor files is XML.



  • HOW TO IMPLEMENT SERVLET LAUNCH WITH APP LAUNCH?


The servlet container usually loads the servlet on the first request from the client, but sometimes it is necessary to load the servlet right at the start of the application (for example, if the servlet is large and will take a long time to load). To do this, you need to use the load-on-startup element in the descriptor (or the loadOnStartup annotation), which will indicate that the servlet should be loaded at startup.


The value of this property must be int. If the value is negative, then the servlet will be loaded at the request of the client, and if 0 and further, then it will be loaded at the start of the application. The lower the number, the earlier the servlet will be in the download queue.



  • WHAT IS THE SERVLETCONFIG OBJECT?


The javax.servlet.ServletConfig interface is used to pass configuration information to a servlet. Each servlet has its own ServletConfig object, which the servlet container is responsible for instantiating. Init parameters in web.xml (or WebInitParam annotations) are used to set configuration parameters. The getServletConfig() method is used to get the ServletConfig object of this servlet.



  • WHAT IS A SERVLETCONTEXT OBJECT?


The javax.servlet.ServletContext interface defines a set of methods that a servlet uses to communicate with its servlet container, such as getting the MIME type of a file, dispatching requests, or writing to a log file. The ServletContext object is unique and available to all servlets in a web application. We can use the ServletContext object when we need to grant access to one or more servlets to the initialized parameters of a web application. This is done using the <context-param> element in web.xml. The ServletContext object can be obtained using the getServletContext() method on the ServletConfig interface.


Servlet containers can also provide context objects that are unique to a group of servlets. Each of the groups will be associated with a different set of host path URLs.

ServletContext has been extended in the Servlet 3 specification to provide programmatic addition of listeners and filters to an application. This interface also has many useful methods like getMimeType(), getResourceAsStream() etc.



  • WHAT IS THE DIFFERENCE FROM SERVLETCONTEXT AND SERVLETCONFIG?


Below are some of the differences:

  • ServletConfig is unique per servlet, while ServletContext is unique across the entire application.

  • ServletConfig is used to provide initialization parameters to a servlet, and ServletContext is used to provide application initialization parameters for all servlets.

  • We do not have the ability to set attributes on the ServletConfig object, while we can set attributes on the ServletContext object that will be available to other servlets.




  • SERVLERESPONSE INTERFACE


The ServletResponse interface is a tool for sending data to a client. All methods of this tool serve this purpose.



  • SERVLETREQUEST INTERFACE


The ServletRequest interface is a tool for getting HTTP request parameters.



  • WHAT IS REQUEST DISPATCHER?


The RequestDispatcher interface is used to pass a request to another resource (it can be HTML, JSP, or another servlet in the same application). We can use this to add another resource's content to the response. This interface is used for internal communication between servlets in the same context. The interface has two methods:

  • void forward(ServletRequest var1, ServletResponse var2) - forwards a request from a servlet to another resource (servlet, JSP, or HTML file) on the server.

  • void include(ServletRequest var1, ServletResponse var2) - includes resource content (servlet, JSP or HTML page) in the response.


The interface can be accessed using the ServletContext getRequestDispatcher(String s) method. The path must start with / , which will be interpreted relative to the context's current root path.




  • HOW CAN I CREATE A DEADLOCK IN A SERVLET?


Deadlock can be obtained by implementing a looped method call, for example, calling the doPost() method in the doGet() method and calling doGet() in the doPost() method.




  • HOW TO GET THE SERVLET ADDRESS ON THE SERVER?


To get the actual path of the servlet on the server, you can use this construct: getServletContext().getRealPath(request.getServletPath()).




  • HOW TO GET INFORMATION ABOUT THE SERVER FROM THE SERVLET?


Server information can be retrieved using the ServletContext object using the getServerInfo() method. So, like this: getServletContext().getServerInfo().




  • HOW TO GET THE IP ADDRESS OF THE CLIENT ON THE SERVER?


Use request.getRemoteAddr() to get the ip of the client in the servlet.



  • WHAT DO YOU KNOW ABOUT WRAPPER CLASSES FOR SERVLETS?


The Servlet HTTP API provides two wrapper classes, HttpServletRequestWrapper and HttpServletResponseWrapper. They help developers implement their own implementations of the servlet's request and response types. We can extend these classes and override only the necessary methods to implement our own response and request object types. These classes are not used in standard servlet programming.


+
+
+ + diff --git a/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/003 Part 2 Java Servlets Interview - Questions and Answers.html b/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/003 Part 2 Java Servlets Interview - Questions and Answers.html new file mode 100644 index 0000000000000000000000000000000000000000..4f95b9d354e0aad48459e110ac1f2333ef20d800 --- /dev/null +++ b/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/003 Part 2 Java Servlets Interview - Questions and Answers.html @@ -0,0 +1,69 @@ + + + + + + Part 2 Java Servlets Interview - Questions and Answers + + + + +
+
+
Part 2 Java Servlets Interview - Questions and Answers
+
  • WHAT IS THE LIFECYCLE OF A SERVLET AND WHEN WHICH METHODS ARE CALLED?


The servlet container manages four phases of the servlet lifecycle:

  • Loading the servlet class - when the container receives a request for a servlet, the servlet class is loaded into memory and the constructor with no parameters is called.

  • Servlet class initialization - after the class is loaded, the container initializes the ServletContext object for that servlet and injects it via the init() method. This is where the servlet class is converted from a normal class to a servlet.

  • Request Handling - Once initialized, the servlet is ready to process requests. For each client request, the servlet container spawns a new thread and calls the service() method by passing in the response object reference and the request.

  • Deletion from Service - When the container stops or the application stops, the servlet container destroys the servlet classes by calling the destroy() method.


The servlet’s lifecycle can be described as a sequence of method calls: init(), service(), destroy().

  • public void init(ServletConfig config) - used by the container to initialize the servlet. Called once during the lifetime of the servlet.

  • public void service(ServletRequest request, ServletResponse response) - called for every request. The method cannot be called before the init() method is executed.

  • public void destroy() - Called to destroy the servlet (once during the lifetime of the servlet).



  • WHEN WILL YOU OVERRIDE THE SERVICE() METHOD?


The service() method is overridden when we want the servlet to process both GET and POST requests in the same method. When the servlet container receives a client request, it calls the service() method, which in turn calls the doGet(), doPost() and other methods based on the HTTP request method. There is an opinion that there is no particular point in overriding the service() method, except for the case of using one method for all the request method types.



  • IS IT POSSIBLE TO DEFINE A CONSTRUCTOR FOR A SERVLET? HOW IS IT BETTER TO INITIALIZE DATA?


There is such a possibility, but it is considered meaningless. It is better to initialize the data by overriding the init() method, in which you can access the servlet initialization parameters through the use of the ServletConfig object.



  • WHAT IS THE DIFFERENCE OF GENERICSERVLET AND HTTPSERVLET?


The abstract class GenericServlet is a protocol-independent implementation of the Servlet interface. HttpServlet, as the name suggests, is an implementation of the servlet interface for the HTTP protocol. Note that HttpServlet extends GenericServlet.



  • HOW TO CALL ANOTHER SERVLET OF THE SAME AND ANOTHER APPLICATION FROM A SERVLET?


If you need to call a servlet from within the same application, then you must use the internal servlet communication mechanism. We can call another servlet using the RequestDispatcher forward() and include() methods to access additional attributes in the request for use by the other servlet. The forward() method is used to transfer processing of a request to another servlet. The include() method is used if we want to include the result of another servlet in the returned response.


If you need to call a servlet from another application, then you can no longer use the RequestDispatcher (it is defined for the application). Therefore, you can use the ServletResponse sendRedirect() method and provide the full URL from another servlet. To transfer data, we can use cookies as part of the servlet response, and then use them in our servlet.



  • SHOULD I WORRY ABOUT "MULTITHREADING SECURITY" WHEN WORKING WITH SERVLETS?


The init() and destroy() methods of the HTTPServlet class are called once per servlet life cycle, so you don't have to worry about them. The doGet(), doPost() methods are called on every client request, and so on. Servlets use multithreading, so here you need to think about thread-safe operation.


If there are local variables in these methods, there is no need to think about multithreading safety, because they will be created separately for each thread. But if global resources are used, then synchronization must be used, as in any multi-threaded Java application.


  • WHICH HTTP METHODS ARE IDEMPOTENT AND WHICH ARE NOT?


An HTTP method is said to be immutable if it always returns the same result. HTTP methods GET, PUT, DELETE, HEAD, OPTIONS are immutable. It is necessary to implement the application so that these methods return the same result after multiple invocations.


Not idempotent methods include the HTTP POST method. The Post method is used to implement something that changes on every request.


For example, to access an HTML page or image, you must use the GET method, because it returns the same result. But if we need to store order information in the database, then we need to use the POST method. Immutable methods are also known as safe methods and there is no need to worry about repeated requests from the client for these methods.



  • WHAT ARE THE METHODS FOR SENDING DATA FROM THE CLIENT TO THE SERVER? WHAT IS THE DIFFERENCE?


The doGet() method is used to request the contents of a specified resource, image, or hypertext document. Additional parameters can be passed along with the request as part of the URI, values can be selected form fields, or passed directly through the URL. In this case, requests are cached and have size limits. This method is the main method of interaction between the browser client and the web server.


The doPost() method is used to pass user data in the content of an HTTP request to the server. The user data is packaged in the request body according to the Content-Type header field and/or included in the request URI. When using the POST method, the URI refers to the resource that will process the request.



  • NAME HTTP METHODS AND HOW THEY SHOULD BE IMPLEMENTED IN THE SERVLET.


The HTTP specification defines methods: GET, HEAD, POST, PUT, DELETE, OPTIONS, and TRACE.


The GET method (method="GET") is used to request the content of a specified resource, image, or hypertext document. Additional parameters can be passed along with the request as part of the URI, values can be selected from form fields, or passed directly through the URL. In this case, requests are cached and have size limits. This method is the main method of interaction between the browser client and the web server.


The POST method is used to pass user data in the content of an HTTP request to the server. The user data is packaged in the request body according to the Content-Type header field and/or included in the request URI. When using the POST method, the URI refers to the resource that will process the request.


PUT is used to send data to a server to create/update a resource. The difference between POST and PUT is that PUT requests are idempotent. That is, calling the same PUT request multiple times will always produce the same result.


The DELETE method is for deleting the target resource.


The HEAD method expects the server to return the same response as when using GET, but without the response body. The method is typically used to check for the existence of a resource, or to find out if the requested resource has changed since it was last accessed.


The OPTIONS method must return information about the web server's capabilities or connection options for a specific resource.


The TRACE method returns the request to the client in the form in which it came to the server - used for debugging, determining the headers added by intermediate servers, as well as for testing connection settings.




  • WHY IS THE HTTPSERVLET CLASS DECLARED AS AN ABSTRACT?


The HTTPServlet class provides an implementation of the HTTP servlet protocol (and therefore helps avoid constant coding of repetitive information), but it does not have the doGet() and doPost() methods implemented (they return an HTTP 405 Method Not Implemented error by default), and are therefore declared abstract. The implementation of these methods is left to the developer.



  • WHAT IS THE DIFFERENCE BETWEEN GET AND POST METHODS?


Main differences:

  • GET method is immutable while POST is mutable.

  • With the GET method, you can send a limited amount of data, which will be sent in the URL header. In the case of the POST method, we can send large amounts of data, because they will be in the body of the method.

  • The GET method data is passed in simple text, which can be used for malicious purposes. POST data is passed in the body of the request and is hidden from the user.

  • The GET method is the default HTTP method, while the POST method must be specified explicitly in order to send a request.

  • The GET method is used by hyperlinks on the page.




  • WHAT ARE THE MOST COMMON TASKS PERFORMED IN A SERVLET CONTAINER?


Some of them:

  • Data exchange support. The servlet container provides an easy way to exchange data between a web client (browser) and a servlet. Thanks to the container, there is no need to create a socket listener on the server to listen for requests from the client, and also to parse the request and generate a response. All these important and complex tasks are solved using the container and the developer can focus on the business logic of the application.

  • Servlet and resource lifecycle management. Starting from loading the servlet into memory, initialization, method injection, and ending with the destruction of the servlet. The container also provides additional utilities such as JNDI to manage the resource pool.

  • Multithreading support. The container itself creates a new thread for each request and provides it with a request and a response to process. This way the servlet is not re-initialized for each request and thus saves memory and reduces the time until the request is processed.

  • JSP support. JSP classes are not like standard java classes, but the servlet container converts each JSP into a servlet and is then managed by the container like a normal servlet.

  • Various tasks. The servlet container manages the resource pool, application memory, garbage collector. Security settings and much more are provided.




  • WHAT IS THE DIFFERENCE BETWEEN PRINTWRITER AND SERVLETOUTPUTSTREAM?


PrintWriter is a class for working with a character stream, and ServletOutputStream is a class for working with a byte stream. PrintWriter is used to write character-based information such as a character array or string to the response, while ServletOutputStream is used to write a byte array to the response. To obtain a ServletOutputStream instance, use the ServletResponse getOutputStream() method, and for a PrintWriter, use the ServletResponse getWriter() method.




  • CAN WE GET PRINTWRITER AND SERVLETOUTPUTSTREAM AT THE SAME TIME IN A SERVLET?


We cannot create two objects of these classes in the same servlet. When trying to inject both getWriter() and getOutputStream() methods in a response, we will get a java.lang.IllegalStateException with the message that another method has already been called for this response.



  • WHY IS IT NEEDED TO OVERRIDE ONLY THE INIT() METHOD WITHOUT ARGUMENTS?


If we need to initialize some resources before the servlet starts processing requests, then we need to override the init () method. If you override the init(ServletConfig config) method, then the super(config) method must be called first, which ensures that the superclass's init(ServletConfig config) method is called. This is why GenericServlet provides another parameterless init() method that will be called at the end of the init(ServletConfig config) method. The developer should use the overridden init() method with no parameters to initialize variables to avoid any problems, such as not specifying a call to super() in the overridden init(ServletConfig config) method.


+
+
+ + diff --git a/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/004 Part 3 Java Servlets Interview - Questions and Answers.html b/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/004 Part 3 Java Servlets Interview - Questions and Answers.html new file mode 100644 index 0000000000000000000000000000000000000000..b90069bd35d5e240d06f3ef1b8dc8bc3848a9e7d --- /dev/null +++ b/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/004 Part 3 Java Servlets Interview - Questions and Answers.html @@ -0,0 +1,69 @@ + + + + + + Part 3 Java Servlets Interview - Questions and Answers + + + + +
+
+
Part 3 Java Servlets Interview - Questions and Answers
+
  • WHAT IS THE ENCODEURL() AND ENCODEREDIRECTURL() METHODS AND WHAT IS THE DIFFERENCE?


HttpServletResponse provides methods for converting URLs to HTML hyperlinks by converting special characters and spaces, as well as adding a session ID to the URL. This behavior is similar to URLEncoder encode(), but with an additional jsessionid parameter added to the end of the URL.


The HttpServletResponse encodeRedirectUrl() method is used to resolve the redirect URL in the response. Thus, when providing URL rewriting support for HTML hyperlinks, encodeURL() should be used, and for URL redirects, encodeRedirectUrl() should be used.



  • WHAT DIFFERENT SERVLET SESSION MANAGEMENT METHODS DO YOU KNOW?


A session is a normal state of interaction between a server and a client and can contain many client-server requests and responses. Because HTTP and the web server do not remember states (stateless), then the only way to maintain a session is to send unique information (session ID) in each request and response between the client and the server.


There are several common ways to manage a session in servlets:

  • User authentication

  • HTML hidden field (hidden field)

  • Cookies

  • URL Rewriting

  • Session Management API



  • WHAT DOES URL REWRITING MEAN?


For session management in servlets, we can use HTTPSession, but it works with Cookies, and they are sometimes disabled. Servlets provide URL Rewriting for this case. From a programming point of view, only one action is necessary - encoding the URL. Another advantage is that this method is sort of a fallback method and is enabled only when cookies are disabled.


Using the HttpServletResponse encodeURL() method, we can encode the URL. If a redirect to another resource is needed, the encodeRedirectURL() method is used to provide session information.




  • WHAT IS A COOKIE?


Cookies are small blocks of text information that the server sends to the client to be stored in cookies. The client can prevent the browser from accepting cookies. The browser returns the information back to the server as part of the HTTP header when the client revisits the same web resource.



  • HOW ARE COOKIES USED IN SERVLETS?


Cookies (cookies) are used in client-server interaction and they are not something specific in Java. The Servlet API provides support for cookies through the javax.servlet.http.Cookie class implements Serializable, Cloneable. To get an array of cookies from a request, use the HttpServletRequest getCookies() method. There are no methods for adding cookies to the request.


HttpServletResponse addCookie(Cookie c) - this method can add a cookie to the response header, but there is no getter method.



  • HOW TO NOTIFY A SESSION OBJECT THAT THE SESSION IS INVALID OR ENDED?


To ensure that an object is notified when a session is terminated, the object must implement the javax.servlet.http.HttpSessionBindingListener interface. Two methods of this interface: valueBound() and valueUnbound() are used to implement logic when adding an object as an attribute to the session and when the session is destroyed.



  • WHAT IS THE EFFECTIVE WAY TO MAKE SURE ALL SERVLETS ARE ACCESSIBLE ONLY TO A USER WITH A VALID SESSION?


Servlet filters are used to intercept all requests between the servlet container and the servlet. Therefore, it is logical to use a filter to check the necessary information (for example, the validity of the session) in the request.




  • HOW CAN WE ENSURE TRANSPORT LAYER SECURITY FOR OUR WEB APPLICATION?


To do this, you need to configure SSL for your servlet container. How to do this is described in the manuals for a specific container implementation.




  • HOW TO ORGANIZE THE CONNECTION TO THE DATABASE AND ENSURE LOG4J LOGGING IN THE SERVLET?


When dealing with a large number of database connections, it is a good idea to initialize them in a servlet context listener and set them as a context attribute so that they can be used by other servlets. Log4j logging is connected using an XML configuration (or a property file) and this information is then used when configuring the context listener.




  • WHAT ARE THE FEATURES OF SERVLET 3?


Servlet 3.0 Features:

  • Servlet Annotations. Before Servlet 3, all mapping was in web.xml, which led to errors and is trite inconvenient with a large number of servlets. Annotation examples: @WebServlet, @WebInitParam, @WebFilter, @WebListener.

  • web fragments. With the advent of web fragments, we can contain many modules in a single page web application. All modules are written in fragment.xml in the META-INF directory. This allows the web application to be split into separate modules included as JAR files in a separate lib directory.

  • Dynamic addition of web components. Using the ServletContext object, we can programmatically add filters and listeners. This helps to build a dynamic system in which the necessary object will be called only when necessary. The addServlet(), addFilter(), addListener() methods are used for this.

  • Asynchronous execution. Support for asynchronous processing allows you to transfer the execution of a request to another thread without keeping the entire server busy.




  • WHAT ARE THE DIFFERENT WAYS TO AUTHENTICATE A SERVLET?


The servlet container provides various authentication methods:

  • HTTP Basic Authentication

  • HTTP Digest Authentication

  • HTTPS Authentication

  • Form Based Login



  • WHAT IS A SESSION?


A session is a session between the client and the server, set for a certain time, during which the client can send any number of requests to the server. The session is established directly between the client and the web server when the first request to the web application is received. Each client establishes its own session with the server, which persists until the end of the application.


+
+
+ + diff --git a/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/005 Part 4 Java JSP Interview - Questions and Answers.html b/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/005 Part 4 Java JSP Interview - Questions and Answers.html new file mode 100644 index 0000000000000000000000000000000000000000..9ac7cbb5703e5a57fd3063507be3f0c55231081a --- /dev/null +++ b/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/005 Part 4 Java JSP Interview - Questions and Answers.html @@ -0,0 +1,69 @@ + + + + + + Part 4 Java JSP Interview - Questions and Answers + + + + +
+
+
Part 4 Java JSP Interview - Questions and Answers
+
  • WHAT IS JAVA SERVER PAGES (JSP)?


JSP (Java Server Pages) is a technology that allows web developers to dynamically generate HTML, XML, and other web pages. JSP has been included with Java EE, a software platform for programming web applications.


The technology allows you to insert Java code into the static content of the page. JSP tag libraries can also be used to insert them into JSP pages. Pages are compiled by the JSP compiler into servlets, which are Java classes, and run on the server. Servlets can also be written by a developer without using JSP pages. These technologies complement each other.




  • DESCRIBE HOW JSP PAGES ARE PROCESSED, FROM A REQUEST TO THE SERVER, ENDING WITH A RESPONSE TO THE USER.


When a user clicks on a link, let's call it index.jsp, it sends an HTTP request to the server in the form "GET /index.jsp". Then, based on this page, the server generates, compiles and executes a Java servlet, which responds to the user in the form of displaying this page. This life cycle can be divided into 6 steps:


  • User request.

  • Reading the .jsp page by the server.

  • Generating a java class based on this .jsp page.

  • Compiling to a class file.

  • Execution class file.

  • Sending a response to the user as an html page.




  • TELL ABOUT THE STAGES (PHASES) OF THE JSP LIFE CYCLE.


If you look at the code inside the created JSP page, it will look like HTML and will not look like a java class. Converting JSP pages to HTML code is handled by the container, which also creates a servlet for use in a web application. The life cycle of a JSP consists of several phases:

  • Translation - JSP container checks the JSP code of the page, parses it to create servlet code. If the JSP page is called home.jsp, then the generated servlet will typically be named home_jsp and the file name is home_jsp.java.

  • Compilation - The JSP container compiles the jsp class source code and creates the class in this phase.

  • Class Loading - the container loads classes into memory during this phase.

  • Instantiation - injection of parameterless constructors of generated classes for initialization in class memory.

  • Initialization - in the container, the init method of the JSP class object is called and the servlet configuration is initialized with the init parameters specified in the deployment descriptor (web.xml). After this phase, the JSP is able to handle client requests. Typically, these phases occur after the first request from the client (i.e., lazy loading), but you can configure the JSP to be loaded and initialized at application startup, similar to servlets.

  • Request Processing - The long life cycle of processing client requests by a JSP page. Processing is multi-threaded and similar to servlets - a new thread is created for each request, ServletRequest and ServletResponse objects are created, and JSP service methods are injected.

  • Destroy is the last phase of the JSP life cycle in which the JSP class is removed from memory. This usually happens when the server or application is shutdown.



  • TALK ABOUT JSP LIFECYCLE METHODS


JSP lifecycle methods:

  • jspInit() - the method is declared in the JSP page and implemented using container implementations. This method is called once in the life cycle of the JSP in order to initialize the configuration parameters specified in the deployment descriptor. This method can be overridden by defining a JSP scripting element and specifying the required parameters for initialization.

  • _jspService() - This JSP method is injected by the JSP container for each client request by passing a request and response object. Note that the method name starts with an underscore and differs from other lifecycle methods in that it cannot be overridden. All JSP code goes through this method and it is overridden by default. This method is defined in the HttpJspPage interface.

  • jspDestroy() - the method is called by the JSP container to remove an object from memory (during the last phase of the JSP life cycle - Destroy). The method is called only once and we can override it to clean up any resources that were created in the JSP init method.




  • WHICH JSP LIFECYCLE METHODS CAN BE OVERRIDEN?


We can override the jspInit() and jspDestroy() methods by using JSP scripts. The jspInit() method is overridden to create the shared resources we would like to use in the JSP service method, and the jspDestroy() method is overridden to release the shared resources during the destroy phase.




  • HOW CAN I PREVENT DIRECT ACCESS TO A JSP PAGE FROM THE BROWSER?


The WEB-INF directory is not directly accessible from the web application. Therefore, we can put the JSP of the page inside this folder and thereby prevent access to the page from the browser.



  • WHAT IS THE DIFFERENCE BETWEEN DYNAMIC AND STATIC JSP CONTENT?


Dynamic resources. The results of their activities change during the execution of the application. Typically represented as Expression Language expressions, tag libraries, and developer tags.


Static resources. Do not change themselves in the course of work (HTML, images, etc.).



  • HOW TO COMMENT OUT CODE IN JSP?


JSP provides two ways to comment out code:

  • HTML comments - <-- HTML Comment --> . Such comments will be visible to the client when viewing the page code.

  • JSP comments - <%-- JSP Comment --%>. Such comments are created in the created servlet and are not sent to the client. For any code comments or debugging information, you must use this comment type.



  • WHAT ARE THE BASIC TAGS IN A JSP?


In the JSP 1.2 specification, only five core tags were declared:

  • <%@ %> directive - used to set JSP server page parameters;

  • <%! the %> - declaration (not desirable in modern programming) contains the fields and methods that are called in the expression block and become the fields and methods of the generated servlet.

  • <% scriptlet %> - (unwanted) embedding java code into a JSP page. Scriptlets usually use small blocks of code and are executed during the processing of a client request.

  • <%= evaluated expression %> - (not desirable) contains Java language statements that are evaluated, after which the result of the calculation is converted to a String and sent to the out stream;

  • <%-- JSP comment --%> is a comment that is not displayed in the JSP page source codes after the runtime.




  • WHAT TYPES OF EL OPERATORS DO YOU KNOW?


Standard relational operators:

  • == (or simply eq), != (or simply ne), < (or lt), > (or gt), <= (or le), >= (or ge).

  • Arithmetic operators: +, -, *, / (or div), % (or mod).

  • Logical operators: && (or and), || (or or), ! (or not).

+
+
+ + diff --git a/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/006 Part 5 Java JSP & JSTL Interview - Questions and Answers.html b/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/006 Part 5 Java JSP & JSTL Interview - Questions and Answers.html new file mode 100644 index 0000000000000000000000000000000000000000..8348d2530ac5e71920d90554a6c3b96e944195e9 --- /dev/null +++ b/70 - ===== Web, Servlets, JSP, JSTL in Java Interview Preparation =====/006 Part 5 Java JSP & JSTL Interview - Questions and Answers.html @@ -0,0 +1,69 @@ + + + + + + Part 5 Java JSP & JSTL Interview - Questions and Answers + + + + +
+
+
Part 5 Java JSP & JSTL Interview - Questions and Answers
+
  • WHAT VARIABLE SCOPES ARE IN JSP?


Expression Language - these are variables of a certain scope, which are available through the expression ${...}. There are scopes: page, request, session, application, response, out, config.



  • WHAT ARE THE IMPLICIT, INTERNAL OBJECTS AND METHODS ON THE JSP PAGE?


JSP implicit objects are created by the container when converting a JSP page into servlet code to help developers. These objects can be used directly in scriptlets to pass information to service methods, however, we cannot use implicit objects in JSP Declaration, because such code will go to the class level.


There are 9 types of implicit objects that can be used directly in a JSP page. Seven of them are declared as local variables at the beginning of the _jspService() method, and the remaining two can be used as arguments to the _jspService() method.


  • out Object

  • request Object

  • response Object

  • config object

  • application Object

  • session Object

  • pageContext Object

  • page Object

  • exception object



  • WHAT DO YOU KNOW ABOUT PAGECONTEXT AND WHAT ARE THE BENEFITS OF USING IT?

The implicit JSP pageContext object is an implementation instance of the javax.servlet.jsp.PageContext abstract class. We can use the pageContext object to get and set attributes with different scopes and to forward requests to another resource. This object also has a reference to another implicit object. It is the only object that is represented in JSP implicit objects and JSP EL implicit objects.



  • HOW TO CONFIGURE INIT PARAMETERS FOR JSP?


We can set initialization parameters for JSPs in a similar way to servlets in the web.xml file. We must configure the JSP init options with servlet and servlet-mapping elements. The only difference will be the location of the JSP page.



  • WHY IS IT NOT RECOMMENDED TO USE SCRIPT ELEMENTS IN JSP?


JSP pages are primarily used for view rendering purposes, and all business logic and models must be implemented in servlets or model classes. We must pass parameters to the JSP page via attributes and then use them to create an HTML response in the JSP page.


Most JSPs contain HTML code, and in order to help designers understand and design JSP pages, action elements, JSP EL, JSP Standard Tag Library are provided. These are elements that need to be used instead of scriptlets to create a bridge between the JSP HTML and the JSP java parts.



  • WHAT IS THE DIFFERENCE OF <C:IMPORT> FROM <JSP:INCLUDE> AND THE DIRECTIVE <%@INCLUDE %>?


The <c:import> tag accesses the source, information from which is read directly without buffering. The content is included line by line in the source JSP. Compared to the <jsp:include> action tag and the <%@include %> directive, the <c:import> tag provides better inclusion of dynamic resources.




  • WHAT DO YOU KNOW ABOUT JSP TAGS? EXPLAIN HOW YOU UNDERSTAND ACTION TAG AND JSP ACTION ELEMENTS.


JSP elements or action tags provide useful functionality for working with a Java Bean, injecting resources, forwarding a request, and creating dynamic XML elements. jsp action elements always begin with a jsp: entry, and we can use them directly inside a JSP page without the need for libraries or other settings.


The most commonly used action elements are: jsp:useBean, jsp:getProperty, jsp:setProperty, jsp:include, jsp:forward.



  • WHAT IS JSTL (JSP STANDARD TAG LIBRARY)?


The JavaServer Pages Standard Tag Library (JSTL) is an extension of the JSP specification that adds a JSP tag library for general needs such as parsing XML data, conditional processing, looping, and internationalization support.


JSTL is an alternative to this kind of built-in JSP logic, like scriptlets, that is, direct insertion of Java code. Using a standardized set of tags is preferable because the resulting code is easier to maintain and it's easier to separate business logic from display logic. To use JSTL tags, you need to include the library and specify the namespace on the pages.




  • WHAT TAG GROUPS DOES THE JSTL LIBRARY CONSIST OF?


The JSTL tag library consists of five groups of tags:

  • Core Tags - core tags, provide iteration, exception handling, url, forward and redirect response capabilities, etc.

  • Formatting and Localization Tags - formatting tags, provide options for formatting Numbers, Dates and support for i18n localization and resource bundles.

  • SQL Tags - tags for working with SQL, support for working with databases like MySQL, Oracle, etc.

  • XML Tags - tags for working with XML documents. For example, for parsing XML, transforming XML data, and executing XPath expressions.

  • JSTL Functions Tags - tag functions for processing strings, provides a set of functions that allow you to perform various operations with strings, etc. For example, by concatenating or splitting strings.




  • WHAT IS THE DIFFERENCE BETWEEN THE <C:SET> AND <JSP:USEBEAN> TAGS?


There is an analogy between the <c:set> tag and the <jsp:useBean> tag. Both create and place instances in the given scope. But <jsp:useBean> only directly creates an instance of a particular type, and <c:set>, by creating a link, allows you to extract a value, for example, from request parameters, session, etc.



  • HOW TO GET THE NAME OF HTTP METHOD USING JSP EL?


Like this: ${pageContext.request.method}.



  • WHAT DO YOU KNOW ABOUT WRITING CUSTOM JSP TAGS?


JSP allows you to create your own tags with the required functionality. We can add a tag library to a JSP page by specifying a namespace. To create our own tag, we can use the following components:

  • JSP Custom Tag Handler

  • Creating a Tag Library Descriptor (TLD) File

  • Deployment Descriptor configuration for TLD



  • WHY IS IT NOT NEEDED TO CONFIGURE STANDARD JSP TAGS IN WEB.XML?


We don't need to set up standard JSP tags in web.xml because the TLD files are already inside the META-INF directory in the JSTL jar files. When the container loads the web application and finds the TLD files in the META-INF directory in the JAR file, it automatically configures them for direct use in JSP pages. It remains only to set the namespace on the jsp page.



  • HOW CAN I HANDLE JSP PAGE ERRORS?


To handle exceptions thrown on a jsp page, you just need to set the error page. To create a JSP error page, we must set the page directive attribute isErrorPage to true. Then we will have access to the implicit exception objects in the JSP and will be able to send our own error messages to the client (usually more informative).



  • HOW IS ERROR HANDLING WITH JSTL?


You can catch exceptions and handle them in class service methods using JSTL Core Tags c:catch and c:if. The c:catch tag catches the exception and wraps it in an exception variable that we can handle in the c:if tag.



  • PUT AN EXAMPLE OF JSP CONFIGURATION IN THE DEPLOYMENT DESCRIPTOR.


The jsp-config element is used to configure various settings for jsp pages.

  • Managing scriptlet elements on the page.

  • Execution control in expression language.

  • URL pattern definition for encoding.

  • Specifies the size of the buffer that is used for objects on the page.

  • The designation of the resource groups matching the URL pattern to be processed as an XML document.



  • HOW TO DEACTIVATE USING EL ON JSP?


There are two ways to ignore expression language execution on a page:

  • use the <%@ page isELIgnored="true" %> directive,

  • customize web.xml (better for disabling on EL on many pages)



  • IS IT POSSIBLE TO USE JAVASCRIPT ON A JSP PAGE?


Yes it is possible. Despite the fact that JSP is a server-side technology, it still creates an HTML page, on which you can also add javascript code and css styles.



  • IS A SESSION OBJECT ALWAYS CREATED ON A JSP PAGE, IS IT POSSIBLE TO DISABLE ITS CREATION?


By default a jsp page creates a session, but sometimes this is not necessary. We can use the page directive with the session attribute to tell us not to create a new session by default. To disable session creation, use the code shown below.


  • <%@ page session = “false” %>



  • WHAT IS THE DIFFERENCE BETWEEN JSPWRITER AND SERVLET PRINTWRITER?


PrintWriter is a response object for writing content in the response. JspWriter uses the PrintWriter object invisibly to the user and provide buffering support. When the buffer is full or cleared, the JspWriter uses the PrintWriter object to write the content to the response.



  • HOW CAN I EXPAND JSP FUNCTIONALITY?


We can extend JSP technology by creating custom tags to avoid using scriptlets and java code in JSP pages.


+
+
+ + diff --git a/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/001 Exam-task-description-and-reference-to-the-solution.url b/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/001 Exam-task-description-and-reference-to-the-solution.url new file mode 100644 index 0000000000000000000000000000000000000000..85dd922d88c6f965771079c3b77ed744fb181902 --- /dev/null +++ b/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/001 Exam-task-description-and-reference-to-the-solution.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://docs.google.com/document/d/1X9iZaqUFtbz7CcglLAr1yHf6ff_8ae7mWTPp3_e8F5k/edit?usp=sharing \ No newline at end of file diff --git a/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/001 Task Overview_en.srt b/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/001 Task Overview_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..f2b9d70681a8e7fcaa29ca6256a28dc386e5291b --- /dev/null +++ b/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/001 Task Overview_en.srt @@ -0,0 +1,1172 @@ +1 +00:00:05,000 --> 00:00:06,000 +Hello, dissidents. + +2 +00:00:07,000 --> 00:00:13,000 +In this lesson, we're going to hold an overview of your home task, of your exam task. + +3 +00:00:14,000 --> 00:00:17,000 +Just look what we did together. + +4 +00:00:17,000 --> 00:00:18,000 +Just look at this. + +5 +00:00:19,000 --> 00:00:25,000 +Did you imagine that you would be able to implement the whole online store from scratch when you just + +6 +00:00:25,000 --> 00:00:25,000 +started? + +7 +00:00:25,000 --> 00:00:26,000 +My course. + +8 +00:00:27,000 --> 00:00:32,000 +The great thing about all this is that you have solution to app into your CV. + +9 +00:00:33,000 --> 00:00:34,000 +Yes, you're right. + +10 +00:00:34,000 --> 00:00:40,000 +I can imagine faces of recruiters when they will see this solution made by you. + +11 +00:00:40,000 --> 00:00:45,000 +I'm sure all of them will be impressed with the level of knowledge that you have. + +12 +00:00:46,000 --> 00:00:48,000 +And this is not about making the solution work. + +13 +00:00:49,000 --> 00:00:51,000 +It's about the quality of your code. + +14 +00:00:51,000 --> 00:00:58,000 +It's about how you write code because it is not so hard nowadays to create code that works somehow. + +15 +00:00:58,000 --> 00:01:00,000 +It is hard to create code. + +16 +00:01:00,000 --> 00:01:01,000 +Is it this easy to scale? + +17 +00:01:01,000 --> 00:01:03,000 +Hence it is easy to support. + +18 +00:01:04,000 --> 00:01:05,000 +That's how I usually say. + +19 +00:01:06,000 --> 00:01:13,000 +And during my course Java from zero to first job would learn also clean code techniques that will help + +20 +00:01:13,000 --> 00:01:15,000 +us to create reliable and scalable code. + +21 +00:01:16,000 --> 00:01:22,000 +I remember when students just started the first lesson and we just printed Hello World in the console + +22 +00:01:22,000 --> 00:01:30,000 +and I believe that you can understand what a long way we went from the first hello world program to + +23 +00:01:30,000 --> 00:01:36,000 +the online store was a complicated business logic and I want to congratulate you on this. + +24 +00:01:36,000 --> 00:01:43,000 +During the course, we've learned a lot of different things and all things that we learned is just like + +25 +00:01:43,000 --> 00:01:44,000 +a grace. + +26 +00:01:44,000 --> 00:01:48,000 +Now we need to make a building out of those bricks. + +27 +00:01:48,000 --> 00:01:51,000 +Or it is another analogy puzzle. + +28 +00:01:52,000 --> 00:01:58,000 +We have different puzzles, but we need to put them together in order to have a picture, even despite + +29 +00:01:58,000 --> 00:02:04,000 +the fact, you know, how the picture should look like and you have all necessary puzzles. + +30 +00:02:04,000 --> 00:02:07,000 +Still, it might be challenging to put all of them together. + +31 +00:02:08,000 --> 00:02:14,000 +That's exactly the reason why you usually create visual lessons with explanation of my solution and + +32 +00:02:14,000 --> 00:02:16,000 +provide you with the source code of my solution. + +33 +00:02:17,000 --> 00:02:24,000 +So in this video lesson, I'm going to make an overview of the exam tasks of your home task, and that + +34 +00:02:24,000 --> 00:02:26,000 +will show you what you have to implement. + +35 +00:02:27,000 --> 00:02:29,000 +One example of my solution. + +36 +00:02:30,000 --> 00:02:35,000 +This will help you to understand what I want you to implement and how our product should work. + +37 +00:02:36,000 --> 00:02:40,000 +After that, I recommend you to take time to implement this task. + +38 +00:02:40,000 --> 00:02:43,000 +It takes different amounts of time to deal with this task. + +39 +00:02:43,000 --> 00:02:45,000 +Based on the feedback of my students. + +40 +00:02:46,000 --> 00:02:50,000 +In average, it is between 15 to 30 hours in average. + +41 +00:02:51,000 --> 00:02:53,000 +But it depends on the students, obviously. + +42 +00:02:54,000 --> 00:02:56,000 +So let's get it started. + +43 +00:02:57,000 --> 00:03:03,000 +First of all, I'm going to share with you that Google document was a detailed description of every + +44 +00:03:03,000 --> 00:03:05,000 +task that you have to implement. + +45 +00:03:06,000 --> 00:03:13,000 +If you remember, we already had exam number one and during that task we implemented the basement of + +46 +00:03:13,000 --> 00:03:14,000 +our online store. + +47 +00:03:15,000 --> 00:03:22,000 +Here you can find the reference to the first exam, and inside that file you can find the solution of + +48 +00:03:22,000 --> 00:03:24,000 +the first exam, too. + +49 +00:03:24,000 --> 00:03:26,000 +And this is important. + +50 +00:03:26,000 --> 00:03:34,000 +You implement those task first because exam number two, the current one will be built on top of that + +51 +00:03:34,000 --> 00:03:38,000 +pass link to this Google doc you can find in attachments to the video. + +52 +00:03:39,000 --> 00:03:47,000 +So by this moment, another course will learn architecture pattern before you move further with the + +53 +00:03:47,000 --> 00:03:48,000 +design of your solution. + +54 +00:03:49,000 --> 00:03:52,000 +Make sure you follow their architecture design pattern. + +55 +00:03:52,000 --> 00:03:57,000 +It is a good way to practice your skills in the architecting of the map application. + +56 +00:03:58,000 --> 00:04:06,000 +The next sequencing implements this task refactor existing part in order to follow MVC. + +57 +00:04:06,000 --> 00:04:11,000 +Bottom we had separate lesson about model view controller. + +58 +00:04:11,000 --> 00:04:11,000 +Pardon. + +59 +00:04:12,000 --> 00:04:15,000 +Now I'm sure you are ready to apply gain knowledge on practice. + +60 +00:04:17,000 --> 00:04:20,000 +Xanax stars implement custom error page. + +61 +00:04:21,000 --> 00:04:27,000 +You're good to go with any design you wish, but just to save some thought of yours, I suggest you + +62 +00:04:27,000 --> 00:04:35,000 +to use design from my solution, but in case you want to implement pages for an the style guides we'll + +63 +00:04:35,000 --> 00:04:36,000 +use in any other template. + +64 +00:04:37,000 --> 00:04:38,000 +You are good to go. + +65 +00:04:38,000 --> 00:04:41,000 +In case you want to explore design on the document. + +66 +00:04:42,000 --> 00:04:45,000 +Feel free to zoom in here to use the details. + +67 +00:04:45,000 --> 00:04:53,000 +Anyway, I don't insist on making the implementation pixel perfect, so don't worry about missing some + +68 +00:04:53,000 --> 00:04:58,000 +minor details and implement them in your own unique way. + +69 +00:04:59,000 --> 00:05:01,000 +Let me open our application. + +70 +00:05:01,000 --> 00:05:01,000 +In-Browser. + +71 +00:05:02,000 --> 00:05:09,000 +So in case users receive any nonexistent page, I want to show a nice looking error page and suggest + +72 +00:05:09,000 --> 00:05:12,000 +user to navigate to the home page. + +73 +00:05:13,000 --> 00:05:18,000 +Once I click go to home page bottom, I navigate to the home page. + +74 +00:05:19,000 --> 00:05:19,000 +Great. + +75 +00:05:20,000 --> 00:05:22,000 +That's what this task is about. + +76 +00:05:23,000 --> 00:05:29,000 +I can give you a hint to implement if you're a student of my Java from zero 2/1 jump course. + +77 +00:05:29,000 --> 00:05:31,000 +Then you saw this lesson already. + +78 +00:05:32,000 --> 00:05:36,000 +We had the lessons, of course, about global error and then in web applications. + +79 +00:05:37,000 --> 00:05:43,000 +Check that lesson in case you forgot how to handle errors and also check lessons about HTML. + +80 +00:05:43,000 --> 00:05:46,000 +And CSS has to implement required markup. + +81 +00:05:47,000 --> 00:05:53,000 +Task number five is about implementation of the custom tax and we use them on all pages. + +82 +00:05:54,000 --> 00:05:57,000 +The remember we learned was you custom tax on GCP. + +83 +00:05:58,000 --> 00:06:03,000 +That's exactly the task to practice your skills in creating custom tasks. + +84 +00:06:04,000 --> 00:06:11,000 +I want you create custom tat of header and footer and we use them on all different pages. + +85 +00:06:12,000 --> 00:06:20,000 +The bonus when you see my solution Greg, is much more taxes and just Heather and I split each visual + +86 +00:06:20,000 --> 00:06:27,000 +component and put it in a separate task and after that I build pages out of those tax. + +87 +00:06:28,000 --> 00:06:36,000 +So as you can see, no matter whether I'm on the home page, sun main page or sign that page everywhere, + +88 +00:06:36,000 --> 00:06:40,000 +I have the same header and footer, I use the same tag. + +89 +00:06:41,000 --> 00:06:48,000 +That means that in case I need to make changes, I will do them in one place and changes will be applied + +90 +00:06:48,000 --> 00:06:49,000 +on all other pages. + +91 +00:06:50,000 --> 00:06:54,000 +The next task is about implementation of the logout button. + +92 +00:06:55,000 --> 00:07:01,000 +The idea of this task is to adjust the behavior of the other component based on the logged in user. + +93 +00:07:02,000 --> 00:07:03,000 +Let me show it to you. + +94 +00:07:04,000 --> 00:07:06,000 +I click signing bottom. + +95 +00:07:06,000 --> 00:07:09,000 +I already have some saved credentials in my browser. + +96 +00:07:10,000 --> 00:07:11,000 +Oh, use them. + +97 +00:07:11,000 --> 00:07:15,000 +I click sign then and now sign. + +98 +00:07:15,000 --> 00:07:16,000 +That button is changed. + +99 +00:07:17,000 --> 00:07:24,000 +We see sign now at the bottom and instead of signing button we see welcome message and the first name + +100 +00:07:24,000 --> 00:07:26,000 +of the log in user. + +101 +00:07:26,000 --> 00:07:28,000 +This is pretty simple to implement. + +102 +00:07:29,000 --> 00:07:32,000 +I hope that this is enough for you how to implement. + +103 +00:07:32,000 --> 00:07:33,000 +Think about it. + +104 +00:07:33,000 --> 00:07:37,000 +Try to implement on cases to have any questions. + +105 +00:07:37,000 --> 00:07:38,000 +Please. + +106 +00:07:38,000 --> 00:07:39,000 +All of them below this video. + +107 +00:07:40,000 --> 00:07:43,000 +And I will be happy to answer one of the sign. + +108 +00:07:43,000 --> 00:07:49,000 +Those buttons and session is invalidated and the user is not logged in anymore. + +109 +00:07:49,000 --> 00:07:50,000 +That's it. + +110 +00:07:51,000 --> 00:07:55,000 +The next task is about implementation of error handling scenarios. + +111 +00:07:55,000 --> 00:07:57,000 +User registration of you new user. + +112 +00:07:57,000 --> 00:07:58,000 +Let me show it to you. + +113 +00:07:59,000 --> 00:08:01,000 +Let me navigate the center page. + +114 +00:08:02,000 --> 00:08:09,000 +I will fill out all fields was the fake data and we will implement back and validation for the email + +115 +00:08:09,000 --> 00:08:17,000 +field in case such email is already registered with the system and present in the database, we cannot + +116 +00:08:17,000 --> 00:08:20,000 +allow to register another user with the same email. + +117 +00:08:21,000 --> 00:08:24,000 +In this case, we should show error message. + +118 +00:08:25,000 --> 00:08:29,000 +Let me use the same emails that we already registered our test email. + +119 +00:08:30,000 --> 00:08:37,000 +I click on the sign them button and I see error message that the user with such email already exists. + +120 +00:08:38,000 --> 00:08:42,000 +The next error harmless in error is for password field. + +121 +00:08:43,000 --> 00:08:48,000 +In case values a password and the repeat password don't match each other. + +122 +00:08:48,000 --> 00:08:50,000 +In this case, we are an error. + +123 +00:08:51,000 --> 00:08:59,000 +As you can see, I enter in password field one password and in repeat password, field another password + +124 +00:08:59,000 --> 00:09:02,000 +and I see error message. + +125 +00:09:03,000 --> 00:09:10,000 +And the third validation is for password field to whether the password should contain at least eight + +126 +00:09:10,000 --> 00:09:10,000 +characters. + +127 +00:09:11,000 --> 00:09:13,000 +One character should be a special character. + +128 +00:09:14,000 --> 00:09:20,000 +I can enter eight characters for password, but there will be error telling me that I should use at + +129 +00:09:20,000 --> 00:09:23,000 +least one special character for the password. + +130 +00:09:24,000 --> 00:09:24,000 +That's it. + +131 +00:09:25,000 --> 00:09:32,000 +Those are three back and validations is that we should implement in scope of this task attention that + +132 +00:09:32,000 --> 00:09:36,000 +we also have customized error messages in different cases. + +133 +00:09:37,000 --> 00:09:38,000 +In the task. + +134 +00:09:38,000 --> 00:09:43,000 +Number eight, we have two main product categories on the home page. + +135 +00:09:44,000 --> 00:09:45,000 +This is easy task to do. + +136 +00:09:46,000 --> 00:09:49,000 +As you remember, will you create the tower database architecture? + +137 +00:09:50,000 --> 00:09:52,000 +And we have separate table for categories. + +138 +00:09:53,000 --> 00:10:00,000 +Basically what we need to do is to extract categories and generate just enough tiles with each category + +139 +00:10:00,000 --> 00:10:01,000 +and picture. + +140 +00:10:02,000 --> 00:10:10,000 +Yes, pay attention that there is also separate feature that is associated with each category sync also + +141 +00:10:10,000 --> 00:10:12,000 +about implementation of this space. + +142 +00:10:12,000 --> 00:10:19,000 +Usually in enterprise applications on the production scale, we use third party systems that are called + +143 +00:10:19,000 --> 00:10:24,000 +down them stands for Digital Asset Management. + +144 +00:10:25,000 --> 00:10:33,000 +But in scope of this task, we do not use any system and we will manage all our media inside one system, + +145 +00:10:33,000 --> 00:10:35,000 +inside one application. + +146 +00:10:36,000 --> 00:10:39,000 +Now things are getting more interesting. + +147 +00:10:39,000 --> 00:10:45,000 +And at last, number nine, we have to implement such functionality in general. + +148 +00:10:45,000 --> 00:10:53,000 +If you have ever used any search in any online store, this search should look predictable for you. + +149 +00:10:53,000 --> 00:10:57,000 +You can type the name of the product you are looking for. + +150 +00:10:57,000 --> 00:11:04,000 +You can type parts of the name in any register, uppercase or lowercase, and you should be redirected + +151 +00:11:04,000 --> 00:11:06,000 +to the product listing page. + +152 +00:11:07,000 --> 00:11:10,000 +For example, let me type laptop here. + +153 +00:11:10,000 --> 00:11:19,000 +I press enter to start the search and I'm redirected to the product listing page with laptop's implementation + +154 +00:11:19,000 --> 00:11:21,000 +of the product listing page. + +155 +00:11:21,000 --> 00:11:22,000 +Isn't that stuff? + +156 +00:11:23,000 --> 00:11:25,000 +We have product tiles here. + +157 +00:11:25,000 --> 00:11:28,000 +Each product has associated image. + +158 +00:11:28,000 --> 00:11:31,000 +What is the price of that specific product? + +159 +00:11:31,000 --> 00:11:32,000 +None of you bottom. + +160 +00:11:32,000 --> 00:11:34,000 +That will lead us to the product. + +161 +00:11:34,000 --> 00:11:42,000 +Details page implementation of the product details page or just PDP is another task. + +162 +00:11:43,000 --> 00:11:50,000 +I can get navigated to the product page either with the help of the search or from the home page. + +163 +00:11:50,000 --> 00:11:52,000 +Click on any category. + +164 +00:11:52,000 --> 00:11:59,000 +This will be a slightly different flow because in the first case you need to display a list of products. + +165 +00:11:59,000 --> 00:12:06,000 +That match is such a charm and in the second case, you need to show a list of products from the specific + +166 +00:12:06,000 --> 00:12:06,000 +category. + +167 +00:12:07,000 --> 00:12:15,000 +But in general, product placement page or just simply pop looks the same, no matter whether you navigate + +168 +00:12:15,000 --> 00:12:20,000 +here from the home page by clicking on category tile or with the help of search. + +169 +00:12:21,000 --> 00:12:24,000 +Let's discuss now pagination on the product page. + +170 +00:12:25,000 --> 00:12:31,000 +That tension that on the bottom of the page we have pagination in our configurations. + +171 +00:12:31,000 --> 00:12:37,000 +We set the maximum amount of items to be shown on the one single page. + +172 +00:12:37,000 --> 00:12:43,000 +Also, I fetch list of products from the database buy pages to improve performance. + +173 +00:12:44,000 --> 00:12:53,000 +So instead of loading all products that match search criteria, I applaud only five items from the database. + +174 +00:12:54,000 --> 00:13:02,000 +And in case user wants to see items from the second page, I shows the following five items and upload + +175 +00:13:02,000 --> 00:13:04,000 +the next five items. + +176 +00:13:05,000 --> 00:13:12,000 +This is important technical requirement of implementation of pagination in case will fetch all possible + +177 +00:13:12,000 --> 00:13:15,000 +products from the database and put all of them in memory. + +178 +00:13:15,000 --> 00:13:18,000 +You will not mean on performance in this case. + +179 +00:13:19,000 --> 00:13:25,000 +So we are attempting with this requirement in case I want to search on the HP products. + +180 +00:13:26,000 --> 00:13:33,000 +I just put HP in the search bar on the end and now I have products with HP and are names on me. + +181 +00:13:33,000 --> 00:13:38,000 +Is there a clear and in case requirements will remain unclear for some reasons. + +182 +00:13:38,000 --> 00:13:44,000 +Please do not hesitate to ask your questions below this video and I will answer those. + +183 +00:13:45,000 --> 00:13:49,000 +The next task is to implement the Code of Details page. + +184 +00:13:49,000 --> 00:13:52,000 +Let me click on View Button of any product from the list. + +185 +00:13:53,000 --> 00:13:59,000 +After clicking on the View Bar, then I'm resurrected to the product details page on this page. + +186 +00:13:59,000 --> 00:14:07,000 +I can see such properties of product s, its name, price, image and description. + +187 +00:14:07,000 --> 00:14:13,000 +You're welcome to use suggested design for implementation or create your own. + +188 +00:14:14,000 --> 00:14:21,000 +And as you can see, we reduce header and footer component on all pages, including preview page. + +189 +00:14:22,000 --> 00:14:29,000 +The next task is to implement the chip powered functionality will implement a lightweight checkout process. + +190 +00:14:30,000 --> 00:14:38,000 +Imagine that our checkout flow is not completely automated, but we just place an order and after that + +191 +00:14:38,000 --> 00:14:40,000 +operate from the online shop. + +192 +00:14:41,000 --> 00:14:45,000 +Regis asks the player for order details and other information. + +193 +00:14:46,000 --> 00:14:49,000 +But we have an information from this course. + +194 +00:14:49,000 --> 00:14:52,000 +You're welcome to implement more complex checkout flow. + +195 +00:14:53,000 --> 00:14:55,000 +It'll just take additional amounts of time. + +196 +00:14:56,000 --> 00:14:58,000 +But the concept is the same. + +197 +00:14:59,000 --> 00:15:06,000 +So when I click by button in case I'm not locked in, I am redirected to the signing page. + +198 +00:15:07,000 --> 00:15:09,000 +Let me log in with manager credentials. + +199 +00:15:10,000 --> 00:15:15,000 +Let's select any product and now I can click by button. + +200 +00:15:16,000 --> 00:15:20,000 +I clicked my button and received notification. + +201 +00:15:20,000 --> 00:15:23,000 +That manager will contact me so great. + +202 +00:15:24,000 --> 00:15:25,000 +What we have to implement. + +203 +00:15:25,000 --> 00:15:30,000 +That's basically we need to implement all the management. + +204 +00:15:30,000 --> 00:15:38,000 +Now, just to remind you, I looked in was manager account who has a role manager in the system. + +205 +00:15:38,000 --> 00:15:46,000 +This is important because only users that log in was full access for the management page. + +206 +00:15:47,000 --> 00:15:51,000 +Let me open to implement this issue. + +207 +00:15:51,000 --> 00:15:55,000 +You please use knowledge that we learned in that field lesson. + +208 +00:15:56,000 --> 00:15:59,000 +On the page we have a lot of open orders. + +209 +00:16:00,000 --> 00:16:01,000 +On the orders of manager. + +210 +00:16:01,000 --> 00:16:09,000 +You just this is also the least as and according to the fulfillment flow we have to implement six order + +211 +00:16:09,000 --> 00:16:13,000 +statuses and the bottom user order status. + +212 +00:16:14,000 --> 00:16:15,000 +So the next one. + +213 +00:16:16,000 --> 00:16:16,000 +Here. + +214 +00:16:16,000 --> 00:16:19,000 +We have released all of active orders. + +215 +00:16:19,000 --> 00:16:23,000 +These are orders that are not in the last completed state. + +216 +00:16:24,000 --> 00:16:27,000 +Also, we have contact details of a user. + +217 +00:16:27,000 --> 00:16:31,000 +Originally order is a receipt request status. + +218 +00:16:32,000 --> 00:16:37,000 +When I click on the them, I move order on the next status according to my fulfillment flow. + +219 +00:16:38,000 --> 00:16:46,000 +Now it is waiting for payments state after death automate become paid operator moves in this status + +220 +00:16:46,000 --> 00:16:52,000 +will receive payment confirmation after order in the process of shipment. + +221 +00:16:53,000 --> 00:17:01,000 +Then order is shipped and stored somewhere in the warehouse and when order is received as a warehouse + +222 +00:17:01,000 --> 00:17:05,000 +by our end user, we change all the status to complete. + +223 +00:17:05,000 --> 00:17:08,000 +Completed was a status is completed. + +224 +00:17:08,000 --> 00:17:15,000 +We don't see this order any more here in the list, but it is still present in this database. + +225 +00:17:16,000 --> 00:17:19,000 +You can implement any of the logic if you wish. + +226 +00:17:19,000 --> 00:17:23,000 +For example, you can implement page to display all orders. + +227 +00:17:25,000 --> 00:17:27,000 +The most important thing regarding order management. + +228 +00:17:28,000 --> 00:17:32,000 +If you remember, our previous home pass will reduce costs. + +229 +00:17:32,000 --> 00:17:38,000 +What affiliate marketing is and implemented part of this affiliate marketing logic. + +230 +00:17:39,000 --> 00:17:48,000 +In ensure, affiliate marketing allows users to receive rewards from purchases made by users they attract + +231 +00:17:48,000 --> 00:17:51,000 +to our website through our online store. + +232 +00:17:52,000 --> 00:17:59,000 +In other words, if you're generating traffic for my shop and zap clients registered on the side with + +233 +00:17:59,000 --> 00:18:06,000 +your reference, then you can count, let's say, 20% reward from each completed order. + +234 +00:18:07,000 --> 00:18:07,000 +Is it fair? + +235 +00:18:08,000 --> 00:18:10,000 +Let me show you how it works. + +236 +00:18:11,000 --> 00:18:17,000 +Be attentive because I will make a lot of tweaks now to reproduce the case that I'm talking about. + +237 +00:18:18,000 --> 00:18:19,000 +Let's start. + +238 +00:18:20,000 --> 00:18:22,000 +First of all, I navigate to my profile. + +239 +00:18:23,000 --> 00:18:30,000 +In my profile, I can take my portfolio personally, contains no code in it. + +240 +00:18:30,000 --> 00:18:33,000 +Let me just leave it as a clipboard. + +241 +00:18:34,000 --> 00:18:37,000 +That tension is the balance of this user is zero. + +242 +00:18:38,000 --> 00:18:41,000 +That means we don't have any money on the account. + +243 +00:18:42,000 --> 00:18:44,000 +Now I click sign now. + +244 +00:18:45,000 --> 00:18:52,000 +Now imagine that you share this thing with your friend and he or she use it to get this song. + +245 +00:18:53,000 --> 00:19:00,000 +If you remember during the exam, number one, we implement a zip up filter that intercepts all requests + +246 +00:19:00,000 --> 00:19:06,000 +to the website and tries to find the ones with the party records parameter in the request. + +247 +00:19:07,000 --> 00:19:11,000 +And we do consequence side with the partner code. + +248 +00:19:12,000 --> 00:19:18,000 +Now with your registered new account, I use some fake data from your account. + +249 +00:19:18,000 --> 00:19:24,000 +Also, I make sure that I follow all the security rules and enter a password. + +250 +00:19:25,000 --> 00:19:27,000 +I register an account. + +251 +00:19:30,000 --> 00:19:32,000 +And now let me buy a laptop. + +252 +00:19:34,000 --> 00:19:38,000 +I navigate to the first laptop from the laptop category least. + +253 +00:19:39,000 --> 00:19:48,000 +When order is graded, let me look out and login into the managers account and I log into the managers + +254 +00:19:48,000 --> 00:19:49,000 +account. + +255 +00:19:50,000 --> 00:19:56,000 +Now let's navigate to the order page and here we can see our new order. + +256 +00:19:57,000 --> 00:19:58,000 +Let's change it. + +257 +00:19:58,000 --> 00:19:59,000 +State to complete. + +258 +00:20:01,000 --> 00:20:06,000 +I will quit this one multiple times until order will be completely fulfilled. + +259 +00:20:10,000 --> 00:20:13,000 +And now let's get back to our profile. + +260 +00:20:14,000 --> 00:20:17,000 +And we should see that the balance of our user is changed. + +261 +00:20:18,000 --> 00:20:23,000 +We receive 2% from $1,500 per chase. + +262 +00:20:24,000 --> 00:20:25,000 +Is that a set of dollars? + +263 +00:20:27,000 --> 00:20:30,000 +Can you understand how affiliate marketing works? + +264 +00:20:30,000 --> 00:20:39,000 +So I brings a user to the shop and now I receive 2% from each purchase of that user and we need to implement + +265 +00:20:39,000 --> 00:20:42,000 +this business logic in our application. + +266 +00:20:42,000 --> 00:20:47,000 +This is pretty interesting logic and especially this is interesting to implement. + +267 +00:20:48,000 --> 00:20:49,000 +So have fun. + +268 +00:20:50,000 --> 00:20:55,000 +The next task is actually the implementation of my profile page. + +269 +00:20:55,000 --> 00:20:57,000 +You can see it here on your screen. + +270 +00:20:58,000 --> 00:21:01,000 +You can re-use my design or create any design you wish. + +271 +00:21:02,000 --> 00:21:05,000 +I print user first name, user, last name here. + +272 +00:21:05,000 --> 00:21:11,000 +And also there is a separate section with all personal information of the logged in user. + +273 +00:21:12,000 --> 00:21:15,000 +Here you can see even generate park my week that I already showed. + +274 +00:21:16,000 --> 00:21:22,000 +If I click on the referral stop, I see all referrals of the current user. + +275 +00:21:23,000 --> 00:21:28,000 +These are users who use my partner code as a registration. + +276 +00:21:29,000 --> 00:21:31,000 +In case user doesn't have vessels yet. + +277 +00:21:32,000 --> 00:21:38,000 +We have to see warning message here telling us that this user doesn't have peripherals here. + +278 +00:21:39,000 --> 00:21:45,000 +The last, but not least US is localization and internationalization in our app. + +279 +00:21:46,000 --> 00:21:52,000 +You are more than welcome to implement localization and internationalization for all Europe. + +280 +00:21:53,000 --> 00:22:01,000 +But I will show you example was Heather and as you already noticed there is a language switch and the + +281 +00:22:01,000 --> 00:22:02,000 +header. + +282 +00:22:02,000 --> 00:22:08,000 +If I select another language, let's say French soon they see all labels in French. + +283 +00:22:09,000 --> 00:22:16,000 +And even if I would go to any other page where the element exists, I would still see header in French + +284 +00:22:16,000 --> 00:22:24,000 +language because this is behavior of my element and I can switch it back to English language. + +285 +00:22:24,000 --> 00:22:25,000 +That's it. + +286 +00:22:26,000 --> 00:22:27,000 +Wow. + +287 +00:22:27,000 --> 00:22:28,000 +Just take a breath. + +288 +00:22:29,000 --> 00:22:34,000 +And yes, that's what you have to implement after you implement this task. + +289 +00:22:34,000 --> 00:22:43,000 +You can add your solution into your folder or it is a CV that all your exam tasks feel free to find + +290 +00:22:43,000 --> 00:22:47,000 +the detailed specification attachments to the lesson and the following lessons. + +291 +00:22:47,000 --> 00:22:54,000 +We are going to review together implementation of this task in details, and I will explain how I implemented + +292 +00:22:54,000 --> 00:23:02,000 +this and will use the source code of my solution to gather with you since a lot for your attention. + +293 +00:23:03,000 --> 00:23:05,000 +Have a great day and see you in the next lesson. + diff --git a/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/002 Solution Overview Part 1_en.srt b/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/002 Solution Overview Part 1_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..269f9a411eaaf7266b5d2cbeded580e3a88144b5 --- /dev/null +++ b/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/002 Solution Overview Part 1_en.srt @@ -0,0 +1,1304 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello, Jim. + +2 +00:00:07,000 --> 00:00:12,000 +In this video, we're going to hold an overview of the solution to the exam task. + +3 +00:00:12,000 --> 00:00:19,000 +I'm going to walk you through the source part of my solution and discuss with you important points in + +4 +00:00:19,000 --> 00:00:19,000 +our solution. + +5 +00:00:20,000 --> 00:00:27,000 +Just to remind you that in previous lesson, I made a comprehensive overview of the expected behavior + +6 +00:00:27,000 --> 00:00:28,000 +of our application. + +7 +00:00:29,000 --> 00:00:36,000 +And in this video we'll focus our attention on the source code answering actually how Everson works + +8 +00:00:36,000 --> 00:00:36,000 +here. + +9 +00:00:37,000 --> 00:00:45,000 +That's why, in case you want to see expected behavior and end times user journeys, please refer to + +10 +00:00:45,000 --> 00:00:46,000 +the previous video. + +11 +00:00:47,000 --> 00:00:53,000 +First of all, I'd like to mention that all source code that you're going to see in this lesson is available + +12 +00:00:53,000 --> 00:01:02,000 +for you and you can find the reference to it was only changes I did to solve this task at the bottom + +13 +00:01:02,000 --> 00:01:07,000 +of the file with the whole tasks right here in solution section. + +14 +00:01:08,000 --> 00:01:15,000 +And also you can find the reference to the whole repository where this solution is stored, the attentive, + +15 +00:01:15,000 --> 00:01:19,000 +because solution in the repository might be changed over time. + +16 +00:01:19,000 --> 00:01:26,000 +Because with my students we keep learning new topics and we keep improving our solution in each lesson. + +17 +00:01:27,000 --> 00:01:33,000 +So that's why in order to see exact solution, we applied in this lesson. + +18 +00:01:33,000 --> 00:01:37,000 +Feel free to explore specific computer vision that I've shared. + +19 +00:01:38,000 --> 00:01:45,000 +Also to make this solution work on your computer, you have to create that base and fill it out with + +20 +00:01:45,000 --> 00:01:53,000 +some data, at least with some thing they consider a configuration of your data source and database + +21 +00:01:53,000 --> 00:01:54,000 +connection by itself. + +22 +00:01:55,000 --> 00:02:01,000 +How to do this live used in the database section of my course Java from zero to first job. + +23 +00:02:03,000 --> 00:02:09,000 +And talking about data you can find here is a reference to my database explorer. + +24 +00:02:10,000 --> 00:02:13,000 +So let's start with you from the first task. + +25 +00:02:13,000 --> 00:02:18,000 +The first task actually is implementation of the previous example task. + +26 +00:02:19,000 --> 00:02:24,000 +In that document, you can find commit was a solution of the previous task. + +27 +00:02:24,000 --> 00:02:26,000 +So let's move on. + +28 +00:02:27,000 --> 00:02:30,000 +The second task is about their architecture. + +29 +00:02:31,000 --> 00:02:37,000 +That tension that my solution consists from three separate modules and the database. + +30 +00:02:37,000 --> 00:02:41,000 +These mean modules represent each layer in my application. + +31 +00:02:42,000 --> 00:02:43,000 +I have that module. + +32 +00:02:43,000 --> 00:02:51,000 +It contains all that resources and also it contains controllers and configurations for us. + +33 +00:02:51,000 --> 00:02:55,000 +Our controllers are in charge of handling requests. + +34 +00:02:55,000 --> 00:03:00,000 +I have quorum also called module contains all my business logic. + +35 +00:03:01,000 --> 00:03:02,000 +I have my facades. + +36 +00:03:02,000 --> 00:03:08,000 +The facades describe main business operations as I do with my data. + +37 +00:03:09,000 --> 00:03:12,000 +All the services affiliates. + +38 +00:03:12,000 --> 00:03:14,000 +That's marketing, business, logic and orders. + +39 +00:03:15,000 --> 00:03:20,000 +So Amazon related was the business logic I put in core module. + +40 +00:03:20,000 --> 00:03:23,000 +The next module is persistence module. + +41 +00:03:24,000 --> 00:03:31,000 +In this module I declared all and that is details, converters, down, segmentations and so on. + +42 +00:03:32,000 --> 00:03:38,000 +And also I have added a base layer that lies beyond the source code of my app. + +43 +00:03:38,000 --> 00:03:41,000 +I have my SQL Server up and running on my computer. + +44 +00:03:42,000 --> 00:03:43,000 +Is it is my database plan. + +45 +00:03:44,000 --> 00:03:48,000 +That's how that architecture is implemented in my solution. + +46 +00:03:49,000 --> 00:03:50,000 +Let's move on. + +47 +00:03:50,000 --> 00:03:56,000 +The task was about following and we see what I'm doing in the implementation of the solution. + +48 +00:03:57,000 --> 00:04:01,000 +I followed the principles that I explained in the embassy lesson. + +49 +00:04:02,000 --> 00:04:11,000 +So first of all, I moved all my presentation files, all my JSP files into that in use folder. + +50 +00:04:12,000 --> 00:04:18,000 +I did this in order to make them not accessible for everyone from the outside of my application. + +51 +00:04:19,000 --> 00:04:27,000 +And in order to control access to them with the help of my controllers so clients may hate my controllers, + +52 +00:04:27,000 --> 00:04:29,000 +first use the controllers. + +53 +00:04:29,000 --> 00:04:33,000 +I prepared all necessary data using the model. + +54 +00:04:33,000 --> 00:04:36,000 +And after that, I for once the request of you. + +55 +00:04:37,000 --> 00:04:44,000 +You are going to see this during my explanation of all the tasks models that they use and controllers + +56 +00:04:44,000 --> 00:04:46,000 +from the business and persistence layers. + +57 +00:04:47,000 --> 00:04:54,000 +So all tasks were implemented in strict conformity with the key and design quality principles. + +58 +00:04:55,000 --> 00:04:58,000 +Let's move on and review the next task. + +59 +00:04:59,000 --> 00:05:04,000 +Task number four was about implementation of the custom 404 page. + +60 +00:05:04,000 --> 00:05:07,000 +Everything is simple here in mind. + +61 +00:05:07,000 --> 00:05:10,000 +The command descriptor is a web x file. + +62 +00:05:10,000 --> 00:05:14,000 +I set error handler for all four or four errors. + +63 +00:05:15,000 --> 00:05:16,000 +Let me show it. + +64 +00:05:16,000 --> 00:05:20,000 +Do I navigate to my VAP module web folder? + +65 +00:05:21,000 --> 00:05:23,000 +And here's my web x-mode file. + +66 +00:05:24,000 --> 00:05:25,000 +Let me open it. + +67 +00:05:25,000 --> 00:05:29,000 +In the bottom of this file you can find error page element. + +68 +00:05:30,000 --> 00:05:33,000 +I mapped it was not found zero. + +69 +00:05:34,000 --> 00:05:41,000 +And how do you see what is map with this euro g speed page on my controller? + +70 +00:05:41,000 --> 00:05:46,000 +If you set controller z, your run follows an MVC bottom. + +71 +00:05:46,000 --> 00:05:49,000 +My request should go to controller first. + +72 +00:05:50,000 --> 00:05:53,000 +Let me open it in scope of this task. + +73 +00:05:53,000 --> 00:05:59,000 +I decided to move all my controllers in one package of controllers. + +74 +00:05:59,000 --> 00:06:03,000 +So let's say you can see not found error handler. + +75 +00:06:03,000 --> 00:06:07,000 +So as you can see, we don't need any model here. + +76 +00:06:08,000 --> 00:06:11,000 +So we just followed the request of you. + +77 +00:06:11,000 --> 00:06:15,000 +I created the interface that is called Configurations. + +78 +00:06:15,000 --> 00:06:22,000 +A little bit later we're going to run Sprint Framework and you are going to find how we can store configurations + +79 +00:06:22,000 --> 00:06:24,000 +outside of the source code. + +80 +00:06:24,000 --> 00:06:31,000 +But in this case, I decided to store my configs as constants in the source code of the program. + +81 +00:06:32,000 --> 00:06:36,000 +One of the cornerstones is called Vue's POS resolver. + +82 +00:06:36,000 --> 00:06:42,000 +This is a graphics that they use in POS for all light UI resources. + +83 +00:06:42,000 --> 00:06:49,000 +Having this config, it will be easy in the future to change graphics in case I decide to make changes. + +84 +00:06:50,000 --> 00:06:54,000 +As you can see, this graphics is equal to VB views. + +85 +00:06:55,000 --> 00:06:58,000 +This is direct request for all my views. + +86 +00:06:59,000 --> 00:07:01,000 +So in error handler. + +87 +00:07:01,000 --> 00:07:02,000 +After you. + +88 +00:07:02,000 --> 00:07:03,000 +Cost resolver. + +89 +00:07:03,000 --> 00:07:08,000 +I just specify the name of the page when used before was request to. + +90 +00:07:09,000 --> 00:07:12,000 +Let's look one more time how it looks like. + +91 +00:07:13,000 --> 00:07:22,000 +I have my web server up and running already, so I open that browser and I type in a non-existent URL. + +92 +00:07:22,000 --> 00:07:30,000 +And as you can see, I for that does a custom error page go to home page should read the recommended + +93 +00:07:30,000 --> 00:07:31,000 +home page. + +94 +00:07:31,000 --> 00:07:35,000 +But let's look a little bit close at how this bottom works. + +95 +00:07:35,000 --> 00:07:38,000 +I hope I'm not found to be. + +96 +00:07:39,000 --> 00:07:43,000 +Let's find a bottom that will lead us to the home page. + +97 +00:07:44,000 --> 00:07:45,000 +Here it is. + +98 +00:07:45,000 --> 00:07:53,000 +As you can see, I use hyper reference here and one user place on this bottle request is sent to the + +99 +00:07:53,000 --> 00:07:54,000 +controller. + +100 +00:07:54,000 --> 00:07:56,000 +Is that this map was the home page? + +101 +00:07:58,000 --> 00:08:00,000 +Let's open home page so that. + +102 +00:08:00,000 --> 00:08:06,000 +And here you can see how I extract all categories with the help of my facade. + +103 +00:08:06,000 --> 00:08:12,000 +We're going to talk a little bit more about this facade when I will explain and also talk about displaying + +104 +00:08:12,000 --> 00:08:14,000 +categories in the home page. + +105 +00:08:14,000 --> 00:08:22,000 +But as of now, you just need to understand that in our that we prepare all necessary data to be displayed + +106 +00:08:22,000 --> 00:08:24,000 +on The View on our GCP page. + +107 +00:08:25,000 --> 00:08:28,000 +We can say that the controller uses model. + +108 +00:08:28,000 --> 00:08:36,000 +I put the categories least into the request object, and after that I can for to request ease of use + +109 +00:08:36,000 --> 00:08:40,000 +so they understand how MVC cordon works. + +110 +00:08:41,000 --> 00:08:49,000 +So before opening of any UI resource, I need to be sure that my system is ready to present that to + +111 +00:08:49,000 --> 00:08:49,000 +you. + +112 +00:08:50,000 --> 00:08:57,000 +That's why I need to select let check the state of the system, fill out model with some data, perform + +113 +00:08:57,000 --> 00:09:01,000 +business operations that we need and only after that presents. + +114 +00:09:01,000 --> 00:09:08,000 +In view of the end user is it clear and even in case something is still remains unclear. + +115 +00:09:09,000 --> 00:09:14,000 +Please do not hesitate to ask your questions below this video and I will be happy to answer. + +116 +00:09:16,000 --> 00:09:21,000 +The next task we need to create our custom tax header and footer elements. + +117 +00:09:22,000 --> 00:09:28,000 +As you remember, we implement the tag and footer and scope of the previous task. + +118 +00:09:29,000 --> 00:09:37,000 +So what we need to do in this case is to create custom tag with the markup already created, and we + +119 +00:09:37,000 --> 00:09:41,000 +use tags on all pages instead of using pure markup. + +120 +00:09:43,000 --> 00:09:49,000 +Our navigate to that means that this is conventional location for custom tax. + +121 +00:09:49,000 --> 00:09:53,000 +I also created separate for this year at the school shop. + +122 +00:09:54,000 --> 00:10:01,000 +I store here all tax related to this specific exam pass, but not tax. + +123 +00:10:01,000 --> 00:10:05,000 +Is that the related obsolescence as I promised to in previous lesson? + +124 +00:10:05,000 --> 00:10:09,000 +I have him more than just Heather and TurboTax. + +125 +00:10:09,000 --> 00:10:13,000 +We are going to discuss each of these tax you as a homework review. + +126 +00:10:14,000 --> 00:10:17,000 +Let me finish explanation both heather and tax first. + +127 +00:10:18,000 --> 00:10:22,000 +Let me open heather unfiltered tax in the heather's time. + +128 +00:10:23,000 --> 00:10:31,000 +You can see that there is a need to use just how there is a need to use to implement different behavior. + +129 +00:10:31,000 --> 00:10:41,000 +Had it in case user is logged in or out and we need to use form teachers to in order to implement localization + +130 +00:10:41,000 --> 00:10:49,000 +of the component will discuss a separately to but in general as you may see this this is regular markup + +131 +00:10:49,000 --> 00:10:52,000 +that will be pasted into a bigger page. + +132 +00:10:52,000 --> 00:10:58,000 +Just similar story was a footnote that lets me open the whole page GCP file. + +133 +00:10:58,000 --> 00:11:07,000 +Now in this GCP file, you can see a directive that enables usage of my custom tax forms a shop namespace. + +134 +00:11:08,000 --> 00:11:10,000 +Here you can see shop how to. + +135 +00:11:11,000 --> 00:11:19,000 +And at the bottom of the file you can find shop for the the similar tax you can find on other pages. + +136 +00:11:19,000 --> 00:11:22,000 +For example, let me open sign in JSP file. + +137 +00:11:22,000 --> 00:11:29,000 +Now this same story shop had a tag on top and shop for the attack at the bottom. + +138 +00:11:30,000 --> 00:11:37,000 +By creating separate thanks, I ensure the beauty of the code and in case and use it to change the design + +139 +00:11:37,000 --> 00:11:40,000 +or behavior of hand on all pages. + +140 +00:11:40,000 --> 00:11:43,000 +I don't need to fix each new page. + +141 +00:11:43,000 --> 00:11:47,000 +I just open had a talk and added it as I need. + +142 +00:11:48,000 --> 00:11:48,000 +That's it. + +143 +00:11:49,000 --> 00:11:51,000 +In the next task. + +144 +00:11:51,000 --> 00:11:56,000 +In the task number six, we have to adjust the behavior of the header elements. + +145 +00:11:57,000 --> 00:12:05,000 +We need to show sign out bottom instead of up when the user is logged in and to show welcome message + +146 +00:12:05,000 --> 00:12:06,000 +instead of sign in bottom. + +147 +00:12:07,000 --> 00:12:12,000 +The task description will really understand that we just had an element. + +148 +00:12:13,000 --> 00:12:18,000 +That's why we navigate ahead of time in this file. + +149 +00:12:18,000 --> 00:12:21,000 +Let's navigate to zero eight. + +150 +00:12:22,000 --> 00:12:25,000 +Humans, of course, go from zero to first job. + +151 +00:12:25,000 --> 00:12:28,000 +We're also going to use them was my students. + +152 +00:12:29,000 --> 00:12:33,000 +And here you can see simple e that comes at g core. + +153 +00:12:34,000 --> 00:12:39,000 +I check whether there's a reason not to be in the session scope of the end user. + +154 +00:12:40,000 --> 00:12:49,000 +If yes, then I show welcome message and use first name of the user and also show sign now the bottom + +155 +00:12:50,000 --> 00:12:57,000 +in case there is no log things user I show sign name and say now bottom probably. + +156 +00:12:57,000 --> 00:13:02,000 +You also notice is that they used you steal from DAX here to get the message from there. + +157 +00:13:02,000 --> 00:13:10,000 +So as Mundo explains this a little bit later one will get is a task about localization of the header + +158 +00:13:10,000 --> 00:13:17,000 +element and is a question that probably pops up in your mind is where this logged in user comes from. + +159 +00:13:17,000 --> 00:13:19,000 +Let's now open sign. + +160 +00:13:19,000 --> 00:13:28,000 +So we implemented signing so that during our previous exam task, basically when I enter with my email + +161 +00:13:28,000 --> 00:13:37,000 +and password and clicked on the sign in bottom, I submitted demo form was supposed to pass it to my + +162 +00:13:37,000 --> 00:13:40,000 +sign in select and pay attention. + +163 +00:13:40,000 --> 00:13:45,000 +Here I extract the user from the database and they put it into the session. + +164 +00:13:46,000 --> 00:13:51,000 +I use attribute name logged in user which I store is a constant. + +165 +00:13:51,000 --> 00:13:52,000 +Can you see this? + +166 +00:13:53,000 --> 00:14:00,000 +Taking into account the GSP, we can see variables from the request, session, scope and others. + +167 +00:14:00,000 --> 00:14:05,000 +I can use attribute to me on the GCP to interact with attribute visit. + +168 +00:14:05,000 --> 00:14:06,000 +They could. + +169 +00:14:06,000 --> 00:14:10,000 +There is a three and though if yes, then let's move on. + +170 +00:14:11,000 --> 00:14:16,000 +If no, please ask your questions below this video and I will be happy to answer. + +171 +00:14:17,000 --> 00:14:22,000 +In the next task, we have to implement a few validations, duties and registration. + +172 +00:14:23,000 --> 00:14:28,000 +First of all, we have to understand that you are talking about backhand validations here. + +173 +00:14:29,000 --> 00:14:34,000 +Usually you can have combination of both backhand and front consolidation. + +174 +00:14:35,000 --> 00:14:40,000 +Front and foundation can be implemented with the help of JavaScript on the front down. + +175 +00:14:41,000 --> 00:14:49,000 +Basically, to implement some code that will validate values on the client side and prevent from submission + +176 +00:14:49,000 --> 00:14:57,000 +until all validation rules that that consolidation exists to prevent our application from malicious + +177 +00:14:57,000 --> 00:14:58,000 +attacks. + +178 +00:14:58,000 --> 00:15:06,000 +For example, user who wants to break our app or consistency of the data in the database can take Postman + +179 +00:15:06,000 --> 00:15:14,000 +Tool or some other tools that helps to generate requests and sends a request directly to the backend + +180 +00:15:14,000 --> 00:15:19,000 +without using frontend, thus forcing frontend pollination. + +181 +00:15:19,000 --> 00:15:25,000 +That's why having backend validations is a mandatory step for secure according. + +182 +00:15:26,000 --> 00:15:29,000 +Let me open sign up to this. + +183 +00:15:29,000 --> 00:15:38,000 +So that handles post requests from the demo form sent from the sign up page and here in do post mass, + +184 +00:15:38,000 --> 00:15:42,000 +I implemented all the validations that we need to implement. + +185 +00:15:43,000 --> 00:15:48,000 +First of all, with the help of user facade, I extract user by email. + +186 +00:15:49,000 --> 00:15:51,000 +What is user facade? + +187 +00:15:51,000 --> 00:15:54,000 +User facade implements facade. + +188 +00:15:54,000 --> 00:15:54,000 +Bottom. + +189 +00:15:55,000 --> 00:16:02,000 +Please check my course about the go design products or section about design products in my course Java + +190 +00:16:02,000 --> 00:16:04,000 +comes first job. + +191 +00:16:04,000 --> 00:16:09,000 +I explain in detail what facade garden is and why we're needed. + +192 +00:16:10,000 --> 00:16:17,000 +So facade is a part of my business layer and it is located in the core module. + +193 +00:16:17,000 --> 00:16:22,000 +As you can see, this interface aggravates business variable behavior. + +194 +00:16:23,000 --> 00:16:31,000 +It is such behavior as registered user, yet all users get referrals for user and asks them on all these + +195 +00:16:31,000 --> 00:16:32,000 +masses. + +196 +00:16:32,000 --> 00:16:37,000 +We have massive that allow us to get user by email. + +197 +00:16:37,000 --> 00:16:44,000 +User facade interface has one implementation and it is called default user facade. + +198 +00:16:45,000 --> 00:16:48,000 +This type contains zero references. + +199 +00:16:48,000 --> 00:16:51,000 +Those are DAO objects on the persistence layer. + +200 +00:16:52,000 --> 00:16:56,000 +Pay attention also to important and interesting design solution here. + +201 +00:16:57,000 --> 00:17:01,000 +Take into account my facade is on the business layer of the app. + +202 +00:17:02,000 --> 00:17:05,000 +Facade works was business entity. + +203 +00:17:05,000 --> 00:17:14,000 +User facade doesn't work was a detail because detail is just a data structure and doesn't contain any + +204 +00:17:14,000 --> 00:17:15,000 +behavior. + +205 +00:17:15,000 --> 00:17:20,000 +On the other hand, our business subject to user can contain behavior. + +206 +00:17:21,000 --> 00:17:23,000 +This is the first important point. + +207 +00:17:23,000 --> 00:17:30,000 +Another important one is a separation between persistence and business, where the structure of the + +208 +00:17:30,000 --> 00:17:35,000 +user object will depend on the structure of my persistence storage. + +209 +00:17:36,000 --> 00:17:44,000 +Various user business objects will contain all the necessary business information and will depend on + +210 +00:17:44,000 --> 00:17:47,000 +business logic only in simpler words. + +211 +00:17:47,000 --> 00:17:52,000 +User tables database may contain hundreds of fields. + +212 +00:17:52,000 --> 00:17:58,000 +Let's imagine some, but not all fields participate in easy business logic. + +213 +00:17:58,000 --> 00:18:02,000 +Some of them are required to ensure consistency of database. + +214 +00:18:02,000 --> 00:18:07,000 +Some of them are used to increase performance of extracting data from the database. + +215 +00:18:08,000 --> 00:18:15,000 +There might be very different cases, and keeping user virtual and user types separate allows me to + +216 +00:18:15,000 --> 00:18:19,000 +make my application more scannable in terms of substitute and persistence. + +217 +00:18:20,000 --> 00:18:26,000 +So my business land depends not on the two objects, but on the business objects. + +218 +00:18:27,000 --> 00:18:28,000 +Can you understand that? + +219 +00:18:29,000 --> 00:18:35,000 +And I can change is the persistence layer or the structure of the detail object. + +220 +00:18:35,000 --> 00:18:38,000 +And this will not impact my facade objects. + +221 +00:18:39,000 --> 00:18:41,000 +To ensure smooth work. + +222 +00:18:41,000 --> 00:18:48,000 +I implement convert this that can convert detail objects into the business objects. + +223 +00:18:48,000 --> 00:18:56,000 +You can see that I have converted for each business entity in my persistence module and then my default + +224 +00:18:56,000 --> 00:18:57,000 +user facade. + +225 +00:18:57,000 --> 00:19:00,000 +I also store reference to the detail. + +226 +00:19:00,000 --> 00:19:05,000 +The user converts an object in order to convert objects between each HASA. + +227 +00:19:05,000 --> 00:19:06,000 +This makes sense. + +228 +00:19:07,000 --> 00:19:13,000 +Here is a message that we discussed at the moment when I struck the user by email. + +229 +00:19:13,000 --> 00:19:22,000 +I use the object as it returns the tool, but I also use convert to object to convert detail into a + +230 +00:19:22,000 --> 00:19:23,000 +user business subject. + +231 +00:19:24,000 --> 00:19:31,000 +With this construction, you have more classes, but you receive more scalability opportunities and + +232 +00:19:31,000 --> 00:19:36,000 +make your business more stable and less dependent on the persistence layer. + +233 +00:19:37,000 --> 00:19:40,000 +So you can consider this design solution also, if you wish. + +234 +00:19:41,000 --> 00:19:44,000 +Let's get back to the sign up so that. + +235 +00:19:45,000 --> 00:19:50,000 +And in case there is no user was the emails that we specified in the form. + +236 +00:19:51,000 --> 00:19:58,000 +That means email is unique in case we use a user associated with this email. + +237 +00:19:58,000 --> 00:20:05,000 +The system that means email value is not unique and we need to send an error message. + +238 +00:20:05,000 --> 00:20:11,000 +Thousands of email is not unique and the user needs to use another email user registration. + +239 +00:20:12,000 --> 00:20:19,000 +When you will implement localization for your application, please move all error messages into the + +240 +00:20:19,000 --> 00:20:23,000 +resource bundles in order you can localize them later. + +241 +00:20:23,000 --> 00:20:32,000 +I already use resource Mongolians this with an extract message with key from resource bundle can top + +242 +00:20:32,000 --> 00:20:34,000 +as one of the properties. + +243 +00:20:34,000 --> 00:20:41,000 +I create object officers bundle and use base name of my properties files as it contains all necessary + +244 +00:20:41,000 --> 00:20:41,000 +labels. + +245 +00:20:42,000 --> 00:20:47,000 +All the source bundles are stored in the SLC Main Resources Source folder. + +246 +00:20:47,000 --> 00:20:49,000 +Let me show it to you. + +247 +00:20:50,000 --> 00:20:55,000 +And here is a section with error messages that they show user registration. + +248 +00:20:55,000 --> 00:20:56,000 +Can you see them? + +249 +00:20:57,000 --> 00:21:03,000 +Here are all the keys that they use in the source code to extract error messages. + +250 +00:21:04,000 --> 00:21:11,000 +In case you're wondering, refresh your knowledge on this topic, please refer to a lesson about localization + +251 +00:21:11,000 --> 00:21:15,000 +and internationalization of my general from zero to first job course. + +252 +00:21:17,000 --> 00:21:20,000 +I put this error message into the session object. + +253 +00:21:20,000 --> 00:21:22,000 +Why not a request object? + +254 +00:21:23,000 --> 00:21:27,000 +Because the call sends redirect message, but not forward. + +255 +00:21:28,000 --> 00:21:32,000 +And when it calls, sends redirect, you request is created. + +256 +00:21:32,000 --> 00:21:37,000 +And all this attached to the request scope become not available. + +257 +00:21:38,000 --> 00:21:41,000 +That's why I attach error message to the session. + +258 +00:21:42,000 --> 00:21:42,000 +Is it clear? + +259 +00:21:43,000 --> 00:21:47,000 +One request is redirected back to the sign up page. + +260 +00:21:47,000 --> 00:21:51,000 +I show this error message and remove it from the session scope. + +261 +00:21:52,000 --> 00:21:57,000 +I open sign up GCP file and here is the bottom of the demo form. + +262 +00:21:57,000 --> 00:22:05,000 +You can see a place where I create error message in case it exists in scope and I remove it from session + +263 +00:22:05,000 --> 00:22:08,000 +right after it was shown already. + +264 +00:22:09,000 --> 00:22:10,000 +We are not done with it yet. + +265 +00:22:11,000 --> 00:22:14,000 +Let me guess a few more questions from your hat. + +266 +00:22:15,000 --> 00:22:20,000 +Another question is probably why we can't pass our message in a square parameter. + +267 +00:22:21,000 --> 00:22:28,000 +Well, if we were cap, let's remember that zero has labeled as advanced and you need to put additional + +268 +00:22:28,000 --> 00:22:32,000 +code on the phone type to pass you parameter value. + +269 +00:22:33,000 --> 00:22:36,000 +But zero will be ugly and scary. + +270 +00:22:36,000 --> 00:22:37,000 +And user. + +271 +00:22:38,000 --> 00:22:44,000 +Another question probably is about not understanding why we need to redirect requests instead of forward. + +272 +00:22:45,000 --> 00:22:54,000 +There is more general that after handling cost requests you should always send redirect and never forwards + +273 +00:22:54,000 --> 00:23:01,000 +the request to another resource, even if you want to just forward the request to another presentation + +274 +00:23:01,000 --> 00:23:02,000 +resource. + +275 +00:23:02,000 --> 00:23:05,000 +And you're saying there is nothing dangerous in this. + +276 +00:23:05,000 --> 00:23:07,000 +Still use redirect. + +277 +00:23:08,000 --> 00:23:16,000 +There is even designed columns at the so called p r g, p r g stands for post rhetoric. + +278 +00:23:16,000 --> 00:23:18,000 +Yeah, we sent a request. + +279 +00:23:19,000 --> 00:23:20,000 +We have, of course, the message. + +280 +00:23:21,000 --> 00:23:24,000 +After that we were ready with requests and czars. + +281 +00:23:24,000 --> 00:23:26,000 +We said, Get the masses. + +282 +00:23:27,000 --> 00:23:29,000 +Why this is so important. + +283 +00:23:30,000 --> 00:23:33,000 +This is because force requests are not safe. + +284 +00:23:34,000 --> 00:23:38,000 +Usually post requests are used to create resources. + +285 +00:23:38,000 --> 00:23:46,000 +And if you watched serious of my lessons about protocol, you already know this and this can be dangerous. + +286 +00:23:47,000 --> 00:23:47,000 +Let me explain. + +287 +00:23:48,000 --> 00:23:51,000 +They know that the browser has a crash button. + +288 +00:23:52,000 --> 00:23:53,000 +Let me show it to you. + +289 +00:23:54,000 --> 00:23:54,000 +Usually is. + +290 +00:23:54,000 --> 00:23:57,000 +This bottom is located near the address line. + +291 +00:23:58,000 --> 00:24:01,000 +This bottle repeats the last request. + +292 +00:24:01,000 --> 00:24:08,000 +Son imagines of the last request that was sent by browser was sent via post. + +293 +00:24:09,000 --> 00:24:16,000 +Imagine that this is money transfer, for example, and there is some error or another page and user + +294 +00:24:16,000 --> 00:24:18,000 +decided to refresh bottom. + +295 +00:24:19,000 --> 00:24:20,000 +What will happen? + +296 +00:24:21,000 --> 00:24:28,000 +The last post request is it will send my browser will be executed again and the last request sent was + +297 +00:24:28,000 --> 00:24:32,000 +about sending money amount from one account to another. + +298 +00:24:32,000 --> 00:24:39,000 +Then the transaction will be repeated and it will be repeated unexpectedly for the end user. + +299 +00:24:40,000 --> 00:24:47,000 +In our case, refresh button will submit form to register user one more time and will face was error + +300 +00:24:47,000 --> 00:24:53,000 +because system can register two users with the same email and similar issues. + +301 +00:24:54,000 --> 00:25:01,000 +That's why after we have of course method, we should regulate that request with the gas masses. + +302 +00:25:01,000 --> 00:25:06,000 +So in another resource, this is called postgraduate cat car. + +303 +00:25:06,000 --> 00:25:09,000 +Shocking version is RG. + +304 +00:25:10,000 --> 00:25:11,000 +Hope that this is clear. + +305 +00:25:12,000 --> 00:25:18,000 +The phone cases will be easy to implement if you know, Joe, because they're based on the simple and + +306 +00:25:18,000 --> 00:25:23,000 +similar blogs as we have just will use in the next case. + +307 +00:25:23,000 --> 00:25:29,000 +We need to compare values from two fields from password field, repeat password field. + +308 +00:25:30,000 --> 00:25:35,000 +And in case they don't match each other, then we need to generate another error. + +309 +00:25:35,000 --> 00:25:37,000 +The principle is the same. + +310 +00:25:38,000 --> 00:25:41,000 +We put error message into the session and redirect the request. + +311 +00:25:42,000 --> 00:25:50,000 +For the next case I created to validate that is store is a core module and that is part of our business + +312 +00:25:50,000 --> 00:25:58,000 +logic validate validates whether there is a special character in the password and password events bad + +313 +00:25:58,000 --> 00:26:06,000 +tensions that they use to know that our interface this is generic it contains generic mass, it is valid, + +314 +00:26:07,000 --> 00:26:08,000 +it takes strings. + +315 +00:26:09,000 --> 00:26:15,000 +This method may be overloaded, by the way, if needed, and massive returns is a true or false. + +316 +00:26:16,000 --> 00:26:19,000 +Here is open closed principle in action. + +317 +00:26:19,000 --> 00:26:29,000 +Validator entity is closed for modification and designed in a way that is easy to expand the star so + +318 +00:26:29,000 --> 00:26:30,000 +it is open for extension. + +319 +00:26:31,000 --> 00:26:33,000 +I have implementation of this interface. + +320 +00:26:33,000 --> 00:26:40,000 +It is called password to validate and it contains business logic to verify the lengths of the passwords + +321 +00:26:41,000 --> 00:26:45,000 +and confirms that at least one special character is present in the password. + +322 +00:26:46,000 --> 00:26:53,000 +And in case when a data returns false, we send another error message and all of the when all validations + +323 +00:26:53,000 --> 00:27:00,000 +pass successfully reregister user and redirect the same to the sign in page that we we've gotten this + +324 +00:27:00,000 --> 00:27:01,000 +task. + +325 +00:27:01,000 --> 00:27:07,000 +Take your time to explore the source code by yourself and ask me in case of any questions. + +326 +00:27:08,000 --> 00:27:08,000 +Let's continue. + diff --git a/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/003 Solution Overview Part 2_en.srt b/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/003 Solution Overview Part 2_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..9671071d853c1524f5e0c6ee8b1edf301c57fb16 --- /dev/null +++ b/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/003 Solution Overview Part 2_en.srt @@ -0,0 +1,872 @@ +1 +00:00:04,000 --> 00:00:05,000 +In the task. + +2 +00:00:05,000 --> 00:00:09,000 +Number eight, we need to add product categories such as a home page. + +3 +00:00:10,000 --> 00:00:12,000 +To be honest, never seen a single share. + +4 +00:00:13,000 --> 00:00:15,000 +Let me open the home page. + +5 +00:00:15,000 --> 00:00:18,000 +So I use category facade. + +6 +00:00:19,000 --> 00:00:24,000 +The principle of using facade and interacting with a business object category, but not category. + +7 +00:00:24,000 --> 00:00:28,000 +The tool is a similar to the principles that we discussed. + +8 +00:00:29,000 --> 00:00:31,000 +One of your views to use a facade. + +9 +00:00:32,000 --> 00:00:36,000 +I extract categories, I put them into a request. + +10 +00:00:36,000 --> 00:00:38,000 +And for a request to give you. + +11 +00:00:40,000 --> 00:00:41,000 +On the home page GSP. + +12 +00:00:42,000 --> 00:00:50,000 +I used stack z to scold category styles and this stuff I use for each loop to iterate over each item. + +13 +00:00:50,000 --> 00:00:56,000 +I generate links here to navigate to the probabilistic page filtering on the products. + +14 +00:00:56,000 --> 00:01:03,000 +From this category I use category name and I also use property of the category. + +15 +00:01:03,000 --> 00:01:05,000 +This code image name. + +16 +00:01:06,000 --> 00:01:13,000 +As I said during the task overview, usually we use digital asset management tools to manage all our + +17 +00:01:13,000 --> 00:01:14,000 +tools and production. + +18 +00:01:15,000 --> 00:01:23,000 +But taking into account Java and clean architecture in this course, I decided to not complicated this + +19 +00:01:23,000 --> 00:01:23,000 +solution. + +20 +00:01:24,000 --> 00:01:27,000 +We store all media files in the project. + +21 +00:01:27,000 --> 00:01:31,000 +In my web folder, I have the images folders. + +22 +00:01:31,000 --> 00:01:34,000 +It contains all visual media items. + +23 +00:01:34,000 --> 00:01:40,000 +So the only thing that I need to do is to select the proper image for the category. + +24 +00:01:41,000 --> 00:01:43,000 +That's why it's a database. + +25 +00:01:43,000 --> 00:01:48,000 +I stores the name of the image that is associated with this category. + +26 +00:01:49,000 --> 00:01:52,000 +You can implement this in different way if you wish. + +27 +00:01:52,000 --> 00:01:56,000 +This is just one of the possible ways of solution of this task. + +28 +00:01:57,000 --> 00:02:03,000 +Definitely it's a little bit better to have a designer in the team or just to spend more time to create + +29 +00:02:03,000 --> 00:02:10,000 +images with the same resolution and the same size and same style to make them look better on the home + +30 +00:02:10,000 --> 00:02:12,000 +page and to have straight lines. + +31 +00:02:13,000 --> 00:02:16,000 +But you have opportunity to make perfect submission. + +32 +00:02:17,000 --> 00:02:19,000 +You have everything you need to implement. + +33 +00:02:21,000 --> 00:02:23,000 +Now let's discuss search functionality. + +34 +00:02:24,000 --> 00:02:31,000 +Let me open my head up top because according to my design search bar is located in the header. + +35 +00:02:32,000 --> 00:02:35,000 +As you can see, my search is simple form. + +36 +00:02:36,000 --> 00:02:39,000 +That love is a lesson about HTML forms. + +37 +00:02:39,000 --> 00:02:42,000 +The only difference here was what we got. + +38 +00:02:42,000 --> 00:02:45,000 +We don't have the input of submit type here. + +39 +00:02:46,000 --> 00:02:49,000 +I am just simple text simple for my search query. + +40 +00:02:49,000 --> 00:02:54,000 +Data from this form will be submitted to the search controller with the get message. + +41 +00:02:55,000 --> 00:02:58,000 +Even despite this, there is no input off submit type. + +42 +00:02:59,000 --> 00:03:07,000 +I can submit the form with enter key and other input type is hidden value and it is called page. + +43 +00:03:08,000 --> 00:03:10,000 +This is needed to support pagination feature. + +44 +00:03:10,000 --> 00:03:17,000 +And I'm also going to explain taking into account is this a search bar I always need to request is a + +45 +00:03:17,000 --> 00:03:25,000 +first page for the concrete search term and on the after I can be navigated proposal pages. + +46 +00:03:26,000 --> 00:03:33,000 +So when I press enter, the request is sent to the search controller in the search tool that I request + +47 +00:03:33,000 --> 00:03:42,000 +parameters, name, search term and the page I decided to implement search was a gets massive because + +48 +00:03:42,000 --> 00:03:50,000 +when you search for the online shop it is easier to show link to the specific page of the search rules. + +49 +00:03:50,000 --> 00:03:56,000 +My sense lets me open the browser and shows the benefits that I'm talking about. + +50 +00:03:56,000 --> 00:04:05,000 +For example, I can search for laptops hopefully and share it with my friend, and even if I will be + +51 +00:04:05,000 --> 00:04:11,000 +on the second page and I will share a link to the second page, I can be navigated directly to. + +52 +00:04:11,000 --> 00:04:14,000 +The second page of the query is in the school. + +53 +00:04:15,000 --> 00:04:22,000 +I can also store the search query into bookmarks and be navigated to the search results that I need. + +54 +00:04:23,000 --> 00:04:26,000 +Let's get back to the server and review implementation. + +55 +00:04:27,000 --> 00:04:31,000 +The key message here is get products like main full page. + +56 +00:04:32,000 --> 00:04:34,000 +This is located in the products for sale. + +57 +00:04:35,000 --> 00:04:35,000 +Why? + +58 +00:04:35,000 --> 00:04:43,000 +It is important because the logic as it stands behind this model makes our search incredibly fast. + +59 +00:04:43,000 --> 00:04:46,000 +Let's understand how this is achieved. + +60 +00:04:47,000 --> 00:04:50,000 +To make it more cost and support pagination. + +61 +00:04:50,000 --> 00:04:56,000 +I need to cross page number and number of items it is allowed to show on the page. + +62 +00:04:57,000 --> 00:05:04,000 +I get page from the request parameter and maximum amount of items on the page is taken from two considerations. + +63 +00:05:05,000 --> 00:05:10,000 +According to our requirements, this is maximum five items per page. + +64 +00:05:11,000 --> 00:05:15,000 +What looks like main full page was the message is located in the facade. + +65 +00:05:16,000 --> 00:05:18,000 +I have one implementation of the product. + +66 +00:05:18,000 --> 00:05:21,000 +Facade is a the scope default for the facade. + +67 +00:05:22,000 --> 00:05:26,000 +Zinn mentioned the massive delegates invocation to the message. + +68 +00:05:27,000 --> 00:05:31,000 +Part of the interface has one implementation with this code. + +69 +00:05:31,000 --> 00:05:37,000 +My sequel, ABC Code, is now in the series implementation of this message. + +70 +00:05:38,000 --> 00:05:39,000 +Let's investigate it. + +71 +00:05:40,000 --> 00:05:47,000 +In this task, I expect you to shop your skills and the knowledge of the school and also practice your + +72 +00:05:47,000 --> 00:05:49,000 +skills of working this prepared statement. + +73 +00:05:50,000 --> 00:05:56,000 +I'd like to highlight that according to this task, I have two such products by such job that can be + +74 +00:05:56,000 --> 00:06:00,000 +read in the annual register upper or lower case. + +75 +00:06:00,000 --> 00:06:09,000 +Also, I have to search products in these and even in case part of full length contains such term zen. + +76 +00:06:09,000 --> 00:06:11,000 +I have to show this products in search results. + +77 +00:06:12,000 --> 00:06:20,000 +That's why I use a like sequel operator to search products by Zoom names according to the car. + +78 +00:06:20,000 --> 00:06:23,000 +Pay attention that I also use proper function. + +79 +00:06:24,000 --> 00:06:27,000 +This function makes value uppercase. + +80 +00:06:28,000 --> 00:06:36,000 +I use proper function both in workflows and in the like, in order to make sure that the veils will + +81 +00:06:36,000 --> 00:06:40,000 +match each other and they will be returned in a search result. + +82 +00:06:41,000 --> 00:06:47,000 +That's how I address the challenge of searching names written in different registers. + +83 +00:06:48,000 --> 00:06:51,000 +In the upper massive here I use Concord, mass. + +84 +00:06:51,000 --> 00:06:59,000 +Why is this the specifics of roads and was prepared statement in Java because if you wouldn't use Concord + +85 +00:06:59,000 --> 00:07:07,000 +Mass then you will receive error in SQL statement because one value will be added instead of the question + +86 +00:07:07,000 --> 00:07:13,000 +mark, it will be misinterpreted considering person signs and quotes that will be added. + +87 +00:07:14,000 --> 00:07:22,000 +So to make sure our SQL statement will be valid by the moment it will be executed against database we + +88 +00:07:22,000 --> 00:07:24,000 +need to use come cut message here. + +89 +00:07:25,000 --> 00:07:29,000 +So implement pagination requirements and return only five items per page. + +90 +00:07:30,000 --> 00:07:37,000 +I used to be with cross limits, operates and can take offset an amount of items to be returned. + +91 +00:07:38,000 --> 00:07:46,000 +So here we calculate offset depending on which page we are, we need to know page number and maximum + +92 +00:07:46,000 --> 00:07:47,000 +amount of cards. + +93 +00:07:47,000 --> 00:07:49,000 +I'm allowed to be shown on the page. + +94 +00:07:50,000 --> 00:07:53,000 +That's where I use these massive arguments. + +95 +00:07:54,000 --> 00:07:56,000 +That's how high performance is achieved. + +96 +00:07:57,000 --> 00:08:00,000 +I didn't search all products from a database. + +97 +00:08:00,000 --> 00:08:07,000 +Each time I navigated to the page, I extracted on the name of the amount of items required to be shown + +98 +00:08:07,000 --> 00:08:15,000 +on the page and no more in general, in case auditing, filtering, or limitation of records through + +99 +00:08:15,000 --> 00:08:19,000 +chance in case these operations are done on the database. + +100 +00:08:19,000 --> 00:08:24,000 +Their performance usually is better than you would perform this operations. + +101 +00:08:24,000 --> 00:08:25,000 +The problem in mammal. + +102 +00:08:26,000 --> 00:08:28,000 +Let me get back to the search service. + +103 +00:08:29,000 --> 00:08:35,000 +Also, I have another message that can calculate the maximum amount of pages for this search. + +104 +00:08:36,000 --> 00:08:44,000 +It is called its number of pages for such as you can see this massive use, this product, though, + +105 +00:08:44,000 --> 00:08:48,000 +to check the total amount of products for this search query. + +106 +00:08:49,000 --> 00:08:55,000 +If we would discover the implementation of this message in my secretary that we see called it now we + +107 +00:08:55,000 --> 00:08:59,000 +would find is a recent query to return count of records. + +108 +00:09:00,000 --> 00:09:07,000 +I also use like algorithm to calculate the amount of products that march search query. + +109 +00:09:08,000 --> 00:09:15,000 +And after that, in facade, I applied a special formula to calculate the maximum amount of pages. + +110 +00:09:16,000 --> 00:09:23,000 +I get the result of division of total products number and the maximum amount of items per page. + +111 +00:09:24,000 --> 00:09:31,000 +And in case there is some more use or simpler set or in line, the after division, we need that additional + +112 +00:09:31,000 --> 00:09:32,000 +page. + +113 +00:09:32,000 --> 00:09:35,000 +Imagine that we have 12 products. + +114 +00:09:35,000 --> 00:09:36,000 +We need three pages. + +115 +00:09:36,000 --> 00:09:40,000 +We are allowed to show maximum five products per page. + +116 +00:09:41,000 --> 00:09:47,000 +In this case, we are going to have five products on the first page, five products on the second page, + +117 +00:09:47,000 --> 00:09:49,000 +and two products on the sports page. + +118 +00:09:50,000 --> 00:09:54,000 +Is it clear when I calculated the maximum number of pages? + +119 +00:09:55,000 --> 00:09:58,000 +I add all necessary data into the request scope. + +120 +00:09:59,000 --> 00:10:05,000 +I at least have products, amount of pages, current page, or in other words, active page because + +121 +00:10:05,000 --> 00:10:13,000 +there will be separate and applied to the active page and search query to be able to search for it back + +122 +00:10:13,000 --> 00:10:20,000 +to see several that in case we will be navigated to the next page and we will need it again is a server. + +123 +00:10:21,000 --> 00:10:22,000 +Another interesting point. + +124 +00:10:22,000 --> 00:10:25,000 +I pass list of page numbers and pages. + +125 +00:10:26,000 --> 00:10:31,000 +I need these because I am going to use for issue one creating pagination elements. + +126 +00:10:32,000 --> 00:10:40,000 +And when all data is prepared and add to the request scope, then a forward request is a page. + +127 +00:10:41,000 --> 00:10:41,000 +Let's look at. + +128 +00:10:43,000 --> 00:10:46,000 +The implementations of this page is our next task. + +129 +00:10:47,000 --> 00:10:49,000 +On this page. + +130 +00:10:49,000 --> 00:10:53,000 +I have separate talk, as it is called, filthy of the times. + +131 +00:10:53,000 --> 00:10:54,000 +Let me open it now. + +132 +00:10:55,000 --> 00:11:01,000 +Series for each loop on each iteration of the great new tile. + +133 +00:11:01,000 --> 00:11:03,000 +I use the reference to the image. + +134 +00:11:04,000 --> 00:11:12,000 +I also use the product name for this price and I need to generate the reference to support this page. + +135 +00:11:12,000 --> 00:11:21,000 +Basically, there is not so much sinks here and those are safe to discuss in scope of this task that + +136 +00:11:21,000 --> 00:11:23,000 +I can navigate this a few page. + +137 +00:11:23,000 --> 00:11:26,000 +These are from the home page by clicking on the category. + +138 +00:11:27,000 --> 00:11:32,000 +All with the help of this search will review the flow with the search. + +139 +00:11:33,000 --> 00:11:35,000 +So let's now review massive flow. + +140 +00:11:36,000 --> 00:11:39,000 +Let's imagine that they click on the category from the home page. + +141 +00:11:40,000 --> 00:11:42,000 +What is supposed to happen next? + +142 +00:11:43,000 --> 00:11:47,000 +I have separate control, as it is called categories too. + +143 +00:11:48,000 --> 00:11:50,000 +In general, it looks similar to this search. + +144 +00:11:50,000 --> 00:11:54,000 +So but still there are some differences. + +145 +00:11:54,000 --> 00:12:00,000 +Namely, instead of the search term we need to some of the products by category using belong to. + +146 +00:12:01,000 --> 00:12:06,000 +With regards to all other options, everything looks similar. + +147 +00:12:06,000 --> 00:12:14,000 +We also need to calculate the amount of pages to be shown active page category ID and list of products + +148 +00:12:14,000 --> 00:12:15,000 +selected. + +149 +00:12:15,000 --> 00:12:18,000 +I use the same names for attributes. + +150 +00:12:18,000 --> 00:12:25,000 +That's why there will not be any differences of field people of titles, that there will be some difference + +151 +00:12:25,000 --> 00:12:29,000 +in the search flow and categories flow on the pagination that. + +152 +00:12:30,000 --> 00:12:36,000 +Let's discuss the next stars because the next task is implementation of the pagination. + +153 +00:12:37,000 --> 00:12:43,000 +So I believe that you already understood why we need pagination and what benefits we expect to get in + +154 +00:12:43,000 --> 00:12:45,000 +performance from pagination. + +155 +00:12:46,000 --> 00:12:52,000 +You also saw facade and how some calculations are done to calculate the maximum amount of pages, for + +156 +00:12:52,000 --> 00:12:53,000 +example. + +157 +00:12:54,000 --> 00:12:55,000 +These appeal people of style stock. + +158 +00:12:56,000 --> 00:12:59,000 +We can find another target that is called pagination. + +159 +00:13:00,000 --> 00:13:02,000 +Let's explore it together. + +160 +00:13:03,000 --> 00:13:11,000 +Here I use to tack because there are two potential cases and dependent on each case linked to the next + +161 +00:13:11,000 --> 00:13:14,000 +page will be formed differently. + +162 +00:13:14,000 --> 00:13:15,000 +Let me explain. + +163 +00:13:16,000 --> 00:13:23,000 +In case I use category to navigate this appeal page, then I need to form query parameters for all the + +164 +00:13:23,000 --> 00:13:31,000 +pages so that when a user clicks on the following page, we will be navigated to the category so that + +165 +00:13:31,000 --> 00:13:33,000 +but not to the search. + +166 +00:13:33,000 --> 00:13:39,000 +So this is important because quality of product selection are different. + +167 +00:13:40,000 --> 00:13:43,000 +Basically, that's how pagination is implemented. + +168 +00:13:43,000 --> 00:13:44,000 +Let's move on. + +169 +00:13:45,000 --> 00:13:52,000 +So next task is about the implementation of the column details page zipcode is similar one. + +170 +00:13:53,000 --> 00:13:58,000 +Basically, each product style on beauty has a reference to the product controller. + +171 +00:13:59,000 --> 00:14:07,000 +As you can see is appeal to tells that we insert hyper reference to the product controller and we post + +172 +00:14:07,000 --> 00:14:09,000 +product page as a parameter. + +173 +00:14:10,000 --> 00:14:12,000 +Let's open product controller now. + +174 +00:14:13,000 --> 00:14:14,000 +Everything is simple. + +175 +00:14:14,000 --> 00:14:25,000 +Shall we use product facade to extract product by the we set product is a request call and we request + +176 +00:14:25,000 --> 00:14:34,000 +to the view on the PDP use page using awesome extraordinaire and display of my product object. + +177 +00:14:34,000 --> 00:14:36,000 +Is it a code is a request scope. + +178 +00:14:37,000 --> 00:14:44,000 +In the next task, we have to implement checkout according to the requirements of our task. + +179 +00:14:44,000 --> 00:14:47,000 +Only logged in users can buy product. + +180 +00:14:47,000 --> 00:14:53,000 +That's why depending on the fact I was involved in user is present in the session on no. + +181 +00:14:54,000 --> 00:15:02,000 +We set different type of reference for the buy button in case user is not logged in, user should be + +182 +00:15:02,000 --> 00:15:10,000 +redirected to the signing page when he or she please by bottom and in the case user is logged in, we + +183 +00:15:10,000 --> 00:15:14,000 +can proceed with checkout by sending request is a checkout controller. + +184 +00:15:15,000 --> 00:15:17,000 +Let me open now checkout. + +185 +00:15:17,000 --> 00:15:25,000 +So let's review together with you in checkout so that we have products for saw the excerpt from the + +186 +00:15:25,000 --> 00:15:35,000 +persistence storage is ID and we also have purchase for saw searches for books with our orders purchases + +187 +00:15:36,000 --> 00:15:41,000 +in the purchase for sort of business behaviors as it is called create purchase. + +188 +00:15:42,000 --> 00:15:51,000 +As a result of the location of this method, we insert all necessary data into our database that were + +189 +00:15:51,000 --> 00:15:57,000 +mentioned and share with you important piece of the database implementation to support this task. + +190 +00:15:58,000 --> 00:16:05,000 +First of all, I want to explain why I decided to use cheese terminology here instead of order. + +191 +00:16:05,000 --> 00:16:13,000 +Simply speaking, because order is an operator in sequel, I still have option to refer to the table + +192 +00:16:13,000 --> 00:16:15,000 +where it's full name. + +193 +00:16:15,000 --> 00:16:22,000 +But this signifies, since I decided to use purchase terminology in order to avoid confusion with operator + +194 +00:16:22,000 --> 00:16:27,000 +in my sequel and avoid errors and diffusion. + +195 +00:16:28,000 --> 00:16:33,000 +When I create order answers into the purchase table, I generates purchase. + +196 +00:16:33,000 --> 00:16:37,000 +I d I add point of the user who made this purchase. + +197 +00:16:38,000 --> 00:16:45,000 +Also, I decided to generate the purchase timestamp on the database level to capture the moment of placing + +198 +00:16:45,000 --> 00:16:45,000 +an order. + +199 +00:16:46,000 --> 00:16:49,000 +And also I have for the purchase status table. + +200 +00:16:50,000 --> 00:16:54,000 +Turkey's status is a table that contains all statuses. + +201 +00:16:54,000 --> 00:16:59,000 +According to my protocol, film flow is the requirements of the task. + +202 +00:16:59,000 --> 00:17:08,000 +We agreed that there will be six fulfillment statuses zero receive requests waiting for payment pay + +203 +00:17:08,000 --> 00:17:11,000 +shipping ship completed. + +204 +00:17:12,000 --> 00:17:17,000 +When you will work with the ecommerce projects, you are going to find that fulfillment flow is pretty + +205 +00:17:17,000 --> 00:17:19,000 +standardized in the industry. + +206 +00:17:20,000 --> 00:17:27,000 +A lot of different e-commerce platforms have predefined fulfillment flows and also there is a separate + +207 +00:17:27,000 --> 00:17:29,000 +tables, the scope to purchase products. + +208 +00:17:30,000 --> 00:17:35,000 +It's snap in between purchasing and product they use. + +209 +00:17:35,000 --> 00:17:42,000 +It was the purchase implementation of the many to many relationships will allow us to extend functionality + +210 +00:17:42,000 --> 00:17:49,000 +of our application to support the purchase of multiple items at the same time and to support products + +211 +00:17:49,000 --> 00:17:51,000 +past in the application. + +212 +00:17:52,000 --> 00:17:53,000 +Let's get back to the checkout. + +213 +00:17:53,000 --> 00:17:54,000 +So let's now. + +214 +00:17:55,000 --> 00:18:02,000 +And when order is great, I put informational message and as a session skill again, I use resource + +215 +00:18:02,000 --> 00:18:08,000 +and extraction message but use key forms in order to support localization. + +216 +00:18:08,000 --> 00:18:17,000 +In my app, zoom for message sales and user that the manager will contact Samsung and we redirect user + +217 +00:18:17,000 --> 00:18:19,000 +agendas immediately. + +218 +00:18:19,000 --> 00:18:26,000 +Once informational message was shown, I removed from the session with the help of to administer. + diff --git a/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/004 Solution Overview Part 3_en.srt b/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/004 Solution Overview Part 3_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..775112390123e4b5d59d30bfe91a600810d7627f --- /dev/null +++ b/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/004 Solution Overview Part 3_en.srt @@ -0,0 +1,556 @@ +1 +00:00:04,000 --> 00:00:08,000 +The next task is about implementation of the order management list. + +2 +00:00:09,000 --> 00:00:16,000 +One of the requirements was to allow access to this information only to users with the role manager. + +3 +00:00:17,000 --> 00:00:24,000 +To implement this, I create separate fields that is called management field as a criticism task and + +4 +00:00:24,000 --> 00:00:27,000 +we already implemented similar system for admin. + +5 +00:00:27,000 --> 00:00:29,000 +We used zero mapping. + +6 +00:00:30,000 --> 00:00:32,000 +This time let's try something new. + +7 +00:00:33,000 --> 00:00:40,000 +In this case I'm going to apply filter not to zero mapping but to the service using zoom leaves. + +8 +00:00:41,000 --> 00:00:45,000 +So you can see that this what filter intercepts request. + +9 +00:00:46,000 --> 00:00:48,000 +This is a purchase and fulfillment service. + +10 +00:00:49,000 --> 00:00:51,000 +We're going to use this so that's in the. + +11 +00:00:52,000 --> 00:00:53,000 +And this filter. + +12 +00:00:53,000 --> 00:01:00,000 +I extracted the log in user achievement from the session and verifies its role. + +13 +00:01:00,000 --> 00:01:07,000 +In case the role is a role manager, then we allow access to the requested resource. + +14 +00:01:07,000 --> 00:01:16,000 +If no zero follows the status quo, tenants have access to this resource for them in case the user is + +15 +00:01:16,000 --> 00:01:17,000 +not wealthy. + +16 +00:01:17,000 --> 00:01:21,000 +We will let user this assignment page ever since. + +17 +00:01:21,000 --> 00:01:22,000 +Simple. + +18 +00:01:23,000 --> 00:01:32,000 +Let me open purchases so that, as you can see, I gave a name to this so that this name is used in + +19 +00:01:32,000 --> 00:01:37,000 +my field to imagine using patches facade. + +20 +00:01:37,000 --> 00:01:40,000 +I extracted all not completed purchases. + +21 +00:01:40,000 --> 00:01:47,000 +Those are purchases that are not in the last full season status and said them it is a request scope + +22 +00:01:47,000 --> 00:01:55,000 +and after that I of request you let me open all this file. + +23 +00:01:55,000 --> 00:02:01,000 +Now I use what is stable tag that is in charge of presentation of my table. + +24 +00:02:02,000 --> 00:02:06,000 +Here I generate table shadows and feel entitled values. + +25 +00:02:07,000 --> 00:02:10,000 +Let me show you this table and browser here. + +26 +00:02:10,000 --> 00:02:17,000 +So tables that we created with the help of orders table that there is a requirement to provide a user + +27 +00:02:17,000 --> 00:02:21,000 +interface to move the order into the next steps. + +28 +00:02:21,000 --> 00:02:25,000 +I'm going to use this button to move to the next fulfillment status. + +29 +00:02:26,000 --> 00:02:28,000 +Let me show you how this is implemented. + +30 +00:02:29,000 --> 00:02:33,000 +This button is actually a part of the web form. + +31 +00:02:33,000 --> 00:02:40,000 +I pass them at purchase I.D. and sends a request to the management fulfillment. + +32 +00:02:41,000 --> 00:02:47,000 +Let me open so that this map, this you throw, it is called fulfillment. + +33 +00:02:47,000 --> 00:02:47,000 +So. + +34 +00:02:48,000 --> 00:02:51,000 +And as you can see, it's name is fulfillment. + +35 +00:02:52,000 --> 00:02:56,000 +This is the second celeb names that they used in my management. + +36 +00:02:56,000 --> 00:02:57,000 +That's Hilton. + +37 +00:02:58,000 --> 00:03:05,000 +And this is what I call another method of purchase for song that is supposed to move order into a following + +38 +00:03:05,000 --> 00:03:05,000 +state. + +39 +00:03:06,000 --> 00:03:11,000 +Once this is done, I read your request again and management orders. + +40 +00:03:12,000 --> 00:03:19,000 +So again, such orders was in use statuses and we shows on the page again. + +41 +00:03:20,000 --> 00:03:21,000 +That's how it works. + +42 +00:03:22,000 --> 00:03:23,000 +Is it clear? + +43 +00:03:24,000 --> 00:03:31,000 +In case you have any questions, please do not hesitate to ask your questions below this video and I + +44 +00:03:31,000 --> 00:03:33,000 +will be happy to answer those. + +45 +00:03:33,000 --> 00:03:38,000 +The next task is about implementation of my profile page. + +46 +00:03:38,000 --> 00:03:41,000 +Let's remind you how this page looks like. + +47 +00:03:42,000 --> 00:03:49,000 +I open the browser and click on my profile button and here is my profile. + +48 +00:03:49,000 --> 00:03:51,000 +I see my personal info here. + +49 +00:03:52,000 --> 00:03:53,000 +The info of my account. + +50 +00:03:54,000 --> 00:03:58,000 +This is a date I provided user registration. + +51 +00:03:58,000 --> 00:04:00,000 +I have multiple tabs here. + +52 +00:04:01,000 --> 00:04:03,000 +I can also view these out of my referrals. + +53 +00:04:04,000 --> 00:04:06,000 +Let's take a look at how this a simple random. + +54 +00:04:07,000 --> 00:04:09,000 +I opened my profile. + +55 +00:04:09,000 --> 00:04:12,000 +So everything is simple here. + +56 +00:04:12,000 --> 00:04:18,000 +I want to extract user from the session object in case there is no user in the session. + +57 +00:04:18,000 --> 00:04:24,000 +Then redirect the user to the signing page in case there is a user in the session. + +58 +00:04:25,000 --> 00:04:29,000 +We use user facade extract reference for this user. + +59 +00:04:30,000 --> 00:04:37,000 +Also, he was wholly dependent on the environment where our application is deployed. + +60 +00:04:38,000 --> 00:04:39,000 +Another important scene. + +61 +00:04:40,000 --> 00:04:46,000 +We need to extract this user from the database one more time and put it into session scope again. + +62 +00:04:47,000 --> 00:04:53,000 +This is needed because the state of the user might be updated after user was locked in. + +63 +00:04:53,000 --> 00:05:00,000 +And we need to substitute the user object on the session scope to make sure we show the latest and up + +64 +00:05:00,000 --> 00:05:01,000 +to date data. + +65 +00:05:02,000 --> 00:05:08,000 +For example, you received some reward because some restaurant completed the purchase. + +66 +00:05:08,000 --> 00:05:11,000 +We need to update the amount of money on that account. + +67 +00:05:12,000 --> 00:05:20,000 +When I prepared the data and at its most important is a request called ZENIT forward's request. + +68 +00:05:20,000 --> 00:05:24,000 +So my profile would be let me open this file. + +69 +00:05:25,000 --> 00:05:34,000 +I have separate for the profile, but let me show you in browser this element here it is on top here. + +70 +00:05:35,000 --> 00:05:37,000 +Let's get back to the idea. + +71 +00:05:38,000 --> 00:05:42,000 +Also I have separate tag for profile picture. + +72 +00:05:43,000 --> 00:05:45,000 +You can see that inside this stack. + +73 +00:05:45,000 --> 00:05:48,000 +I use information from the logged in user. + +74 +00:05:48,000 --> 00:05:50,000 +Here it is on the left. + +75 +00:05:51,000 --> 00:05:55,000 +Was the first name and last name of the user and added button. + +76 +00:05:56,000 --> 00:06:00,000 +Is this personal info that you see on the screen is a separate stack too. + +77 +00:06:01,000 --> 00:06:05,000 +It draws a table and takes information from the logged in user. + +78 +00:06:06,000 --> 00:06:13,000 +Also, we are touched because the scope of the request portion of the meeting was poor quote ever since. + +79 +00:06:13,000 --> 00:06:15,000 +Here, let me show you this stock. + +80 +00:06:15,000 --> 00:06:16,000 +These are source quotes. + +81 +00:06:17,000 --> 00:06:24,000 +So as you can see, this is a regular HMO table, HMO less. + +82 +00:06:25,000 --> 00:06:29,000 +And also I use expression language to extract required properties. + +83 +00:06:30,000 --> 00:06:34,000 +As you can see, nothing extraordinary is next. + +84 +00:06:34,000 --> 00:06:42,000 +That was in my profile just before is a profile reference and see a presentation will depend on the + +85 +00:06:42,000 --> 00:06:44,000 +state also Rafael's collection. + +86 +00:06:45,000 --> 00:06:53,000 +In case it is not time to reuse for ritual and recreate table with information about referrals of this + +87 +00:06:53,000 --> 00:06:53,000 +user. + +88 +00:06:54,000 --> 00:06:59,000 +In case user does an app and you raffles, we have to show informational message. + +89 +00:07:00,000 --> 00:07:00,000 +That's it. + +90 +00:07:01,000 --> 00:07:08,000 +And the last but not the least task is about the localisation you saw already in the source code that + +91 +00:07:08,000 --> 00:07:11,000 +they use resource bundles to print localized messages. + +92 +00:07:12,000 --> 00:07:15,000 +Let me show you localization on the example of the of. + +93 +00:07:17,000 --> 00:07:20,000 +I open head to the first scene. + +94 +00:07:20,000 --> 00:07:24,000 +I want to draw attention to this thoroughly directive. + +95 +00:07:24,000 --> 00:07:27,000 +Here you can see some giusto. + +96 +00:07:28,000 --> 00:07:31,000 +If you forgot what FMC just is. + +97 +00:07:31,000 --> 00:07:32,000 +Please. + +98 +00:07:32,000 --> 00:07:41,000 +This shot is a lesson of my job from zero to first job, cos I use local tag to set local on this page. + +99 +00:07:42,000 --> 00:07:47,000 +We know that you're going to see where I put this local attribute in the scope. + +100 +00:07:48,000 --> 00:07:53,000 +Said One note that sets is a source bundle that I'm going to use on this page. + +101 +00:07:54,000 --> 00:07:59,000 +I need to specify these name officers model and given name to variable. + +102 +00:08:00,000 --> 00:08:06,000 +As you already saw, my resource properties are located in the SC main resources for the. + +103 +00:08:07,000 --> 00:08:10,000 +After it was said local and bondo. + +104 +00:08:10,000 --> 00:08:14,000 +I'm going to use percentages still tax to print labels. + +105 +00:08:16,000 --> 00:08:17,000 +There is a message there. + +106 +00:08:18,000 --> 00:08:21,000 +For example, here is rule 40. + +107 +00:08:21,000 --> 00:08:27,000 +You can see that they use message tech and pass keys there and variable fluorescence bundle. + +108 +00:08:27,000 --> 00:08:28,000 +That's it. + +109 +00:08:28,000 --> 00:08:35,000 +We can use such approach in all different places and that's important since I'd like to highlight here. + +110 +00:08:36,000 --> 00:08:40,000 +For example, do remember how our search bar looks like. + +111 +00:08:41,000 --> 00:08:47,000 +Let me open the browser and remind you, can you see this text search for products? + +112 +00:08:47,000 --> 00:08:53,000 +I mean, this text is added to the input field with the help of place for the attributes. + +113 +00:08:54,000 --> 00:08:56,000 +Let's get back to the source code. + +114 +00:08:57,000 --> 00:09:02,000 +So using some key message stack to create text, the record is a page. + +115 +00:09:03,000 --> 00:09:07,000 +This one case let's use message stack to achieve its value. + +116 +00:09:08,000 --> 00:09:09,000 +It is in the opposite case. + +117 +00:09:10,000 --> 00:09:17,000 +What I would suggest here, in case you need to pass the localized value, is it very often to you can + +118 +00:09:17,000 --> 00:09:24,000 +create a separate variable and after that, with the help of expression language, you can pass value + +119 +00:09:24,000 --> 00:09:26,000 +into the attribute like I did here. + +120 +00:09:27,000 --> 00:09:35,000 +You can see that I create such placeholder variable and after that I add that it is a placeholder attribute + +121 +00:09:36,000 --> 00:09:37,000 +in zero 92. + +122 +00:09:37,000 --> 00:09:46,000 +You can see that when I click on the flag of United States, then I use Harbour Reference Change Locale, + +123 +00:09:46,000 --> 00:09:53,000 +and when I click on the flag of France, then I use hopper reference change local with the local adjective + +124 +00:09:53,000 --> 00:09:55,000 +equal to AFR. + +125 +00:09:55,000 --> 00:09:56,000 +Can you see this? + +126 +00:09:57,000 --> 00:10:00,000 +Listen, we see you change local control. + +127 +00:10:01,000 --> 00:10:03,000 +I change the locals too. + +128 +00:10:04,000 --> 00:10:09,000 +I expect a local parameter in case there is no local parameter. + +129 +00:10:09,000 --> 00:10:16,000 +I set the English local by default in case Zoe's FA or call zone. + +130 +00:10:16,000 --> 00:10:18,000 +I set French local law. + +131 +00:10:19,000 --> 00:10:23,000 +This is a lesson about localization and internationalization. + +132 +00:10:24,000 --> 00:10:28,000 +So in case you forgot to stop, please refer to that lesson. + +133 +00:10:29,000 --> 00:10:37,000 +I also sent local articles into the session and that's why it's a header that I can use local to is + +134 +00:10:37,000 --> 00:10:39,000 +a set of local giusto that. + +135 +00:10:40,000 --> 00:10:43,000 +That's all tasks that we had to implement. + +136 +00:10:43,000 --> 00:10:50,000 +Now you can create your own online shop, publish it on the youth hub and add it to your CV. + +137 +00:10:51,000 --> 00:10:53,000 +I want to congratulate you on this. + +138 +00:10:53,000 --> 00:10:55,000 +Thank you all for your attention. + +139 +00:10:55,000 --> 00:10:58,000 +Have a great day and see you in the next lesson. + diff --git a/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/external-links.txt b/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/external-links.txt new file mode 100644 index 0000000000000000000000000000000000000000..0a8cc51403f4b3be3e109f7f0f6873ff991cf201 --- /dev/null +++ b/71 - ===== EXAM JSP, JSTL, MVC, Layered Architecture, Custom Tags =====/external-links.txt @@ -0,0 +1,3 @@ + +001 Exam-task-description-and-reference-to-the-solution +https://docs.google.com/document/d/1X9iZaqUFtbz7CcglLAr1yHf6ff_8ae7mWTPp3_e8F5k/edit?usp=sharing diff --git a/72 - Data Access Software Design Pattern/001 Connection Pooling DBCP, C3P0, HikariCP & Tomcat Connection Pool with JNDI_en.srt b/72 - Data Access Software Design Pattern/001 Connection Pooling DBCP, C3P0, HikariCP & Tomcat Connection Pool with JNDI_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..3162b172e6d86c35ba4e471443415b5e80bb1846 --- /dev/null +++ b/72 - Data Access Software Design Pattern/001 Connection Pooling DBCP, C3P0, HikariCP & Tomcat Connection Pool with JNDI_en.srt @@ -0,0 +1,1376 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello. + +2 +00:00:06,000 --> 00:00:10,000 +Login in this nice national weather database connection pool. + +3 +00:00:10,000 --> 00:00:15,000 +This is very important topic in optimization of our database connectivity. + +4 +00:00:15,000 --> 00:00:20,000 +We're going to start our lesson from none of what connection cool is. + +5 +00:00:20,000 --> 00:00:23,000 +I'm going to explain you of how connection works. + +6 +00:00:24,000 --> 00:00:25,000 +During the lesson. + +7 +00:00:25,000 --> 00:00:29,000 +I will highlight the benefits that we expect to get from connection. + +8 +00:00:29,000 --> 00:00:29,000 +Cool. + +9 +00:00:30,000 --> 00:00:32,000 +And you will be able to understand it better. + +10 +00:00:33,000 --> 00:00:35,000 +Why it is recommended to use connection. + +11 +00:00:35,000 --> 00:00:43,000 +Cool and universal will also have practical exercises and practical activities on real cold examples. + +12 +00:00:43,000 --> 00:00:51,000 +I'm going to show you how to configure and how to work with such connection libraries as DB SCB by Apache, + +13 +00:00:51,000 --> 00:00:54,000 +C, Sweet Peel and C Nancy Currie. + +14 +00:00:54,000 --> 00:00:59,000 +CB Separately, I'm going to explain how to configure a connection. + +15 +00:00:59,000 --> 00:01:06,000 +Go on the Tomcat Web server using G and I will learn what these and when to use it. + +16 +00:01:07,000 --> 00:01:09,000 +We have a lot of things to do on the day. + +17 +00:01:09,000 --> 00:01:11,000 +Let's start our lesson. + +18 +00:01:12,000 --> 00:01:15,000 +Let's learn first what there's a connection to. + +19 +00:01:16,000 --> 00:01:18,000 +All of this also means connection pool. + +20 +00:01:18,000 --> 00:01:25,000 +In connection pool is a technique of creating and managing a pool of connections that are ready for + +21 +00:01:25,000 --> 00:01:30,000 +use by any threat that meets an actual pool. + +22 +00:01:30,000 --> 00:01:37,000 +It can greatly increase the performance of your job application well, reduce overall resource usage. + +23 +00:01:38,000 --> 00:01:45,000 +Ensure it is a data access portal whose main purpose is to reduce the overhead involved in performing + +24 +00:01:45,000 --> 00:01:49,000 +database connections and read write database operations. + +25 +00:01:50,000 --> 00:01:57,000 +In a nutshell, the connection pool is at the most basic level and database connection cache implementation, + +26 +00:01:57,000 --> 00:02:00,000 +which can be configured to suit specific requirements. + +27 +00:02:01,000 --> 00:02:05,000 +Usually obtaining a database connection is very resource expensive operation. + +28 +00:02:06,000 --> 00:02:07,000 +But why? + +29 +00:02:07,000 --> 00:02:09,000 +Let's understand what is happening. + +30 +00:02:09,000 --> 00:02:11,000 +Why don't we want to obtain a database connection? + +31 +00:02:12,000 --> 00:02:19,000 +First of all, we open a connection to the database using the database driver open and that this would + +32 +00:02:19,000 --> 00:02:24,000 +be sorted for reading, writing data, reading, writing data over assaulted. + +33 +00:02:24,000 --> 00:02:30,000 +After we need to close the connection and close a socket, it is obvious that in case we want to improve + +34 +00:02:30,000 --> 00:02:38,000 +performance of database interaction, then we need to optimise these steps and if possible, do not + +35 +00:02:38,000 --> 00:02:42,000 +repeat each step any time to perform database operation. + +36 +00:02:43,000 --> 00:02:47,000 +With the help of connection, we can improve performance significantly. + +37 +00:02:47,000 --> 00:02:53,000 +The course will not create new database connection each time we need the database connection will keep + +38 +00:02:53,000 --> 00:02:58,000 +some connections active constantly and will use them when we need. + +39 +00:02:59,000 --> 00:03:05,000 +And instead of closing connections when we completed some operations with the database, we'll just + +40 +00:03:05,000 --> 00:03:10,000 +put them back into the storage, but we will not actually close them. + +41 +00:03:11,000 --> 00:03:19,000 +This means that connections are we use rather than created each time a connection is requested to facilitate + +42 +00:03:19,000 --> 00:03:20,000 +connection. + +43 +00:03:20,000 --> 00:03:26,000 +Using a memory cache of database connections called a connection pool is maintained. + +44 +00:03:27,000 --> 00:03:30,000 +Let's review now how connection works. + +45 +00:03:31,000 --> 00:03:39,000 +So basically there is a memory cache where connection objects are stored will reduce costs that this + +46 +00:03:39,000 --> 00:03:41,000 +memory cache is called connection. + +47 +00:03:41,000 --> 00:03:48,000 +Call the threads that need to execute the database transaction just to use a database connection from + +48 +00:03:48,000 --> 00:03:48,000 +the call. + +49 +00:03:49,000 --> 00:03:56,000 +Once there are no processes that require connection to process transactions, the connection sits idle. + +50 +00:03:57,000 --> 00:04:05,000 +Connection cool enables the idle connection to be used by some as a threat to the user over and gratis. + +51 +00:04:05,000 --> 00:04:09,000 +When a thread needs to do work against a database b. + +52 +00:04:09,000 --> 00:04:12,000 +C e to request a connection from the pool. + +53 +00:04:13,000 --> 00:04:19,000 +Once this thread is finished using the connection between turns, it is a pool so that it can be used + +54 +00:04:19,000 --> 00:04:21,000 +by any other threat. + +55 +00:04:22,000 --> 00:04:28,000 +When using connection Golden always make sure that connections and anything created by Zoom, such as + +56 +00:04:28,000 --> 00:04:31,000 +statements or results are closed. + +57 +00:04:32,000 --> 00:04:39,000 +This rule applies no matter what happens in your code exceptions, errors and so forth. + +58 +00:04:39,000 --> 00:04:47,000 +When these objects are closed, they can be reused, otherwise they will be stranded, which means that + +59 +00:04:47,000 --> 00:04:54,000 +the database server sources they represent, such as buffers, logs or sockets tied up for some time + +60 +00:04:55,000 --> 00:04:58,000 +or in the worst case scenario, be tied up forever. + +61 +00:04:59,000 --> 00:05:01,000 +Let's also now to the next question. + +62 +00:05:02,000 --> 00:05:09,000 +Why we have to use connection and what benefits we expect to get after use in connection to the main + +63 +00:05:09,000 --> 00:05:16,000 +benefits of connection building or reduce connection creation time, although this is not usually a + +64 +00:05:16,000 --> 00:05:23,000 +new issue, was a quick connection setup that many database systems offer great and usually busy connections. + +65 +00:05:24,000 --> 00:05:31,000 +Still make some networking and driver over hats that will be avoided if connections are recycled. + +66 +00:05:32,000 --> 00:05:34,000 +Controlled resource usage. + +67 +00:05:35,000 --> 00:05:41,000 +If you create a new connection every time a thread needs one resident using the connection, then your + +68 +00:05:41,000 --> 00:05:49,000 +application's resource usage can go wasteful and it could lead to unpredictable behaviors for your application. + +69 +00:05:49,000 --> 00:05:53,000 +One is this under the heavy load was a connection. + +70 +00:05:53,000 --> 00:05:56,000 +We can manage configurations of the connection pool. + +71 +00:05:57,000 --> 00:06:04,000 +Setting up the rules and lanes for active and idle database connections and even setting the limit on + +72 +00:06:04,000 --> 00:06:08,000 +the age of connections and many of the different things. + +73 +00:06:09,000 --> 00:06:10,000 +Diagnostics. + +74 +00:06:11,000 --> 00:06:17,000 +If you have one subsystem responsible for connecting to a database, it becomes easier to diagnose and + +75 +00:06:17,000 --> 00:06:22,000 +analyze database connection, usage, maintainability. + +76 +00:06:22,000 --> 00:06:29,000 +Again, if you have one subsystem responsible for handling database connections, it will be easier + +77 +00:06:29,000 --> 00:06:33,000 +to maintain that if each component connected to the database itself. + +78 +00:06:34,000 --> 00:06:40,000 +So I well really understand what it's an actual piece and what benefits we expect to get. + +79 +00:06:40,000 --> 00:06:45,000 +Let's now understand how we can implement an actual CPU into our system. + +80 +00:06:46,000 --> 00:06:53,000 +First of all, I'd like to highlight that nowadays it's absolutely no sense to implement your custom + +81 +00:06:53,000 --> 00:07:01,000 +connection CPU from scratch because there are numerous and proven free and open source libraries that + +82 +00:07:01,000 --> 00:07:03,000 +we can use to integrate connection CPU. + +83 +00:07:04,000 --> 00:07:08,000 +So there are two options how to integrate connection into our application. + +84 +00:07:09,000 --> 00:07:17,000 +Zia Using external libraries among the libraries, I'd like to mention the following ones Apache, the + +85 +00:07:17,000 --> 00:07:19,000 +DCP, CCP. + +86 +00:07:19,000 --> 00:07:21,000 +All High Country CB. + +87 +00:07:22,000 --> 00:07:23,000 +So they survived. + +88 +00:07:23,000 --> 00:07:27,000 +I'm going to show examples of using these fibers. + +89 +00:07:28,000 --> 00:07:34,000 +The next option to integrate connection into your app is by using gondii and web server. + +90 +00:07:35,000 --> 00:07:43,000 +The concept of connection engineered B C has been standardized, so you see 2.0 optional interfaces + +91 +00:07:43,000 --> 00:07:50,000 +and all major application service have implementations of these APIs that work with database connectors. + +92 +00:07:51,000 --> 00:07:57,000 +In today's example, I'm going to show you example was my scroll connector general. + +93 +00:07:57,000 --> 00:08:03,000 +You configure a connection call in your application server configuration files and access it. + +94 +00:08:03,000 --> 00:08:08,000 +Susan Name a directory interface that is called Gonzi. + +95 +00:08:09,000 --> 00:08:11,000 +So it is time for a live demo. + +96 +00:08:11,000 --> 00:08:14,000 +Let's review the examples that I've prepared for you. + +97 +00:08:15,000 --> 00:08:22,000 +We're going to start from the overview of the external libraries like VCP suite, euro currency. + +98 +00:08:23,000 --> 00:08:27,000 +By the way, all source code examples that will be shared in this lesson. + +99 +00:08:27,000 --> 00:08:29,000 +You can find attachments. + +100 +00:08:29,000 --> 00:08:35,000 +Those are the first things that we need to do is to configure all necessary dependencies. + +101 +00:08:35,000 --> 00:08:43,000 +Let me open maximum file of my persistence module here in dependencies section you can see different + +102 +00:08:43,000 --> 00:08:44,000 +dependencies. + +103 +00:08:44,000 --> 00:08:47,000 +Zia did you see to see? + +104 +00:08:47,000 --> 00:08:54,000 +Speaking of currency, I added all these dependencies because I prepared them with each of these. + +105 +00:08:55,000 --> 00:09:02,000 +Based on my experience about your local connection is probably one of the most popular connection implementations. + +106 +00:09:03,000 --> 00:09:05,000 +So let me start from it. + +107 +00:09:06,000 --> 00:09:12,000 +I opened the demo class, the core class and UBC scope basic data source. + +108 +00:09:13,000 --> 00:09:16,000 +This is a class that we all use to get connection. + +109 +00:09:17,000 --> 00:09:23,000 +Data source is basically our connection pool and we need to configure this data source. + +110 +00:09:23,000 --> 00:09:30,000 +Then we do a lot of different configurations and encourage you to expose the source code or visit data + +111 +00:09:30,000 --> 00:09:35,000 +source class and just spend some time exploring set of methods. + +112 +00:09:36,000 --> 00:09:40,000 +I really believe that there is no need going over each of these masses. + +113 +00:09:40,000 --> 00:09:43,000 +Let me just cover the most important ones. + +114 +00:09:44,000 --> 00:09:50,000 +Obviously it is important to specify zero of the database you can use to send you. + +115 +00:09:50,000 --> 00:09:54,000 +Well, we used all other GBC examples of this. + +116 +00:09:55,000 --> 00:09:57,000 +We need to set username and password. + +117 +00:09:58,000 --> 00:10:01,000 +There is nothing extraordinary in these configurations. + +118 +00:10:02,000 --> 00:10:05,000 +Set a number of other connections as a pool. + +119 +00:10:06,000 --> 00:10:13,000 +This method helps us to set number of connections that are available once an idle object runs. + +120 +00:10:14,000 --> 00:10:18,000 +There is also lots of properties that can impact idle connections. + +121 +00:10:18,000 --> 00:10:21,000 +It is called time between eviction runs. + +122 +00:10:21,000 --> 00:10:22,000 +This. + +123 +00:10:23,000 --> 00:10:31,000 +This message sets the maximum number of connections at the main islands of code accessed by the connections + +124 +00:10:31,000 --> 00:10:33,000 +are destroyed and returned physical. + +125 +00:10:34,000 --> 00:10:42,000 +The next message he said the value of the month's Open Staples property, the maximum number of open + +126 +00:10:42,000 --> 00:10:49,000 +statements that can be allocated from the statement while at the same time a negative number following. + +127 +00:10:50,000 --> 00:10:51,000 +Since a connection. + +128 +00:10:51,000 --> 00:10:58,000 +Usually the only use as one of two statements at a time is this is mostly used to help resource needs + +129 +00:10:59,000 --> 00:11:05,000 +and believes that you know what purpose statements are and b see if you want to session knowledge about + +130 +00:11:05,000 --> 00:11:12,000 +purpose statements, please watch lesson about prepared statements from that section of my job from + +131 +00:11:12,000 --> 00:11:13,000 +zero to first jump course. + +132 +00:11:14,000 --> 00:11:20,000 +I have to get connection message here that you just configure a data source connection object. + +133 +00:11:21,000 --> 00:11:26,000 +Let's look at the main message I wrote like this on purpose. + +134 +00:11:26,000 --> 00:11:28,000 +I initialize connection variable. + +135 +00:11:29,000 --> 00:11:32,000 +After that, I will try with resources. + +136 +00:11:32,000 --> 00:11:39,000 +I created reference to object on the console and also I wanted to store the reference as a connection + +137 +00:11:39,000 --> 00:11:42,000 +object in order to print it. + +138 +00:11:42,000 --> 00:11:44,000 +Outside of the try was resources. + +139 +00:11:44,000 --> 00:11:44,000 +Well. + +140 +00:11:45,000 --> 00:11:47,000 +Let me run this program. + +141 +00:11:48,000 --> 00:11:51,000 +I believe that you remember trial was a resources construction. + +142 +00:11:51,000 --> 00:11:58,000 +Just to remind you that when you reach end of the trial was a sausage block then close that is invoked + +143 +00:11:58,000 --> 00:12:01,000 +on the resources that are declared in this block. + +144 +00:12:02,000 --> 00:12:04,000 +The same happens here. + +145 +00:12:04,000 --> 00:12:12,000 +So basically after the end of this block on the stat is it's close massive is invoked as you can see + +146 +00:12:12,000 --> 00:12:16,000 +even after closed now the connection object has been called. + +147 +00:12:17,000 --> 00:12:23,000 +We still have the reference to the very interesting part is called Google connection work. + +148 +00:12:24,000 --> 00:12:27,000 +This is a cross of data source. + +149 +00:12:28,000 --> 00:12:34,000 +What is actually happening with Don't Close the Connections is a database we call closeness items. + +150 +00:12:34,000 --> 00:12:38,000 +The rock or object is that sense connection object. + +151 +00:12:38,000 --> 00:12:39,000 +That is a connection. + +152 +00:12:39,000 --> 00:12:42,000 +Cool instead of actually close in connection. + +153 +00:12:43,000 --> 00:12:45,000 +That's how it works on the hood. + +154 +00:12:46,000 --> 00:12:46,000 +Is it clear? + +155 +00:12:47,000 --> 00:12:54,000 +And in case you want to use the ABC News feeds in Massachusetts returns your connection. + +156 +00:12:55,000 --> 00:13:02,000 +In our online store we have such massive is a class so we can change this message. + +157 +00:13:02,000 --> 00:13:06,000 +We know that we're connection objects just from basic that's a source object. + +158 +00:13:07,000 --> 00:13:13,000 +In case you have any questions, please do not hesitate to ask questions below this video and I will + +159 +00:13:13,000 --> 00:13:14,000 +be happy to answer. + +160 +00:13:14,000 --> 00:13:15,000 +That's my one. + +161 +00:13:16,000 --> 00:13:20,000 +The next example is using of the C-suite level. + +162 +00:13:20,000 --> 00:13:25,000 +You also saw that they added dependency those at the library to equal maximal. + +163 +00:13:26,000 --> 00:13:27,000 +Here I have similar demo. + +164 +00:13:28,000 --> 00:13:32,000 +The basic class here is called code data source. + +165 +00:13:33,000 --> 00:13:40,000 +To be honest, there is not so much since I'd like to add here because the connection calls implementations + +166 +00:13:40,000 --> 00:13:40,000 +I can. + +167 +00:13:40,000 --> 00:13:42,000 +That was the same idea. + +168 +00:13:43,000 --> 00:13:46,000 +The only difference is that API used to configure connection. + +169 +00:13:47,000 --> 00:13:55,000 +Here an example I tried to show some of the possible mass is of you can use to configure combo data + +170 +00:13:55,000 --> 00:13:55,000 +source. + +171 +00:13:56,000 --> 00:14:03,000 +I encourage you to do a similar thing I recommended to do was actually basically download this code + +172 +00:14:03,000 --> 00:14:10,000 +from the GitHub and explore the source code of the data source who works as an API. + +173 +00:14:10,000 --> 00:14:15,000 +I don't expect you remember all the masses because it was only Kansas. + +174 +00:14:16,000 --> 00:14:21,000 +Anyway, one time comes and you will know which connection code is used on your project. + +175 +00:14:21,000 --> 00:14:23,000 +You will learn all the details. + +176 +00:14:24,000 --> 00:14:30,000 +As of now, you'll just be aware about the potential capabilities of each library and as you said, + +177 +00:14:31,000 --> 00:14:33,000 +zoom more or less the same. + +178 +00:14:33,000 --> 00:14:36,000 +So you just have slightly different it got. + +179 +00:14:37,000 --> 00:14:43,000 +And this sort of cell level resample is occurring, as you can see in the examples. + +180 +00:14:43,000 --> 00:14:48,000 +Instead of using different settings, most people use just data source property. + +181 +00:14:49,000 --> 00:14:52,000 +It is recommended for hard currency. + +182 +00:14:52,000 --> 00:14:57,000 +That's innovation in order to correct property in that data source property message. + +183 +00:14:58,000 --> 00:15:01,000 +Also, you can explore the source code as a high frequency. + +184 +00:15:01,000 --> 00:15:08,000 +Plus it provides also great variety of different classes to configure similar properties. + +185 +00:15:09,000 --> 00:15:16,000 +After that, when you create a current data source object, how we pass our object to constructor of + +186 +00:15:17,000 --> 00:15:18,000 +current data source object. + +187 +00:15:19,000 --> 00:15:20,000 +Instantiate that object. + +188 +00:15:21,000 --> 00:15:24,000 +And after that we use that source object to get connection. + +189 +00:15:24,000 --> 00:15:25,000 +That's it. + +190 +00:15:26,000 --> 00:15:29,000 +That was a short overview of different libraries. + +191 +00:15:30,000 --> 00:15:34,000 +Feel free to explore the source code and use these examples in your code. + +192 +00:15:35,000 --> 00:15:39,000 +And then cases will be needed to use this examples in your homework. + +193 +00:15:40,000 --> 00:15:45,000 +So well, we just saw some real examples of configuration of connection pools. + +194 +00:15:45,000 --> 00:15:53,000 +But here's another interesting question how to calculate the size of the collection pool, how to calculate + +195 +00:15:53,000 --> 00:15:57,000 +maximum and minimum idle connections, for example. + +196 +00:15:57,000 --> 00:16:01,000 +Let's try to even ask this question to guess. + +197 +00:16:01,000 --> 00:16:10,000 +Each connection to the database has overhead memory, CPU, context, switches and so forth on both + +198 +00:16:10,000 --> 00:16:12,000 +the client and service side. + +199 +00:16:13,000 --> 00:16:14,000 +Connection. + +200 +00:16:14,000 --> 00:16:21,000 +Coals can be tuned to maximize performance while keeping resource utilization to the point where your + +201 +00:16:21,000 --> 00:16:25,000 +application will start to fail rather than just run slower. + +202 +00:16:26,000 --> 00:16:33,000 +The optimal size was a connection pool that passed on anticipated for an average that the base transaction + +203 +00:16:33,000 --> 00:16:38,000 +time in practice the optimal connection size can be small. + +204 +00:16:38,000 --> 00:16:39,000 +So you might expect. + +205 +00:16:40,000 --> 00:16:48,000 +For example, a simple online store, a collection of 15 to 20 connections, can serve a relatively + +206 +00:16:48,000 --> 00:16:56,000 +moderate floor, up to 600 concurrent users to correctly size the connection pool for your application. + +207 +00:16:57,000 --> 00:17:07,000 +Great load tests groups with tools such as a portrait and there was a window and look past your application. + +208 +00:17:08,000 --> 00:17:09,000 +And these are way to the demand. + +209 +00:17:09,000 --> 00:17:16,000 +The starting point is to configure your connection plus maximum number of connections to be on bond, + +210 +00:17:16,000 --> 00:17:22,000 +and one will test and merges the largest amount of concurrently used connections. + +211 +00:17:23,000 --> 00:17:26,000 +You can then work backwards to this in mind. + +212 +00:17:26,000 --> 00:17:33,000 +What's what values of minimum and maximum connections use the best performance for the particular application. + +213 +00:17:34,000 --> 00:17:40,000 +And now I want to discuss with you one more way to implement an action in your application. + +214 +00:17:41,000 --> 00:17:41,000 +Let me explain. + +215 +00:17:41,000 --> 00:17:48,000 +Connection in Tomcat Web Server Take into account in my course, jump from zero to first job. + +216 +00:17:49,000 --> 00:17:55,000 +We'll create our own online store and we deploy our web application on the Tomcat Web server. + +217 +00:17:56,000 --> 00:18:03,000 +I believe that understanding of how we can configure a connection pool in Tomcat is important for us. + +218 +00:18:03,000 --> 00:18:06,000 +And also in the future we will start running. + +219 +00:18:06,000 --> 00:18:13,000 +Smoke, finger and speed modes that uses Tomcat Web server by default will understand the specifics + +220 +00:18:13,000 --> 00:18:16,000 +of connection configuration easier and faster. + +221 +00:18:17,000 --> 00:18:24,000 +The GBC connection provided by Tomcat is a replacement for an alternative to the Apache Coleman's DCP + +222 +00:18:25,000 --> 00:18:25,000 +connection call. + +223 +00:18:26,000 --> 00:18:31,000 +But the logical question sounds like this why we have to use Tomcat connection. + +224 +00:18:31,000 --> 00:18:32,000 +Cool. + +225 +00:18:32,000 --> 00:18:38,000 +Or all the libraries that we have just you let me name just a few advantages of Tomcat connection go + +226 +00:18:39,000 --> 00:18:48,000 +over all libraries Tomcat simple implements daemon to retrieve a connection closely without adding additional + +227 +00:18:48,000 --> 00:18:49,000 +stress to the library. + +228 +00:18:49,000 --> 00:18:59,000 +Self supports 400 concurrent environments and multi-core CPU systems ability to configure custom interceptors. + +229 +00:18:59,000 --> 00:19:04,000 +This allows it to add custom interceptors to enhance the functionality. + +230 +00:19:04,000 --> 00:19:06,000 +You can use interceptors together. + +231 +00:19:06,000 --> 00:19:16,000 +Query Stats Cache Session States Reconnect is a collection of consumers try queries cache clues also + +232 +00:19:16,000 --> 00:19:20,000 +on your options and this ends interceptors. + +233 +00:19:20,000 --> 00:19:22,000 +They know I'm not tired. + +234 +00:19:22,000 --> 00:19:31,000 +The agility version of Java sequel or Java sequel interface close connections after they have been connected + +235 +00:19:31,000 --> 00:19:32,000 +for a certain charm. + +236 +00:19:33,000 --> 00:19:36,000 +Extremely simple due to the very simplified implementation. + +237 +00:19:37,000 --> 00:19:46,000 +The learning curve and source file are very low compared with CC fuel that has approximately 200 source + +238 +00:19:46,000 --> 00:19:46,000 +files. + +239 +00:19:47,000 --> 00:19:50,000 +Some have GBC has a core of eight files. + +240 +00:19:51,000 --> 00:19:58,000 +The connection pool itself is about half of that as box match here will be faster to track, though + +241 +00:19:59,000 --> 00:20:00,000 +it's easier to fix. + +242 +00:20:00,000 --> 00:20:04,000 +Complexity reduction has been a focus from inception and. + +243 +00:20:06,000 --> 00:20:14,000 +Let's now visit configure tomcat connection was g and you are what is G and yeah, what are goals of + +244 +00:20:14,000 --> 00:20:17,000 +use in January and when will you to use it? + +245 +00:20:18,000 --> 00:20:21,000 +Just to remind you what the agenda is. + +246 +00:20:21,000 --> 00:20:25,000 +It stands for general name and Directorate Interface. + +247 +00:20:25,000 --> 00:20:33,000 +Ginger allows distributed to applications to link up services in an obsolete, resource independent + +248 +00:20:33,000 --> 00:20:33,000 +way. + +249 +00:20:34,000 --> 00:20:41,000 +The most common use case is to set up a database connection pool on a Java application server. + +250 +00:20:42,000 --> 00:20:51,000 +Napoli occasionally deployed on this can gain access to the connections is a need uses a GDI name java + +251 +00:20:51,000 --> 00:20:58,000 +com and any name of a connection call and we don't need to know the details about the connection itself. + +252 +00:20:59,000 --> 00:21:01,000 +This has several advantages. + +253 +00:21:02,000 --> 00:21:07,000 +You can have a deployment sequence where apps move between different environments from def to code. + +254 +00:21:08,000 --> 00:21:14,000 +You can use the same GDI only in each environment and hides the actual database being used. + +255 +00:21:15,000 --> 00:21:21,000 +Applications don't have to change the zoom agreed between environments and also we can minimize the + +256 +00:21:21,000 --> 00:21:27,000 +number of team members who need to know the credentials for accessing a production database. + +257 +00:21:28,000 --> 00:21:34,000 +As a Java, the observer needs to know if you use gender, let's use this some practice. + +258 +00:21:35,000 --> 00:21:42,000 +As we already discussed, we'll configure our connection pool as a source in the configuration file. + +259 +00:21:42,000 --> 00:21:47,000 +This is important not in the source code but in the configuration file. + +260 +00:21:48,000 --> 00:21:54,000 +We can configure this on the level of the web server or on the level of the web application. + +261 +00:21:55,000 --> 00:22:00,000 +In both cases will adjust file with the same name but from different locations. + +262 +00:22:01,000 --> 00:22:03,000 +There is a file to scroll the context. + +263 +00:22:03,000 --> 00:22:09,000 +Asimo is a Tom direct, so it is located as a call folder. + +264 +00:22:09,000 --> 00:22:13,000 +This is direct or is its source configuration files. + +265 +00:22:13,000 --> 00:22:18,000 +But in our application we can store the same file as a matter of the rect. + +266 +00:22:18,000 --> 00:22:22,000 +And again, the configuration will look the same. + +267 +00:22:22,000 --> 00:22:28,000 +It is just can be done either on the level of the whole web server or on the level of the single web + +268 +00:22:28,000 --> 00:22:31,000 +application in this video. + +269 +00:22:31,000 --> 00:22:37,000 +And for the sake of the demo, I will show you a configuration on the level of this single application. + +270 +00:22:38,000 --> 00:22:42,000 +For this, we have to create context file in the medical folder. + +271 +00:22:43,000 --> 00:22:48,000 +I prepared before video recording in order to save the time difference to be done. + +272 +00:22:48,000 --> 00:22:50,000 +Let me walk you through this file. + +273 +00:22:51,000 --> 00:22:59,000 +So the content section on file has the one element after that with the great source and with the help + +274 +00:22:59,000 --> 00:23:02,000 +of patches, we can figure out our data source. + +275 +00:23:03,000 --> 00:23:04,000 +This source has a name. + +276 +00:23:05,000 --> 00:23:06,000 +We're going to use. + +277 +00:23:06,000 --> 00:23:11,000 +This name is a configuration of a data source as a data source interface. + +278 +00:23:11,000 --> 00:23:19,000 +I use one from the JDK from Java sequel package max active property sets. + +279 +00:23:19,000 --> 00:23:25,000 +The maximum number of database connections is a CPU set to minus one following. + +280 +00:23:26,000 --> 00:23:33,000 +Mark's ideal achievement sets maximum number of base connections to retain in the pool. + +281 +00:23:33,000 --> 00:23:36,000 +Set the minus one full loading. + +282 +00:23:37,000 --> 00:23:37,000 +See. + +283 +00:23:37,000 --> 00:23:39,000 +Also set documentation on. + +284 +00:23:39,000 --> 00:23:42,000 +This ends in me of this table. + +285 +00:23:42,000 --> 00:23:43,000 +Idle time. + +286 +00:23:43,000 --> 00:23:44,000 +This configuration. + +287 +00:23:44,000 --> 00:23:45,000 +Parameter. + +288 +00:23:46,000 --> 00:23:53,000 +Monks weight sets the maximum time to wait for database connection to become available in milliseconds. + +289 +00:23:53,000 --> 00:23:56,000 +In this example, 10 seconds. + +290 +00:23:57,000 --> 00:24:03,000 +An exception to smell if this time is exceeded, set the minus one way. + +291 +00:24:03,000 --> 00:24:03,000 +Therefore. + +292 +00:24:05,000 --> 00:24:06,000 +Marks each time. + +293 +00:24:06,000 --> 00:24:09,000 +It sets time and milliseconds to keep this connection. + +294 +00:24:10,000 --> 00:24:13,000 +What if the reaction is reactions to the poll disapproval? + +295 +00:24:13,000 --> 00:24:20,000 +Check to see if the now minus one connected is more than most age has been reached. + +296 +00:24:21,000 --> 00:24:25,000 +And if so, it closes the connection rather than returning. + +297 +00:24:25,000 --> 00:24:25,000 +It does. + +298 +00:24:25,000 --> 00:24:33,000 +A cool default value is zero, which implies the connections will be less open and no age check will + +299 +00:24:33,000 --> 00:24:34,000 +be gone upon to change terms. + +300 +00:24:35,000 --> 00:24:36,000 +Connection to support. + +301 +00:24:36,000 --> 00:24:39,000 +There are many other activities available for configurations. + +302 +00:24:40,000 --> 00:24:41,000 +I laughed. + +303 +00:24:41,000 --> 00:24:43,000 +Here's a link to the documentation. + +304 +00:24:43,000 --> 00:24:50,000 +Don't worry about Tomcat version seven here because it is for data sources source as a saying in the + +305 +00:24:50,000 --> 00:24:52,000 +latest version of Tomcat. + +306 +00:24:52,000 --> 00:24:57,000 +So anyway, you can find also of the communication on the official website. + +307 +00:24:58,000 --> 00:25:00,000 +Let me open the connection to them. + +308 +00:25:00,000 --> 00:25:05,000 +So I live with two data sources here on the class level. + +309 +00:25:06,000 --> 00:25:14,000 +In order to show you use way some data source configuration will initialize data source one things against + +310 +00:25:14,000 --> 00:25:19,000 +method and data source two will be initialized with the help of source annotation. + +311 +00:25:19,000 --> 00:25:26,000 +Basically, I just use resource annotation from Jakarta, annotation package and the class resource + +312 +00:25:26,000 --> 00:25:35,000 +name as an argument annotation resource will be found instantiated and this will be initialized in our + +313 +00:25:35,000 --> 00:25:35,000 +view. + +314 +00:25:35,000 --> 00:25:36,000 +Get Lesson. + +315 +00:25:36,000 --> 00:25:40,000 +I show you example of how we can initialize data source. + +316 +00:25:40,000 --> 00:25:43,000 +You can see initial contacts class. + +317 +00:25:43,000 --> 00:25:46,000 +This class is a starting context for performing. + +318 +00:25:46,000 --> 00:25:53,000 +Naming operations after Penguin's agenda are initial contacts and looking at the data source. + +319 +00:25:54,000 --> 00:26:01,000 +The rest of the quote follows from the imagined ABC conventions that set and similar to occurrence examples. + +320 +00:26:01,000 --> 00:26:09,000 +I point to console connection objects received using the from data source references I present to console + +321 +00:26:09,000 --> 00:26:13,000 +before and after close method is invoked. + +322 +00:26:14,000 --> 00:26:17,000 +Mentions of this type of data source configuration will work. + +323 +00:26:17,000 --> 00:26:20,000 +Only one web server is up and running. + +324 +00:26:20,000 --> 00:26:28,000 +Let me know on the web server and sees a URLs of this map was also in the browser. + +325 +00:26:28,000 --> 00:26:36,000 +I type the demo and when I see this select I see messages on console as we expect. + +326 +00:26:37,000 --> 00:26:46,000 +You can see that Cougars connection of upper class is used from Orca Project Tomcat BBC to package. + +327 +00:26:47,000 --> 00:26:50,000 +And I would compare data source objects. + +328 +00:26:51,000 --> 00:26:57,000 +You would see that Z used to reference this up once and now to the same object because we declared all + +329 +00:26:57,000 --> 00:27:01,000 +of the one source in our context x amount. + +330 +00:27:01,000 --> 00:27:05,000 +And these are just different ways of initializing variables. + +331 +00:27:06,000 --> 00:27:09,000 +Also now you're ready to implement the home task. + +332 +00:27:10,000 --> 00:27:17,000 +The home task will be shot at connection communities online store solutions that we developed with you. + +333 +00:27:18,000 --> 00:27:20,000 +As always, you will be able to find. + +334 +00:27:20,000 --> 00:27:23,000 +My solution on the document was a home pass. + +335 +00:27:24,000 --> 00:27:27,000 +Let's recap now what we have learned in this lesson. + +336 +00:27:28,000 --> 00:27:31,000 +Who knows what the connection is and how it works. + +337 +00:27:31,000 --> 00:27:39,000 +We learn the advantages of connection, cooling and real examples of how to work with an orchard C-suite + +338 +00:27:39,000 --> 00:27:41,000 +people in high currency. + +339 +00:27:42,000 --> 00:27:48,000 +I explain to you what Ginger is and an example we learned how to configure connection. + +340 +00:27:48,000 --> 00:27:49,000 +Go Tomcat. + +341 +00:27:50,000 --> 00:27:53,000 +That's all what I wanted to share with you in this lesson. + +342 +00:27:53,000 --> 00:27:54,000 +Thanks for your attention. + +343 +00:27:55,000 --> 00:27:57,000 +Have a great day and see you. + +344 +00:27:57,000 --> 00:27:58,000 +Next lesson. + diff --git a/72 - Data Access Software Design Pattern/001 Documentation-for-attributes-of-connection-pooling-in-Tomcat.url b/72 - Data Access Software Design Pattern/001 Documentation-for-attributes-of-connection-pooling-in-Tomcat.url new file mode 100644 index 0000000000000000000000000000000000000000..1ebbcdccc94018f7f803773b82c3be1cf6d82ea5 --- /dev/null +++ b/72 - Data Access Software Design Pattern/001 Documentation-for-attributes-of-connection-pooling-in-Tomcat.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html \ No newline at end of file diff --git a/72 - Data Access Software Design Pattern/001 Homework-task-and-source-code-of-the-solution.url b/72 - Data Access Software Design Pattern/001 Homework-task-and-source-code-of-the-solution.url new file mode 100644 index 0000000000000000000000000000000000000000..2a379436337f78339a2da97ec2526e8be70b6676 --- /dev/null +++ b/72 - Data Access Software Design Pattern/001 Homework-task-and-source-code-of-the-solution.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://docs.google.com/document/d/1ZWdFFYlQ9B0KyUzeV_wDReCr8zuW0TJacGKxs8wmvgA/edit?usp=sharing \ No newline at end of file diff --git a/72 - Data Access Software Design Pattern/external-links.txt b/72 - Data Access Software Design Pattern/external-links.txt new file mode 100644 index 0000000000000000000000000000000000000000..cd1e6abc265d0b19bfbf739c212cfb77c603ebb4 --- /dev/null +++ b/72 - Data Access Software Design Pattern/external-links.txt @@ -0,0 +1,6 @@ + +001 Homework-task-and-source-code-of-the-solution +https://docs.google.com/document/d/1ZWdFFYlQ9B0KyUzeV_wDReCr8zuW0TJacGKxs8wmvgA/edit?usp=sharing + +001 Documentation-for-attributes-of-connection-pooling-in-Tomcat +https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html diff --git a/73 - OWASP Top 10 2021/001 Common-Weakness-Enumeration-CWE-official-website.url b/73 - OWASP Top 10 2021/001 Common-Weakness-Enumeration-CWE-official-website.url new file mode 100644 index 0000000000000000000000000000000000000000..8560ed8473aaa515a838233777ec17ccc77ad72d --- /dev/null +++ b/73 - OWASP Top 10 2021/001 Common-Weakness-Enumeration-CWE-official-website.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://cwe.mitre.org/index.html \ No newline at end of file diff --git a/73 - OWASP Top 10 2021/001 OWASP Top 10 Overview_en.srt b/73 - OWASP Top 10 2021/001 OWASP Top 10 Overview_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..3b5e05d895e98eaf78dbe2c3cb1ea3bd2ffccf5e --- /dev/null +++ b/73 - OWASP Top 10 2021/001 OWASP Top 10 Overview_en.srt @@ -0,0 +1,832 @@ +1 +00:00:05,000 --> 00:00:06,000 +Hello? + +2 +00:00:06,000 --> 00:00:10,000 +Yes, it was this nice little start, very important topic. + +3 +00:00:10,000 --> 00:00:11,000 +We're going to run. + +4 +00:00:11,000 --> 00:00:14,000 +Basic principles, rules for secure coding. + +5 +00:00:14,000 --> 00:00:21,000 +During this course, we're going to learn a lot of different use cases and real life examples to make + +6 +00:00:21,000 --> 00:00:23,000 +your application more secure. + +7 +00:00:23,000 --> 00:00:27,000 +Security is one of the most important things in our application. + +8 +00:00:28,000 --> 00:00:30,000 +You in my course Java from zero. + +9 +00:00:30,000 --> 00:00:33,000 +The first job together was all my students. + +10 +00:00:33,000 --> 00:00:40,000 +We developed our own online store and the most interesting part of this course is that we are going + +11 +00:00:40,000 --> 00:00:48,000 +to learn secure coding on real examples on the real online store web application that we developed with + +12 +00:00:48,000 --> 00:00:49,000 +my students from scratch. + +13 +00:00:50,000 --> 00:00:58,000 +This course will be extremely important for developers, key engineers, security use, and even managers + +14 +00:00:58,000 --> 00:01:01,000 +and users of web applications. + +15 +00:01:01,000 --> 00:01:04,000 +And this is the first lesson of this course. + +16 +00:01:04,000 --> 00:01:11,000 +We'll learn some basic terms and concepts in order to be able to proceed with done of more advanced + +17 +00:01:11,000 --> 00:01:14,000 +concepts and understanding of code examples. + +18 +00:01:14,000 --> 00:01:17,000 +We are going to learn what a WASP is. + +19 +00:01:17,000 --> 00:01:21,000 +After that, we're going to learn what a WASP top ten is. + +20 +00:01:21,000 --> 00:01:25,000 +And I will explain why it is important you're in a lesson. + +21 +00:01:25,000 --> 00:01:33,000 +We're going to make an overview of categories from a WASP Top ten, 2021 and compare them with version + +22 +00:01:33,000 --> 00:01:36,000 +from year to 2017. + +23 +00:01:36,000 --> 00:01:43,000 +Gradually, I will start explaining domain specific terminology in this lesson will explain you what + +24 +00:01:43,000 --> 00:01:52,000 +common a weakness enumeration is, what common vulnerabilities and exposures are, and what common vulnerabilities + +25 +00:01:52,000 --> 00:01:53,000 +current system is. + +26 +00:01:54,000 --> 00:01:55,000 +Let's start our lesson. + +27 +00:01:56,000 --> 00:02:05,000 +Let's start from understanding of what a WASP is, a WASP stance for the Open Application Security Project. + +28 +00:02:05,000 --> 00:02:13,000 +It is an international, non-profit foundation that works to improve the security of software that a + +29 +00:02:13,000 --> 00:02:20,000 +WASP foundation is a source of guidelines and recommendations for developers all over the world to secure + +30 +00:02:20,000 --> 00:02:20,000 +the web. + +31 +00:02:21,000 --> 00:02:28,000 +There are a lot of communities that open source software projects hundreds of local chapters worldwide, + +32 +00:02:29,000 --> 00:02:34,000 +tens of thousands of members, and leading educational and training conferences. + +33 +00:02:35,000 --> 00:02:39,000 +By the way, you can become an active member of this community if you wish. + +34 +00:02:40,000 --> 00:02:48,000 +One of the WASPs core principles is that all of their materials be freely available and easily accessible + +35 +00:02:48,000 --> 00:02:54,000 +on their website, making it possible for anyone to improve their own web application security. + +36 +00:02:55,000 --> 00:03:01,000 +The materials they offer include documentation, tools, videos and forums. + +37 +00:03:02,000 --> 00:03:06,000 +Probably one of their best known projects is a loss top ten. + +38 +00:03:07,000 --> 00:03:10,000 +That's basically what we are going to learn in this course. + +39 +00:03:10,000 --> 00:03:17,000 +But instead of reading slides together with you will keep them through the security of our own web application. + +40 +00:03:18,000 --> 00:03:25,000 +Together with my students from scratch in Java, from zero to first job course, let us know now what + +41 +00:03:25,000 --> 00:03:27,000 +our last thought then is. + +42 +00:03:27,000 --> 00:03:34,000 +Of course, Top ten is publicly shared standards awareness documents for developers of the ten most + +43 +00:03:34,000 --> 00:03:41,000 +critical web application security vulnerabilities, according to the foundation of ASP, understands + +44 +00:03:41,000 --> 00:03:49,000 +that the security vulnerability is any weakness that enables a malevolent actor to cause harm and losses + +45 +00:03:49,000 --> 00:03:54,000 +to an application stakeholders, owners, users, etc.. + +46 +00:03:54,000 --> 00:04:02,000 +The last top ten list is developed by Web application security experts worldwide and is updated every + +47 +00:04:02,000 --> 00:04:03,000 +couple of years. + +48 +00:04:04,000 --> 00:04:10,000 +It aims to educate companies and developers on how to minimize application security risks. + +49 +00:04:11,000 --> 00:04:18,000 +Of course, compiles at least on the community surveys contributor data about common vulnerabilities + +50 +00:04:18,000 --> 00:04:26,000 +and exploits and vulnerability databases is the latest update of the list was published in 2001, whereas + +51 +00:04:26,000 --> 00:04:30,000 +the previous update was in 2017. + +52 +00:04:31,000 --> 00:04:38,000 +Stay tuned because I'm going to keep this course up to date and updated with new lessons in case updated + +53 +00:04:38,000 --> 00:04:41,000 +list of vulnerabilities will be published by a loss. + +54 +00:04:42,000 --> 00:04:48,000 +I believe that in few years you least will be published and there will be a need to create new lessons. + +55 +00:04:49,000 --> 00:04:56,000 +What is also important to say about a WASP Top ten is that it provides rankings and remediation guidance + +56 +00:04:56,000 --> 00:05:03,000 +to fix vulnerabilities, leveraging the extensive knowledge and experience of the WASP Open Community + +57 +00:05:03,000 --> 00:05:04,000 +Contributors. + +58 +00:05:04,000 --> 00:05:10,000 +The report is based on a consensus among security experts from around the world. + +59 +00:05:10,000 --> 00:05:15,000 +The risks are ranked according to the frequency of discovered security defects. + +60 +00:05:16,000 --> 00:05:22,000 +The severity of them covers vulnerabilities and the magnitude of their potential impacts. + +61 +00:05:23,000 --> 00:05:29,000 +The purpose of the report is to offer developers and web application security professionals insight + +62 +00:05:29,000 --> 00:05:37,000 +into the most prevalent security risks so that they may implement the report's findings and recommendations + +63 +00:05:37,000 --> 00:05:45,000 +into their own security practices, thereby minimizing the presence of known risks in their applications. + +64 +00:05:46,000 --> 00:05:52,000 +As you already know from the introduction to this course, I have my own consulting company and they + +65 +00:05:52,000 --> 00:05:57,000 +hold a lot of security, engineering and all the audits of the software projects. + +66 +00:05:58,000 --> 00:06:05,000 +And a lot of my clients can't understand why spending money on the detection and after that on the resolution + +67 +00:06:05,000 --> 00:06:08,000 +of security vulnerabilities is so important. + +68 +00:06:09,000 --> 00:06:10,000 +And you know what? + +69 +00:06:10,000 --> 00:06:18,000 +They also make a point very well, because you can lead with security vulnerabilities relatively long + +70 +00:06:18,000 --> 00:06:21,000 +periods of time or short periods of time in the past. + +71 +00:06:21,000 --> 00:06:26,000 +But it can be that you can lead without even knowing about any vulnerabilities. + +72 +00:06:27,000 --> 00:06:33,000 +But the potential impact from a security vulnerability might be dramatic and priceless. + +73 +00:06:34,000 --> 00:06:36,000 +And all this is really hard to count. + +74 +00:06:37,000 --> 00:06:44,000 +There is no single and then statistics that would calculate probability of malicious attack and potential + +75 +00:06:44,000 --> 00:06:45,000 +cost of impact. + +76 +00:06:45,000 --> 00:06:51,000 +It is almost impossible to calculate because there are a lot of different cases that it's hard to take + +77 +00:06:51,000 --> 00:06:55,000 +into account for all possible web applications. + +78 +00:06:56,000 --> 00:07:02,000 +That's why when we talk about security, it is always this question of the systematic approach, but + +79 +00:07:02,000 --> 00:07:10,000 +not a one time action, systematic approach and series of regular actions directed on the identification + +80 +00:07:10,000 --> 00:07:17,000 +resolution of vulnerability and create an environment that will minimize impact on your application. + +81 +00:07:18,000 --> 00:07:22,000 +That is, by the way, one of the direction of my consultancy services. + +82 +00:07:22,000 --> 00:07:26,000 +I establish security processes in the companies on request. + +83 +00:07:26,000 --> 00:07:32,000 +That's why this topic is extremely familiar to me and I will be able to share with you a lot of practical + +84 +00:07:32,000 --> 00:07:33,000 +examples. + +85 +00:07:34,000 --> 00:07:43,000 +Companies should adopt a lot of document and start the process of ensuring that their application minimizes + +86 +00:07:43,000 --> 00:07:44,000 +these risks. + +87 +00:07:44,000 --> 00:07:51,000 +Using the of most of them is perhaps the most effective first step towards change the software development + +88 +00:07:51,000 --> 00:07:56,000 +culture within the organization and the ones it produces more secure quote. + +89 +00:07:57,000 --> 00:08:03,000 +It is recommended that all companies incorporate the report into their processes in order to minimize + +90 +00:08:03,000 --> 00:08:06,000 +and or mitigate security risks. + +91 +00:08:07,000 --> 00:08:14,000 +Integration of the top down into the software development lifecycle demonstrates an organization's overall + +92 +00:08:14,000 --> 00:08:17,000 +commitment to industry best practices for secure development. + +93 +00:08:18,000 --> 00:08:21,000 +That's why a lot of time is so important. + +94 +00:08:22,000 --> 00:08:25,000 +Let's review now our top ten list. + +95 +00:08:26,000 --> 00:08:32,000 +On this slide, you can see top ten vulnerabilities, according to some of us, top ten, 20, 21 and + +96 +00:08:32,000 --> 00:08:33,000 +2017. + +97 +00:08:34,000 --> 00:08:40,000 +Let's briefly compares these to these as we'll go over broken access control. + +98 +00:08:40,000 --> 00:08:46,000 +This category moves up from the fifth position to the category with the most serious web application + +99 +00:08:46,000 --> 00:08:51,000 +security risk in comparison to Avast Top ten, 2017. + +100 +00:08:52,000 --> 00:09:00,000 +The contributor data indicates that on average Sweetcorn 81% of applications tested had one or more + +101 +00:09:01,000 --> 00:09:10,000 +common weakness enumerations with more than 318,000 occurrences of common weakness enumerations in this + +102 +00:09:10,000 --> 00:09:18,000 +risk category, the 34 common weakness enumerations mapped to broken access control have more currencies + +103 +00:09:18,000 --> 00:09:21,000 +and applications than any other category. + +104 +00:09:22,000 --> 00:09:24,000 +What is common weakness enumeration? + +105 +00:09:25,000 --> 00:09:28,000 +Let's start none on domain specific terminology. + +106 +00:09:28,000 --> 00:09:30,000 +Common Weakness Enumeration. + +107 +00:09:30,000 --> 00:09:38,000 +C w e is a universal online dictionary of weaknesses that have been found in computer software. + +108 +00:09:38,000 --> 00:09:45,000 +The dictionary is maintained by the major corporation and can be accessed free on a worldwide basis. + +109 +00:09:46,000 --> 00:09:54,000 +The purpose of CWI is to facilitate the effective use of tools that can identify, find and resolve + +110 +00:09:54,000 --> 00:10:00,000 +bugs, abilities and exposures before the programs are publicly distributed. + +111 +00:10:00,000 --> 00:10:07,000 +Also, the common weakness enumeration is a category system for hardware and software, weaknesses and + +112 +00:10:07,000 --> 00:10:08,000 +abilities. + +113 +00:10:08,000 --> 00:10:15,000 +It is sustained by a community project with the goals of understanding flaws in software and hardware + +114 +00:10:16,000 --> 00:10:22,000 +and create an automated tool that can be used to identify, fix and prevent those flaws. + +115 +00:10:23,000 --> 00:10:27,000 +Let's look at two more terms that we are going to use during the course. + +116 +00:10:27,000 --> 00:10:30,000 +Common vulnerabilities and exposures. + +117 +00:10:30,000 --> 00:10:37,000 +C We e is a list of publicly disclosed information security vulnerabilities and exposures. + +118 +00:10:38,000 --> 00:10:48,000 +CB was launched in 1999, was a meta operation to identify and categorize vulnerabilities in software + +119 +00:10:48,000 --> 00:10:49,000 +and firmware. + +120 +00:10:50,000 --> 00:10:55,000 +CV provides a free dictionary for organizations to improve their cybersecurity. + +121 +00:10:56,000 --> 00:11:02,000 +But what is the difference between vulnerabilities and exposures and vulnerabilities is weaknesses that + +122 +00:11:02,000 --> 00:11:05,000 +can be exploited in a cyber attack. + +123 +00:11:06,000 --> 00:11:11,000 +Also, access open from unauthorized actions on a computer system. + +124 +00:11:11,000 --> 00:11:19,000 +Vulnerabilities can allow attackers to, quote, access system memory, install different types of malware + +125 +00:11:19,000 --> 00:11:22,000 +and still destroy unmodified, sensitive data. + +126 +00:11:23,000 --> 00:11:28,000 +An exposure is a mistake because it gives an attacker access to the system. + +127 +00:11:28,000 --> 00:11:36,000 +On network exposures can lead to data breaches, data leaks and personally identifiable information + +128 +00:11:36,000 --> 00:11:38,000 +being sold on the dark web. + +129 +00:11:39,000 --> 00:11:47,000 +The goal of CVP is to make it easier to share information about known vulnerabilities so that cybersecurity + +130 +00:11:47,000 --> 00:11:52,000 +strategies can be updated with the latest security flaws and security issues. + +131 +00:11:53,000 --> 00:12:00,000 +Comfortable liabilities and exposures does this by creating a standardized indentify for a given vulnerability + +132 +00:12:00,000 --> 00:12:01,000 +or exposure? + +133 +00:12:02,000 --> 00:12:12,000 +CV Indentify is also called CV names or CV numbers allow security professionals to access information + +134 +00:12:12,000 --> 00:12:18,000 +about specific cyber threats across multiple information sources using the same common name. + +135 +00:12:19,000 --> 00:12:27,000 +In fact, some of the biggest data breaches were caused by accidental exposures rather than sophisticated + +136 +00:12:27,000 --> 00:12:28,000 +cyber attacks. + +137 +00:12:29,000 --> 00:12:32,000 +There is also a common vulnerability scoring system. + +138 +00:12:32,000 --> 00:12:35,000 +You should be familiar with this abbreviation too. + +139 +00:12:36,000 --> 00:12:38,000 +Let me explain what it is. + +140 +00:12:38,000 --> 00:12:48,000 +The common religious coin system C double S is a set of open standards for a sun, but a vulnerability + +141 +00:12:48,000 --> 00:12:50,000 +to assess its severity. + +142 +00:12:50,000 --> 00:12:56,000 +CV W As course I used to assess the impact of a vulnerability. + +143 +00:12:56,000 --> 00:13:06,000 +A CV w a score ranges from 0.0 to 10.0 is a higher number, the higher degree of security severity. + +144 +00:13:07,000 --> 00:13:11,000 +Now let's get back to that of top ten review. + +145 +00:13:12,000 --> 00:13:20,000 +Cryptographic failures shifts of one position to number two precision known as sensitive data exposure, + +146 +00:13:20,000 --> 00:13:23,000 +which was growth symptom raises and there was costs. + +147 +00:13:24,000 --> 00:13:31,000 +The new theory focuses on failures related to cryptography as it has been in place before. + +148 +00:13:31,000 --> 00:13:39,000 +This category often leads to sensitive data exposure, loss system, compromise injection slides down + +149 +00:13:39,000 --> 00:13:40,000 +to the position. + +150 +00:13:41,000 --> 00:13:50,000 +94% of the applications were tested for some form of injection, with a marks incidence rate of 19%, + +151 +00:13:51,000 --> 00:13:55,000 +an average incidence rate of 3.37%. + +152 +00:13:55,000 --> 00:14:02,000 +And the search history common weakness enumerations mapped into this category of the second most appearances + +153 +00:14:02,000 --> 00:14:07,000 +visa applications with 274,000 occurrences. + +154 +00:14:07,000 --> 00:14:15,000 +Cross-Site scripting is now of course of this category is addition by 2021 and secure design is a new + +155 +00:14:15,000 --> 00:14:21,000 +category for 2021 with a focus on risks related to design flaws. + +156 +00:14:21,000 --> 00:14:28,000 +An insecure design can't be fixed by perfect implementation, as by definition neither. + +157 +00:14:28,000 --> 00:14:33,000 +The security controls were never created to defend against specific attacks. + +158 +00:14:34,000 --> 00:14:38,000 +Security misconfiguration moves up from number six in the previous edition. + +159 +00:14:39,000 --> 00:14:46,000 +90% of applications were tested for some form of misconfiguration, with an average incidence rate of + +160 +00:14:46,000 --> 00:14:52,000 +4.5% and over 208,000 occurrences of common weakness. + +161 +00:14:52,000 --> 00:14:55,000 +Enumerations mapped to this risk category. + +162 +00:14:56,000 --> 00:15:02,000 +With more shares and highly configurable software, it is not surprising to see this category move up. + +163 +00:15:02,000 --> 00:15:08,000 +The former category for EXIM of external entities is now part of this risk category. + +164 +00:15:09,000 --> 00:15:15,000 +Vulnerable and outdated components was previously titled Using the components was known vulnerabilities + +165 +00:15:16,000 --> 00:15:22,000 +and is number two in the top ten community survey, but also had enough data to make the top ten with + +166 +00:15:22,000 --> 00:15:23,000 +data analysis. + +167 +00:15:24,000 --> 00:15:28,000 +The category moves up from number nine in 2070. + +168 +00:15:29,000 --> 00:15:36,000 +Identification and authentication sellers was previously broken authentication and the sliding down + +169 +00:15:36,000 --> 00:15:43,000 +from the second position and now includes common objects enumerations that are more related to identification + +170 +00:15:43,000 --> 00:15:44,000 +failures. + +171 +00:15:44,000 --> 00:15:50,000 +This category is still an integral part of the top ten, but has increased. + +172 +00:15:50,000 --> 00:15:54,000 +The visibility of standardized frameworks seems to be helping. + +173 +00:15:55,000 --> 00:16:02,000 +Software and data integrity failures is new category for 2021, focusing on making assumptions related + +174 +00:16:02,000 --> 00:16:04,000 +to software updates. + +175 +00:16:04,000 --> 00:16:12,000 +Critical data on CRC pipelines without verifying integrity and secure civilization is now a part of + +176 +00:16:12,000 --> 00:16:14,000 +this larger category. + +177 +00:16:15,000 --> 00:16:19,000 +Security, logging and monitoring failures was previously insufficient. + +178 +00:16:19,000 --> 00:16:24,000 +Logging and monitoring is added from the Top ten Communities survey. + +179 +00:16:24,000 --> 00:16:32,000 +Moving up from number ten previously this category is expanded to include more types of failures is + +180 +00:16:32,000 --> 00:16:33,000 +challenging to test for. + +181 +00:16:34,000 --> 00:16:40,000 +However, failures in this category can directly impact visibility and incident alerting. + +182 +00:16:41,000 --> 00:16:45,000 +Several sites request for due is added from the Top ten Communities Survey. + +183 +00:16:46,000 --> 00:16:53,000 +The data shows a relatively low incidence rate was above average tests and coverage, along with above + +184 +00:16:53,000 --> 00:16:56,000 +average ratings for exploit and the impact potential. + +185 +00:16:57,000 --> 00:17:06,000 +So if we want to draw the line on the comparison of a loss of ten, 20, 21 and 2017, then we can make + +186 +00:17:06,000 --> 00:17:07,000 +the following conclusion. + +187 +00:17:08,000 --> 00:17:11,000 +You can see that some of the categories were merged into one. + +188 +00:17:12,000 --> 00:17:18,000 +Like for example, cross-site scripting is merged into the injection SML external and this is merged + +189 +00:17:18,000 --> 00:17:20,000 +into the security misconfiguration. + +190 +00:17:21,000 --> 00:17:27,000 +Insecure decentralization was renamed the software and data integrity failures as a vulnerability is + +191 +00:17:27,000 --> 00:17:31,000 +have been assigned was defined ranking and things like that. + +192 +00:17:32,000 --> 00:17:35,000 +We have just reviewed each of these items anyway. + +193 +00:17:35,000 --> 00:17:39,000 +One will review each of this category in a separate lesson. + +194 +00:17:39,000 --> 00:17:47,000 +I will share with you all the details and comparative analysis between our loss Top ten, 2017 and Top + +195 +00:17:47,000 --> 00:17:48,000 +ten 2021. + +196 +00:17:49,000 --> 00:17:53,000 +Because I have much more since that and this is just an overview lesson. + +197 +00:17:53,000 --> 00:17:58,000 +I believe that it is enough for overview and a little more detail. + +198 +00:17:58,000 --> 00:18:00,000 +See the following lessons that. + +199 +00:18:00,000 --> 00:18:06,000 +So what I wanted to share with you today in this video, let's recap what we have learned in this lesson + +200 +00:18:07,000 --> 00:18:08,000 +today. + +201 +00:18:08,000 --> 00:18:16,000 +We learned what a loss is now you know what a loss top ten and why it is important we use categories + +202 +00:18:16,000 --> 00:18:24,000 +from a loss top ten, 20, 21 and we compared them with categories from a loss to top ten 2017. + +203 +00:18:25,000 --> 00:18:29,000 +Also, we learned what common weakness enumeration is. + +204 +00:18:29,000 --> 00:18:36,000 +I explained what common vulnerabilities and exposures are, and we learned what common vulnerability + +205 +00:18:36,000 --> 00:18:37,000 +score in system is. + +206 +00:18:38,000 --> 00:18:39,000 +That's all for this lesson. + +207 +00:18:40,000 --> 00:18:41,000 +Thanks a lot for your attention. + +208 +00:18:42,000 --> 00:18:44,000 +Have a great day and see you in the next lesson. + diff --git a/73 - OWASP Top 10 2021/002 Broken Access Control_en.srt b/73 - OWASP Top 10 2021/002 Broken Access Control_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..da4f785413769afb866689a149ad88e3f220a63a --- /dev/null +++ b/73 - OWASP Top 10 2021/002 Broken Access Control_en.srt @@ -0,0 +1,1756 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello. + +2 +00:00:07,000 --> 00:00:14,000 +In this lesson, we start a review of the first category of the top ten we're going to discuss today. + +3 +00:00:14,000 --> 00:00:16,000 +Broken access, the main category. + +4 +00:00:16,000 --> 00:00:18,000 +We'll start from the bottom. + +5 +00:00:18,000 --> 00:00:23,000 +Access control is one rule on what access control is. + +6 +00:00:23,000 --> 00:00:29,000 +You will be able to understand what an access control is and you will be able to understand potential + +7 +00:00:29,000 --> 00:00:30,000 +impact. + +8 +00:00:31,000 --> 00:00:36,000 +After that, we're going to review different ability set associated with this category. + +9 +00:00:37,000 --> 00:00:40,000 +All we'll know abilities will be reviewed based on the code. + +10 +00:00:40,000 --> 00:00:46,000 +Examples I will share with you our online store that we develop together with my students from scratch. + +11 +00:00:47,000 --> 00:00:54,000 +You in the course jump from zero to jump on examples of online store will understand potential impact + +12 +00:00:55,000 --> 00:01:00,000 +because I will a little exam also on real examples. + +13 +00:01:00,000 --> 00:01:06,000 +I'm going to show you a design solutions that is recommended to follow to make your application more + +14 +00:01:06,000 --> 00:01:14,000 +secure using us and we they're going to use such vulnerabilities as insecure given our ability, cost, + +15 +00:01:14,000 --> 00:01:20,000 +reversal ability, climb cash ability, violation of the principle of least privilege. + +16 +00:01:21,000 --> 00:01:23,000 +Elevation of privilege. + +17 +00:01:24,000 --> 00:01:26,000 +This is going to be a very interesting lesson. + +18 +00:01:26,000 --> 00:01:28,000 +Let's get it started. + +19 +00:01:29,000 --> 00:01:33,000 +I already did a high level overview of this risk category in the first lesson. + +20 +00:01:34,000 --> 00:01:38,000 +But let me go deep now and explain to you more about this category. + +21 +00:01:39,000 --> 00:01:42,000 +The category is called Broken Access Control. + +22 +00:01:43,000 --> 00:01:46,000 +Let's learn first what is an access control? + +23 +00:01:47,000 --> 00:01:54,000 +In a nutshell, Access Control represents a set of policies and mechanisms that manage and control access + +24 +00:01:54,000 --> 00:01:55,000 +to resources. + +25 +00:01:56,000 --> 00:01:56,000 +Access. + +26 +00:01:56,000 --> 00:02:00,000 +Control is also commonly known as authorisation. + +27 +00:02:01,000 --> 00:02:08,000 +Once the server has determined your identity is through a loading or authentication mechanism, it grants + +28 +00:02:08,000 --> 00:02:11,000 +all the immense functions and resources you have access to. + +29 +00:02:12,000 --> 00:02:15,000 +This may be implemented with the help of the roles mechanism. + +30 +00:02:16,000 --> 00:02:20,000 +Together with my students of my course go from zero to first job. + +31 +00:02:20,000 --> 00:02:26,000 +Already implemented online store and we use this mechanism in order to set access restrictions. + +32 +00:02:27,000 --> 00:02:30,000 +Today, doing the practical duty I'm going to show you this. + +33 +00:02:30,000 --> 00:02:39,000 +So another way to manage axis is to use security talking like in house or in JWT. + +34 +00:02:40,000 --> 00:02:43,000 +What is POS and JWT? + +35 +00:02:44,000 --> 00:02:48,000 +This is a broader topic to discuss, but let me explain you very briefly. + +36 +00:02:48,000 --> 00:02:53,000 +To not miss context also stands for open authorization. + +37 +00:02:53,000 --> 00:03:00,000 +It is an open system for access delegation commonly used as a way for internet users to ground websites + +38 +00:03:00,000 --> 00:03:01,000 +or applications. + +39 +00:03:01,000 --> 00:03:07,000 +Access to the information on other websites, but without even stems and passwords. + +40 +00:03:07,000 --> 00:03:11,000 +For example, blogging was Google, but a local was Facebook. + +41 +00:03:11,000 --> 00:03:14,000 +Bottom is example of also. + +42 +00:03:15,000 --> 00:03:18,000 +GW t stands for Jason Babcock. + +43 +00:03:19,000 --> 00:03:26,000 +It is a proposed internal standards for creating data with optional signature and or optional encryption + +44 +00:03:26,000 --> 00:03:28,000 +whose payload holds. + +45 +00:03:28,000 --> 00:03:34,000 +Jason Z asserts some number of claims Z tokens are signed. + +46 +00:03:34,000 --> 00:03:37,000 +These are using a private secret or public private key. + +47 +00:03:38,000 --> 00:03:47,000 +For example, a server cloud generates a token that has the Queen logged in as administrator and provides + +48 +00:03:47,000 --> 00:03:48,000 +it to a client. + +49 +00:03:48,000 --> 00:03:56,000 +Zyklon could then use that talking to prove that it is logged in as and then the tokens can be signed + +50 +00:03:56,000 --> 00:04:04,000 +by one party's private key user as a service so that the party can subsequently verify that token is + +51 +00:04:04,000 --> 00:04:10,000 +legitimate if other party is in possession of the corresponding public key. + +52 +00:04:11,000 --> 00:04:15,000 +They do able to verify the tokens legitimacy. + +53 +00:04:16,000 --> 00:04:19,000 +So the summarized definition of x is control. + +54 +00:04:19,000 --> 00:04:26,000 +We can see that access control is an implementation of constraints that control who can perform actions + +55 +00:04:27,000 --> 00:04:34,000 +and which actions in particular can be performed or access resources that they have requested in the + +56 +00:04:34,000 --> 00:04:36,000 +context of web applications. + +57 +00:04:36,000 --> 00:04:41,000 +Access control is dependent on the authentication and session management. + +58 +00:04:42,000 --> 00:04:48,000 +Authentication identifies the user and confirms that they are who they say they are. + +59 +00:04:48,000 --> 00:04:55,000 +Session management identifies which subsequent requests are being made by that same user. + +60 +00:04:56,000 --> 00:05:02,000 +Access Control determines whether the user is allowed to carry out the actions of their attempting to + +61 +00:05:02,000 --> 00:05:03,000 +perform. + +62 +00:05:03,000 --> 00:05:10,000 +I assume that based on what we have discussed, you already can understand the next two terms Zorra + +63 +00:05:11,000 --> 00:05:13,000 +authentication and authorization. + +64 +00:05:14,000 --> 00:05:16,000 +What is the difference between these two terms? + +65 +00:05:17,000 --> 00:05:21,000 +Authentication basically identifies who you are. + +66 +00:05:22,000 --> 00:05:29,000 +Authorization is about verifying whether you have enough rights to perform an action or to access their + +67 +00:05:29,000 --> 00:05:30,000 +source. + +68 +00:05:31,000 --> 00:05:36,000 +Imagine secure at the airport and boarding on your flight is started. + +69 +00:05:36,000 --> 00:05:43,000 +You need to prove his identity that you're the person was a name on your ticket and confirms that was + +70 +00:05:43,000 --> 00:05:45,000 +your ID card or passport. + +71 +00:05:46,000 --> 00:05:51,000 +And once you confirmed who you are, you will be able to take your place according to a ticket. + +72 +00:05:52,000 --> 00:05:55,000 +Enjoys a VIP meal if it's specified in your ticket. + +73 +00:05:56,000 --> 00:06:02,000 +In case you are not authorized to enjoy VIP meal, you will not be provided with it. + +74 +00:06:03,000 --> 00:06:04,000 +In the digital world. + +75 +00:06:04,000 --> 00:06:09,000 +Authentication and authorization accomplish these same goals. + +76 +00:06:10,000 --> 00:06:16,000 +Authentication is used to verify that users really are who they were present themselves to be. + +77 +00:06:17,000 --> 00:06:25,000 +Once this has been confirmed, authorization is then used to grant a user permission to access new levels + +78 +00:06:25,000 --> 00:06:32,000 +of information and perform specific functions depending on the rules established for different types + +79 +00:06:32,000 --> 00:06:32,000 +of users. + +80 +00:06:34,000 --> 00:06:36,000 +The different types of axis control. + +81 +00:06:36,000 --> 00:06:39,000 +They are vertical axis controls. + +82 +00:06:39,000 --> 00:06:41,000 +Horizontal axis controls. + +83 +00:06:41,000 --> 00:06:44,000 +Context dependent access controls. + +84 +00:06:45,000 --> 00:06:46,000 +That's a little bit closer. + +85 +00:06:46,000 --> 00:06:48,000 +Each of the mentioned categories. + +86 +00:06:49,000 --> 00:06:56,000 +Vertical axis controls are mechanisms that restrict access to sensitive functionality that is not available + +87 +00:06:56,000 --> 00:07:01,000 +to all types of users with vertical axis controls. + +88 +00:07:01,000 --> 00:07:05,000 +Different types of users have access to different application functions. + +89 +00:07:06,000 --> 00:07:14,000 +For example, an administrator might be able to modify or delete any user's account while an ordinary + +90 +00:07:14,000 --> 00:07:16,000 +user has little access to these actions. + +91 +00:07:17,000 --> 00:07:24,000 +Horizontal axis controls and mechanisms that restrict access to resource to the users who are specifically + +92 +00:07:24,000 --> 00:07:29,000 +allowed to access those resources with horizontal axis controls. + +93 +00:07:29,000 --> 00:07:34,000 +Different users have access to a subset of resource of the same type. + +94 +00:07:34,000 --> 00:07:41,000 +For example, a banking application will allow a user to view transactions and make payments from their + +95 +00:07:41,000 --> 00:07:45,000 +own accounts, but not the accounts of any other user. + +96 +00:07:47,000 --> 00:07:54,000 +Context dependent access controls, restrict access to functionality and resources based upon the state + +97 +00:07:54,000 --> 00:07:58,000 +of the application or the user's interaction with it. + +98 +00:07:59,000 --> 00:08:04,000 +Context dependent access controls prevent the user performing actions in the wrong order. + +99 +00:08:05,000 --> 00:08:12,000 +For example, a retail website might prevent users from modifying the contents of their shopping cart + +100 +00:08:12,000 --> 00:08:14,000 +after they have made payment. + +101 +00:08:15,000 --> 00:08:20,000 +At the first glance, you might be wondering and what may go wrong with access control? + +102 +00:08:20,000 --> 00:08:26,000 +Is it really so hard to configure roles or tokens or just to control access to resources? + +103 +00:08:27,000 --> 00:08:31,000 +This shouldn't be so hard, despite the simplicity of its concept. + +104 +00:08:32,000 --> 00:08:36,000 +It isn't so easy to implement a robust and secure access control system. + +105 +00:08:37,000 --> 00:08:41,000 +Access control is closely involved as a system architecture. + +106 +00:08:41,000 --> 00:08:48,000 +Moreover, users regularly fall into more than one role, which makes access management more complex. + +107 +00:08:49,000 --> 00:08:55,000 +Therefore, development access control from scratch is generally discouraged and model tested. + +108 +00:08:55,000 --> 00:09:00,000 +Robust solutions like Office 2.0 is adopted in step. + +109 +00:09:01,000 --> 00:09:01,000 +Okay. + +110 +00:09:02,000 --> 00:09:05,000 +So now we've learned what an access control is. + +111 +00:09:05,000 --> 00:09:06,000 +But what is broken? + +112 +00:09:06,000 --> 00:09:07,000 +Access control. + +113 +00:09:08,000 --> 00:09:15,000 +Broken access control comprises a set of known exploits that kind of represent a threat to your systems. + +114 +00:09:15,000 --> 00:09:16,000 +Access Control. + +115 +00:09:17,000 --> 00:09:23,000 +Despite many of the vulnerabilities in access control being easy to exploit neglected, they can be + +116 +00:09:23,000 --> 00:09:25,000 +addressed relatively quickly. + +117 +00:09:26,000 --> 00:09:32,000 +This point is important because the consequences of a breach in access control can be pretty disruptive. + +118 +00:09:33,000 --> 00:09:37,000 +Since attackers can take over your system, let's summarize. + +119 +00:09:37,000 --> 00:09:41,000 +The impact is caused by vulnerabilities from this category. + +120 +00:09:41,000 --> 00:09:49,000 +The technical impact is attackers acting as users or administrators or users using privileged functions + +121 +00:09:49,000 --> 00:09:53,000 +or creating, accessing, updating or deleting every record. + +122 +00:09:54,000 --> 00:10:01,000 +So basically, once access is gained, attackers can perform operations with data and systems they need. + +123 +00:10:01,000 --> 00:10:08,000 +It is hard to quantify the specific impact because there can be different levels of access to different + +124 +00:10:08,000 --> 00:10:12,000 +parts of the system and the impact can vary. + +125 +00:10:12,000 --> 00:10:17,000 +Obviously there are a lot of do from broken access control web images. + +126 +00:10:17,000 --> 00:10:22,000 +They depend on the technology stack you use on your software architecture. + +127 +00:10:23,000 --> 00:10:28,000 +Let me show you examples of some of the liabilities of the broken access control. + +128 +00:10:28,000 --> 00:10:35,000 +First of all, I recommend you to download the web application, our online store that I've mentioned + +129 +00:10:35,000 --> 00:10:36,000 +at the beginning of the lesson. + +130 +00:10:37,000 --> 00:10:43,000 +This is important because I'm going to show you examples based on our web application, you will be + +131 +00:10:43,000 --> 00:10:48,000 +able to find also solutions and a lot of source code examples here. + +132 +00:10:49,000 --> 00:10:50,000 +Let me start from the insecure. + +133 +00:10:50,000 --> 00:10:55,000 +I will be able to imagine that we have user profile page. + +134 +00:10:56,000 --> 00:11:02,000 +My web server is up and running already, so I open the web browser to see the user profile page. + +135 +00:11:03,000 --> 00:11:04,000 +Pay attention to the URL. + +136 +00:11:05,000 --> 00:11:12,000 +I send the request to the user profile you around and I pass query parameter I.D. Obviously this is + +137 +00:11:12,000 --> 00:11:15,000 +the user ID, the my new one. + +138 +00:11:15,000 --> 00:11:21,000 +And what is wrong was this in most cases usually due to access from source might be okay. + +139 +00:11:22,000 --> 00:11:30,000 +For example, there is no critical harm or big impact in accessing product page by its ID since it doesn't + +140 +00:11:30,000 --> 00:11:31,000 +store any sensitive data. + +141 +00:11:32,000 --> 00:11:35,000 +Let's see, we're going to come back to this case a little bit later. + +142 +00:11:36,000 --> 00:11:38,000 +Let me show is a product page. + +143 +00:11:38,000 --> 00:11:47,000 +I type product in your row and again, I pass a query parameter that seems to be fine, but you should + +144 +00:11:47,000 --> 00:11:52,000 +take into account the case on top of it identifies the name of the source. + +145 +00:11:52,000 --> 00:11:57,000 +In other words, some euro and the list of required parameters. + +146 +00:11:57,000 --> 00:12:04,000 +Attacker can use brute force technique to extract all the data, and in case with user, we can access + +147 +00:12:04,000 --> 00:12:11,000 +personal information emails that will be used for spam in the future or will be used in attempts to + +148 +00:12:11,000 --> 00:12:15,000 +harvest account information about amount of modules. + +149 +00:12:15,000 --> 00:12:15,000 +Account. + +150 +00:12:15,000 --> 00:12:18,000 +Also, what is brute force? + +151 +00:12:18,000 --> 00:12:23,000 +Was a brute force attack an attacker submitting many different variables of passphrase. + +152 +00:12:23,000 --> 00:12:26,000 +This was the hope of eventually guessing correctly. + +153 +00:12:27,000 --> 00:12:33,000 +Basically, you can create a script or program with any programming language that will open the page + +154 +00:12:33,000 --> 00:12:35,000 +with different attributes. + +155 +00:12:36,000 --> 00:12:40,000 +Well, of course the content on the page and little stored somewhere is data. + +156 +00:12:41,000 --> 00:12:45,000 +This is not good and this can be treated as a serious vulnerability. + +157 +00:12:46,000 --> 00:12:50,000 +Let me open the source code of the server that handles this request. + +158 +00:12:51,000 --> 00:12:53,000 +I open user profile so let. + +159 +00:12:54,000 --> 00:13:01,000 +In most of our projects stretch for examples related to that, of course I will store into a loss package + +160 +00:13:02,000 --> 00:13:06,000 +and things are sub packages associated with this risk category. + +161 +00:13:06,000 --> 00:13:11,000 +In some particular cases, examples may be stored from actual solution. + +162 +00:13:12,000 --> 00:13:17,000 +In this case, a C sub package name stands for Broken Access Control. + +163 +00:13:18,000 --> 00:13:23,000 +And inside we're going to have problem and solution packages and problem package. + +164 +00:13:23,000 --> 00:13:30,000 +We're going to store source code is a describes problem statement and in solution source code that contains + +165 +00:13:30,000 --> 00:13:33,000 +solution to the suggested problem statement. + +166 +00:13:33,000 --> 00:13:40,000 +That's how easy you can find all related quote examples here you can see that they get a parameter and + +167 +00:13:40,000 --> 00:13:46,000 +they use reason for store to extract the user and the request scope. + +168 +00:13:46,000 --> 00:13:52,000 +I also perform AWS operations here, like extracting of user raffles and preparing partner league and + +169 +00:13:52,000 --> 00:13:52,000 +so on. + +170 +00:13:53,000 --> 00:13:57,000 +The main thing here is that there's no active control in place. + +171 +00:13:57,000 --> 00:14:01,000 +To validate my request, I can access any profile. + +172 +00:14:02,000 --> 00:14:03,000 +How to solve this. + +173 +00:14:04,000 --> 00:14:10,000 +There might be different solutions, but in this particular case, I would validate the incoming request + +174 +00:14:10,000 --> 00:14:15,000 +and would show on the information that this user is allowed to see how to do this. + +175 +00:14:16,000 --> 00:14:20,000 +If you want to access your profile, then please log in in the system. + +176 +00:14:21,000 --> 00:14:27,000 +Let me validate your credentials and only after that server will show what information you request. + +177 +00:14:28,000 --> 00:14:35,000 +And this information will be related only to your account because you are not allowed to see other accounts. + +178 +00:14:35,000 --> 00:14:44,000 +Let me show the things a euro profile and would that get redirected to the login page? + +179 +00:14:45,000 --> 00:14:53,000 +Because application need to verify my credentials before showing the information I am logging and password + +180 +00:14:53,000 --> 00:14:57,000 +and now I can access my profile and pay attention. + +181 +00:14:57,000 --> 00:15:05,000 +There is no I.D. in the euro because server decides which information are allowed to see and which information + +182 +00:15:05,000 --> 00:15:07,000 +I can access. + +183 +00:15:07,000 --> 00:15:08,000 +Then the step. + +184 +00:15:09,000 --> 00:15:11,000 +Let's look at the implementation. + +185 +00:15:12,000 --> 00:15:16,000 +I open profile, so that is the first check that I do here. + +186 +00:15:16,000 --> 00:15:23,000 +I check whether there is some user in the session that is already provided his or her credentials in + +187 +00:15:23,000 --> 00:15:26,000 +case there is no user object on the session. + +188 +00:15:26,000 --> 00:15:34,000 +We resurrect user it as a logging page and in case there is a user in the session, we extract all the + +189 +00:15:34,000 --> 00:15:37,000 +latest information about profile from the persistence storage. + +190 +00:15:38,000 --> 00:15:41,000 +How do we follow request to the presentation again? + +191 +00:15:41,000 --> 00:15:47,000 +In this case, it is not possible to access the user which is not stored in the session. + +192 +00:15:47,000 --> 00:15:55,000 +And just to remind you that we caught a user in the session right after successful log in here and the + +193 +00:15:55,000 --> 00:16:01,000 +same answer in zero number 42 is that we came. + +194 +00:16:01,000 --> 00:16:05,000 +In case you have any questions, please do not hesitate to ask the questions. + +195 +00:16:05,000 --> 00:16:08,000 +But those of Sweden and I will be happy to answer. + +196 +00:16:09,000 --> 00:16:11,000 +Let's proceed with the next example. + +197 +00:16:11,000 --> 00:16:16,000 +Another solution is to use EU ID instead of ID. + +198 +00:16:17,000 --> 00:16:22,000 +What it is do you ID stands for global unique identifier. + +199 +00:16:23,000 --> 00:16:25,000 +It is 128 bits text. + +200 +00:16:26,000 --> 00:16:28,000 +This represents an ID. + +201 +00:16:29,000 --> 00:16:36,000 +The organizations generate these when a unique reference number is needed to identify information on + +202 +00:16:36,000 --> 00:16:38,000 +a computer or network. + +203 +00:16:38,000 --> 00:16:45,000 +Using a U, you will not allow an attacker just to incremented you number to navigate through the website + +204 +00:16:45,000 --> 00:16:47,000 +in the automatic manner. + +205 +00:16:47,000 --> 00:16:52,000 +For example, in our online store, attacker can implement screens that will open. + +206 +00:16:52,000 --> 00:16:59,000 +Each page will pass as a page, and this information will be used to impact our business. + +207 +00:17:00,000 --> 00:17:07,000 +Let's imagine that daily our competitors check the price now online shop with the automated scripts + +208 +00:17:07,000 --> 00:17:15,000 +and after that the same automated scripts of the zero seven crisis, in order to be in competition or + +209 +00:17:15,000 --> 00:17:24,000 +any place, have already generated significantly reduced chances to guess the product ID because there + +210 +00:17:24,000 --> 00:17:31,000 +are much more singles, thus passing all the data from the site just by zero parameters, temporary + +211 +00:17:31,000 --> 00:17:32,000 +becomes close to impossible. + +212 +00:17:33,000 --> 00:17:39,000 +Let me show you example in my database I added UAD field to the product table. + +213 +00:17:40,000 --> 00:17:47,000 +I also added You add in my default product type and I created a new controller of the scope PDP. + +214 +00:17:47,000 --> 00:17:52,000 +So let me find it in the solution sub package as examples. + +215 +00:17:53,000 --> 00:17:53,000 +Here it is. + +216 +00:17:54,000 --> 00:18:00,000 +I give you a parameter from the request and extract the product by its UAD. + +217 +00:18:01,000 --> 00:18:06,000 +The rest of the code is similar here to our previous example in existing solution. + +218 +00:18:06,000 --> 00:18:13,000 +When we extracted product by the inside, I put product into the request, object and request to view + +219 +00:18:13,000 --> 00:18:15,000 +all my MVC parking. + +220 +00:18:16,000 --> 00:18:24,000 +Let me opens the browser now in the browser I change your address to access PDP resource and I pass + +221 +00:18:24,000 --> 00:18:28,000 +you ID of the first product I took it from. + +222 +00:18:28,000 --> 00:18:33,000 +The database user can navigate to the product page from the product listing page. + +223 +00:18:34,000 --> 00:18:41,000 +We need also to change GCP pages on POPEY, but I believe you already understood the solution. + +224 +00:18:41,000 --> 00:18:42,000 +Look at this idea. + +225 +00:18:43,000 --> 00:18:47,000 +It is less likely that that talk would use brute force against you. + +226 +00:18:47,000 --> 00:18:48,000 +You agree? + +227 +00:18:49,000 --> 00:18:49,000 +That's it. + +228 +00:18:50,000 --> 00:18:53,000 +That's all what I wanted to share with you regarding security review. + +229 +00:18:53,000 --> 00:18:55,000 +Is that someone. + +230 +00:18:56,000 --> 00:19:01,000 +The next four images that I'm going to explain is a posture reversal with you. + +231 +00:19:02,000 --> 00:19:02,000 +What is it? + +232 +00:19:03,000 --> 00:19:06,000 +It is also known as a direction traversal. + +233 +00:19:07,000 --> 00:19:14,000 +It is a web security alert ability that allows a target to make arbitrary files on the server that is + +234 +00:19:14,000 --> 00:19:15,000 +running from application. + +235 +00:19:16,000 --> 00:19:23,000 +This might include application code data credentials for back end systems and sensitive operating system + +236 +00:19:23,000 --> 00:19:24,000 +files. + +237 +00:19:24,000 --> 00:19:31,000 +In some cases, an attacker might be able to write to arbitrary files on the server, allowing them + +238 +00:19:31,000 --> 00:19:37,000 +to modify application data or behavior and ultimately take full control of the server. + +239 +00:19:38,000 --> 00:19:45,000 +A system without proper access control might be a victim of post reversal, so exploits allow attackers + +240 +00:19:45,000 --> 00:19:48,000 +to access restricted resources into server. + +241 +00:19:49,000 --> 00:19:56,000 +This situation can happen once the possible source system is allow it to retrieve, is accessible, + +242 +00:19:56,000 --> 00:19:59,000 +to be modified and is not adequately validated. + +243 +00:20:00,000 --> 00:20:06,000 +To illustrate this, let's imagine that we have controller reactions of pictures on request. + +244 +00:20:06,000 --> 00:20:15,000 +Let me show in browser I type in you will get and post query parameter to the scope name. + +245 +00:20:15,000 --> 00:20:18,000 +This is the name of the page that I want to retrieve. + +246 +00:20:18,000 --> 00:20:20,000 +I wrote FLAC being. + +247 +00:20:21,000 --> 00:20:25,000 +And as you can see, I have the image from my web server richer. + +248 +00:20:26,000 --> 00:20:31,000 +And again, as a first glance, probably you don't see any harm on this. + +249 +00:20:31,000 --> 00:20:33,000 +But let me show something interesting. + +250 +00:20:34,000 --> 00:20:39,000 +What if I were to adjust parameter in a way that will allow me to navigate over the tree of the file + +251 +00:20:39,000 --> 00:20:41,000 +system on the server side? + +252 +00:20:42,000 --> 00:20:48,000 +For example, I would type double dots, slash LeBron's secrets, secret text. + +253 +00:20:49,000 --> 00:20:52,000 +And again, this is just an example. + +254 +00:20:52,000 --> 00:20:57,000 +We're going to have different variations of the same ability and the same problem. + +255 +00:20:58,000 --> 00:21:03,000 +When I show you one example, try to analyze all the similar cases you can think of. + +256 +00:21:04,000 --> 00:21:11,000 +The main idea here is that you have a possibility to pass the input to the server and when you can pass + +257 +00:21:11,000 --> 00:21:12,000 +the input. + +258 +00:21:12,000 --> 00:21:18,000 +There's always a ways that you can pass different inputs to vulnerabilities on the server side. + +259 +00:21:19,000 --> 00:21:24,000 +As you can see in the browser, I have just received access to the content of the secret file. + +260 +00:21:25,000 --> 00:21:31,000 +This file may contain information about secrets and passwords to other systems and services, whatever. + +261 +00:21:31,000 --> 00:21:37,000 +This is not okay and that target can use this information to break this system further. + +262 +00:21:37,000 --> 00:21:40,000 +Let's investigate how it is possible. + +263 +00:21:40,000 --> 00:21:47,000 +You can see the URLs that they accessed file inside web folder, but you remember that the resources + +264 +00:21:47,000 --> 00:21:53,000 +in the web in Java Web application folder are not accessible outside of the server. + +265 +00:21:54,000 --> 00:21:59,000 +And you are right, resources are not accessible outside of this. + +266 +00:22:00,000 --> 00:22:08,000 +But I sent file named to this and all the server I found requested file and send it back. + +267 +00:22:09,000 --> 00:22:17,000 +You can access directly grab them for them the URL and it's called them too, but you can access it + +268 +00:22:17,000 --> 00:22:18,000 +on the server side. + +269 +00:22:19,000 --> 00:22:26,000 +Can you understand this in my so that you can see that we pass is a query parameter and using image + +270 +00:22:26,000 --> 00:22:33,000 +graphics we create a cost to the resource, but be aware that using those graphics doesn't make the + +271 +00:22:33,000 --> 00:22:34,000 +solution more secure. + +272 +00:22:35,000 --> 00:22:37,000 +Do not forget that no zip passes. + +273 +00:22:37,000 --> 00:22:45,000 +The thing we are again using the brute force I can navigate up and down is a directory released the + +274 +00:22:45,000 --> 00:22:53,000 +parameters a type parsons a euro two dots basically allows you to navigate on the one level up and from + +275 +00:22:53,000 --> 00:22:55,000 +there I can access another folder. + +276 +00:22:55,000 --> 00:23:03,000 +Is it the scroll mappings and secrets and it can open file from z directions that they need is clear. + +277 +00:23:04,000 --> 00:23:06,000 +Let's see now what we can do to fix this. + +278 +00:23:07,000 --> 00:23:13,000 +First of all, you always have to understand how the underlying operating system will handle file names. + +279 +00:23:15,000 --> 00:23:22,000 +Well, the first solution, the easiest one and the most reliable one, will not allow user to pass + +280 +00:23:22,000 --> 00:23:24,000 +user inputs when it is not necessary. + +281 +00:23:25,000 --> 00:23:30,000 +Even if you seeing that it would be great to allow the client to pass value here as a server. + +282 +00:23:30,000 --> 00:23:37,000 +Don't do that without thinking and making a wise decision because all user inputs may be used by attackers. + +283 +00:23:38,000 --> 00:23:44,000 +Avoid user input whenever possible and solution might be a validation of user input. + +284 +00:23:45,000 --> 00:23:51,000 +You can think is that you will validate slashes and double dots on the parameter and that would be it. + +285 +00:23:51,000 --> 00:23:54,000 +But again, I can name at least few options. + +286 +00:23:54,000 --> 00:23:56,000 +How to bypass validation. + +287 +00:23:56,000 --> 00:24:02,000 +For example, let's imagine that you implemented validation to check slashes and dots. + +288 +00:24:02,000 --> 00:24:04,000 +Okay, good try. + +289 +00:24:05,000 --> 00:24:09,000 +What do you do when I will pass such kind of parameter using your encoding? + +290 +00:24:10,000 --> 00:24:11,000 +Just look here. + +291 +00:24:12,000 --> 00:24:14,000 +Having you will like this. + +292 +00:24:14,000 --> 00:24:16,000 +I also can access request file. + +293 +00:24:17,000 --> 00:24:22,000 +What will try to do next will implement another validation for person. + +294 +00:24:22,000 --> 00:24:26,000 +So I love this games and I can play them forever. + +295 +00:24:26,000 --> 00:24:27,000 +Just joking. + +296 +00:24:27,000 --> 00:24:34,000 +I can even try to use not reality but absolute pass to get access to the file on the server operating + +297 +00:24:34,000 --> 00:24:37,000 +system is in problem. + +298 +00:24:37,000 --> 00:24:42,000 +You want to make validation of the file extension to be retrieved and you want to validate that parameter + +299 +00:24:42,000 --> 00:24:45,000 +will end up with dot extension. + +300 +00:24:46,000 --> 00:24:52,000 +Well, okay, but I can use so-called portion no bytes attack. + +301 +00:24:52,000 --> 00:24:57,000 +What is this, a low bar to represent s/0. + +302 +00:24:57,000 --> 00:25:04,000 +It is an encoded character that is usually not visible and this is used only for encoding purposes. + +303 +00:25:04,000 --> 00:25:08,000 +This will be already harder but still possible. + +304 +00:25:08,000 --> 00:25:09,000 +In some servers. + +305 +00:25:10,000 --> 00:25:18,000 +This exploit can be used against a web server as a chunk is a request Exxon Mobile, such as Microsoft, + +306 +00:25:18,000 --> 00:25:18,000 +W. + +307 +00:25:19,000 --> 00:25:22,000 +S and Netscape Enterprise Web Service. + +308 +00:25:22,000 --> 00:25:26,000 +But there are different variations how to bypass this, too. + +309 +00:25:27,000 --> 00:25:28,000 +Let's talk about other solutions. + +310 +00:25:29,000 --> 00:25:32,000 +The solution is to configure file permissions. + +311 +00:25:33,000 --> 00:25:40,000 +We should properly configure file permissions and even to restrict the read and access files. + +312 +00:25:40,000 --> 00:25:45,000 +We can use some solutions provided by cloud providers to manage sensitive data. + +313 +00:25:45,000 --> 00:25:52,000 +For example, Azure, A, W, s and Google Cloud provides security and proven solutions for sequence + +314 +00:25:52,000 --> 00:25:53,000 +management. + +315 +00:25:53,000 --> 00:25:59,000 +The force solution is to make an application validate user input before processing it. + +316 +00:26:00,000 --> 00:26:01,000 +Idealism. + +317 +00:26:01,000 --> 00:26:08,000 +A nation should compare against a white list of its values we can use safe recent to validate user input. + +318 +00:26:09,000 --> 00:26:10,000 +What is safe listing? + +319 +00:26:11,000 --> 00:26:18,000 +Since listing consists of creating a list of possible costs that can be accessed safely, save this. + +320 +00:26:18,000 --> 00:26:26,000 +Is a simple and comparatively effective approach to reduce the potential for exploits by adding this + +321 +00:26:26,000 --> 00:26:27,000 +validation to user inputs. + +322 +00:26:28,000 --> 00:26:32,000 +You can have an extra layer of protection against malicious attacks. + +323 +00:26:33,000 --> 00:26:37,000 +Let me show it to you in the solution folder. + +324 +00:26:37,000 --> 00:26:40,000 +I have get pictures so that lets you open it. + +325 +00:26:40,000 --> 00:26:42,000 +I create a list of strings. + +326 +00:26:43,000 --> 00:26:44,000 +This will be my safe release. + +327 +00:26:45,000 --> 00:26:47,000 +This list of image names. + +328 +00:26:48,000 --> 00:26:51,000 +All images that are available in my images folder. + +329 +00:26:51,000 --> 00:26:55,000 +There you can stores is not a memory collection. + +330 +00:26:55,000 --> 00:26:58,000 +You can also store it outside of the source code. + +331 +00:26:58,000 --> 00:27:00,000 +It's up to you how you will implement this. + +332 +00:27:01,000 --> 00:27:08,000 +But the main thing is that I have some of these with all valid file names of my images in my server. + +333 +00:27:09,000 --> 00:27:11,000 +I initialize this use with values. + +334 +00:27:12,000 --> 00:27:13,000 +I have a separate message here. + +335 +00:27:14,000 --> 00:27:16,000 +Feel free to explore later. + +336 +00:27:16,000 --> 00:27:23,000 +If you are a student of my Java course, please refer to this section about input and output streams. + +337 +00:27:23,000 --> 00:27:26,000 +I cover that how to work with sparse object. + +338 +00:27:27,000 --> 00:27:31,000 +Ensure I get the boss object of my images folder. + +339 +00:27:31,000 --> 00:27:38,000 +After that I convert it to file in order to get access to the sub elements in this direction and that + +340 +00:27:38,000 --> 00:27:46,000 +created functions and adds file name of each file from images folder into our collection and analysis. + +341 +00:27:46,000 --> 00:27:54,000 +Where I add validation, I allow access to source only in case past parameter is present in my collection + +342 +00:27:54,000 --> 00:27:55,000 +with file names. + +343 +00:27:55,000 --> 00:27:57,000 +Otherwise I print text. + +344 +00:27:57,000 --> 00:28:00,000 +That image with such name doesn't exist. + +345 +00:28:00,000 --> 00:28:03,000 +Let me open the browser and show you examples. + +346 +00:28:04,000 --> 00:28:07,000 +Basically, I will just change the euro. + +347 +00:28:07,000 --> 00:28:09,000 +I will add the solution. + +348 +00:28:09,000 --> 00:28:11,000 +Put together euro. + +349 +00:28:12,000 --> 00:28:21,000 +And you can see I can access secret file anymore, but I can access FLAC without BMG because this file + +350 +00:28:21,000 --> 00:28:24,000 +name is present in my safe place. + +351 +00:28:24,000 --> 00:28:25,000 +Isn't this cool? + +352 +00:28:26,000 --> 00:28:27,000 +The solution. + +353 +00:28:28,000 --> 00:28:34,000 +In case implementation of safe leasing is not possible, then civilized nations should verify that the + +354 +00:28:34,000 --> 00:28:40,000 +input contains on the premise its contents, such as purely alphanumeric characters. + +355 +00:28:41,000 --> 00:28:45,000 +Now you have a solution how to avoid such an ideological struggle. + +356 +00:28:45,000 --> 00:28:49,000 +So let's review another word, unity. + +357 +00:28:50,000 --> 00:28:53,000 +I'm going to explain my client cash liability. + +358 +00:28:54,000 --> 00:28:59,000 +Imagine that you're in a cafe and you walked into our web application. + +359 +00:29:00,000 --> 00:29:06,000 +After that, you was distracted, or you just went to the restroom and you left your C on the table. + +360 +00:29:07,000 --> 00:29:14,000 +Somebody accessed you, obviously, while you were in the restroom and made some orders from your account + +361 +00:29:14,000 --> 00:29:16,000 +using your balance of the account. + +362 +00:29:17,000 --> 00:29:26,000 +This is a scenario of client cash and cash, which is tough to address because it involves attackers + +363 +00:29:26,000 --> 00:29:29,000 +physically taking over the user's computer. + +364 +00:29:29,000 --> 00:29:37,000 +Instead of remote attacks, they take advantage of the session credentials, cached pages or data in + +365 +00:29:37,000 --> 00:29:38,000 +the browser already present. + +366 +00:29:39,000 --> 00:29:40,000 +Also educate the client. + +367 +00:29:41,000 --> 00:29:46,000 +Once this happens that Tucker can quickly gain access to the user data. + +368 +00:29:47,000 --> 00:29:52,000 +In this case, the most effective solution is also the most simple one. + +369 +00:29:53,000 --> 00:29:54,000 +You can shorten the user session. + +370 +00:29:55,000 --> 00:30:02,000 +If you notice in bulk applications, usually use is very short session and in case remains inactive + +371 +00:30:02,000 --> 00:30:03,000 +for some periods of time. + +372 +00:30:03,000 --> 00:30:11,000 +Session is invalidated and issue commendation needed to validate user credentials on performing critical + +373 +00:30:11,000 --> 00:30:12,000 +operations. + +374 +00:30:13,000 --> 00:30:19,000 +For example, in some applications, when you perform critical operations, users use an email verification + +375 +00:30:20,000 --> 00:30:22,000 +or a semester verification. + +376 +00:30:22,000 --> 00:30:26,000 +All passwords verification we can implement is a way. + +377 +00:30:27,000 --> 00:30:35,000 +When I change password, I'm asked to enter old passwords past to confirm my action or when I make money + +378 +00:30:35,000 --> 00:30:36,000 +transaction. + +379 +00:30:36,000 --> 00:30:40,000 +I should confirm this behavior was a from mess. + +380 +00:30:40,000 --> 00:30:42,000 +Let me show you an example. + +381 +00:30:43,000 --> 00:30:48,000 +So imagine I left my laptop and the last thing in my account. + +382 +00:30:49,000 --> 00:30:57,000 +Somebody answer it to my profile in order to change information, for example, to change user email + +383 +00:30:58,000 --> 00:30:59,000 +or to change passwords. + +384 +00:31:00,000 --> 00:31:07,000 +And you can see that to be able to update user and click update button, I need to enter passwords and + +385 +00:31:07,000 --> 00:31:11,000 +I don't know, password lets me type any possible. + +386 +00:31:11,000 --> 00:31:16,000 +Because as an attacker, I try to remember how password looks like. + +387 +00:31:16,000 --> 00:31:24,000 +And in case I changed the email and some of those passwords and just click update button, I see error + +388 +00:31:24,000 --> 00:31:26,000 +message telling me. + +389 +00:31:26,000 --> 00:31:29,000 +So can you turn the current password to confirm the action? + +390 +00:31:30,000 --> 00:31:30,000 +That's it. + +391 +00:31:31,000 --> 00:31:33,000 +Let's talk about the next vulnerability. + +392 +00:31:34,000 --> 00:31:41,000 +The next vulnerability that I'd like to discuss is a violation of the principle of this privilege of + +393 +00:31:41,000 --> 00:31:48,000 +denied by default, where access should only be granted for particular capabilities, roles for users, + +394 +00:31:49,000 --> 00:31:51,000 +but is available to anyone. + +395 +00:31:52,000 --> 00:31:53,000 +And now application. + +396 +00:31:53,000 --> 00:31:58,000 +We already implemented web filters that helps us to avoid the mentioned violation. + +397 +00:31:59,000 --> 00:32:07,000 +In the filters package, you can find admin and management filters Z Verify role of the user before + +398 +00:32:07,000 --> 00:32:09,000 +granting access to the resource. + +399 +00:32:10,000 --> 00:32:18,000 +Let's make all comes of our browser and show the we have a page list of all orders on that page. + +400 +00:32:18,000 --> 00:32:20,000 +We change fulfillment status of the order. + +401 +00:32:21,000 --> 00:32:24,000 +As you can see, I can access it. + +402 +00:32:24,000 --> 00:32:25,000 +We add directly. + +403 +00:32:26,000 --> 00:32:28,000 +I'm redirected to the sign main page. + +404 +00:32:29,000 --> 00:32:34,000 +Let me sign me with a test user after successfully logging. + +405 +00:32:35,000 --> 00:32:43,000 +Let me try to access that page one more time and I see for all three for meeting error, I am not allowed + +406 +00:32:43,000 --> 00:32:45,000 +to access this resource. + +407 +00:32:45,000 --> 00:32:52,000 +We should follow the principal deny by default and grant access only to those resources which should + +408 +00:32:52,000 --> 00:32:59,000 +be available for the user based on zero except for public resources denied by default. + +409 +00:33:00,000 --> 00:33:08,000 +That's how who sells all users that were registered users sign up for automatically assigned to the + +410 +00:33:08,000 --> 00:33:09,000 +customer role. + +411 +00:33:10,000 --> 00:33:15,000 +So all users of my application has roles and access is controlled. + +412 +00:33:16,000 --> 00:33:16,000 +Let me see. + +413 +00:33:16,000 --> 00:33:25,000 +Now that will sign me with management account and when I want to access order page, I can see it now + +414 +00:33:25,000 --> 00:33:34,000 +because in my filter I verify the role of the end user and in case role is role manager, then I allow + +415 +00:33:34,000 --> 00:33:35,000 +access to the resource. + +416 +00:33:35,000 --> 00:33:37,000 +Never forget about this. + +417 +00:33:38,000 --> 00:33:43,000 +There are different frameworks that can help you to improve authentication mechanism in the application. + +418 +00:33:44,000 --> 00:33:46,000 +Screw security exists for Java. + +419 +00:33:47,000 --> 00:33:52,000 +Security Corp applies outside of the scope of this lesson, but stay tuned in. + +420 +00:33:52,000 --> 00:33:55,000 +My job of course, will review it in a separate lesson. + +421 +00:33:56,000 --> 00:34:02,000 +There is also another similar vulnerability the same but similar elevation of privilege. + +422 +00:34:02,000 --> 00:34:11,000 +It describes a scenario when we can act as a user of the app without being logged in action as an admin + +423 +00:34:11,000 --> 00:34:13,000 +when loved as a user. + +424 +00:34:14,000 --> 00:34:19,000 +And the last things that I wanted to cover is a comparison of this risk category with the same risk + +425 +00:34:19,000 --> 00:34:23,000 +category from the last ten 2017. + +426 +00:34:23,000 --> 00:34:30,000 +I can say that this category in general, in its description sense and others, remains unchanged. + +427 +00:34:30,000 --> 00:34:32,000 +So not so much sinks to compare. + +428 +00:34:33,000 --> 00:34:36,000 +That's all what I wanted to share with you in this lesson. + +429 +00:34:36,000 --> 00:34:39,000 +Let's recap what we have learned today. + +430 +00:34:40,000 --> 00:34:46,000 +This lesson we learned what access control is and what broken access control means. + +431 +00:34:46,000 --> 00:34:53,000 +We reviewed some vulnerabilities and possible design solutions to avoid disease regulators ability to + +432 +00:34:53,000 --> 00:34:54,000 +review. + +433 +00:34:54,000 --> 00:34:58,000 +It is worth to mention insecure a new liability posture. + +434 +00:34:58,000 --> 00:34:59,000 +Reversal vulnerability. + +435 +00:35:00,000 --> 00:35:07,000 +Client cash relation of the principle of this privilege together with elevation of privilege. + +436 +00:35:07,000 --> 00:35:13,000 +And after this lesson, you also have an answer how to prevent such liability. + +437 +00:35:13,000 --> 00:35:14,000 +That's it. + +438 +00:35:15,000 --> 00:35:16,000 +Thanks a lot for your attention. + +439 +00:35:16,000 --> 00:35:19,000 +Have a great day and see you in the next lesson. + diff --git a/73 - OWASP Top 10 2021/002 Source-code-examples-from-the-lesson.url b/73 - OWASP Top 10 2021/002 Source-code-examples-from-the-lesson.url new file mode 100644 index 0000000000000000000000000000000000000000..6f35503fe7d84ffd31ab4df65a452b3ce8d889f1 --- /dev/null +++ b/73 - OWASP Top 10 2021/002 Source-code-examples-from-the-lesson.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/tree/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/owasp/bac \ No newline at end of file diff --git a/73 - OWASP Top 10 2021/003 Cryptography Failures (Theory, Sensitive Data, Data Breach, Types of Failures)_en.srt b/73 - OWASP Top 10 2021/003 Cryptography Failures (Theory, Sensitive Data, Data Breach, Types of Failures)_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..0e737a54f661cda08525312283f578469b92f67f --- /dev/null +++ b/73 - OWASP Top 10 2021/003 Cryptography Failures (Theory, Sensitive Data, Data Breach, Types of Failures)_en.srt @@ -0,0 +1,588 @@ +1 +00:00:06,000 --> 00:00:06,000 +Hello. + +2 +00:00:06,000 --> 00:00:13,000 +In this lesson, we continue to learn of us that today we're going to talk about cryptographic failures. + +3 +00:00:13,000 --> 00:00:16,000 +As we will learn what cryptographic failures are. + +4 +00:00:16,000 --> 00:00:24,000 +We're going to discuss a lot of other different and related topics like peace, encryption and so on. + +5 +00:00:25,000 --> 00:00:31,000 +We're going to start our lesson from General Overview after you would understand what cryptographic + +6 +00:00:31,000 --> 00:00:37,000 +failures are will reduce the most common the root causes the help you understand that the data will + +7 +00:00:37,000 --> 00:00:45,000 +compare similar risk category from across the top ten 2017 and of course the top ten 2021. + +8 +00:00:45,000 --> 00:00:49,000 +We'll also learn different types of cryptographic failures. + +9 +00:00:49,000 --> 00:00:54,000 +Taking into account the data is the main subject of an attack. + +10 +00:00:54,000 --> 00:00:58,000 +We need to understand the difference between personal and sensitive data. + +11 +00:00:59,000 --> 00:01:02,000 +Separately, I'm going to explain different types of sensitive data. + +12 +00:01:03,000 --> 00:01:07,000 +Also will compare cryptographic failures was data breach. + +13 +00:01:08,000 --> 00:01:14,000 +I believes that with the help of these comparisons, it will be easier for you to understand what cryptographic + +14 +00:01:14,000 --> 00:01:15,000 +failure is. + +15 +00:01:16,000 --> 00:01:22,000 +I am going to share with you the most common examples of attacks scenarios and therefore we're going + +16 +00:01:22,000 --> 00:01:25,000 +to have practical exercises in the lesson. + +17 +00:01:25,000 --> 00:01:28,000 +In order, you could see how we can avoid liability. + +18 +00:01:28,000 --> 00:01:31,000 +Some practice on the example of our online shop. + +19 +00:01:32,000 --> 00:01:36,000 +I'm going to show you how you can make your application even more secure. + +20 +00:01:37,000 --> 00:01:40,000 +We will review examples with sequel objections. + +21 +00:01:40,000 --> 00:01:45,000 +I was explaining what tools and SSL are also well known. + +22 +00:01:45,000 --> 00:01:50,000 +What should be asked is and what is the difference between A, B and B? + +23 +00:01:50,000 --> 00:01:51,000 +S. + +24 +00:01:51,000 --> 00:02:00,000 +I'm going to show how you can enable a, b, s on the Tomcat Web server together architecture decisions + +25 +00:02:00,000 --> 00:02:03,000 +and solutions about how and where exactly. + +26 +00:02:03,000 --> 00:02:04,000 +Now application. + +27 +00:02:05,000 --> 00:02:12,000 +When you do encrypt and decrypt sensitive data, I will explain what passwords, passion and password + +28 +00:02:12,000 --> 00:02:13,000 +salt are. + +29 +00:02:13,000 --> 00:02:22,000 +We're going to review different hashing algorithms like for example, modify s, h, a, p, b, CDF + +30 +00:02:22,000 --> 00:02:25,000 +to decrypt and ask quick. + +31 +00:02:25,000 --> 00:02:30,000 +And at the end of the lesson, I'm going to share with you some general rules that it's recommended + +32 +00:02:30,000 --> 00:02:33,000 +to follow in order to prevent cryptographic failures. + +33 +00:02:34,000 --> 00:02:38,000 +This is going to be a very interesting lesson and very useful one. + +34 +00:02:39,000 --> 00:02:40,000 +Let's get it started. + +35 +00:02:41,000 --> 00:02:44,000 +Let's understand first what a cryptographic failure is. + +36 +00:02:44,000 --> 00:02:52,000 +A cryptographic failure is a security failure that occurs when a third party entity apps that pages + +37 +00:02:52,000 --> 00:02:56,000 +defense websites expose a sensitive data. + +38 +00:02:57,000 --> 00:02:57,000 +To be exact. + +39 +00:02:58,000 --> 00:03:03,000 +It is one entity thus so without specific intent behind it. + +40 +00:03:04,000 --> 00:03:11,000 +As you already can imagine, a cryptographic fear that can have catastrophic consequences, both personal + +41 +00:03:11,000 --> 00:03:12,000 +and business wise. + +42 +00:03:13,000 --> 00:03:16,000 +Originally called sensitive data exposure. + +43 +00:03:16,000 --> 00:03:22,000 +A cryptographic failure occurs when a system makes sensitive data accessible to attackers. + +44 +00:03:22,000 --> 00:03:30,000 +Attackers often target sensitive data, such as passwords, credit card numbers and personal information. + +45 +00:03:30,000 --> 00:03:37,000 +When you do not properly protect them, their defenses causing some graphic failures, some of them + +46 +00:03:37,000 --> 00:03:45,000 +are inadequate database protection, inappropriate usage of data systems, software mistakes and flaws, + +47 +00:03:45,000 --> 00:03:50,000 +weak encryption, or complete absence of encryption and others. + +48 +00:03:50,000 --> 00:03:57,000 +A cryptographic failure flaw can occur when you lose a following store or transit data in three attacks. + +49 +00:03:58,000 --> 00:03:59,000 +That is most common of this course. + +50 +00:04:00,000 --> 00:04:07,000 +Protect data was an old or weak encryption improperly filter or mask of data in transit. + +51 +00:04:07,000 --> 00:04:15,000 +In comparison to Avast Top ten 2017, it is worse than dimensions of this risk category shipped from + +52 +00:04:15,000 --> 00:04:17,000 +self to the second position. + +53 +00:04:18,000 --> 00:04:24,000 +This risk category was previously known as sensitive data exposure, which is more of a broad symptom + +54 +00:04:24,000 --> 00:04:33,000 +rather than the cross failures related to cryptography or lack thereof often leads to exposure of sensitive + +55 +00:04:33,000 --> 00:04:33,000 +data. + +56 +00:04:34,000 --> 00:04:41,000 +In the first lesson of this section of the course, when the use of USB overview, I also explained + +57 +00:04:41,000 --> 00:04:46,000 +to you what common a vehicle's enumerations are, and they provided you with the link to the official + +58 +00:04:46,000 --> 00:04:54,000 +website, so feel free to check some notable common vehicles enumerations of this in this category like + +59 +00:04:54,000 --> 00:05:06,000 +cwe2 hundred 59 use of hard coded password c 327 broken or escape route algorithm and cwe3 hundred 31 + +60 +00:05:06,000 --> 00:05:15,000 +Insufficient Entropy Cryptographic Failures Ranked number two on Avast's Top ten 2021 Verification Security + +61 +00:05:15,000 --> 00:05:17,000 +Risks so them not a joke. + +62 +00:05:18,000 --> 00:05:22,000 +Big and small companies have fallen victim to sensitive data exposure. + +63 +00:05:23,000 --> 00:05:27,000 +Let's look now at different types of cryptographic failures. + +64 +00:05:27,000 --> 00:05:31,000 +In general, cryptographic failures fall into three categories. + +65 +00:05:32,000 --> 00:05:34,000 +The first one, confidentiality breach. + +66 +00:05:35,000 --> 00:05:43,000 +This category covers cases that happens when a third party is able to access confidential data or when + +67 +00:05:43,000 --> 00:05:46,000 +an organization discloses such data on accident. + +68 +00:05:47,000 --> 00:05:49,000 +The second one integrity breach. + +69 +00:05:50,000 --> 00:05:57,000 +This category describes a situation when the sensitive data is also it once again without authorization + +70 +00:05:57,000 --> 00:06:02,000 +and or intent behind the shards category. + +71 +00:06:02,000 --> 00:06:09,000 +However, the ability to reach this category describes scenarios where sensitive data is destroyed or + +72 +00:06:09,000 --> 00:06:17,000 +when you lose access to the category covers both permanent as well as temporary data loss with mentioned + +73 +00:06:18,000 --> 00:06:19,000 +sensitive data. + +74 +00:06:19,000 --> 00:06:27,000 +A few times in this lesson already it is time to learn what is sensitive data and how it is connected + +75 +00:06:27,000 --> 00:06:28,000 +with personal data. + +76 +00:06:29,000 --> 00:06:34,000 +Let's understand what personal data first, because there is a connection between personal and sensitive + +77 +00:06:34,000 --> 00:06:35,000 +data. + +78 +00:06:35,000 --> 00:06:42,000 +Ensure personal data covers any information related to identifiable individuals. + +79 +00:06:42,000 --> 00:06:51,000 +Non-personal data as a hat includes pieces and bits of information that have no relationship with identifiable + +80 +00:06:51,000 --> 00:06:55,000 +people or that are not unique to any single individual. + +81 +00:06:56,000 --> 00:07:02,000 +One of the foundations that determines the sensitivity level of data is to think about how the loss + +82 +00:07:02,000 --> 00:07:09,000 +of the confidentiality, integrity or availability of that information would impact the organization. + +83 +00:07:09,000 --> 00:07:18,000 +In the case of an unauthorized disclosure sensitive data, meanwhile, composites any information that + +84 +00:07:18,000 --> 00:07:27,000 +does or could reveal individuals house by magic and also genetic materials, sexual orientation, sex, + +85 +00:07:27,000 --> 00:07:34,000 +life or anything along these lines racial and ethnic and or national origins. + +86 +00:07:34,000 --> 00:07:43,000 +Political views ties to religious, political and or philosophical organizations, religious and or + +87 +00:07:43,000 --> 00:07:47,000 +political beliefs, trade union memberships, and more. + +88 +00:07:47,000 --> 00:07:55,000 +So we can say that sensitive data is classified information that must be protected against unauthorized + +89 +00:07:55,000 --> 00:08:02,000 +access, and it can be seen as a hard power that requires greater protections and personal data. + +90 +00:08:03,000 --> 00:08:09,000 +Many things can be considered with personal data, such as individuals, name or email address. + +91 +00:08:10,000 --> 00:08:16,000 +Sensitive data, on the other hand, will generally be information that falls under special categories + +92 +00:08:16,000 --> 00:08:18,000 +that I have named a few seconds ago. + +93 +00:08:19,000 --> 00:08:25,000 +It is important to understand what sensitive data is because it is the main subject of attacks. + +94 +00:08:25,000 --> 00:08:28,000 +When we talk about cryptographic failures. + +95 +00:08:28,000 --> 00:08:31,000 +That's why I want to explain this in every detail. + +96 +00:08:32,000 --> 00:08:35,000 +Sensitive data can be a number of things. + +97 +00:08:35,000 --> 00:08:42,000 +One of the easiest way to evaluate is to think of personal data you would not want to be open to share. + +98 +00:08:42,000 --> 00:08:43,000 +Chance was just anyone. + +99 +00:08:44,000 --> 00:08:50,000 +There are, of course, federal laws and regulations that sets specific guidelines on what types of + +100 +00:08:50,000 --> 00:08:52,000 +sensitive data must be protected. + +101 +00:08:53,000 --> 00:08:58,000 +But still, different laws in different countries are usually classified as sensitive data. + +102 +00:08:58,000 --> 00:09:05,000 +The following data categories financial information, credit card numbers, bank account information, + +103 +00:09:06,000 --> 00:09:07,000 +and Social Security numbers. + +104 +00:09:08,000 --> 00:09:09,000 +Government information. + +105 +00:09:10,000 --> 00:09:12,000 +Any documents it is classified as secret. + +106 +00:09:12,000 --> 00:09:15,000 +A top secret, restricted or so. + +107 +00:09:15,000 --> 00:09:18,000 +This can be considered a breach of confidentiality. + +108 +00:09:19,000 --> 00:09:26,000 +Business information, accounting data, trade secrets, financial statements or accounts, and any + +109 +00:09:26,000 --> 00:09:28,000 +sensitive information in business clouds. + +110 +00:09:29,000 --> 00:09:31,000 +Personal Information addresses. + +111 +00:09:31,000 --> 00:09:36,000 +Medical History, driver's license numbers of phone numbers. + +112 +00:09:36,000 --> 00:09:43,000 +This data is information most people would not want to share with others who don't have approval. + +113 +00:09:44,000 --> 00:09:50,000 +And it is the responsibility of the association that has collected Z data to protect it from and also + +114 +00:09:51,000 --> 00:09:57,000 +access, for example, passwords, credit cards, numbers, health records, personal information and + +115 +00:09:57,000 --> 00:10:05,000 +business secrets require extra protection, mainly if Z data falls under privacy laws like European + +116 +00:10:05,000 --> 00:10:14,000 +Union, general data protection regulation or regulations like financial data protection such as PCI + +117 +00:10:14,000 --> 00:10:16,000 +data security standards. + +118 +00:10:16,000 --> 00:10:16,000 +PCI. + +119 +00:10:17,000 --> 00:10:17,000 +S s. + +120 +00:10:18,000 --> 00:10:24,000 +I believe that by this moment in the lesson you are concerned about the difference between the cryptographic + +121 +00:10:24,000 --> 00:10:26,000 +failure and data breach, don't you? + +122 +00:10:27,000 --> 00:10:29,000 +This is a great question, by the way. + +123 +00:10:29,000 --> 00:10:34,000 +Let's understand now what is the difference between cryptographic failures and data breach? + +124 +00:10:35,000 --> 00:10:43,000 +And data breach describes a security incident where intruders able to access confidential information + +125 +00:10:43,000 --> 00:10:45,000 +without authorization. + +126 +00:10:45,000 --> 00:10:53,000 +In this case, the attackers seemed to find personally identifiable info or any other data that could + +127 +00:10:53,000 --> 00:10:59,000 +provide financial gain, compromise identities, or be sold on the dark web. + +128 +00:10:59,000 --> 00:11:05,000 +In other words, they are looking to obtain data that could be classified as valuable. + +129 +00:11:06,000 --> 00:11:11,000 +The goals can be just to modify or destroy that data altogether. + +130 +00:11:12,000 --> 00:11:19,000 +A cryptographic failure, on the other hand, is what happens when you leave data free on a server or + +131 +00:11:19,000 --> 00:11:21,000 +in a data store for anyone to see. + +132 +00:11:22,000 --> 00:11:29,000 +More often than not, cryptographic failures come about when you leave configuration details unsecure + +133 +00:11:29,000 --> 00:11:34,000 +online, so the data is exposed without specific intent behind it. + +134 +00:11:35,000 --> 00:11:41,000 +Obviously there is some environment that can facilitate cryptographic failures. + +135 +00:11:41,000 --> 00:11:49,000 +For example, relatively often I can find that sensitive data is stored as plain text and left unattended. + +136 +00:11:50,000 --> 00:11:56,000 +Basically, each software engineer could use was application can read sensitive data. + +137 +00:11:56,000 --> 00:12:03,000 +That's because of being a matter of strict regulations and huge fines in case of violations will be + +138 +00:12:03,000 --> 00:12:04,000 +discovered. + +139 +00:12:05,000 --> 00:12:09,000 +There are some positive trends in this area, but we are not completely. + +140 +00:12:10,000 --> 00:12:17,000 +Sometimes because of lack of trainings or personal awareness, single use don't even see that some information + +141 +00:12:17,000 --> 00:12:20,000 +can be considered as a sensitive information. + +142 +00:12:21,000 --> 00:12:28,000 +That's why I always recommend to build the courses with regular workshops and even some quizzes for + +143 +00:12:28,000 --> 00:12:35,000 +employees, software engineers, engineers and others in order to increase general awareness about security + +144 +00:12:35,000 --> 00:12:35,000 +requirements. + +145 +00:12:36,000 --> 00:12:41,000 +And as a company doing one day this will pay off. + +146 +00:12:42,000 --> 00:12:48,000 +Not using isotopes, but using regular basically means that may be considered as an environment in which + +147 +00:12:48,000 --> 00:12:53,000 +attackers will use existing communities to impact our application. + diff --git a/73 - OWASP Top 10 2021/004 Cryptography Failures (Practical Examples, SQL Injections, TLSSSL, HTTPS)_en.srt b/73 - OWASP Top 10 2021/004 Cryptography Failures (Practical Examples, SQL Injections, TLSSSL, HTTPS)_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..c66875669c3bd5e9ad7858b96154256d0bfe6524 --- /dev/null +++ b/73 - OWASP Top 10 2021/004 Cryptography Failures (Practical Examples, SQL Injections, TLSSSL, HTTPS)_en.srt @@ -0,0 +1,892 @@ +1 +00:00:03,000 --> 00:00:05,000 +Let's talk now about attack scenarios. + +2 +00:00:06,000 --> 00:00:11,000 +A WASP highlights the most common snares used by attackers. + +3 +00:00:11,000 --> 00:00:17,000 +Let's review them together with examples and solutions in order to avoid them in the future. + +4 +00:00:18,000 --> 00:00:25,000 +Scenario number one, an application encrypts credit card numbers in a database using automatic database + +5 +00:00:25,000 --> 00:00:26,000 +encryption. + +6 +00:00:26,000 --> 00:00:33,000 +However, this data is automatically decrypted when retrieved, allowing a SQL injection floor to retrieve + +7 +00:00:33,000 --> 00:00:36,000 +credit card numbers in attacks. + +8 +00:00:37,000 --> 00:00:44,000 +This scenario describes a case of pool detection, for example, using your application and the way + +9 +00:00:44,000 --> 00:00:47,000 +that it encrypts data to store it in the database. + +10 +00:00:48,000 --> 00:00:55,000 +But when it is retrieved with the help of application, the data is decrypted, which makes our application + +11 +00:00:55,000 --> 00:00:56,000 +vulnerable. + +12 +00:00:57,000 --> 00:01:03,000 +From one side, we secure sensitive data in the database and in case database will be stolen. + +13 +00:01:03,000 --> 00:01:11,000 +Our data is secure, but in most cases data is retrieved with the API, and decrypted data retrieval + +14 +00:01:11,000 --> 00:01:13,000 +may be considered as a vulnerability. + +15 +00:01:14,000 --> 00:01:20,000 +Today we are going to see an example of passwords, encryption and decryption, and I'm going to show + +16 +00:01:20,000 --> 00:01:21,000 +you zero command a solution. + +17 +00:01:21,000 --> 00:01:26,000 +But first, let's talk about how we can access data through the API. + +18 +00:01:26,000 --> 00:01:30,000 +And in particular, let's talk about SQL injection. + +19 +00:01:31,000 --> 00:01:33,000 +By the way, talking about SQL injections. + +20 +00:01:33,000 --> 00:01:37,000 +In my lesson, both prepared statements from my course Java from zero. + +21 +00:01:37,000 --> 00:01:44,000 +The first job I explained in details what SQL injection star feel free to what is it lesson to run the + +22 +00:01:44,000 --> 00:01:48,000 +more about statements prepared statement on SQL Injection. + +23 +00:01:48,000 --> 00:01:51,000 +I will just briefly remind you what SQL injection are. + +24 +00:01:52,000 --> 00:01:59,000 +SQL injection is a web security vulnerability that allows an attacker interface with Aquarius. + +25 +00:01:59,000 --> 00:02:02,000 +Existing an application makes the database. + +26 +00:02:03,000 --> 00:02:08,000 +It generally allows an attacker to view data that they are not normally able to retrieve. + +27 +00:02:09,000 --> 00:02:16,000 +This might include data belonging to other users or any other data the application itself is able to + +28 +00:02:16,000 --> 00:02:17,000 +access. + +29 +00:02:18,000 --> 00:02:21,000 +In many cases, an attacker can modify the needs. + +30 +00:02:21,000 --> 00:02:26,000 +Is data causing persistent changes to the application's content or behavior? + +31 +00:02:27,000 --> 00:02:34,000 +In general, SQL injections are done for the malicious user input and insufficient validation on the + +32 +00:02:34,000 --> 00:02:35,000 +server side. + +33 +00:02:36,000 --> 00:02:42,000 +Basically, by manipulation of user input, the user can steal some information from the database. + +34 +00:02:42,000 --> 00:02:45,000 +Let me show small example installation. + +35 +00:02:46,000 --> 00:02:53,000 +Imagine that we have some end point, some service that returns a last name of a user and it's email + +36 +00:02:53,000 --> 00:02:54,000 +by ID. + +37 +00:02:55,000 --> 00:02:58,000 +So this is just an example because cases may be different. + +38 +00:02:59,000 --> 00:03:05,000 +The main thing here is that you expect to get some information from a database based on some equals. + +39 +00:03:05,000 --> 00:03:13,000 +In this particular case, I pass a parameter that is equal to the well and seems like I get what I expected. + +40 +00:03:14,000 --> 00:03:15,000 +So what is wrong here? + +41 +00:03:16,000 --> 00:03:17,000 +Let me show you. + +42 +00:03:18,000 --> 00:03:28,000 +Now I write a union select email password from user and just see what we get. + +43 +00:03:28,000 --> 00:03:30,000 +We get emails and passwords. + +44 +00:03:31,000 --> 00:03:35,000 +Yes, it's a written email, but just take a look what data retrieved. + +45 +00:03:36,000 --> 00:03:42,000 +It is obvious that this is password and it is a good thing in case passwords password encrypted. + +46 +00:03:43,000 --> 00:03:49,000 +This can add some challenges to attack, but still, this is not good that passwords can be extracted + +47 +00:03:49,000 --> 00:03:50,000 +so easily from the database. + +48 +00:03:51,000 --> 00:03:53,000 +That's how SQL injection works. + +49 +00:03:54,000 --> 00:03:59,000 +Let me show you the source code specially for this lesson I created. + +50 +00:03:59,000 --> 00:04:04,000 +User package is a the scope c f c f stands for cryptographic failures. + +51 +00:04:05,000 --> 00:04:12,000 +Here is a problem package I have so is a the scope SQL injection demo, so pay attention that they get + +52 +00:04:12,000 --> 00:04:18,000 +a D from the parameter and after that I concatenate my parameter with a cycle query string. + +53 +00:04:19,000 --> 00:04:26,000 +This is not good because this allows me so that stateless you can extract data from the database without + +54 +00:04:26,000 --> 00:04:34,000 +proper authorization like you saw example was union sensitive data may be easily exposed by the way + +55 +00:04:34,000 --> 00:04:38,000 +you can one alone SQL better feel free to watch my sequel course. + +56 +00:04:39,000 --> 00:04:44,000 +Most of SQL injection vulnerabilities arise which is aware clause of select query. + +57 +00:04:44,000 --> 00:04:51,000 +This type of secure injection is generally well understood by experienced testers, but SQL injection + +58 +00:04:51,000 --> 00:04:58,000 +vulnerabilities can in principle occur at any location within the query and within defined query types. + +59 +00:04:58,000 --> 00:05:06,000 +The most common odds of occasions where SQL injections arise are in update statements within the queries + +60 +00:05:07,000 --> 00:05:15,000 +or is aware clause in insert statements wasn't inserted was in select statements within the table or + +61 +00:05:15,000 --> 00:05:17,000 +column name in select statement. + +62 +00:05:18,000 --> 00:05:20,000 +Was in the order my clothes. + +63 +00:05:20,000 --> 00:05:27,000 +But what would be the solution to this specific case from technical standpoint in Java and in other + +64 +00:05:27,000 --> 00:05:28,000 +languages? + +65 +00:05:28,000 --> 00:05:33,000 +Do you have a solution to create prepared statements instead of statements? + +66 +00:05:33,000 --> 00:05:34,000 +Prepared statements. + +67 +00:05:34,000 --> 00:05:37,000 +Help us with cases like this. + +68 +00:05:37,000 --> 00:05:39,000 +Let me show you the solution. + +69 +00:05:39,000 --> 00:05:40,000 +I open. + +70 +00:05:40,000 --> 00:05:47,000 +So let's find a solution package with the scope SQL injection demo solution so that you can find almost + +71 +00:05:47,000 --> 00:05:50,000 +a similar code with only one small difference. + +72 +00:05:51,000 --> 00:05:55,000 +As you can see here, I called prepare statement massive. + +73 +00:05:55,000 --> 00:06:00,000 +Instead of create statements, feel free to check my GBC course. + +74 +00:06:00,000 --> 00:06:04,000 +I have a lot of assets available to view tools examples of these APIs. + +75 +00:06:05,000 --> 00:06:12,000 +Prepared statement said The amount of arguments I can cost is a query and here costs only add value. + +76 +00:06:13,000 --> 00:06:13,000 +That's it. + +77 +00:06:14,000 --> 00:06:16,000 +No sequel query concatenation. + +78 +00:06:16,000 --> 00:06:18,000 +The rest of the court is pretty similar. + +79 +00:06:19,000 --> 00:06:25,000 +Again, this is nonetheless large Adebisi because I covered the uses of using should you be seen my + +80 +00:06:25,000 --> 00:06:26,000 +course. + +81 +00:06:26,000 --> 00:06:29,000 +This is a lesson about design solutions on architecture. + +82 +00:06:30,000 --> 00:06:37,000 +In case you don't use GBC, whether you use any GPA implementation, you can see that you are safe and + +83 +00:06:37,000 --> 00:06:39,000 +sequel injections are not a threat for you anymore. + +84 +00:06:40,000 --> 00:06:42,000 +This is a common misconception. + +85 +00:06:42,000 --> 00:06:51,000 +GP and ASA or AMS relieves us from creating hands recorded SQL statements, but they won't prevent us + +86 +00:06:51,000 --> 00:06:56,000 +from writing vulnerable code, even despite using GP implementation in Java. + +87 +00:06:56,000 --> 00:07:02,000 +Applications is very popular, but it is not always the case and they should use a solution. + +88 +00:07:02,000 --> 00:07:09,000 +Was busy because in my opinion it is more easy to understand, especially during the learning process. + +89 +00:07:09,000 --> 00:07:15,000 +Let me open browser now in browser I will adjust our last query a little bit. + +90 +00:07:15,000 --> 00:07:17,000 +Taking the account we are. + +91 +00:07:17,000 --> 00:07:18,000 +So it was a solution. + +92 +00:07:19,000 --> 00:07:21,000 +I will add solution to the euro. + +93 +00:07:22,000 --> 00:07:23,000 +Let's execute it. + +94 +00:07:23,000 --> 00:07:27,000 +And here you can see is of course a was union is discarded. + +95 +00:07:28,000 --> 00:07:34,000 +It doesn't impact our results and I can see only formation that I am allowed to see. + +96 +00:07:35,000 --> 00:07:39,000 +Here's how we prevent SQL injection in our online store. + +97 +00:07:39,000 --> 00:07:44,000 +Feel free to check our assistance module and explore our implementations. + +98 +00:07:44,000 --> 00:07:50,000 +I used the only purpose statements to secure our app from such threat as sequel injections. + +99 +00:07:51,000 --> 00:07:53,000 +Let's review now another attack scenario. + +100 +00:07:54,000 --> 00:08:02,000 +Scenario number two in case our application doesn't use or enforce to ask for all pages attack, it + +101 +00:08:02,000 --> 00:08:03,000 +can take advantage of this. + +102 +00:08:04,000 --> 00:08:09,000 +First of all, what is DHL's transport layer security? + +103 +00:08:10,000 --> 00:08:17,000 +The successor of the now deprecated secure sockets layer SSL is a cryptographic protocol designed to + +104 +00:08:17,000 --> 00:08:21,000 +provide communication security over a computer network. + +105 +00:08:21,000 --> 00:08:28,000 +The protocol is widely used in applications such as email, instant messaging and voice over IP. + +106 +00:08:28,000 --> 00:08:37,000 +But its use in security remains the most public and reasonable transport layer of security, or US is + +107 +00:08:37,000 --> 00:08:38,000 +widely adopted. + +108 +00:08:38,000 --> 00:08:45,000 +Security Protocol designed to facilitate privacy and data security for communications over the ease + +109 +00:08:45,000 --> 00:08:49,000 +that a primary use of the US is encryption. + +110 +00:08:49,000 --> 00:08:55,000 +The communication between web applications and service, such as web browsers and a website. + +111 +00:08:56,000 --> 00:08:59,000 +What is the difference between to us and SSL? + +112 +00:09:00,000 --> 00:09:07,000 +Two or less evolved from a previous encryption protocol called Secure Sockets Layer, which was developed + +113 +00:09:07,000 --> 00:09:14,000 +by Netscape DNS Version one action that began development as SSL version 3.1. + +114 +00:09:14,000 --> 00:09:21,000 +But the name of the protocol was changed before publication in order to indicate that it was no longer + +115 +00:09:21,000 --> 00:09:22,000 +associated with Netscape. + +116 +00:09:23,000 --> 00:09:28,000 +Because of this history, the terms teams and SSL are sometimes used interchangeably. + +117 +00:09:29,000 --> 00:09:33,000 +There are three main components to what the tumor's US protocol accomplishes. + +118 +00:09:34,000 --> 00:09:37,000 +Encryption, authentication and integrity. + +119 +00:09:38,000 --> 00:09:42,000 +Encryption hides the data being transferred from third parties. + +120 +00:09:43,000 --> 00:09:49,000 +Authentication ensures that the parties exchanging information are who they claim to be. + +121 +00:09:50,000 --> 00:09:55,000 +Integrity verifies that the data has not been forged or tampered with. + +122 +00:09:56,000 --> 00:10:03,000 +So without using a few as an attack, it can monitor network traffic, for example, at an insecure + +123 +00:10:03,000 --> 00:10:09,000 +wireless network, intercepts requests and steals a user's session cookie. + +124 +00:10:09,000 --> 00:10:18,000 +The attackers place this cookie and hijacks the user's authenticated session, accessing or modifying + +125 +00:10:18,000 --> 00:10:25,000 +the user's private data instead of they both zig with all the old trials or the data, for example, + +126 +00:10:26,000 --> 00:10:27,000 +recipient of money transfer. + +127 +00:10:28,000 --> 00:10:33,000 +Let me show you how the configuration appears on the Tomcat Map server. + +128 +00:10:34,000 --> 00:10:41,000 +So to enable to in your Tomcat, please navigate to the Tomcat folder and finds the Icons folder. + +129 +00:10:42,000 --> 00:10:50,000 +If you remember, the folder contains all configuration files so you can find seven example file. + +130 +00:10:50,000 --> 00:10:58,000 +Open it, search through the file to find the connector that you're going to find different command + +131 +00:10:58,000 --> 00:11:03,000 +attacks so you can make a compilation of different ways how to configure connect. + +132 +00:11:04,000 --> 00:11:10,000 +We need to command our default to be connected and instead of default. + +133 +00:11:10,000 --> 00:11:18,000 +One less uncommon is that once it describes configuration for SSL, basically you can use this configuration + +134 +00:11:18,000 --> 00:11:22,000 +or here I prepared the custom configuration for two of us. + +135 +00:11:23,000 --> 00:11:28,000 +Feel free to present course in the region and we write it in most cases. + +136 +00:11:28,000 --> 00:11:31,000 +I use certificates to use the file in the mute. + +137 +00:11:31,000 --> 00:11:39,000 +I'm going to show you how to configure it there tensions that I also made some minor changes I changed + +138 +00:11:39,000 --> 00:11:45,000 +port number by default tomcat uses here port number 84 for G suite. + +139 +00:11:45,000 --> 00:11:50,000 +But I am going to use default issue TPS, which is 443. + +140 +00:11:51,000 --> 00:11:54,000 +Also I left here command and also configuration for this connection. + +141 +00:11:55,000 --> 00:12:01,000 +This is important because unfortunately I want to be able to contribute trusted certificates locally + +142 +00:12:02,000 --> 00:12:08,000 +because basically you can't make a self signed SSL certificate that is trusted. + +143 +00:12:09,000 --> 00:12:14,000 +But when you will have the domain registered, you can get free SSL certificate. + +144 +00:12:14,000 --> 00:12:15,000 +So is that a trusted? + +145 +00:12:16,000 --> 00:12:17,000 +You can Google different services. + +146 +00:12:18,000 --> 00:12:21,000 +For example, there is SSL for free service. + +147 +00:12:21,000 --> 00:12:28,000 +It provides free SSL certificates, but for the job there are also different paid services. + +148 +00:12:28,000 --> 00:12:35,000 +But in general, if you try to generate free SSL certificate here and follow single steps to confirm + +149 +00:12:35,000 --> 00:12:37,000 +the main, you should be good. + +150 +00:12:38,000 --> 00:12:41,000 +Basically, all steps here are easy to understand. + +151 +00:12:42,000 --> 00:12:44,000 +You shouldn't have any problem with that. + +152 +00:12:45,000 --> 00:12:51,000 +But for the sake of the demo, we can generate our Galaxy store and use it as a certificate to generate + +153 +00:12:51,000 --> 00:12:55,000 +key store content and types of foreign commands. + +154 +00:12:56,000 --> 00:13:08,000 +Key to Genki Unless you can specify any of the key algorithm errors C, Q store and name of our key + +155 +00:13:08,000 --> 00:13:17,000 +store in this case test j cas q size Q2 was a program in indicates it generates key tools for us. + +156 +00:13:18,000 --> 00:13:23,000 +After executing this command, you will first be prompted for the key store password. + +157 +00:13:23,000 --> 00:13:30,000 +Next, you will be prompted for general information about this certificate such as company contacts. + +158 +00:13:30,000 --> 00:13:31,000 +Name a song. + +159 +00:13:31,000 --> 00:13:37,000 +This information will be displayed to users who attempt to access a secure page in your application. + +160 +00:13:38,000 --> 00:13:43,000 +So make sure that the information provided matches what they will expect. + +161 +00:13:44,000 --> 00:13:46,000 +Was Jackass generated. + +162 +00:13:46,000 --> 00:13:50,000 +Let's use this name in our server x-mode configuration file. + +163 +00:13:51,000 --> 00:13:58,000 +Once we are done with all of these configurations, let's surround our Tomcat server and navigate as + +164 +00:13:58,000 --> 00:13:58,000 +a new folder. + +165 +00:13:59,000 --> 00:14:02,000 +I open terminal and I run startup bots. + +166 +00:14:03,000 --> 00:14:09,000 +And again, if you're not familiar with Tomcat Server, I have separate lessons of this called Web servers. + +167 +00:14:10,000 --> 00:14:15,000 +And we also have a lesson where we go with my students, Tomcat Web server configurations. + +168 +00:14:15,000 --> 00:14:20,000 +So please feel free to navigate those that lesson that is in my course. + +169 +00:14:20,000 --> 00:14:21,000 +Java zero 2/1 job. + +170 +00:14:22,000 --> 00:14:28,000 +In this lesson, I will not stop on each and every detail of the Tomcat configuration because we have + +171 +00:14:28,000 --> 00:14:29,000 +another topic. + +172 +00:14:30,000 --> 00:14:38,000 +So once I started Let me opens a browser, I type HTP s and localhost. + +173 +00:14:39,000 --> 00:14:50,000 +I don't need to type port number because I come to the full support 443 in case you use a tomcat port + +174 +00:14:50,000 --> 00:14:58,000 +or any other custom course, then to free to specify it here you can see that certificate is in place, + +175 +00:14:59,000 --> 00:15:00,000 +but it is not trusted. + +176 +00:15:01,000 --> 00:15:07,000 +Most likely, if you connect the Tomcat first time with the ancient you you're going to see a warning + +177 +00:15:07,000 --> 00:15:09,000 +about not trusted certificate. + +178 +00:15:09,000 --> 00:15:14,000 +You can click at the bottom is will be located somewhere here on the. + +179 +00:15:15,000 --> 00:15:19,000 +And after that you can select option to trust the certificate. + +180 +00:15:19,000 --> 00:15:27,000 +As I said before, we can make a self signed SSL certificate as it is trusted and that will let you + +181 +00:15:27,000 --> 00:15:32,000 +share with you at least one way you can generate SSL certificate for your domain. + +182 +00:15:33,000 --> 00:15:39,000 +That's how we configure with tools and now we can reach our applications through the base protocol. + +183 +00:15:40,000 --> 00:15:42,000 +But what is actually the best protocol? + +184 +00:15:43,000 --> 00:15:47,000 +And to explain this, let me compare to us and zips. + +185 +00:15:48,000 --> 00:15:56,000 +It should be as easy the implementation of you as encryption on top of the ACP protocol, which is used + +186 +00:15:56,000 --> 00:15:59,000 +by all websites as well as some of our services. + +187 +00:16:00,000 --> 00:16:04,000 +Any website that uses AC DC is therefore important to us. + +188 +00:16:04,000 --> 00:16:13,000 +Encryption Hypertext Transfer Protocol Secure IPS is a secure version of issue to be, which is a primary + +189 +00:16:13,000 --> 00:16:18,000 +protocol used to some data between a web browser and the website issues. + +190 +00:16:19,000 --> 00:16:22,000 +Includes in order to increase security of data transfer. + +191 +00:16:23,000 --> 00:16:29,000 +This is particularly important when users transmit sensitive data, such as by logging into their bank + +192 +00:16:29,000 --> 00:16:33,000 +account, email service or health insurance provider. + +193 +00:16:34,000 --> 00:16:41,000 +So what is the difference between HTP and IPS issued IPS as encryption, authentication and integrity + +194 +00:16:41,000 --> 00:16:43,000 +to that HTP protocol? + +195 +00:16:44,000 --> 00:16:48,000 +Like we discussed when we talked about tools, let's go deeper. + +196 +00:16:48,000 --> 00:16:49,000 +What does all this mean? + +197 +00:16:50,000 --> 00:16:51,000 +Encryption. + +198 +00:16:51,000 --> 00:16:55,000 +Because HTP was originally designed as a text protocol. + +199 +00:16:55,000 --> 00:17:00,000 +It is vulnerable to eavesdropping and man in the middle attacks. + +200 +00:17:00,000 --> 00:17:09,000 +By including SSL, less encryption prevents data over the internet from being intercepted and read by + +201 +00:17:09,000 --> 00:17:10,000 +said party. + +202 +00:17:11,000 --> 00:17:19,000 +So public key cryptography and the SSL to US handshake and encrypted communications session can be securely + +203 +00:17:19,000 --> 00:17:26,000 +set up between two parties who have never met in person, for example, a web server and browser. + +204 +00:17:27,000 --> 00:17:31,000 +Whereas a creation of a shared sequence key authentication. + +205 +00:17:32,000 --> 00:17:36,000 +Unlike HTP, basic IPS includes robust authentication. + +206 +00:17:36,000 --> 00:17:44,000 +We as a as a cell to us protocol websites as a cellular certificate includes a public key that a web + +207 +00:17:44,000 --> 00:17:51,000 +browser can use to confirm the documents sent by the server, such as HTML pages have been digitally + +208 +00:17:51,000 --> 00:17:56,000 +signed by someone in possession of the corresponding private key. + +209 +00:17:56,000 --> 00:18:03,000 +If the server certificate has been signed by a publicly trusted certificate, authority usually confines + +210 +00:18:03,000 --> 00:18:07,000 +and variations c a which stands for Certificate of Sovereignty. + +211 +00:18:07,000 --> 00:18:15,000 +The browser will accept that any defined information that is a certificate has been validated by trusted + +212 +00:18:16,000 --> 00:18:18,000 +party integrity. + +213 +00:18:18,000 --> 00:18:26,000 +Each document, such as web page image a JavaScript file sensitive browser by an issue to some web server + +214 +00:18:26,000 --> 00:18:30,000 +includes a digital signature that the web browser can use. + +215 +00:18:30,000 --> 00:18:37,000 +That doesn't mean that the document has not been altered by a third party or otherwise corrupted while + +216 +00:18:37,000 --> 00:18:38,000 +in transit. + +217 +00:18:38,000 --> 00:18:42,000 +The server cocoa is a cryptographic hash of the documents. + +218 +00:18:42,000 --> 00:18:49,000 +Contents included was its digital certificate, which is a browser, an independently cultivated proof + +219 +00:18:49,000 --> 00:18:52,000 +that the documents integrity is intact. + +220 +00:18:52,000 --> 00:18:59,000 +Taken together, these guarantees of encryption, authentication and integrity make HTP is a much safer + +221 +00:18:59,000 --> 00:19:07,000 +protocol for browsing and conducting business on the VAT issued now when returns were to us and issued + +222 +00:19:07,000 --> 00:19:09,000 +to us are work good? + +223 +00:19:09,000 --> 00:19:12,000 +The precedent was a review of another attack scenario. + diff --git a/73 - OWASP Top 10 2021/004 Source-code-examples-from-the-lesson.url b/73 - OWASP Top 10 2021/004 Source-code-examples-from-the-lesson.url new file mode 100644 index 0000000000000000000000000000000000000000..0ba7979256f7aec4b0fc8efd64cdf37df17cc69c --- /dev/null +++ b/73 - OWASP Top 10 2021/004 Source-code-examples-from-the-lesson.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/tree/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/owasp/cf \ No newline at end of file diff --git a/73 - OWASP Top 10 2021/005 Source-code-examples-from-the-lesson.url b/73 - OWASP Top 10 2021/005 Source-code-examples-from-the-lesson.url new file mode 100644 index 0000000000000000000000000000000000000000..0ba7979256f7aec4b0fc8efd64cdf37df17cc69c --- /dev/null +++ b/73 - OWASP Top 10 2021/005 Source-code-examples-from-the-lesson.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/AndriiPiatakha/java-learnit-web-online-store/tree/master/online-store.web/src/main/java/com/itbulls/learnit/onlinestore/web/owasp/cf \ No newline at end of file