Re: com web/php: Created some new classes to produce the articles view on the homepage. I'm trying to improve the backend code where I can and the
print_news function is pretty complex, so I went this route instead.: Entity/NewsItem.p

From: Date: Thu, 21 Jun 2012 22:43:11 +0000
Subject: Re: com web/php: Created some new classes to produce the articles view on the homepage. I'm trying to improve the backend code where I can and the
print_news function is pretty complex, so I went this route instead.: Entity/NewsItem.p
References: 1  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-13758@lists.php.net to get a copy of this message
On Thu, Jun 21, 2012 at 4:35 PM, Hannes Magnusson < hannes.magnusson@gmail.com> wrote: > On Tue, Jun 19, 2012 at 11:41 PM, Levi Morrison <levim@php.net> wrote: > > Commit: 9530a8571f96ce34bb5b5574740f6a3ffee2e09c > > Author: Levi Morrison <levim@php.net> Tue, 19 Jun 2012 > 16:41:45 -0600 > > Parents: 5b38097f43541ef7a76787090ef9d1d7d0b6c697 > > Branches: master > > > > Link: > > http://git.php.net/?p=web/php.git;a=commitdiff;h=9530a8571f96ce34bb5b5574740f6a3ffee2e09c > > > > Log: > > Created some new classes to produce the articles view on the homepage. > I'm trying to improve the backend code where I can and the print_news > function is pretty complex, so I went this route instead. > > > > Changed paths: > > A Entity/NewsItem.php > > A Gateway/NewsFileSystemGateway.php > > A Gateway/NewsGateway.php > > A View/HomepageNewsView.php > > M index-beta.php > > > Whaaaaat? > I don't understand how 3 classes and one interface makes anything better > here? > Especially considering you are using output buffering in a method, > printing loads of html, and breaking in and out of PHP all in the same > method. > > The onlything this commit does is creating wtf. > > -Hannes > I can understand your complaints about the method breaking in and out of PHP, but if you don't see how the classes help then you aren't as good of a developer as you think you are. I do not mean for that to sound disrespectful: you have contributed a lot more to PHP than I have. I'll change the method to do string concatenation and use a heredoc if you really think it is better than output buffering and breaking in and out of PHP.

« previous php.webmaster (#13758) next »