Skip to content

Instantly share code, notes, and snippets.

@Thinkscape
Created July 17, 2012 14:40
Show Gist options
  • Select an option

  • Save Thinkscape/3129794 to your computer and use it in GitHub Desktop.

Select an option

Save Thinkscape/3129794 to your computer and use it in GitHub Desktop.
SM and normalization
[16:30] <Zend\Bot> ralphschindler, Thinkscape wants me to remind you to tell ocramius and Thinkscape why do we normalize names and aliases in Service Manager? (written 0 minutes ago)
[16:31] <ralphschindler> did you guys figure that one out already? ;)
[16:31] <Thinkscape> ralphschindler: ;) not really
[16:31] <ezimuel> Thinkscape: we are improving the doc2rst conversion script, I will re-run the script on the entire documentation in a while
[16:32] <Thinkscape> ezimuel: ok, thx.
[16:32] <Thinkscape> ralphschindler: couldn't we just remove it and depend on 1:1 mappings ?
[16:32] <ralphschindler> ultimately, it can be changed. In my world of programming, service names are not supposed to be strict, for the same reasons PHP's functions and methods are not strict
[16:33] <ralphschindler> that looseness is there to promote service reuse
[16:33] <ralphschindler> why penalize one 3rd party developer when he uses 'db' and another uses 'Db'
[16:33] <ralphschindler> they effectively are talking about the same service
[16:33] <Thinkscape> ralphschindler: ocramius: wouldn't strtolower cut it?
[16:34] <Maks3w> ezimuel, I did the title review
[16:34] <Thinkscape> there's a full regex
[16:34] <ralphschindler> the problem here is that people are using Di with service manager (very unintended) and putting things that are really "not services" in the service manager (simply can't stop people from doing this)
[16:34] <Thinkscape> interesting...
[16:34] <Thinkscape> ocramius: wake up! ^
[16:34] <Thinkscape> ocramius: you're one of those people...
[16:34] <ralphschindler> Thinkscape: same rational: someone does 'edp_user', another does 'EdpUser'
[16:34] <ralphschindler> same thing
[16:34] <Maks3w> ezimuel, Basically don't change anything from the doctree titles, except for one case where <article> was used and I used a more important title
[16:35] <Thinkscape> ralphschindler: well, the was a rationale that actually EdpUser !== edp_user.
[16:35] <Thinkscape> ralphschindler: though I understand the convenience normalization brings in.
[16:35] <ralphschindler> the original point of the service manager was to allow service coordination between developers that have never med before
[16:36] <ezimuel> Maks3w, some of the section tags in reStructuredText are not "standard", that's why i used =, -, and ^ only
[16:36] <ralphschindler> so one can create a module that exposes a service, and another can consume it
[16:36] <ralphschindler> if one uses MyService conventions (camel case), and other is entirely using under_score, they can operate without mixing and matching in their code bases
[16:36] <Thinkscape> ralphschindler: you're right.
[16:36] <ralphschindler> but, like I said, its by now taken on a life all its own
[16:37] <Maks3w> ezimuel, Yep, Anyway don't change nothing, only the titles for examples are differents
[16:37] <ralphschindler> its probably like 20% of the original design at this point
[16:37] <Maks3w> ezimuel, But I formatted them from a different way (IMO is better) using 'rubric'
[16:38] <Maks3w> ezimuel, show them are out from the doctree and that for me have sense,
[16:38] <Thinkscape> ralphschindler: abstract factories are having unnecessary complexity due to this. Otherwise, norm. is a performance hit which brought up the discussion we had before.
[16:39] <ralphschindler> yep
[16:39] <Thinkscape> ralphschindler: having bottomline: Why would we want to correct developers' typos - they should figure exact service name if they consume it, otherwise = exception.
[16:39] <ralphschindler> I'm ok with chaining it
[16:39] <ralphschindler> changing*
[16:39] <ezimuel> Maks3w: regarding the usage of file instead of directory do you agree? Did you read the comment https://github.com/zendframework/zf2/pull/1907#issuecomment-7033546 ?
[16:39] <ralphschindler> yeah- at this point I agree, we've already gone the "strict" route with using Doctrine Annotations
[16:39] <Thinkscape> though that will result in applications having CamelCased stuff mixed_with_ManyOther strange-ways of Namingservices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment