Course Outline
I Implementation and DevelopmentMethodologies
1CodingStyles
ChoosingaStyleThatIsRightforYou
CodeFormattingandLayout
Indentation
LineLength
UsingWhitespace
SQLGuidelines
ControlFlowConstructs
NamingSymbols
ConstantsandTrulyGlobalVariables
Long-LivedVariables
TemporaryVariables
MultiwordNames
FunctionNames
ClassNames
MethodNames
NamingConsistency
MatchingVariableNamestoSchemaNames
AvoidingConfusingCode
AvoidingUsingOpenTags
AvoidingUsingechotoConstructHTML
UsingParenthesesJudiciously
Documentation
InlineComments
APIDocumentation
2Object-Oriented ProgrammingThrough Design Patterns
IntroductiontoOOProgramming
Inheritance
Encapsulation
Static(orClass)AttributesandMethods
SpecialMethods
ABriefIntroductiontoDesignPatterns
TheAdaptorPattern
TheTemplatePattern
Polymorphism
InterfacesandTypeHints
TheFactoryPattern
TheSingletonPattern
Overloading
SPL
call()
autoload()
3Error Handling
HandlingErrors
DisplayingErrors
LoggingErrors
IgnoringErrors
ActingOnErrors
HandlingExternalErrors
Exceptions
UsingExceptionHierarchies
ATypedExceptionsExample
CascadingExceptions
HandlingConstructorFailure
InstallingaTop-LevelExceptionHandler
DataValidation
WhentoUseExceptions
4Implementingwith PHP: StandaloneScripts
IntroductiontothePHPCommand-LineInterface(CLI)
HandlingInput/Output(I/O)
ParsingCommand-LineArguments
CreatingandManagingChildProcesses
ClosingSharedResources
SharingVariables
CleaningUpAfterChildren
Signals
WritingDaemons
ChangingtheWorkingDirectory
GivingUpPrivileges
GuaranteeingExclusivity
5Designinga Good API
DesignforRefactoringandExtensibility
EncapsulatingLogicinFunctions
KeepingClassesandFunctionsSimple
Namespacing
ReducingCoupling
DefensiveCoding
EstablishingStandardConventions
UsingSanitizationTechniques
II Caching
6External PerformanceTunings
Language-LevelTunings
CompilerCaches
Optimizers
HTTPAccelerators
ReverseProxies
OperatingSystemTuningforHighPerformance
ProxyCaches
Cache-FriendlyPHPApplications
ContentCompression
7Data ComponentCaching
CachingIssues
RecognizingCacheableDataComponents
ChoosingtheRightStrategy:Hand-Madeor PrefabClasses
OutputBuffering
In-MemoryCaching
Flat-FileCaches
CacheSizeMaintenance
CacheConcurrencyandCoherency
DBM-BasedCaching
CacheConcurrencyandCoherency
CacheInvalidationandManagement
SharedMemoryCaching
Cookie-BasedCaching
CacheSizeMaintenance
CacheConcurrencyandCoherency
IntegratingCachingintoApplicationCode
CachingHomePages
UsingApache’smod_rewriteforSmarterCaching
CachingPartofaPage
ImplementingaQueryCache
8Computational Reuse
IntroductionbyExample:FibonacciSequences
CachingReusedDataInsideaRequest
CachingReusedDataBetweenRequests
ComputationalReuseInsidePHP
III DistributedApplications
9Interactingwith Databases
UnderstandingHowDatabasesandQueriesWork
QueryIntrospectionwithEXPLAIN
FindingQueriestoProfile
DatabaseAccessPatterns
AdHocQueries
TheActiveRecordPattern
TheMapperPattern
TheIntegratedMapperPattern
TuningDatabaseAccess
Limitingthe ResultSet
LazyInitialization
10User Authentication and Session Security
SimpleAuthenticationSchemes
HTTPBasicAuthentication
QueryStringMunging
Cookies
RegisteringUsers
ProtectingPasswords
ProtectingPasswordsAgainstSocialEngineering
MaintainingAuthentication:EnsuringThatYou
AreStill TalkingtotheSamePerson
CheckingThat$_SERVER[REMOTE_IP]StaystheSame
EnsuringThat$_SERVER[‘USER_AGENT’]StaystheSame
UsingUnencryptedCookies
ThingsYouShouldDo
ASampleAuthenticationImplementation
SingleSignon
ASingleSignonImplementation
11Session Handling
Client-SideSessions
ImplementingSessionsviaCookies
BuildingaSlightlyBetterMousetrap
Server-SideSessions
TrackingtheSessionID
ABriefIntroductiontoPHPSessions
CustomSessionHandlerMethods
GarbageCollection
ChoosingBetweenClient-SideandServer-SideSessions
12Buildinga Distributed Environment
WhatIsaCluster?
ClusteringDesignEssentials
PlanningtoFail
WorkingandPlayingWellwithOthers
DistributingContentto YourCluster
ScalingHorizontally
SpecializedClusters
CachinginaDistributedEnvironment
CentralizedCaches
FullyDecentralizedCachesUsingSpread
ScalingDatabases
WritingApplicationsto UseMaster/SlaveSetups
AlternativestoReplication
AlternativestoRDBMSSystems
13RPC: Interactingwith RemoteServices
XML-RPC
BuildingaServer:ImplementingtheMetaWeblogAPI
Auto-DiscoveryofXML-RPCServices
SOAP
WSDL
Rewritingsystem.loadasaSOAPService
AmazonWebServicesandComplexTypes
GeneratingProxyCode
SOAPandXML-RPCCompared
FurtherReading
SOAP
XML-RPC
WebLogging
PubliclyAvailableWebServices