Tek-X: A Framework for People who Hate Frameworks - Lithium
by Joël Perras on May 20, 2010
- 3,509 views
All web application frameworks suck....
All web application frameworks suck.
Some are too complex for the task at hand, and others don’t offer enough flexibility when your application steps outside of the confines of the ubiquitous blog tutorial. As stated by the venerable Sean Coates: “the #1 reason to avoid frameworks: you’ll spend all your time working around edge cases.”
Lithium, a new PHP 5.3+ rapid application development framework started by several CakePHP core alumnus tired of the status quo, is designed to help you get the job done, and get out of your way. Built from the ground-up to cater to people who hate frameworks, it attempts to reduce edge cases, and expose an intelligent public interface that sucks less.
We’ll take a jolly jaunt through the internals of Lithium and examine how we’re leveraging closures, late static binding and anonymous functions made available in PHP 5.3 to write a framework that Sucks Less, including our one-of-a-kind aspect-oriented inspired filter architecture, adapter-based architecture, and first-class support for non-relational datastores such as MongoDB and CouchDB.
Accessibility
Categories
Tags
More...Upload Details
Uploaded via SlideShare as Apple Keynote
Usage Rights
© All Rights Reserved
Statistics
- Favorites
- 14
- Downloads
- 82
- Comments
- 0
- Embed Views
- Views on SlideShare
- 3,270
- Total Views
- 3,509
- They’re all about knowing when and how to apply them
- Often, patterns derived from other languages make little to no sense in PHP
- Many GOF patterns were invented for Java to overcome deficiencies in the language itself
- You don’t need a dependency injection container in PHP, it’s pointless
- In languages with first-class functions (PHP as of 5.3), patterns like Command and Visitor are irrelevant
- Each individual cross-cutting concern adds more boilerplate code
- Each individual cross-cutting concern adds more boilerplate code
- Each individual cross-cutting concern adds more boilerplate code
- Each individual cross-cutting concern adds more boilerplate code
- Each individual cross-cutting concern adds more boilerplate code
- Mutable state is the source of most software defects
- Computers are good at dynamic process flows. Humans aren’t.
Handoff: Joël, talking about mutable state
- But it’s okay... because “Design Patterns” make everything okay
- A referentially transparent function is one whose return value is only dependent on input parameters
- A referentially transparent function is one whose return value is only dependent on input parameters
- A referentially transparent function is one whose return value is only dependent on input parameters
- A referentially transparent function is one whose return value is only dependent on input parameters
- A referentially transparent function is one whose return value is only dependent on input parameters
- A referentially transparent function is one whose return value is only dependent on input parameters
Handoff: Joël
- Rant about programmers vs. typists
- We don’t dumb down APIs or hide things. We just make it clear what you’re doing.
- We don’t dumb down APIs or hide things. We just make it clear what you’re doing.
- We don’t dumb down APIs or hide things. We just make it clear what you’re doing.
- *Always* the last parameter
- Any settings contained only modify behavior for the duration of the call
- Delineation between configuration state and request state
- Delineation between configuration state and request state
- Delineation between configuration state and request state
- Filter system allows class interdependencies to be pushed to the surface, instead of buried within the framework
- Filter system allows class interdependencies to be pushed to the surface, instead of buried within the framework
- Filter system allows class interdependencies to be pushed to the surface, instead of buried within the framework
- Filter system allows class interdependencies to be pushed to the surface, instead of buried within the framework
- Bypasses the entire framework request cycle
- Relies on native language constructs, no micro-syntax
- Relies on native language constructs, no micro-syntax
- Explain about SQL operators being translated to Mongo commands
- Helps transitioning from relational DBs to Mongo
- Aids in developing cross-functional plugins
Everything works because of the magical Query API
- PDO abstraction layer with support for many RDBMS systems
- Accessed through the same Model API as standard Lithium backends