News Feed
Sections




News Archive
feed this:

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

Gonzalo Ayuso:
The reason why singleton is a "problem" with PHPUnit
September 24, 2012 @ 11:57:02

Gonzalo Ayuso has a new post that responds to the idea that "singletons are a problem when testing" your applications with something like PHPUnit.

Maybe this pattern is not as useful as it is in J2EE world. With PHP everything dies within each request, so we cannot persist our instances between requests (without any persistent mechanism such as databases, memcached or external servers). But at least in PHP we can share the same instance, with this pattern, in our script.

He illustrates a bad side effect of this sharing of resources with a simple unit test that increments a counter in a class. He notes that, because the script shares the object, you can't reliably know the state of it as you don't know what's happened before your use. He recommends two things to help the situation - either not use them at all or destroy the instance each time after using it (counterproductive to using a Singleton, obviously).

0 comments voice your opinion now!
singleton designpattern problem resource sharing


NetTuts.com:
Building Web Applications from Scratch with Laravel
June 20, 2012 @ 08:56:21

On the NetTuts.com site there's a new tutorial introducing you to one of the relatively new players to the PHP framework scene - Laravel. In this article you'll see how to set up and create a basic Laravel app - a simple social app for sharing photos.

In this Nettuts+ mini-series, we'll build a web application from scratch, while diving into a great new PHP framework that's rapidly picking up steam, called Laravel - a simple and elegant PHP 5.3 framework. First up, we'll learn more about Laravel, and why it's such a great choice for your next PHP-based web application.

They briefly introduce the framework and talk about some of the things that it offers for the PHP 5.3 users out there (including the use of packages called Bundles, the built-in ORM, migration and Redis support). They start you off on the road to building the sample application with instructions on downloading, configuring and creating the first controllers, templated views (with Blade) and a bit on asset management.

0 comments voice your opinion now!
laravel tutorial framework introduction photo sharing application


Henri Bergius' Blog:
Composer Solves The PHP Code-Sharing Problem
November 02, 2011 @ 16:28:25

Henri Bergius has a new post to his blog today about a tool that could help make code reuse across PHP applications a much simpler process. The Composer tool (and Packagist) make setting up packages and dependencies easy.

In PHP we've had a lousy culture of code-sharing. Because depending on code from others as been tricky, every major PHP application or framework has practically had to reimplement the whole world. Only some tools, like PHPUnit, have managed to break over this barrier and become de-facto standards across project boundaries. But for the rest: just write it yourself. But now Composer, and its repository counterpart Packagist, promise to change all that. And obviously new conventions like PHP's namespacing support and the PSR-0 standard autoloader help.

Making a package is as simple as setting up a JSON-based configuration file that names dependencies and package metadata (like name, type, etc). Composer generates an autoloader of its own to handle the loading of your needs based on the dependencies listed as a part of the package. If you'd like more information about Composer or to get the latest version and try it yourself, check out the project's github repository.

0 comments voice your opinion now!
code sharing composer package psr0 packagist namespacing


Enrico Zimuel's Blog:
PHP session sharing using Zend Server CE and MS SQL Server
April 16, 2010 @ 12:11:39

With several articles out there about sharing session across multiple servers on databases, there seemed to be a lack of examples that used SQL Server to do it. Enrico Zimuel has helped to solve that problem with his new post on using Zend Server and SQL Server to persist the session data.

In the open source community there are many examples on how to share session data using database but i didn't found an example using MS SQL Server with the new Microsoft SQL Server Driver for PHP so I decided to write a new session handler from scratch. I used the last version 1.1 of the Microsoft SQL Server Driver. I tested the session handler using two Windows Server 2003 running IIS6 and Zend Server 5 CE. I used a SQL Server 2005 database to share the PHP session between the two servers.

He shows you how to set up the custom session handler, create the table where the session data will be stored and includes a sample test script (a part of his SQLSrv_Session class) so you can ensure that it's all cooperating as it should.

0 comments voice your opinion now!
zendserver sqlserver session sharing tutorial


Hasin Hayder's Blog:
Building services like FriendFeed using PHP - Part 1
June 02, 2008 @ 08:47:32

Hasin Hayder has posted part one of a series he's doing on making an application similar to the popular FriendFeed site in PHP.

Friendfeed is an excellent life streaming service aggregating all your feeds from different service providers, compile them together, build a social network among your known people and finally deliver all these feeds as a mashup. [...] In this blog post I will try to focus on how to develop such a service like Friendfeed using PHP and JS and how to scale such a huge load successfully.

This first part looks at the photo sharing handling of the application, including links to libraries already written in PHP to connect to them (like Flickr and Smugmug).

0 comments voice your opinion now!
friendfeed application photo sharing flickr smugmug picasa zoomr


Community News:
Komodo IDE 4.0 Released
January 24, 2007 @ 09:45:00

As mentioned by both Sean Coates and the International PHP Magazine, ActiveState has release the latest version of their popular development environment - Komodo IDE 4.0.

Komodo IDE 4.0 is the first unified workspace for end-to-end development of dynamic web applications. A rich feature set for client-side Ajax languages such as CSS, HTML, JavaScript and XML, coupled with advanced support for dynamic languages such as Perl, PHP, Python, Ruby and Tcl, enables developers to quickly and easily create robust web apps.

Komodo is all about simplicity and helping you write your code. This includes features like a multi-language editor, integrating sharing abilities, the ability to create Firefox-like extensions to add to other applications, and full customization settings to make your worspace your own.

Find out more about the software on Komodo's page or just head over and buy this latest version for a discounted rate of $245 USD. There's also a trial copy you can download and check out before spending the cash.

0 comments voice your opinion now!
komodo release multilanguage editor ide sharing extension komodo release multilanguage editor ide sharing extension


IT Manager's Journal:
Court library AMPs up
December 28, 2005 @ 07:26:56

Via this new post from LinuxLibrarian.org today, there's a pointer to this new article on the IT Manager's Journal site about the Supreme Court Library of North Carolina's move to an Apache/MySQL/PHP combination.

Until last year, [Ronald] Diener's organization was paying thousand of dollars a year to a library software vendor, but the vendor's services had become inadequate for the task. The court's IT team determined that they could develop a better, cost-effective in-house solution that would at the same time be open to participation from outside.

The open source option available through Apache, MySQL, and PHP (AMP) would serve as a resource to collaborate with other organizations and libraries, even internationally, in creating a continually upgradeable software portfolio. This solution would both cut costs and enhance the value of what could be offered to their own clients and a larger audience of legal professionals.

They do mention the comment made about finding documentation on implementing an AMP setup, but other than that, they seem happy overall with the system - plus it's already saving them money.

0 comments voice your opinion now!
apache mysql amp court library sharing search apache mysql amp court library sharing search



Community Events





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


install deployment community symfony series laravel unittest zendserver package language api podcast release tips update framework introduction interview library opinion

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