sherlock icon indicating copy to clipboard operation
sherlock copied to clipboard

0.2 Branch

Open polyfractal opened this issue 12 years ago • 0 comments

I'm starting to working on the 0.2 branch for Sherlock. Sherlock has a pretty good base of functionality - it's time to start cleaning up the syntax and making it more consistent.

Even though SemVer says that any 0.* does not need to maintain backwards compatibility (since it isn't a true release yet), I realize some of you guys are using Sherlock in real systems.

My plans for Sherlock include several syntax changes, so I'm going to quarantine the new stuff to 0.2.* so it doesn't interfere with your current projects (unless you wish to update the code).

Main goals of 0.2:

  • First class Facade pattern: Sherlock is currently using a half-baked Facade pattern, but its kludgy and inconsistent (and clutters up the main class). I plan on breaking all the builder methods into their own Builder class, accessible by statics for convenience. These will simply be a facade for the underlying component objects. Taking a lot of inspiration from Laravel here
  • Dependency injection makeover: DI is used sporadically in Sherlock, but there is also a lot of hard-coding and just plain weird shit (EventDispatcher usage...I'm looking at you). All of this needs to be refactored into a simple DIC, probably Pimple. This will also make it easier to configure Sherlock, and instead of a gross parameter array you can simply operate on the DIC. Consistent DI is needed to make Sherlock testable.
  • Syntax: generally make the syntax consistent and fluent. Singular/plural methods. Make constructors consistent (e.g. everyone can use array and inline)

polyfractal avatar Jun 02 '13 15:06 polyfractal