Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- To take
- a common example that will be familiar to PHP developers, before using input from an
- online form, you need to make sure it doesn’t contain anything that could be used to sab-otage your database or relay spam. The procedural approach looks at the specific project,
- and writes tailor-made code, usually a series of conditional statements designed to check
- each input field in turn
- ...
- OOP looks at programming in a more generic way. Instead of asking “How do I validate this
- form?” the object-oriented approach is to ask “How do I validate any form?” It does so by
- identifying common tasks and creating generic functions (or methods, as they’re called in
- OOP) to handle them.
Add Comment
Please, Sign In to add comment