• 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/56

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;

56 Cards in this Set

  • Front
  • Back

What is a software design pattern?

It's a general, reusable solution for commonly occurring problems within a given context in software design




Its a description/ template for how to solve a problem that can be used in many different solutions

What isn't software design design pattern?

Its not a finished design that can be transformed directly into code

What do OO design patterns show?

They show relationships and interactions between classes and objects without specifying the final application classes or objects involved

What are the two types of OO patterns?

High level patterns which are architectural, large in scope and describe an overall system




object oriented patterns which are not as applicable in functional programming languages

What are the different patterns php developers use?

Container, observer and factory



What does the web application architecture consist of?

Three components: Client which stores the browser




Web server which stores the presentation layer, business layer, data layer




Cross cutting

What sort of design considerations should be made when designing a program?

Consideration of:


Use of caching, logging and instrumentation, authenticating users across trust boundaries, how application will be partitioned logically

What does the MVC pattern do?

Separates data handling from the user interface by diving the user interface into input and output processes

What does each part of the MVC do? MODEL, VIEW, CONTROLLER

MODEL - Encapsulates core application data and functionality


VIEW - obtains data from the model and presents it to the user


CONTROLLER- receives + translates input

What two ways can the model be considered?

Active & passive

What does the active model do?

It allows the model to inform the view and controller components of any required changes

What does the passive model do?

Allows the objects used to be completely unaware they are part of a larger application




Allows the controller to inform the view when the result of a process in the model requires the view to be updated

What cycle does the Passive model reflect well?

HTTP Request / Response cycle

What is a third variation of the active and passive models known as?

The presentation / application model

What does the presentation model entail?

it involves the data or behaviours that would usually be considered part of the view to be presented within the model

What is the relationship between the view and controller ?

They are responsible for creating and selecting views but when only one is responsible this is known as Application controller pattern

Why is the Application controller pattern named what it is?

Because the object is controlling the flow of the application

What is the relationship between the model and the view ?

this is also a close relationship as changes to the model require the view to be updated as well

What are disadvantages of the MVC pattern?

1) possible increased complexity


2) it's virtually impossible to have a 100% MVC compliant application


3) it can be difficult to decide what component should go where


4) as long as rules of basic separation between sections are followed a application can be considered well structured - false

What is seperation of concerns

A design principle for separating programs into sections, each section addressing a separate concern

What is a conern in terms of SOC?

A concern is a set of information that could affect the code of a computer - something as specific as the name of the class to instantiate

What is the name given to a program that embodies SOC well?

A modular program

How is a modular program achieved?

By encapsulating information inside a section of code that has a well defined interface

Where can the bootstrap.php file be found and what does it do?

It can be found in index.php and its roles are :


1) load the environment of the script


2) create definitions


3) call the router

What are the stages of auto loading?

When code calls for a class to be instantiated, php looks for a class definition, if it can't find one


1) the autoload function is called and


2) the name of the required class is passed as a parameter and


3) the function finds the class definition file, includes it and instantiates the class

What is the router class responsible for?

Instantiating the correct controller class and each feature has a controller class

What is the config class responsible for?

Storing the configuration values that will be used throughout the application eg name of application, database connection deets

What else could be stored in configuration class?

Storage of actual data as data is now user configurable

What can help to design the file structure?

File relationship diagrams

How does one maintain the security of file structure?

Ensuring all files served across the internet are docroot

What is not displayed to user by mail programs and what is?

The sender address is hidden from the user and the header of the sender address is displayed



What is the sender address used for?

Used during transport of message from one mail server to another and as a return path ; to return a message to sender in case of delivery failure

What happens if to: address is valid?

Recipient can press reply to send mail to the address in the from header

What happens if to address is invalid?

the email will be bounced back to the address specified in the envelope from header

What is an example of a more sophisticated mail library than php mail function?

PEARL mail

What does SPF stand for ad what does it do?

Sender Policy framework attempts to authenticate an email to spam filters and prevent sender address forgery



How does SPF work?

Adding the SPF record to the DNS domain of the sender containing the policy of the server. The recieveing mail server can then check if the SPF record exists and matches with the policy stated on the DNS record

What is a pdo?

PHP data object is an extenstion that defines a lightweight, consistent interface for standardised access to databases

Assuming there are no problems with a database wrapper class what happens ?

A handle to the new data object is stored in a class variable to be later used within the class methods

Is it true or false that pictures are stored in the database?

it is false, pictures aren't stored in the database unless for security reasons. Only the link to their location is stored

What are the three things an OO paradigm consists of?

OOA - Object orientatedanalysis


OOD- Object orientateddesign


OOP - Object orientated programing

What is the cornerstone of Object orientated?

Polymorphism - the ability to treat objects with differences in behaviour in a uniform way




In php - objects are reusable with different parameters

What is Presentation and Business logic? How are they a benefit to OO?

Presentation logic - is the code that generates output of HTML pages to be sent to the browser




Business Logic - is the data access and manipulation.




They are a benefit as they can be readily separated

What is the idea of encapsulation and inheritance in PHP?

Encapsulation - Idea an object knows itself in terms of its values and behaviours




Inheritance - idea an object may inherit the values and behaviours of another object

What was the main reason for development of OO?

To better model the real world, which is the ultimate aim of all good software



What is Object orientated?

The use of class and allied diagrams eg UML package to create a system of reusable, intercommunicating objects

What should be achievable from the use of OO?

To rapidly create new and better understood software implementations

What are the SOLID principles?

S - Single Responsibility principle


O - Open close principle


L -Liskov substitution principle


I - Interface segregation principle


D - Dependency Inversion Principle

What isInterface segregation principle ?

"Many client specific interfaces are better than one general purpose interface"

What is the Dependency Inversion Principle?

One should "depend on abstraction not upon connections "

If a class constructor exists and parameters are passed for processing what is returned?

The constructor returns a pointer to the object which should be stored in the object identifier

What keyword is used to access an objects attributes accessor methods?

$this and the arrow operator ->

PHP Attributes have visibility similar to Java access modifiers what are they ?

Private, public and Protected

What are examples of Private, public and Protected when building an object in Php?

Private -attributes are isolated from other php code and only visible in the current class


Public- Methods are made public


Protected - variables / functions that can be inherited by all child classes that extend the current but not objects



What does retrieving the value from the class with a get method allow?

Allows the output to be created in alternative ways eg sending the content of an email

How is a class file made available to the program file?

with the include or require command:




Require_once 'Class.name.php'.