2,099 reputation
1921
bio website gordiansolution.co.uk
location United Kingdom
age
visits member for 3 years, 7 months
seen Jan 14 at 13:05

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
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?
Feb
5
comment Handling Errors In PHP When Using MVC
I agree that in most cases error codes are fairly meaningless. However, throwing exceptions willy nilly is extremely bad! Exceptions should be reserved for exceptional circumstances only. Exceptions cause unpredictable program flow, can make code hard to follow (and therefore maintain), and in PHP they carry a rather significant performance penalty compared to IF/THEN/ELSE. I tend to prefer methods to return true on success, false on failure, and only throw an exception of something goes egregiously wrong.
Jan
6
awarded  Editor
Jan
6
revised Can we compare programming languages ergonomically?
deleted 1 characters in body
Jan
6
answered Can we compare programming languages ergonomically?
Jan
5
awarded  Commentator
Jan
4
comment I've unit tested my class, now how do I get started with an integration test?
I would add that scenario testing is probably not really something PHPUnit is suited to. Yu might want to look at some tool you can run in a browser such as Selenium, or a tool that can simulate a browser, like jMeter.
Jan
4
comment I've unit tested my class, now how do I get started with an integration test?
+1 for good question, but also voted to migrate to Programmers. Seems that's where questions on testing strategies belong
Jan
4
comment Is this the correct approach to an OOP design structure in php?
You might want to consider implementing an autoloader instead of explicitly requiring everything.
Jan
3
awarded  Citizen Patrol