armtuk: Cheetah (Default)
From the PHP homepage:

PHP 5.2.7 has been removed from distribution

Due to a security bug found in the PHP 5.2.7 release, it has been removed from distribution. The bug affects configurations where magic_quotes_gpc is enabled, because it remains off even when set to on. In the meantime, use PHP 5.2.6 until PHP 5.2.8 is later released.

This means that even if you used magic_quotes_gpc, which is evil anyway, but necessary for MySQL (reasons not to use MySQL and PHP), you would have been open to an injection attack, and that values that had single quotes in them like O'Reilly would have broken your site.

Can anyone say regression tests?

PHP - Not enterprise software.
armtuk: Cheetah (Default)
So I am building this web app. For the first time, I'm trying to do it by the book. I have a spring context, DAOs and ORM through hibernate. Everything seems copacetic. Then I realize that the logic for stopping a workflow item has to be in two places. So I do the seemingly sensible thing and I pull it out into a method.

A few days pass, and the thought dawns on me that this is what they mean by 'business logic'. An operation that can be called independently of the website to perform a function against the data. The light goes on in my head. The ActionBean should be looking up an instance of this business object in the spring context and setting member variables and calling a method on the business object.

All my functionality like that should be moved into business objects.

D'Oh, Yay! I finally 'get it'. Nobody ever explained how this stuff is supposed to work to me.

This is a subtlety that most MVC guides fail to point out. There is really another level of abstraction there, MVCB, Model, View, Controller and Business Logic. If we were in a SOA this would be the stuff that would be at the other end of the service.

Let me tell you how awesome this is going to make Dot Artistry when I get it going.


armtuk: Cheetah (Default)

April 2017

16171819 202122


RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 23rd, 2017 09:20 am
Powered by Dreamwidth Studios