Big and Little Concepts
Created Wednesday 10 July 2024
How to get input, (safely)
How to retrieve stuff
How to save stuff
Data Storage
Database
- Separate "program" ( e.g. Different port that must be connected to)
- Another language (on one hand can be very complex, but breaks down to relatively simple text)
- Practical: With PHP, look for "PDO" (instead of 'mysqli') 'parameter binding/ aka avoiding 'little bobby tables''
- Consider a separate 'credentials' file
(Postgres)
(Sqlite)
(Sqlite)
the CRUD concept
Flat File Storage
- In PHP, file reading and saving is (necessarily) more complex
- check out "fopen/fclose etc" vs "file_get_contents"
(the former, understand what a "file handle" is)
- Consider text data types, e.g.
- check out "fopen/fclose etc" vs "file_get_contents"
(the former, understand what a "file handle" is)
- Consider text data types, e.g.
- simple lines
- csv
- XML
- json
- yaml/toml
- csv
- XML
- json
- yaml/toml
Logins
PHP - Sessions (Cookies)
Passwords: USE THE STANDARD. (password_hash)
Passwords: USE THE STANDARD. (password_hash)
Other Peoples Code (PHP)
"include" v "require" v "require_once"
Just Download/ AI generate it
Just Download/ AI generate it
(Git?)
PHP Composer
(for dependencies and libraries, package manager for php)
Javascript Concepts
Mostly "front-end"
thus, easier to test/play with.
Try e.g. JSFiddle
DOM - Document Object Model
"Objects?"
Classes (uncommon) v. "Prototypes"
Scope
In many (most?) languages, the scope of a variable is limited to its "context"
For example, if a variable is inside the definition of a function, that variable or its data is typically not accessible outside of that function
- but, javascript can be weird here MV
For example, if a variable is inside the definition of a function, that variable or its data is typically not accessible outside of that function
- but, javascript can be weird here MV
JS Frameworks
React
Angular
Ext
"Vanilla?"
Angular
Ext
"Vanilla?"
MVC: Model - View - Controller
—
"Push" "pop" "map" "reduce"
Backlinks: FSU Courses:LIS5367