Client Side Coding - Part 1 - WS2023
Client Side Coding - Part 1 - WS2023
Florian Grassinger
fgrassinger@fhstp.ac.at
What is programming?
How do computers solve problems?
Programming & Problem solving
◉ The logic flow is the order in which the steps are fulfilled
◉ The steps we tell a computer to perform are completed mostly
sequential (synchronous in JS - one after another)
◉ There are steps who can be independent (asynchronous in JS)
What is an Object?
?
Image Source:
Icons
Let’s think in a more programmatic way!
Object-oriented programming (OOP)
can: lick
(clean) her
paw.
Nr. legs: 4
Nr. tail: 1
Object-oriented programming
OBJECT 1 OBJECT 3
color = brown color = white
name = simon name: minka
fur type = short OBJECT 2 fur type = normal
Color = red brown
Name = garfield
fur type = long
Class
Class:
“A class is a blueprint or prototype that defines the variables and
the methods (functions) common to all objects of a certain kind.”
Object:
“An object is a instance of a class.”
Interacting with Objects / Classes
Public Part
eat()
sleep()
meow()
swim()
bark()
Polymorphism
Image Source:
freecodecamp
Difference: Encapsulation & Abstraction
◉ There are various loops. Common ones are while and for
◉ The while loop is used when we know the end state, but not
the number of iterations
◉ The for loop is used when we know the exact number of
iterations