summaryrefslogtreecommitdiff
path: root/html/processed-views/server-client-contract.md
diff options
context:
space:
mode:
authorGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-04-17 12:12:22 +0300
committerGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-04-17 12:12:22 +0300
commit68fc9e55e538e03f94509731ab41a0c8cf96710f (patch)
tree3edb1e81864ac3eb35ba0fe8087ed24da1b812bf /html/processed-views/server-client-contract.md
parent84b2da85a1b452922dadb6a609533b9945afe51d (diff)
downloadclassroom-68fc9e55e538e03f94509731ab41a0c8cf96710f.tar.gz
classroom-68fc9e55e538e03f94509731ab41a0c8cf96710f.tar.bz2
classroom-68fc9e55e538e03f94509731ab41a0c8cf96710f.zip
setup a real server environment (apache DocumentRoot=/var/www/public)
Diffstat (limited to 'html/processed-views/server-client-contract.md')
-rw-r--r--html/processed-views/server-client-contract.md59
1 files changed, 0 insertions, 59 deletions
diff --git a/html/processed-views/server-client-contract.md b/html/processed-views/server-client-contract.md
deleted file mode 100644
index 325e6e5..0000000
--- a/html/processed-views/server-client-contract.md
+++ /dev/null
@@ -1,59 +0,0 @@
-## Server-Client contract
-
-Servers can serve content in 2 major formats: text/html and json (and links to many more content types)
-
-Clients/browsers can handle content in many more ways; they can just passive render the content or they
-can grow their proccessing and logic to become a smart engine or heavy application.
-
-These 2 factors need to cooperate smoothly. So, it is necessary to pre-define:
-- what a server serves
-- what a borwser/client procceses
-
-This contract:
-- allows development sharing in separate teams
-- sets clear rules for each development group
-- helps developing an ecosystem of reliable tools that can be reused and extended
-- helps to detect malfunctions and apply fixes and optimizations
-- makes the project manageable and scalable
-
-
----
-
-
-## The Contract
-
-A cotract is recommended to include as less as possible rules;
-
-Of course there might be page-types that need special handling; Such pages are
-
-- product pages
-
-- product categories pages
-
-
-
-### Rule #1: Default rule
-
-
-On the server side:
-
-- Server serves main content in html format; all non-user-based content is constucted and served in html format
-
-On the client side:
-
-- Client/browser requests the user-based content via ajax; (*still to be determinid the format of the replies*)
-
-
-
-### Product Pages
-
-
-apache:
-serves product -> product: { id, title, prices:{ s1:{..}, s2:{..}, ... }, images:{...} }
-
-browser:
-check cookie(store) = s#
--> use product.prices.s# to draw prices
-
-
----