your own. An open solution means there (hopefully) is a pool of talent to hire from. There are experts in case your brightest developer is hit by a bus. A community effort means the framework is put through its paces by many, not few. Projects with proper momentum are unlikely to disappear overnight. It’s more convenient too!
system. True, but so would all new employees. It’ll pay off. What if the project bites the dust tomorrow? Then you need to maintain it yourself. That’s still not any different from what‘d be if you had your own. They all suck, we need to use it to control a submarine. Pick the one that works best and customize it.
of framework to guide users is not leveraged. Users are locked into the vendor’s way of doing things: If you want RSS, your URLs must end on “.rss” Our HTML helpers only work with PHP templates. What, you don‘t like ActiveRecord?
more expensive than) without a framework. Developers end up hacking around weaknesses or assumptions in the framework that lead to bugs and maintenance nightmares. The framework does not achieve its most fundamental mission: keeping your software fit for future demands. In the end, it does not scale in any regard.
Development wasn’t open and transparent, despite the license (and awesomeness!), and died eventually. Mojavi 3 was forked by some guys from Keller, Texas, and given the name Agavi in 2005. Because Agave plants grow in the Mojave desert. Since late 2005, Agavi is maintained by Bitextender. symfony is also based on Mojavi 3.
and other HTTP-based stuff, but you can use it to write any app. No requirements for specific template engines, DBMSes, ORMs, client side JS libraries etc. Abstraction of HTTP request method verbs, output types, response implementations etc. Form Handling is independent of libraries, template engines etc.
places, and the framework prevents common mistakes. Exposing Actions of a web application through a SOAP web service API etc. can be done in minutes. Want an RSS feed of your latest products? It’s just a new output type away. Want to return JSON for Ajax features? Have it done when a JS framework sends the right request headers!
or developer. Could be “production”, or “dev-joecool” etc. A Context represents a way of accessing the application, like “web”, “soap” or “console”. Any configuration can be specific to one or more Environment(s) and/or Context(s). → no more copying and overwriting of DB configs!
Modules. Each Module has Actions with corresponding Views and Templates, as well as various configuration files that control caching, validation and so on. Actions, which can also be nested into folders, contain application logic, make calls to Models, and have one or more Views (“Error”, “Success”, “Input” etc.) Views handle presentation, usually using Templates.
Every container has it’s own request data, response, filters etc. A normal execution is idempotent, i.e. does not affect the “outside world”. Internal forwarding can be done by returning a new Container from a View.
call the next Filter in the chain - like an Onion or a Russian Nested Doll. Features like Security or Form Handling are implemented using Filters inside Agavi. Flow can be redirected internally, response info can be modified etc; numerous possibilities.
to render; these are called Layers. Each Layer has access to the output of the previous Layers, and can define Slots - Containers with Actions that are run before rendering, returning the content. Layer and Slot definitions can be made in a configuration file; the result is a Layout. All this can be done programmatically, as well.
can have children. Callbacks can control and modify behavior on matching or when generating URLs. Routes can also set Output Types, force continuing of execution even though they matched, and much more. Also very nice for refactoring existing applications.
Can pre-populate forms using given values. Re-populates a form when an error occurred. Highlights erroneous fields and labels. Can insert error messages into the document. All without a single line of code in templates.
parts. Action-based, so a Slot that runs can be cached, too. Output can be cached on a per-layer basis, so that the outer master template always runs even when cached. Also caches cookies (with correct lifetime!), HTTP headers that were set etc. Stampede Protection included as of Agavi 0.11.3.
and HTTP Headers. Default settings mean you only have access to data you validated. Drastically reduces the possibility for dev mistakes. Validators can have dependencies (“only validate email if checkbox is on”), different severities, handle arrays, normalize values (e.g. make Unix TS from date value).
credentials, authentication status etc. Ships with plain and RBAC implementations, easily extensible. Provided implementations work with the standard getCredentials() and isSecure() methods on Actions; any other behavior, additional authentication levels etc can be implemented in a custom Security Filter.
locales of this world. Functions for translating text, formatting and parsing dates, numbers and currency values, calendar and timezone operations, locale information (e.g. list of all countries in Japanese language etc.) Parts of the functionality are ports of ICU, IBM’s Java/C library for globalization.
$latestProducts = $pfm‐>fetchLatest(): // assign it for the View $this‐>setAttribute('products', $latestProducts); // go to Products_LatestSuccessView return 'Success'; } }
eats Agaves). Was a prototype IRC bot application with an IRC Context and a Web interface. IRC Routing implementation matched patterns against incoming messages. <configuration context="irc"> <!‐‐ so someone can type "!seen Wombert" on IRC ‐‐> <route pattern="^!seen (username:\S+)$" action="LastSeen" /> </configuration> <configuration context="web"> <!‐‐ on the web, the URL is /seen/Wombert ‐‐> <route pattern="^/seen/(username:\S+)$" action="LastSeen" /> </configuration>
are available online at http://talks.wombert.de/ http://agavi.org/ is the Agavi website With Trac, Mailing Lists, PEAR Channel, Docs, ... Join the Agavi IRC channel: #agavi on irc.freenode.net