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

Ben Ramsey:
Learning a New Codebase
September 18, 2014 @ 09:38:51

In a new post to his site Ben Ramsey shares a few suggestions around things to ask and do to learn a new codebase (whether that means in a new job or coming into a new open source project).

A few days ago, my friend Ed Finkler started a new job. Earlier this week, he posted on Twitter: "First days humble us all." Having begun a new job myself, I shared Ed's sentiment. Last weekend, while at the Madison PHP Conference, we were discussing what developers can do during the interview process to get an idea of the kind of codebase a company has.

He includes a few questions for developers to ask, either during the interview or once hired, about the codebase itself including:

  • what coding standards the company follows
  • how much of the code is covered by tests
  • have the company's deployment process described

He also recommends learning the codebase by diving in and either writing tests for untested areas or work through bug reports and fix (then test) them.

0 comments voice your opinion now!
learn new codebase tips questions bugfix unittest

Link: http://benramsey.com/blog/2014/09/learning-a-new-codebase/

Alessandro Nadalin:
Integrating Twig in Your Legacy PHP Code
June 18, 2013 @ 10:19:49

Alessandro Nadalin has posted a two part series to his site to help you get the Twig templating tool integrated with your legacy codebase.

It might happen that you are working on a legacy code that is years old, with its own templating mechanism1 that doesn't really allow you to take advantage of the benefits that a structured and object-oriented engine like Twig. In this situations, when a complete replacement would cost too much to your organization, you can take advantage of a wild integration between this advanced template engine and your existing code.

In the first part of the series, he proposes integrating it at the base level, essentially wrapping the "render" method of your framework of choice. In the second part of the series, though, he comes back with a "less wild" approach that also lets you take advantage of some of the other features twig has to offer. He modifies the previous example to output a template file and reuse that in the Twig "render" call.

0 comments voice your opinion now!
twig legacy codebase integration template render

Link: http://odino.org/integrating-twig-in-your-legacy-php-code

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


Cal Evans' Blog:
Six ways to be a better client for your developer - Point 8
February 24, 2011 @ 11:03:59

Cal Evans has posted the eighth tip in his six-tip series (but who's counting) about how a client can coordinate better with a developer and make a better relationship for the project. In this new tip, he suggests that the client "own it".

No, I'm not talking about own it as in Point 7 - "Do your part", I mean make sure that at the end of the project, you own the project, not your developer.

He mentions two of the aspects you, the client, will need to worry about once the last line of bug free code has been committed and delivered. Be sure that you own the domain name for the project and have a clear understanding of any intellectual property concerns that might come up (what codebase is it built on, who owns the code - client or developer, etc).

0 comments voice your opinion now!
better client developer relationship ownership domain codebase intellectual property


Keith Casey's Blog:
Technical Debt Doesn't Disappear
February 22, 2011 @ 08:17:01

In a recent post to his site Keith Casey mentions something that should be obvious to most software developers (and managers of developers out there) but is easy to forget - technical debt doesn't just disappear, even if the related resources change dramatically.

Just because you set a codebase aside and do it the "right" way, your problems don't disappear. The same bugs that annoyed people yesterday will be there today and tomorrow. In fact, when the bugs are still there a week, month, or year from now, they move beyond annoyances and into frustrations as people think (or say) things like "this has been broken for years.. why haven't they fixed it!?"

He notes that, while tossing the entire codebase out the window and starting over again (a move very, very rarely shown a good idea), you'll still end up with issues - this time involving resources and the work needed to sift through all of the bugs in the new code.

0 comments voice your opinion now!
technical debt opinion codebase rewrite


Ibuildings techPortal:
Refactoring Your Application
April 28, 2009 @ 13:48:58

A new article has been posted on the Ibuildings techPortal site today from Stefan Koopmanschap The article looks at refactoring applications: what it is, how it can help you and a few requirements for doing it successfully.

If you read articles, visit websites, read tech books or visit conferences you will undoubtedly have heard about the term refactoring. There is a good chance you've been refactoring yourself already, whether you knew it or not. In this article you will be introduced to the practice of refactoring. The basic definition will be discussed, as well as reasons for refactoring and how to actually refactor your code. The difference between refactoring your code and rewriting your code will also be explained.

After explaining what refactoring is, he gets into how it can help your applications and some of the key things it will help you with like the creation of a more structured API, development of unit tests and a larger knowledge of the code base. A code example of refactoring is also included.

0 comments voice your opinion now!
refactor application unittest codebase knowledge api example


John Rockefeller's Blog:
PHP Tricks How To Handle Multiple Domains
May 27, 2008 @ 11:11:01

John Rockefeller has a tip he'd like to share with all of the other PHP developers out there - a little method he's come up with to host multiple domains off of the same code.

This is really handy for those of us who have the same code handling multiple sites or multiple sub-domains. A case in point: When I coded NetBoardz (my free forum hosting service now defunct), I had one codebase handling all 250 forums. How? Simple. When the code runs, it determines which site the user is loading and does different things (like using different databases) dynamically.

He shows the two key points to dividing things up - grabbing the domain and subdomain they were trying to access. This can be fed into a script that can switch things like layout or even functionality based on which site they've chosen.

1 comment voice your opinion now!
trick multiple domain same codebase subdomain hostname



Community Events





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


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

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