 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Zend Developer Zone: Managing CSS and JavaScript files within a Zend Framework App
by Chris Cornutt February 09, 2010 @ 10:48:56
On the Zend Developer Zone there's a recent tutorial from Andy Baird looking at an interesting way to manage CSS and Javascript files in a Zend Framework application. His suggestion can help tame those larger sites where multiple CSS/Javascript files can be a hassle to maintain.
Full design control usually means large, thousand plus line CSS files that equal serious pain when it comes to maintenance or building upon. If you don't namespace your selectors carefully you'll end up paying for it down the road. And heaven forbid you apply a default HTML tag styling. So, ranting aside, how do you maintain flexibility and still keep tidy CSS and JavaScript?
He's created two helpers to, well, help with the problem. They take in the path of a CSS/Javascript file and add it to either the stylesheet list or the file list to load into the header. He also includes an example of it in action, adding multiple CSS and Javascript files to the header of a sample application and echoing them back out.
voice your opinion now!
css javascript zendframework helper tutorial
Rob Allen's Blog: Determining if a ZF view helper exists
by Chris Cornutt January 14, 2010 @ 12:07:19
Rob Allen has a quick new post for you Zend Framework users out there on how to detect if a view helper even exists before you try to use it.
If you need to know whether a view helper exists before you call it, one way is to write a simple view helper to tell you. You can then use it in a view script.
The comments mention another way to do it - calling the getHelper method - but that can cause exceptions to be thrown if the helper doesn't exist. You can find more on view helpers in this section of the Zend Framework manual (or here on custom helpers).
voice your opinion now!
zendframework view helper tutorial
Phil Sturgeon's Blog: Why CodeIgniter HTML helper functions rock
by Chris Cornutt December 15, 2009 @ 08:33:27
Phil Sturgeon has a new post to his blog about something the CodeIgniter framework offers - HTML helper functions - and why they're a very happy thing.
A complaint I often hear about CodeIgniter is one about HTML helper functions like form_open(), doctype() and img(). [...] These points of view come from people who do not understanding the potential benefits of using HTML helpers - whichis fair enough as I used to think they were useless too.
He starts with two things to refute these common complains including the structure they can bring to a script (it looks cleaner) and, similarly, that they're not a violation of the MVC "no HTML outside the view" school of thought. Instead they're really helpers, providing shortcuts into these chunks of HTML to include into the view.
With this covered, he gets into the point of the article, what these helpers can do for your CodeIgniter application. He uses a specific example of the shortening of a form opening tag using the form_open function.
voice your opinion now!
codeigniter framework html helper
The Bakery: Writing an easy to use A/B test helper with CakePHP and jquery
by Chris Cornutt October 30, 2009 @ 11:57:14
In a recent post to The Bakery (the CakePHP resource) Jonathan Hendler has created a simple A/B test helper using the CakePHP framework and jQuery.
Knowing what is driving the user experience is key to the success of an application. Subtle changes in the interface can cause dramatic shifts in user behavior. Here, A/B tests display two (or more) language choices or color choices to a user (any HTML). Metrics are measured in two ways - 1) did the user click on the button at all and 2) how long did it take them to find it from the moment the page has started loading?
The helper tracks the user through the site and adds the results to a testing table (abtests). The code is included - model, component, controller, helper class and the jquery code to make it all work together. A few usage examples are also thrown in near the end.
voice your opinion now!
ab test helper cakephp framework jquery
Content with Style Blog: Quick helper script for ZF view translations
by Chris Cornutt October 29, 2009 @ 07:54:01
On the Content with Style blog today Pascal Opitz has posted a helper script for Zend Framework applications to make internationalization of your templates simpler.
Manual copy and paste jobs are a pain. Faced with the prospect of internationalizing 30+ big view files, I thought there had to be a better way. When I started to use the reg exp search facility in Textmate, the penny dropped. A helper script is what was needed.
The CLI script he's created goes through a file, in this case a view file (phtml) and does a replace on the values defined in an ini file. It's a simple one-to-one, exact match relationship but it can make it much easier to do simple translations on a large number of pages.
voice your opinion now!
zendframework translation helper script tutorial
DevShed: Building a More Capable Validation Helper Class
by Chris Cornutt August 24, 2009 @ 13:16:47
DevShed continues their series on helpers classes in PHP applications with the sixth part of the series focusing on updates to their Validation class to add additional format checks.
It would be really useful to add more methods to it to validate other things, like email and IP addresses, to mention just two examples. Thus, in the next few lines I'm going to extend the abilities of this helper class so it can be used to perform the validation processes mentioned above.
They include the code that lets you validate URLs, IP addresses and email addresses for correctness via PHP's filter_var function.
voice your opinion now!
validation helper class tutorial
DevShed: Creating a Validation Helper Class
by Chris Cornutt August 17, 2009 @ 15:10:31
DevShed has continued their series looking at helpers in PHP5 applications with this new tutorial about creating a simple validation helper to ensure inputted data is as it should be.
In this fifth part of the series I plan to build a class that will be responsible for validating input data, either supplied by users or from a different source. In this specific project, this validation helper will make use of the PHP filter extension to perform the pertinent checking processes, but it can be easily adapted to use custom methods as well.
Their example code sets up two methods for validating integers and floats against the values given. It uses the filter extension to run the check.
voice your opinion now!
helper class tutorial validate
DevShed: Enhancing a URL Handling Helper Class in PHP 5
by Chris Cornutt August 11, 2009 @ 08:37:47
DevShed continues their look at making helpers in PHP5 classes with this new part of the series - updating their previous URL helper to change it over to a static class.
As you'll possibly recall, all of the methods of the class were called initially inside the object context, that is dynamically, which may lead to the creation of an unnecessary instance of the helper class. So, to solve this issue quickly, in this chapter of the series I'm going to redefine the signature of the previous URL helper class by declaring all of its methods static.
Their updates involve adding the "static" keyword to each of the function definitions so they can be called like: "URLHelper::get_request_method()".
voice your opinion now!
tutorial helper class handler
DevShed: Developing a URL Handling Helper Class in PHP 5
by Chris Cornutt August 03, 2009 @ 11:03:38
DevShed has continued their series looking at helper classes in PHP5 applications with this new tutorial about building a URL class to help with parsing and manipulation.
Since it's a common practice to build helpers that manipulate URLs in different ways, in the next few lines I'm going to show you how to create a class whose main task will be dynamically generating URLs via a basic API.
Their URL helper class lets you find things like the page being calls, fetching the query data and getting the method that the page was requested as (like GET or POST).
voice your opinion now!
url helper class tutorial
|
Community Events
Don't see your event here? Let us know!
|