• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/31

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

31 Cards in this Set

  • Front
  • Back
Web Form Attributes
method - get or post

action - url to submit to


accept - MIME Type (deprecated in HTML5)


accept-charset - dwisott


enctype - encoding




autocomplete, name, novalidate, target

Web Form Elements
label

fieldset




input


textarea,


button,


select, option, optgroup,

Scope

3 Scopes: Global, Class and Method/Function




Hungarian Notation:

$f_ = function

$p_ = parameter


$c_ = class


$m_ = method

PHP Editors (Advantages)
Class browser

Debug tools

sFTP tools

Integrated version control


Tracing & profiling


Projects



Help files

PHP Useful Commands for Debugging
print_r()

var_dump()

var_export()

xdebug





PHP Unsual Operators
'@' - Suppress error messages

'`' (backtick) - Execute command (shell_exec)


'<<< x' HEREDOC


'<<< 'x'' NOWDOC

PHP Operator Precedence
[clone][new] -[**] - [++][--][~][@][(types)] - [instanceof] -

[!] - [*][/][%] - [+][-][.] - [<<][>>] -


[<][<=][>=][>] - [==][!=][===][!==][<>] -


[&] - [^] - [|] - [&&] - [||] - [?:]


[=][+=][-=][*=][**=][/=][.=][%=][&=][|=][^=][<<=][>>=][=>]


[and] - [xor] - [or] - [,]

PHP Types
Scalar: boolean, integer, float, string



Compound: array, object





Special: Resource, NULL

PHP Variable Names
Must start with '$'

Digits must be character, number or '_'


First digit after '$' cannot be number


Case sensitive

PHP Variable References and Variable Variables
'&' Reference to variable



'$$' Variable variable

PHP Array Keys
Strings or Integers

Strings that are integers will be converted


floats will be cast to int (losing fractional)


bool cast to int


Null cast to empty string


Arrays and objects not valid


* Duplicate keys will overwrite

PHP Conditional Statements
if ... else;

switch ... case;

PHP Control Statements
for(initialx;whilex;updatex) ...;

foreach(array as $value) ...;


foreach(array as $key => $value) ...;


while(x): ... endwhile;


do ... while(x);


goto ()

XDEBUG
Error messages

(with stack trace and variables in scope)




Generates trace files

SOLID
(S) Single responsibility principle


(O) Open/closed (extension/modification)


(L) Liskov Substitution principle


(I) Interface segregation


(D) Dependency inversion

OO in PHP

__construct()


__destruct()


$this->


private, protected, public

Patterns

Container


Factory


Observer

Web App Design - Layers

Presentation (UI, UI Process)

Business (App Facade,


Workflows, Components, Entities)


Data (


Data Access Components,


Data Helpers/Utilities,


Service Agents)

Web App Design - Cross Cutting

Security


Operational Management


Communication

Web App Design - Considerations

Partition logically


Loose coupling (abstraction)


Component communication


Reduce round trips


Caching


Logging


Avoid blocking


Authentication (across trust boundaries)


No sensitive data in plain text


Least privilege

MVC

Model


encapsulates application data and process


View


responsible for display/output of data


Controller


handles requests with calls to Model and View




(Active, Passive or Presentation models)

Agile Manifesto (2001)

Individuals & interactions


over Processes & tools


Working software


over Comprehensive documentation


Customer collaboration


over Contract negotiation


Responding to change


over Following a plan

Agile Principles (1)

Customer satisfaction, rapid delivery


Welcome changing requirements


Working software delivered frequently


Working software, measure of progress


Sustainable development pace


Close, daily cooperation

Agile Principles (2)

Face to face conversation is best


Projects built around motivated individuals


Continuous attention (excellence & design)


Simplicity (maximise work not done)


Self organising teams


Regular adaptation

Agile Tools & Techniques

Continuous integration


Automated unit testing


Pair programming


Test driven development


Design patterns


Domain driven design


Code refactoring

Feature-Driven Development

Develop overall model


Build a feature list


Plan by feature


Repeat:


Design by feature


Build by feature

FDD - Feature Milestones

Domain Walkthrough


Design


Design Inspection


Code


Code Inspection


Promote to Build

FDD - Best Practices

Domain Object Modelling


Develop by Feature


Individual Class/Code Ownership


Feature Teams


Inspections


Configuration Management


Regular Builds


Visibility of Progress and Results

ACID

Atomicity


Consistency


Isolation


Durability

PHP Database Access

PDO: PHP Data Objects


mysql & mysqli deprecated


Prepared Statements:


Prepare, Bind, Execute

Security Process

Authentication


Authorisation


Accounting