News Channels

Agile
C and C++
Companies
Database
Java
Media
.NET
Open Source
PHP
PHP Developer
PHP Planet
RIA
Web Services
XML

Partner Sites

Methods & Tools



SoftDevJobs.com

SoftDevLinks.com

Development Tools

Development Articles

RSS engine
provided
by Zfeeder

Contact

Software Development Planet
Software development RSS feeds: .NET, Java, PHP, C, C++, XML, RIA, databases, programming, open source, web services, agile software development, etc.

Tue, 07 Sep 2010 15:27:50 GMT
Tue, 07 Sep 2010 13:37:09 -0500

In this recent post to his blog Luc de Brouwer makes a recommendation about dereferencing your arrays - start thinking about it now even before the feature's added to the stable release!

Ever since I started programming object oriented PHP I've been using function chaining and function dereferencing. But there is another thing I'd like to be able to do that was added to the PHP trunk over 8 months ago that still hasn't made it to the current release. The function I'm referring to is array dereferencing.

The trick of dereferencing arrays is that you can pull out a value from a returned array without having to use another line of code (i.e. "foo()['a']"). His suggestion is that you start thinking that way now, but use a sort of hack function to pull it off - one that takes the array and a key and returns that value. There's other suggestions in the comments on how to do things differently though.

Tue, 07 Sep 2010 12:40:37 -0500

Aleksey Martynov has submitted a project that can come in quite handy of you do a lot of work with XML in your application - a XML serialization tool for PHP 5.3 that lets you easily translate objects into valid XML.

lexa-xml-serialization is a lightweight library for serializing PHP objects to XML like it's done in .NET. My xml serializer requires that you mark serializable properties of your classes with doc-comment annotations. The properties are not required to be public. The lettercase of annotations doesn't matter. Whitespaces are not essential. Parameters are optional: type defaults to string, xmlName defaults to the property name. Parameter values must not be enclosed in quotes. Empty brackets may be omitted.

The page on the Google Code site gives some examples of it in use as well as as "first look" tutorial about building a large, more complex XML file. If you want to try it out, head over to the download page to grab the latest.

Tue, 07 Sep 2010 11:27:55 -0500

New on ZendCasts.com this screencast helps you use the Zend Framework's Zend_Feed component to create simple RSS and Atom feeds for your application.

The screencast shows you how to create a basic controller with information for a sample blog post (title, date creates, content, etc) and a simple method to create default posts. A second controller is made to handle the feed creation and two actions are created - one for RSS and the other for Atom. The posts are then parsed and pushed out to views for displaying as feeds.

The site has more great screencasts where this came from so check out their screencasts section for ones on other topics like ZendX_JQuery, working with Zend_Log, and validation with Zend_Validate.

Tue, 07 Sep 2010 10:13:17 -0500

Padraic Brady has a new post on his blog talking about a new proposal he's made for the Zend Framework about filtering and sanitizing HTML content.

For a while now, I've been keen to build a HTML Sanitisation solution for PHP. Where else would I end up putting it other than in Zend Framework? As I've explored in past articles [1] [2], HTML Sanitisation in PHP is a very inconsistent practice. [...] Isn't it possible to create a sanitiser that is both secure by default and performs well?

He talks about his Wibble tool that's become the base of his idea for a filtering feature built into the framework. It mainly uses the PHP DOM functionality and HTML Tidy for speed and parsing and was benchmarked as performing better than the HTMLPurifier tool. If you're interested, check out his proposal for its inclusion in the Zend Framework 2.0.

Tue, 07 Sep 2010 09:56:25 -0500

Derick Rethans has continued his series on garbage collection in the PHP internals with this second post of the series with a special look at circular references. You can find the first part here.

In this second part of the three part column on the new garbage collecting mechanism in PHP 5.3, we'll dive into a solution to the problem with circular references. If we look quickly back, we found that by using code like the [first example], an in-request memory leak is created.

He goes on to briefly describe the synchronous algorithm (including a few more helpful graphs to show the flow) and how that has worked its way into the PHP garbage collection methods. He also points out that this collection can be turned off and on via the gc_enable and gc_disable functions. Keep an eye out for the next part of the series where he gets into more detail on how this is all integrated into PHP.

Tue, 07 Sep 2010 08:46:27 -0500

For those that didn't get to attend this year's CakeFest 2010, The Bakery has put together this summary of some of the things that happened and the presentations that were given.

CakeFest 2010 has come to a close. After 4 days of jam-packed talks, workshops, lightning talks and social outings, we're sad to see it finish. I'd like to thank the community for their ongoing and ever increasing support. Both for the community and for the CakeFest conference itself. Without the passionate community around CakePHP, we couldn't achieve events like CakeFest 2010.

They mention some of the sponsors that made the event possible - like Microsoft, GitHub and ActiveState - as well as some photos from the event and links to twelve of the presentations that were given over the four day event.

Tue, 07 Sep 2010 07:18:36 -0500

On the Ibuildings techPortal there's a new post with the latest episode in their DPCRadio series (as recorded at this past Dutch PHP Conference) - Melanie Rhianna Lewis' talk on web services and consumer devices.

A web service is an API provided by a site that allows a remote application to access data and use functionality without having to 'act like a web browser'. [...] The talk will describe how a web service targeted at consumer devices can be implemented. It will look at the different methods of calling remote functionality such as SOAP, XML-RPC, JSON and restful services. It will also consider the limitations of consumer devices, memory restrictions, communications bandwidth restrictions, and so on that have to be considered when designing a web service aimed at consumer devices. Finally it will have a brief look at how to make a service secure.

You can find the slides for the session here and you can either listen to the episode through the in-page player or buy downloading the mp3 directly.

Mon, 06 Sep 2010 12:09:38 -0500

Chris Roane has a new post to his blog asking an interesting question - should PHP programmers/developers spend the time to go to college?

A common debate in our field is whether or not a college education is worth it when becoming a PHP programmer. People will throw statistics in how much more money you can make with a college degree. But is the cost of college (time + tuition) for a four year degree better than the benefits of having four years of experience in the web programming field?

He qualifies it with the fact that not all college educations are created equal and that it depends on the student as to what they get out of it. He breaks it up into a few different sections with reasoning in each:

  • The Benefits of Going to College
  • The Cost of Going to College
  • The Benefits of a PHP Programmer Not Going to College
  • The Negative Aspects of a PHP Programmer Skipping College
Mon, 06 Sep 2010 11:56:59 -0500

Chris Jones has a new post to his Oracle blog today about a situation he found himself in with his recent Zend Framework application. The issue popped up when he tried to use more than just the basic controller.

I've been using NetBeans with Frameworks recently. I had no problem when doing a single controller example in Zend Framework, so I knew everything was installed OK and mod_rewrite was "working" fine. But I would click a URL that should be routed to a second controller and see an error [about the requested URL not being found].

His solution was to add a new line to his .htaccess file so Apache knew where to start the rewrite from (instead of it being relative) - a RewriteBase path.

Site Copyright 2005-2008 by Martinig & Associates
Copyright and responsibilty on all RSS feeds by their providers

SD Tools | SD Articles | SD Videos | SD Conferences | SD Links | SQAZone | DevAgile
DevBazar | Forum Logiciel | AjaxAlliance | SD News | WaterfallManifesto