News Feed
Jobs Feed
Sections




News Archive
feed this:

Robert Basic's Blog:
A Zend Framework 2 EventManager use case
October 20, 2011 @ 11:05:43

Robert Basic has a new post to his blog today with an use case for Zend Framework 2's event manager to solve a problem he has with "repetitive code" in some of his models.

Basically, this allows us to have one piece of code to trigger an event and to have one or more listeners listening to this event. When the event gets triggered, the listeners are called and then we can do *something*, like caching or logging. Logging or caching. [...] See, that's my problem. All the event examples stop at logging and caching. Truly there must be some other example for which this event stuff can be used for.

In his example code, he's used the EventManager in one of his models to add listeners to validate the post and "slugify" the post's title for use on the URL. You can find his code on github if you're interested in the full implementation.

0 comments voice your opinion now!
zendframework eventmanager usecase model listener save


PHPMaster.com:
Documentation Makes the World Go Round
October 04, 2011 @ 09:03:16

On PHPMaster.com today there's a new article emphasizing something that lots of developers forget to make a part of their process when writing code - creating useful documentation to help make your code that much clearer.

If you're writing code that will be shared with others, put yourself in their shoes. Don't let your project lose potential users, community members, and possible contributors all because of insufficient documentation.

He (Matthew Turland) suggests a few things to keep in mind as you're writing up your documentation - the content is "king" (an emphasis on good descriptions/examples/use cases), open it up to external contributions using things like wikis (or even stored in the source code repository) and a focus on technical writing skills. Even the best tools out there can suffer if there's poor or no documentation.

0 comments voice your opinion now!
documentation application code opinion content usecase example technical writing


Timothy Boronczyk's Blog:
Currying in PHP
July 10, 2009 @ 13:33:18

Timothy Boronczyk has posted about an interesting concept you could use in your applications - currying (made possible in PHP 5.3.x and above):

What happens if you don't have all the arguments handy for a function, but you want to give whatever arguments you do have now and then provide the rest of them to the function later? This is called currying, and is a core concept in functional programming. It's messy, but possible to curry functions in PHP now that closures have been added.

He starts with an example from OCaml/F# to illustrate the point and moves to a PHP example - changing a normal function that requires three parameters into one that makes it possible to only submit the parameters you'd want to use. He also includes a more "real life" example of how it could be used in array filtering.

0 comments voice your opinion now!
usecase tutorial closures currying


Brian DeShong's Blog:
Development process for PHP-based projects
July 15, 2008 @ 15:11:25

Brian DeShong has posted some of his "food for thought" on the development process that's behind the scenes of different PHP applications.

Lately I've been doing a lot of thinking on development processes and quality, specifically for large-scale, professional PHP-based projects. [...] Generally speaking, my perception is that software development shops that really care about and emphasize quality have processes that consist of things such as writing use cases, unit testing and continuous integration.

He knows how he feels about all of this, be he wants to hear back from the community. How far does quality assurance go in your group? What kind of time/funding does this involve? Leave him a comment and let him know...

0 comments voice your opinion now!
development practice project unittest usecase review quality assurance



Community Events









Don't see your event here?
Let us know!


interview example phpunit language podcast object zendframework2 api framework database development tool opinion introduction release testing unittest code community composer

All content copyright, 2013 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework