News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

PHPImpact Blog:
Scalable and Flexible Directory Structure for Web Applications
August 11, 2008 @ 11:17:30

In this new post on the PHP::Impact blog, Federico looks at some examples of directory setups for web apps that can help to make them both scalable and flexible.

Designing a modular and component-based directory structure for your Web applications can seem like an easy task. If your system is small, it may seem logical to go with the simplest design possible, but if there's anything more time consuming and complex than developing a new directory structure design, it's trying to redesign an existing system that wasn't developed with growth in mind.

He breaks it up into a few different topics that can be applied where needed to keep the application in check:

  • Consistency
  • Scalability and Flexibility
  • Single Application
  • Multi-application
  • Naming Conventions
  • Versioning
  • Proposed Structure
0 comments voice your opinion now!
scalable application flexible directory structure



PHPFreaks.com:
PHP Loops
June 20, 2008 @ 12:10:18

The PHPFreaks.com website gets back to basics with a new tutorial they've posted - a look at looping in PHP.

Looping is simply a way for you to reduce the amount of code and/or content you have to write out. The idea is that you have something you have to do, or some content you have to show, and instead of just "writing it all out," you find a pattern to it - a common denominator - and let PHP execute the code or generate the content piece by piece using that pattern, based on a condition.

Their example solves the problem of finding taking a range of numbers and seeing how many of them can be evenly divided by another number.

0 comments voice your opinion now!
looping conditional structure tutorial example


SitePoint PHP Blog:
PHPBench.com Live PHP benchmarks, demystifying "best practices"
June 03, 2008 @ 12:09:10

In this new post to the SitePoint PHP blog Akash Mehta talks about a web application, PHPBench.com, that runs real-time benchmarks comparing some of PHP's own structures (like for versus foreach or echo versus print).

The benchmark suite covers all the usual bases, taking a simple task - like iterating over an array - and speed testing almost every possible way to achieve it. Most importantly, however, Chris takes raw numbers out of the spotlight and instead focuses on how the options compare with each other.

Since the results are generated live, they'll change a little bit each time the page is loaded. Each also includes a link to the code behind the benchmark so you can test it on your own system easily.

2 comments voice your opinion now!
bestpractices benchmark demystify compare structure


Alan Knowles' Blog:
Licence to release PHP code?
March 28, 2008 @ 11:10:37

A little while back, Alan Knowles wondered something that I'm sure has crosses the mind of every PHP developer out there, especially when they came across a particularly bad chunk of code - some people should need to apply for a license before releasing their PHP code out into the wild.

Unlike most of the reviews you get, I was specifically looking at code quality [of the CMSs]. not fuzzy does it look nice!

He looks at a whole list of them including: Tanslucis, Siteman, Pivot, jaf-cms, Guppy, Doop and CutePHP. Unfortunately, most of the news is bad - between badly structured code and mixes of HTML and PHP, there was almost nothing good in any of them.

0 comments voice your opinion now!
license release cms good bad ugly structure functionality


Stefan Mischook's Blog:
Setting up an MVC structure with the Zend Framework - part 2
March 27, 2008 @ 08:45:56

Stefan Mischook has posted the second part of the video tutorial introduction to making a Zend Framework application:

This Zend Framework video is from our resident Zend-nerd: Jon Lebensold. Again, let us know what you think and should you have any suggestions or request, please feel free to comment.

Part one was posted back on Tuesday for those that need to catch up.

0 comments voice your opinion now!
zendframework video tutorial mvc structure jonlebensold


Stefan Mischook's Blog:
Setting up an MVC structure with the Zend Framework - part 1
March 25, 2008 @ 12:03:17

Stefan Mischook has just posted a new video in his set of PHP-related presentations - part one of a look at setting up the MVC structure in a Zend Framework application.

This video is a little more basic than the previous Zend videos.

The video runs about twelve minutes long and covers the use of the Framework to post information back to a page and insert some of the information back into the database.

1 comment voice your opinion now!
mvc video tutorial structure zendframework series


PHPBuilder.com:
The Ternary Conditional Operator
March 07, 2008 @ 12:04:00

The PHPBuilder.com site has a quick reminder about a handy little bit of functionality PHP has to make evaluations quicker - the ternary operator.

This allows you to check for the existence of a variable (or check that the variable has a valid value) and assign a value accordingly. This is very useful when you are dealing with $_GET, $_POST, $_SESSION etc. variables, because you don't know whether the incoming variable will exist, and if it doesn't you might want to assign a default value.

An example is included and explained - evaluating an index in the _GET superglobal to see if it exists. It returns either the value itself or a false.

0 comments voice your opinion now!
ternary conditional operator structure evaluate


Zend Developer Zone:
Creating Data Tables With PEAR Structures_DataGrid
January 28, 2008 @ 16:19:30

Cal Evans has posted a tutorial on the Zend Developer Zone (posted today) about using the PEAR Structures_DataGrid package to create quick and easy data tables.

In this article, I'll be introducing you to the Structures_DataGrid package, showing you how it can be used to display structured data in tabular form. I'll be showing you how to hook it up to various data sources (including a CSV file, an RSS feed and an Excel spreadsheet), and how to format the resulting output so it's as pretty (or as ugly) as you want it to be.

They talk about what you'll need to get started (the different packages for different kinds of data) and some sample code to help you down the path to more attractive tables. There's even a bit touching on some of the more advanced features like exporting to Excel, pagination and data sorting.

0 comments voice your opinion now!
pear package structure datagrid table tutorial


Kevin van Zonneveld's Blog:
Convert anything to Tree Structures in PHP
October 09, 2007 @ 16:38:00

Kevin van Zonneveld has posted a new example today of how to convert anything into a tree structure with PHP:

With a function on this site: explodeTree(), you can explode any single-dimensional array into a full blown tree. The function uses a user-specified delimiter found in the keys of the original array to separate nodes and determine hierarchy.

Sample: with 3 lines of code you could have a full directory hierarchy in a multi-dimensional array if you specify the delimiter to be a '/' (slash).

Not only is the code included to make the tree from the data, but an example block of code showing how to use the result.

0 comments voice your opinion now!
tree structure convert tutorial code example usage tree structure convert tutorial code example usage


SitePoint PHP Blog:
Good and Bad PHP Code
May 28, 2007 @ 09:02:00

On the SitePoint PHP blog today, Kevin Yank shares his thoughts in the form of a list for what makes for "good" and "bad" PHP code.

When interviewing a PHP developer candidate for a job at SitePoint, there is one question that I almost always ask, because their answer tells me so much about the kind of programmer they are. Here's the question: "In your mind, what are the differences between good PHP code and bad PHP code?"

Among the items on the list for the good side are things like: structure, consistency, security, and portability. He gives a bit of example code that shows the three levels of "goodness" in a script (using $_GET variables).

1 comment voice your opinion now!
good bad code example list structure consistency portability security good bad code example list structure consistency portability security



Community Events











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


book releases cakephp conference PEAR package zendframework job release application developer security ajax zend code PHP5 framework example mysql database

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