News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Practical Refactoring, Part 1 - What is Good Code?
October 12, 2012 @ 11:15:26

On PHPMaster.com they've started up a new series focused on refactoring code to make your applications not only easier to maintain but easier to expand on in the future. In this first part they focus on what the term "good code" really means.

The main goal of refactoring is clean code, better code, or whatever you might call it. But what actually constitutes good code? Good code is smelled and tasted. If you've written a lot of code, you understand what I mean; you can easily identify whether code is good or bad with experience. But what if you are new to coding but still want to do things right? We can summarize the aspects of good code with these three guidelines: Readable, Extensible and Efficient

He goes on to explain each of these three guidelines with descriptions of what they are and what they mean to you as a developer. In the next part of the series, he'll take these three ideas and apply them to code, showing some of the most common points where they can be applied to clean things up.

0 comments voice your opinion now!
good code refactor readable extensible efficient series


Ibuildings Blog:
My framework is better than all other frameworks
January 28, 2009 @ 08:46:14

Why is Harrie Verveer claiming that his framework is the best? Well, really he's not - its just to make a point: there's no such thing as one "best" framework.

The framework that has the best solution for every thinkable problem will simply never exist. Such a framework can't be build for several reasons.

He names two reasons why you should get more specialized in picking which framework you go with on a project:

  • First, if a framework wants to provide solutions for as many situations as possible there is less time to focus on the individual solutions.
  • Second, it would need to be big and small at the same time.

He notes that, while specializing in one framework can make you more efficient for that task, finding the right framework fit for the project will make you (and whatever team you might be working with) more productive overall.

0 comments voice your opinion now!
framework compare efficient right tool zendframework requirement


Christian Weiske's Blog:
Importing huge XML files using PHP5 - efficiently and conveniently
August 25, 2008 @ 09:34:38

Christian Weiske has a quick tip on how to get larger XML files to pull into PHP5 and be usable:

At work I had the task to implement the synchronization between an online shop and a commodity management system. Data exchange format was XML - one big XML file for all of the products (some thousands with dozens of attributes). Big question: How do I import the file in a way that is most convenient for me as a programmer - and without exceeding the machine's RAM when loading a 1 GiB file?

The newer alternatives both use the same technology (DOM and SimpleXML - with DOM behind it) so he goes more "low tech" than that and opts for the XMLReader extension to pull in the large amounts of data. Available in PHP5, the XMLReader extension, which he combines with an Iterator from the SPL to makes for a simple, quick little parser.

0 comments voice your opinion now!
import xml file php5 efficient convenient xmlreader spl iterator


SitePoint PHP Blog:
Last we checked, PHP IS a framework.
June 09, 2008 @ 09:33:27

According to Akash Mehta in this new post on the SitePoint PHP blog, all of the frameworks out there aren't really needed because "last we checked, PHP IS a framework".

Now, consider the "average" PHP frameworks. They help you handle request data, manage your output, control app flow - essentially, extending PHP's inbuilt functionality. They are, therefore, PHP frameworks on the PHP framework. PHP provides a vast array (pardon the pun) of functionality out of the box. But when you want to do things your way, it gets out of the way, and this is really important when building anything beyond a simple database frontend.

He suggests that PHP is a "half framework" on its own, providing quick an easy methods and functionality to build up applications. He gives an example of Twitter (and really, who isn't picking on them these days) and how it probably could have avoided a lot of the issues it is seeing if it had gone with something a bit more efficient and flexible.

Be sure to check out the comments for some other great opinions from the community.

0 comments voice your opinion now!
framework language twitter efficient flexible


Kae Verens' Blog:
efficient JS minification using PHP
May 21, 2008 @ 10:25:35

In a new post today, Kae Verens takes a look at a method for easy and quick javascript minification with help from a little bit of PHP.

A useful part of minification is that during the act of compiling your minified source, you can also pull in other JavaScript files and compiled them all into one single source. This has a major advantage that there is only one file to download.

The method runs a file_get_contents on each of the javascript files, and pulls their content into a single PHP variable. This value is then just echoed out after it's passes through this minimizer class.

Kae also offers an alternative to performing this expensive operation each time - caching then checking the md5 hash of the cache to see if it's different than the current version. Example code is included.

0 comments voice your opinion now!
efficient minification filegetcontents caching javascript


Josh Sharp's Blog:
Why you should be using a framework
October 23, 2007 @ 17:52:00

Josh Sharp has posted a new article to his blog advocating something that there's still a lot of controversy around in the PHP community - frameworks (when to use them and when to not).

PHP's ease of use is also its downfall. Because there are less restrictions on the structure of the code you write, it's much easier to write bad code. But there is a solution: use a framework. [...] Of course, if you're not taken with any of the packages above you can also write your own framework, which I've done and will talk about in the next few posts. But for now, let's have a look at the common benefits of a framework.

He's broken it out to talk about the usual framework structure, MVC and how a framework can enforce good code standards. He also mentions some happy side benefits of their use including making for "pretty URLs" and the helpers that most of the frameworks come with.

0 comments voice your opinion now!
why use framework mvc codingstandards helper efficient why use framework mvc codingstandards helper efficient


Wez Furlong's Blog:
Just the facts, ma'am
May 03, 2006 @ 06:51:39

Wez Furlong posts today about a response made to a previous mention of "PHP vs. ASP.NET" in this article from Joe Stagner in this post on his MSDN blog.

From Wez:

Joe's response is perhaps a little pro-Microsoft (you can't really blame him for that--he does work there :-) but the essence of his response rings true; there's nowhere near enough factual data in the OTN article to make a balanced decision one way or the other.

To be fair to Sean (the author of the OTN article), it does say "Opinion" across the top of the page and the byline is "One developer's view of the pros and cons of the two most popular means of building web applications", but it's easy to forget those once you're into the article.

Wez also mentions one of his personal views on the whole debate, basically saying that even if PHP is the faster/more efficient, some situations might do better with an ASP.NET solution (what's the cost of implementation?).

0 comments voice your opinion now!
facts asp.net versus implemntation cost faster efficient facts asp.net versus implemntation cost faster efficient



Community Events











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


symfony2 language hhvm package unittest release performance overview install facebook framework opinion application podcast composer component hack introduction database security

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