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

Mathias Verraes:
Resolving Feature Envy in the Domain
August 12, 2014 @ 11:55:24

Mathias Verraes has a new post today about something he calls "feature envy" in the domain, related to this code smell (based on a definition from Martin Fowler).

Benjamin Eberlei did a really nice job of explaining refactoring the Feature Envy code smell on his blog. I wrote a comment because I felt the example could be taken one step further. You should read the original post. Below are Benjamin's code examples (for reference), followed by a repost of my comment.

The "smell" is defined as "a method that seems more interested in a class other than the one it's in". Mathias includes the code examples from the other post showing a datetime calculation and how it could be abstracted out to another class and method. He talks about the migration and how it relates to the "Whole Value" pattern and integrating some of the logic into a factory, generating a "reporting period" instance. He finishes the post with a brief look at an application of domain-driven design concepts to the problem, suggesting that the reporting be even more abstracted from the datetime data and using the "reporting period" object instead.

0 comments voice your opinion now!
feature envy whole value designpattern class object abstraction domaindriven

Link: http://verraes.net/2014/08/resolving-feature-envy-in-the-domain/

DZone.com:
And now instead, 5 things Java envies PHP for
January 25, 2011 @ 13:56:53

Giorgio Sironi has posted the other side of the PHP/Java envy perspective in this new article on DZone.com - five things that Java envies PHP for (The first article is here offering the opposite perspective).

The comparison is only on web applications and dynamic websites, as PHP does not compete on the desktop. I am a PHP programmer, but I work in Java on university-related projects. If you notice something is missing from the comparisons in this list, feel free to comment and complete my depiction of Java features, and of PHP too.

His list of five things includes that there's no compilation required in PHP applications (running is "compiling"), that there's a unified platform to work on and that there's a lot more included "out of the box" than with Java (like database connectivity).

0 comments voice your opinion now!
java feature wishlist envy opinion


Web Builder Zone:
5 things that PHP envies Java for
January 20, 2011 @ 11:44:33

On the Web Builder Zone today Giorgio Sironi has a new article with five things he thinks the PHP world is jealous about when they look at the features Java has to offer.

I've seen many programmers starting to think that Java is old and verbose, and trying to jump on the bandwagon of scripting languages such as PHP and Ruby. But it's not so simple, as these languages are late to the party in many areas. Here are the 5 things that as a PHP programmer I started envy Java for.

The five features on his list are:

  • Hibernate
  • Generics
  • Keeping objects in memory between requests
  • Java Collection Framework
  • Asynchronous processing

Keep an eye out for his next article - he flips it around and talks about what Java developers have to envy about PHP's features.

0 comments voice your opinion now!
java feature wishlist envy opinion



Community Events





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


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

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