Making Frameworks Suck Lessterry chayInternational PHP Conference, Berlin2009-05-26T09:00+200
Roadmap Introduction
Where I’m coming from
Terry Chay goes to Zendcon
Not about making frameworks suck less…so much as why frameworks suck.
PHP Coding Web Development OOPEngine- What are differences between PHP4 and PHP5?- How does PHP4 handle objects strangely?-- How does PHP5 fix this-- Name an interesting PHP quirk you came across in your last project?- How are defines different from variables?-- Faster?-- Better?- How does the Zend Engine work (basically)? (Or explain the what a JVM is__-- How does code caching work?-- Why is Java and dotNet faster than PHP ever will be?-- how is javac different than gcc?settings- What is "safe mode"?- How do you code around "magic_quotes_gpc=on"?- What is PEAR?-- How do you install a PEAR library-- How does PEAR handle errors?- What is a PHP extension?-- Why extensions at all? what are the advantages of extensions-- what are the disadvantages of extensions?-- How do you compile extensions?-- Where repositories for extensions?…
g11n- What is the difference between i18n and l10n?- How would you solve that architecturally?- How does PHP deal with it?- What are some pitfalls to avoid in character handling?SQL injection- what is an SQL injection attack?-- How do you fix it? (three ways)-- Which one would you do?-- How do you create a security audit point?OTHER ATTACKS- what is session fixation- what is XSS- what is XSRF-- Can you give an example about XSRF to determine login state on a remote site?Philosophy- What does "filter-input escape output" mean?-- example of filter?-- example of escape?-- what is "magic quotes" and why is it bad?HTML/CSS- Example of browser rendering quirk?-- Workaround?- Box model?…
- What is a design pattern?-- why is it not an algorithm?-- why use patterns at all?-- Example-- what is a "consequence" mean?-- consequences of the pattern-- what is "is a" relationship?-- How does that relate to design patterns?- How is HTML templating MVC?-- how is not like MVC?- Name a principle of package reuse?- Strengths and weaknesses of frameworks?- In design define-- poor design example: (rigidity, fragility, immobility, viscosity, needles complexity, needless repetition, opacity)-- Single Responsibility Principle?-- Open-Close Principle?-- Liskov Substitution Principle?-- Dependency-Inversion Principle?-- Interface Segregation Principle?- Principle of Package reuse-- Release-Reuse Equivalenc?-- Common Closure Principle?-- Common Reuse Principle?-- Acyclic Dependencies Principle?-- Stable Dependencies Principle?-- Stable Abstractions Principle?- HTTP protocol- what is the difference between post and get?-- name some HTTP headers?- areas of race conditions in PHP?…
Roadmap Challenges and Choices
ChoicesWriting software is about MAKING CHOICES
?!
What is adesign pattern?
Has a name
Solves a problem
Independent of code that implements it
Has consequences
breadcrumbs
tabs
Pareto Principle
Pareto Principle
Ruby on Rails (Frameworks)
graph of rock and hard placetext: rock, hard place, “here is ruby”
The Database
Ahmdahl’s law and abstraction (Premature Optimization)
Database Scalability (“Moore’s Law” punt, vs. master-slave, vs. vertical vs. horizontal
Independence vs. Portability
Roadmap Where Frameworks Rock
Toy Sites
“Enterprise”
Standardization
RAD
Roadmap Where PHP Rocks
Must keep with PHP’s
easy
simple
direct
ugly
BrayismTim Bray of Sun on developing in PHP…
BrayismTim Bray
Glue
Originally 3 tier
Now glue: client, db, memcache, smtp (virality), http services (REST, XMLRPC, SOAP), http scraping, UDP logging, other long-lived services (search, map reduce, message q, cometd)
Roadmap Examples of Good Framework Design
Solves errors
Design patterns solve errors in design
Other stuff
configuration, registry
caching (memcache = L2)
where? readthrough, output, db
publish-subscribe (inversion of control, AQS)
i18n/l10n
A-B testing, analytics, loggin
Roadmap Challenges and Choices in PHP
graph of 40%
60%
40%
use PHP don’t use PHP
PHPgraph of rock and hard place
Bind lightly
Loose couplingLoosly coupling graph with various services
mention cometmention map-reducemntion searchmention social-graph
Play nice
Story of memcache
Java patterns
Java and Javascript language constructs
Even with Ruby (deployment)
Especially with Ruby
php strengths from shared -nothing
ruby strengths from multi-threading
cloud computing (vs. PHP hosted)
GitHub, CruiseControl, etc.
Roadmap Conclusion
Conclusion
Not “F— You!”
“Blog This!”
Appreciate Feedback…
http://terrychay.com/blog/
Image of me