 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Matthew Weier O'Phinney's Blog: Why Modules?
by Chris Cornutt May 01, 2012 @ 08:04:20
Matthew Weier O'Phinnney has a new post to his blog filling in some additional details behind a series he's been doing on modules in the Zend Framework v2 releases. In this new post he answers the question "why modules?"
I've blogged about getting started with ZF2 modules, as well as about ZF2 modules you can already use. But after fielding some questions recently, I realized I should talk about why modules are important for the ZF2 ecosystem.
He covers some of the history of the idea, starting with the MVC rework/refactor of the framework and the desire from several people to have self-contained components that could be native to a ZF app. ZFv1 made it work (kinda) with Zend_Application, but it was difficult so solving this became a main focus of ZFv2. He illustrates with a "building block" metaphor based on his current blog site (currently being refactored too).
This kind of building-block development makes your job easier as a developer - and allows you to focus on the bits and pieces that make your site unique. As such, I truly feel that modules are the most important new feature of ZF2.
voice your opinion now!
zendframework2 modules building block focus
NETTUTS.com: Don't Ignore Your WordPress Footer
by Chris Cornutt November 04, 2008 @ 07:50:47
The NETTUTS.com site recommends that you don't ignore your WordPress footer and instead enhance it with some simple HTML and CSS.
Footers are often an overlooked aspect of designing a site - when they can actually be kinda handy and informative. In this tutorial we'll go through some options you can have for your WordPress site.
They take different bits of information - archived posts, the "about" message and some links - and arrange them in a sidebar sort of format. This is then styled to work more like a footer, moving it down to the bottom of the page and laid out horizontally. The complete code for the tutorial can be dropped easily into the wp-content folder (named "WPFooter").
voice your opinion now!
wordpress tutorial footer content block css style wpfooter
Debuggable Blog: Code Insults Round 1 - Why switch blocks are dumb
by Chris Cornutt October 29, 2008 @ 08:48:28
In the first of his "I will insult your code" series, Nate Abele looks at this submitted code and points out that maybe blocks of switch/case statements aren't such a good idea after all.
The entire submission is actually two files, which together comprise a console script for interacting with a web service (the names of the entrants have been withheld to protect the identities of the guilty). Rather than examine the full entry, we're going to take a look at one part which I find comes up fairly often: switch block overkill.
The example he's talking about has a switch statement with eight different cases under it, most of them just setting two properties on the current class. Its used ot map command line parameters to their correct properties. Nate suggests a bit different method - still using switch/case but pulling the properties to be assigned from an array of options rather than hard-coding them into the evaluation.
voice your opinion now!
switch case block insult refine overkill property
Lars Strojny's Blog: NOWDOC + double quotes = HEREDOC
by Chris Cornutt April 15, 2008 @ 10:25:09
Lars Strojny has posted about a the new element that's been introduced in the PHP 5.3 branch - NOWDOC:
PHP 5.3 introduces a new syntax element, NOWDOC. If you know HEREDOC, NOWDOC is easy to understand: it is in fact HEREDOC taken literally. Whily variables are expanded in HEREDOC, in NOWDOC they are not.
NOWDOC is basically a HEREDOC except for one thing - no parsing is done inside of it, making it good for echoing out PHP code (that would otherwise need to be escaped all over).
voice your opinion now!
heredoc nowdoc parse block content
PHPRiot.com: Creating Custom Block Tags in Smarty
by Chris Cornutt February 04, 2008 @ 07:56:00
On the {H{Riot.com site today, there's a new tutorial talking about how to customize your site's Smarty templates a bit more using external plug-ins, specifically one for making those "code block" sections seen all over the web.
We will first learn how block plug-ins can be used in your templates, and then learn how to create our own. Once we know how to create a block plug-in, we will cover a practical example that will show you how block plug-ins can effectively be used in your own web sites.
The tutorial assumes that you already have Smarty installed and that you're familiar enough with it to know how to work with the plug-in system right away. They include some samples of how it can be used (a default block, formatting it with HTML) and, of course, how to integrate this (PHP code and all) into your template and push your content into it.
voice your opinion now!
custom block tag smarty plugin example tutorial
Syntux Blog: Advanced Caching Technique - Block Randomization
by Chris Cornutt August 21, 2006 @ 16:18:25
In his latest entry to the Synutx blog, Ammar Ibrahim talks about an advanced chaching technique - block randomization.
I'm currenlty working on a site where I want to improve performance of dynamic pages. One of the greatest techniques to do is to cache dynamic content and serve the generated output (HTML). It's not as easy as we all want it to be when you have all sorts of weird blocks on the page: User login area, random content, ..etc
As I had a very pleasent experience with eZ components last week, I decided to take a look at the components, but then i remembered it works on PHP5. This project is on PHP4, I had to look for an alternative and decided to use PEAR::Cache_Lite.
He gives a visual example of what he's working towards and includes some sample code (using Cache_Lite) to create the blocks of content for his site. It took a few tries to get right, but apparently, third time's the charm.
voice your opinion now!
caching technique advanced block randomize pear cache_lite caching technique advanced block randomize pear cache_lite
PHPit.net: No more spam; Akismet and PHP to the rescue!
by Chris Cornutt May 22, 2006 @ 05:57:31
If you're tired of spam comments or people flooding your PHP application with junk text and links, you'll definitely want to check out this new tutorial from PHPit.net. It looks at how to integrate the Akismet anti-spam service into your application.
I've started using Akismet myself recently, and it has completely cut down all the spam I was receiving. Normally I'd get about 700 spam comments a day on my various blogs and websites (including PHPit), but since installing Akismet I've only received four. That means that approximately 99,5% is being caught by Akismet, which is an extremely good rate, and what's even better is that Akismet hasn't caught one good spam comment (no positives). Sounds pretty good, right?
In this article you'll learn how to use the Akismet anti-spam service to prevent any spam from being added to your PHP website. Live examples and demo's are included.
To start off right, you need to know how the service works and what kind of methods you'll need to access it. They show a simple connection to the service as well as two functions to mark something as spam and to mark it as non-spam (or 'ham' as he calls it). He also links to their development page and to the WordPress plugin that performs the same action.
voice your opinion now!
spam block akismet connection positive negative spam block akismet connection positive negative
|
Community Events
Don't see your event here? Let us know!
|