 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Rob Allen's Blog: A form in your layout
by Chris Cornutt October 11, 2010 @ 12:11:07
If you've ever wanted to have a form that stuck with every page of your Zend Framework application, Rob Allen might just have your solution in his latest blog post.
I recently received an email asking for my advice about how to handle a form that appears on every page. I want to add a newsletter sign up box to layout.phtml so it will appear on every page. The layout->content() comes from several different action controllers... So how do I handle the newsletter sign up? I thought that the answer is long-winded enough to be worth writing a blog post about. One way to do this is to use a action helper, so let's build a simple application to show this solution.
He walks you through the creation of the simplest part first - the form that will live inside of the view helper. He chose a signup type of form with a username, email and submit button. He helps you create an action helper and the view helpers to help inject the form into the layout of each page. Then, with a simple call to "$this->signupForm()" you can drop it in anywhere in the layout.
voice your opinion now!
form layout zendframework tutorial viewhelper actionhelper
Bas de Nooijer's Blog: Controlling Varnish ESI inside your application
by Chris Cornutt July 16, 2010 @ 08:50:57
As is mentioned on the Zend Developer Zone, there's a new post from Bas de Nooijer about a cool feature of Varnish - Edge Side Includes - and how you can control them.
For me one of the best features of Varnish is ESI (Edge Side Includes). It allows you to combine elements with different lifetimes into a single page. This way you don't need to regenerate a complete page as soon as a news listing somewhere on the page changes. And you can still cache pages while displaying user-specific information somewhere on the page. This lowers the load on your application even further and it can also help in simplifying your application, by focussing purely on the content of the page and loading all other elements via ESI.
He talks about the upsides and downsides to using the technique and what to avoid when implementing it in your Varnish config. One solution to the problem is sending an ESI "marker" to tell Varnish that a certain bit of content needs to be updated. He shows how to put it to use with a Zend Framework view helper that adds a special "esi" tag to the page when the content for a URL needs to be updated.
voice your opinion now!
varnish caching edgesideincludes zendframework viewhelper
Brandon Savage's Blog: Making Zend_Navigation Useful
by Chris Cornutt March 31, 2010 @ 09:18:23
As a follow-up to his previous post on Zend_Navigation Brandon Savage takes a look at how to make it more useful by using some of the methods that come bundled with the component.
This is certainly wonderful and exciting, but the reality is that for the most part, Zend_Navigation is a pretty useless component of Zend Framework until you have a way to get the data out of the structure you've built. And since navigation is a component of most people's views, we have a view helper to give us the tools we need.
This view helper, "navigation", gives you some interesting functionality including what he illustrates - fineOneBy, htmlify, building breadcrumbs, menu generation and a way to finally render the menu as output. You can see more of the options/methods in the Zend Framework manual for the helper.
voice your opinion now!
zendnavigation tutorial viewhelper zendframework
Padraic Brady's Blog: Complex Web Pages with the Zend Framework?
by Chris Cornutt April 03, 2008 @ 12:04:13
On his blog, Padraic Brady talks about the creation of custom web pages (in the Zend Framework) with the help of the Zend_View enhancements that have been introduced lately.
With the inclusion of Zend_View Enhanced as first documented, discussed and publicized in this blog series, in the Zend Framework as of 1.5.0 I'd like to thank everyone involved in the process. [...] The main problem of a complex View, is that the current Controller is only aware of a subset of its own required Model (data) and the current View. So how do do you get the View to include extra sections - for example, details from Technorati for your blog - which are common to ALL pages?
Normally, a call to _forward() would have been the norm, but this was more often overly complex for what the developer wanted to do. The new Composite View and View Helpers seem to be the remedy. They make it simpler to grab that information and pull it in without the need to make a whole other framework request to do so.
voice your opinion now!
zendframework complex page compositeview viewhelper zendview
|
Community Events
Don't see your event here? Let us know!
|