Timeline for Extract a joined result set into a parent-child hierarchy
Current License: CC BY-SA 2.5
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 11, 2011 at 18:29 | vote | accept | codecowboy | ||
Feb 11, 2011 at 18:28 | comment | added | codecowboy | Thanks again. You could take a look at components.symfony-project.org/dependency-injection | |
Feb 11, 2011 at 7:14 | comment | added | David Harkness | @codecowboy - DI is more geared toward configuring system services such as a Data Access Object with a DB connection or an API Service with a REST Connection Manager which probably doesn't mean much to you now. It's a tougher sell (for me) in PHP since the PHP processes are short lived. In a Java web application you can build all of the necessary services and reuse them. With PHP you must build them for every request so you want to build only what you'll use. I haven't investigated DI libraries for PHP yet, however. | |
Feb 11, 2011 at 6:31 | comment | added | codecowboy | Would this be a candidate for dependency injection do you think? A quiz would contain several question objects which in turn would contain several answer objects | |
Feb 11, 2011 at 6:17 | vote | accept | codecowboy | ||
Feb 11, 2011 at 18:29 | |||||
Feb 11, 2011 at 6:17 | comment | added | codecowboy | Wow, thanks David. That is definitely more succinct and presumably more performant without the extra loop. I plan to release the quiz code as a plugin at some point. I will definitely consider encapsulating the answers and questions in objects during refactoring. | |
Feb 11, 2011 at 3:20 | history | answered | David Harkness | CC BY-SA 2.5 |