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

Migrating to ZF2:
Integrating Composer and DoctrineORMModule
November 14, 2013 @ 12:23:52

Zend Framework v2 has been out for a good while now, but there's still applications out there running on the v1 of the popular framework. Since there was such a fundamental change in structure and functionality between v1 and v2, simply upgrading isn't possible - you have to migrate. Fortunately, there's guides like this one from Chris Strosser that shows you how to get there gradually.

Due to the vast nuances of Zend Framework 2, migrating an application from Zend Framework 1 can be very tedious. To make this process a little less painful, there is a way to slowly implement modules from ZF2 without making the application unusable. The methodology illustrated, which implements DoctrineModule and DoctrineORMModule into a Zend Framework 1 project, can be applied to a variety of ZF2 modules, making it an invaluable technique in the migration process.

Using these two ZF1 modules, they show how to integrate them into a typical ZF2 structure. There's a few steps in the process:

  • Add init_autoloader.php to application root directory
  • Update ZF1′s index.php for Composer compatibility
  • Setup ZF2 configuration files
  • Setup ZF2 "Application" module
  • Relocate existing entities and repositories to ZF2
  • Make ZendMvcApplication available in ZF1

It's not an overly complex process, it just requires the right configuration settings and component placement to get the ZF1 module to cooperate in the world of ZF2.

0 comments voice your opinion now!
zendframework1 zendframework2 module migrate gradual composer

Link: http://webjawns.com/2013/11/migrating-to-zf2-integrating-composer-and-doctrineormmodule/

DZone.com:
From Java to PHP
March 15, 2013 @ 11:55:29

On DZone.com today there's a new post that welcomes those coming from Java over to PHP with a few recommendations and suggestions about what's different and some things they might find familiar in the transition.

We are welcoming some new colleagues that come from a Java background in the Onebip team, both from the development and operations field. Here's a primer on learning PHP in this situation, that you may find useful when introducing similar people in your PHP-based projects.

He breaks it up into a few sections:

  • the "absolute basics" (like the differences in variable handling)
  • things to not care about (like procedural PHP or the installation of Apache+PHP)
  • how to "write to a graph" (things like PDO, DateTime)
  • things to watch out for (like == vs === and some php.ini settings)

He also recommends doing some coding katas with TDD to give you a "crash course" in the language and help you learn from more than just reading.

0 comments voice your opinion now!
java language migrate learn suggestions


Reddit.com:
Moving a large existing project onto a framework
February 01, 2013 @ 12:18:13

On Reddit.com a discussion has started up around a question asked about legacy application migration - things to consider when moving a large existing project onto a framework.

I am working for an online store that has a codebase which has spanned dozens of developers and has been constantly upgraded. The codebase has its problems but it is not too bad. I would love to put it onto a framework like laravel and systematically start cleaning up as I go, but I am unsure if it will work trying to shove a framework into the current site. Has anyone done something similar, it would take me months to rewrite the whole system, has anyone done something like this successfully? Any advice would be appreciated.

There's lots of good recommendations made in the comments including:

  • "If it were me, I'd take a step back before trying to build on top of a framework. I'd start by refactoring the existing codebase out into PSR-0 compliant namespace."
  • "In my experience you only rewrite an entire application if what you have has become too expensive to maintain. At this point it is actually more cost effective to rewrite it using a framework."
  • "We have recently moved our website to the Symfony2 framework at my company [...] it definitely is not a one programmer job."
  • "Whatever you do, replace one bit at a time. And always strive to de-couple code."

Read up on the rest of the responses or add your own to the post.

0 comments voice your opinion now!
framework legacy application opinion advice migrate


Josh Adell:
Migrating to Dependency Injection
November 23, 2012 @ 11:41:41

In a new post to his blog Josh Adell talks about his voyage to implement dependency injection into a current application. His work can be found in this github repository.

Recently, I gave a lunch-and-learn to my team on the topic of Dependency Injection (DI). Instead of showing a bunch of slides explaining what DI is and what it's good for, I created a small project and demonstrated the process of migrating a codebase that does not use DI to one that does. Each stage of the project is a different tag in the repository. The code can be found on Github: http://github.com/jadell/laldi. Checkout the code, and run composer install. To see the code at each step in the process, run the git checkout command in the header of each section.

He goes through each "checkout" step (the title is the git command to run to follow along) showing how he migrated away from a simple micro-framework based site to one that defines the various objects (and repositories) inside the "application" object. He adds in a few comments to let you know a bit more about what's going on and some basic event handling. He finishes off the post with some potential issues that could come up both during the process and with the resulting application.

0 comments voice your opinion now!
migrate dependency injection tutorial github


Community News:
PHP-GTK Migrates to Git/Github
March 21, 2012 @ 09:40:31

As a part of the move to git/github that the PHP project recently made, a reminder was posted that the PHP-GTK project has also migrated.

PHP-GTK is a PHP extension that enables you to write client-side cross-platform GUI applications. This is the first such extension of this kind and one of the goals behind it was to prove that PHP is a capable general-purpose scripting language that is suited for more than just Web applications.

The full source can be found and forked/cloned over on github and is just waiting for you to contribute!

0 comments voice your opinion now!
phpgtk gtk migrate git github


Brian Swan's Blog:
Azure Real World Migrating a Drupal Site from LAMP to Windows Azure
March 20, 2012 @ 08:44:04

In this new post to his blog Brian Swan shares the process that he and other Microsoft-ers went through to migrate a site off of a LAMP stack and over to one based on Windows Azure. They moved was the SAG awards website because of issues it had seen with outages and slow performance.

In many ways, the SAG Awards website was a perfect candidate for Windows Azure. The website has moderate traffic throughout most of the year, but has a sustained traffic spike shortly before, during, and after the awards show in January. [...] The main challenge that SAG Awards and Microsoft engineers faced in moving the SAG Awards website to Windows Azure was in architecting for a very high, sustained traffic spike while accommodating the need of SAG Awards administrators to frequently update media files during the awards show. Both intelligent use of Windows Azure Blob Storage and a custom module for invalidating cached pages when content was updated were key to delivering a positive user experience.

He walks you through each of the five steps (high-level, obviously) that they took in the migration:

  • Export data
  • Install Drupal on Windows
  • Import data into SQL Azure
  • Copy media files to Azure Blob Storage
  • Package and Deploy Durpal

Each step comes with some explanation and descriptions of the commands and tools used during the process.

0 comments voice your opinion now!
windows azure migrate lamp stack sag awards tutorial


PHP.net:
PHP Migrates to Git
March 20, 2012 @ 06:39:52

The announcement has finally come - the PHP project has officially moved to git!

The migration of the PHP source code from Subversion to Git is complete. You can clone or fork the source from our GitHub mirror, and we also now support pull requests made via GitHub. The source is also available via git.php.net, and full instructions on cloning the php-src tree can be found at php.net/git. One immediate benefit is that future PHP release tags will be signed by the PHP development team. We will be releasing GPG keys for verification purposes in the next few days. More information on the migration and the new workflow can be found at the Moving to Git FAQ on the PHP Wiki.

This move does not include the manuals yet, but that's coming soon. Be sure to follow these steps if you'd like to contribute back via the git repository. This is a great move for the project and makes it even easier for developers to contribute their fixes and ideas back to the development group!

Joshua Thijssen has also posted a guide to getting started on his blog.

0 comments voice your opinion now!
git migrate subversion svn clone


Daniel Krook's Blog:
Migrating PHP applications to DB2
March 09, 2012 @ 08:20:28

As Daniel Krook mentions in his latest blog post, the IBM developerWorks site has just posted the last part of a series he's been writing about migrating a PHP application's backend over to DB2.

IBM developerWorks has just published the final part in our series on migrating a PHP application from MySQL to DB2. [...] In addition to sharing our own experience, the series highlights the number of resources available to you to carry out your own migration.

The series is broken up into four parts:

0 comments voice your opinion now!
db2 migrate tutorial series ibm developerworks mysql


PEAR Blog:
What would you do with 5 million lines of code?
January 24, 2012 @ 12:18:07

On the PEAR blog today there's an update about the migration over to github that 5 million lines of code has already made:

Since October 2011, 5 million lines of the PEAR codebase has shifted to github. Hand in hand with this shift has been the tireless work of Daniel C - someone who brazenly said "I will fix the failing packages!" in the tail end of last year.

As a result of his efforts a list has been created of known good packages to use with PHP 5.4. Other results include:

  • All test infrastructure upgrading to PHP 5.4 release candidates
  • All database driven test suites executing properly, catching a variety of simple bugs
  • Hitting a point of "near zero" patches to be applied to unmaintained packages
  • Increasingly, the PEAR QA team is delivering PHP 5.3+ friendly forks of existing packages
0 comments voice your opinion now!
pear migrate github package library update


Leasewebs Labs:
Painless (well, less painful) migration to Symfony2
December 23, 2011 @ 11:02:12

Stefan Koopmanschap has written up an article on the Leaseweblabs.com blog about migrating a Symfony 1 application to Symfony2 in a (slightly) less painful way that making the move all at once.

It is much easier to do a gradual migration. Start with one part of your application, and bit by bit migrate your logic and application. The traditional way of doing such migrations is to create a new project and have parallel development on the old and the new version of the application. The problem with this, though, is that when you make a change to your old application, you have to make the same change in the new codebase, essentially doubling the amount of work for each feature you need to implement. [...] You could wrap your old application into your Symfony2 application, and have different parts of your application be handled by different versions of your codebase.

With the help of a bundle he created, IngewikkeldWrapperBundle that handles the rerouting of your requests based on where the requested resource exists (in the Symfony 1 or 2 codebase).

0 comments voice your opinion now!
symfony2 migrate codebase bundle painless



Community Events





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


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

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