1,996 reputation
819
bio website gordiansolution.co.uk
location United Kingdom
age
visits member for 3 years
seen Jun 29 at 7:24

I'm a professional PHP programmer with almost a decade of professional experience and considerably more as a hobbyist programmer. I've also had some exposure to Java, Object Pascal and am interested in learning objective C

I've started work on a PHP framework, though it's still at a very early stage and not yet really useful. The current source is available on GitHub.

I've also begun development of a CSS3 elastic grid for use on my own projects and had published that on GitHub as well.


May
12
answered What do I need to do to NOT steal “Hello World” code with a GPL license?
May
11
awarded  Guru
May
11
awarded  Mortarboard
May
11
awarded  Good Answer
May
11
comment Why is Global State so Evil?
@frankc See my comment to briddums
May
11
comment Why is Global State so Evil?
@briddums in that case you'd use constants! :) And that is still problematic because the code becomes dependant on the constant. Even non-mutable global state is best avoided. Like I said, my answer isn't by any means exhaustive.
May
10
awarded  Enlightened
May
10
awarded  Nice Answer
May
10
revised Why is Global State so Evil?
added 1752 characters in body
May
10
comment Why is Global State so Evil?
@Truth I got the impression you were asking why global state was bad. You might want to update your question to make it clearer you're asking about alternative approaches as well. Am going to make an edit to the answer, but usually dependency injection is favoured these days.
May
10
revised Why is Global State so Evil?
added 1482 characters in body
May
10
answered Why is Global State so Evil?
Apr
30
comment Separation of concerns in an RMR framework
I don't think that's going to be much of an issue, the outputting (representation or view) is separate from the business logic (model or resource) in both systems. The problems I'm running into have to do with things I would have put in the controller before should go now.
Apr
30
comment Separation of concerns in an RMR framework
@JamesAnderson No it doesn't, the view just needs to iterate over the array of results the model returns, that's the same regardless of whether you're using RMR or MVC or anything else. Besides, this has pretty much nothing to do with the question I asked.
Apr
30
comment Separation of concerns in an RMR framework
Are you talking about pagination? That would work the same way as it does in MVC. The input includes a 'page' variable that's sent to the model/representation. The model/representation returns an array that an external view/template/presentation/whatever formats into markup/JSON/XML/etc. Model/representation doesn't need to know anything about the presentation (that's the Response's problem)
Apr
30
asked Separation of concerns in an RMR framework
Mar
15
awarded  Critic
Feb
25
comment Adding conditional toggles into methods for running tests
PHPUnit allows you to create a mock from a real implementation, so mocking shouldn't be that difficult in most cases unless the protocol of your class is in a very unstable state and keeps changing all the time. If that's the case then it's usually a sign that you need to do a bit of design work before actually sitting down to code anything. Mocks are a far better solution than introducing code into your implementation that exists purely for testing and debugging.
Feb
18
comment PHP Aspect Oriented Design
Everywhere you do a static call or use a static property (wherever there's a :: in the code) you're creating a tight coupling between the caller and the callee. This is considered bad because it results in code that isn't organized into self-contained modules but where modules are tied to each other and can't be reused or tested in isolation.
Feb
5
answered Does it make sense to avoid a framework when building a large webapp with PHP?