Ajax and Frontend Libraries
SUMMARY MAIN NOTES
Front-end libraries Contents
allow for: Front-end Libraries
Reactive Programming
separations of
Vue
concerns Ajax
freedom of XMLHttp Request
simplification Lifecycle and readyState changes
Fetch API
maintenance Promise API
of code Web Frameworks
Websockets
Separate style,
💡
logic and data
They follow the Use PEP8 style guide for Python
DRY principle by
https://realpython.com/python-
having a single
pep8/#maximum-line-length-and-line-
representation of
breaking
each function:
Python can also have type hints with the
reusable
typing library in the form of
components
and templates def greeting(name: str) -> str:
middleware for return name
common tasks
ORMs to
remove
boilerplate Front-end Libraries
routine Allows for separation of concerns (SoC):
separating a software in distinct section so each
Reactive
one addresses a separate “concern”.
programming is a
Ajax and Frontend Libraries 1
, declarative Allows for freedom of simplification and
programming maintenance of code
paradigm
More opportunities for module upgrade,
concerned with
reuse and independent development
data stream and
propagation of A website should be separated:
change style and presentation
e.g. Vue and business logic
React are
content i.e. the actual data
progressive
frameworks as Follows Don’t Repeat Yourself (DRY) principle,
they can be by having single representations of each piece
incrementally of knowledgeable. Done through:
adopted
reusable components and templates
Ajax is a way to
middleware to handle common tasks
make async
requests without ORMs to reduce boilerplate and improve
refreshing the code reuse
page and handling Routing as it is streamlined
them in the
Reactive library watches changes to the data
background
and refreshes the UI
A persistent
connection
between a client
and server,
💡 It only changes where the data changed
providing
bidirectional, full Reactive Programming
duplex
communication Declarative programming paradigm
channels over
concerned with data stream and the
HTTP through a
single TCP/IP propagation of change
socket connection.
Vue and React are known as progressive front-
end frameworks
They can be incrementally adopted
Ajax and Frontend Libraries 2