Working on 1_WebApplicationDevelopment.md

jason.zhu 2021-05-11 09:45:44 +10:00
parent 348b5d66bb
commit b4eff1571e
2 changed files with 15 additions and 3 deletions

@ -21,8 +21,9 @@ Client-Server Model distributes processing btw:
* Static web page: do not change for all requests.
* Before HTML5, `.html/.htm` files are static web pages.
* Dynamic web page:
*
* Dynamic web page: can change its look everytime requested.
* some file extension related to dynamic web page e.g. `.php` (hypertext preprocessor), `.jsp` (java server page).
* Dynamic web pages are processed by both a *web server* and an *app server*, or *db server*
![Processing cycle of a static Web page](imgs/493603_1_En_1_Fig2_HTML.jpg)
Processing cycle of a static Web page:
@ -96,4 +97,15 @@ Events are things that happened
* e.g. .NET Page class raises a **Load** event every time client reload web page.
* Events can be static or non-static for different class.
#### 1.4.5 Encapsulation
#### 1.4.5 Encapsulation
**Encapsulation** refers to two notions (concepts):
* A class's properties & methods are bundle together and treated as a single unit
* A class's properties & methods cannot be directly accessed by code outside of the class.
Access restriction (enfored when declaring):
* **private**: only accessed by code within the obj itself
* **protected**: accessed by code within the obj itself and child class objs.
* **public**: accessed by code in other class.