View Source

<ac:macro ac:name="toc" />


<li>Date: 21 March 2012, 18:00-19:00 UTC</li>
<li><ac:link><ri:page ri:content-title="2012-03-21 Meeting Agenda" /><ac:link-body>Agenda</ac:link-body></ac:link></li>
<li>Moderator: Matthew Weier O'Phinney (nickname weierophinney)</li>
<li>Next meeting: 28 March 2012</li>


<h3>Forms RFC</h3>

<p>(Search for 18:03 in the log.)</p>

<p>Matthew (weierophinney) indicated he'd finished incorporating feedback from the mailing list and comments to the <ac:link><ri:page ri:content-title="RFC - Forms" /><ac:link-body>Forms RFC</ac:link-body></ac:link>, and wanted to determine if it was ready for development at this stage.</p>

<p>Mike Willbanks (mwillbanks) raised an objection to using the term &quot;Model&quot; in the form component. Matthew and Guilherme Blanco (guilhermeblanco) indicated that the usage gives symmetry with the View layer, and that forms are largely considered part of a Data Transfer Object anyways, which is one form of &quot;model&quot;. Mike and others indicated that they feel &quot;model&quot; is a loaded term and could raise unintended connotations for new users. Matthew asked Mike to create a poll; the functionality remains the same, but we should ask a larger population what their preference is for naming. (Mike suggested &quot;Object&quot;.)</p>

<p>Artur Bodera (Thinkscape) does not like that decorators are gone from the new RFC, and also lamented the lack of an easy pattern such as &quot;$this-&gt;renderForm($form)&quot;. Matthew and Kyle Spraggs (SpiffyJr) indicated that the proposed usage of view helpers largely mimics the decorators from ZF1 without calling them such, and that it's entirely possible to create a helper that would render an entire form at once. A point was also made that we could build something mimicing the decorator system in ZF1 via view helpers (i.e., pass a list of helpers to use, and the helper would call each in turn). Artur thinks these are must-haves for a stable release. Matthew indicated he's fine with including something these items in the spec, but that he will not prioritize it for beta4.</p>

<p>Matthew raised a question about subforms (now called Fieldsets): should they be able to validate themselves? His original intent was that validation happens at the form-level only; however a number of people have indicated they'd like to build a form out of several smaller forms. After discussion, we decided that Fieldsets and Forms will be equivalent in functionality.</p>

<p>In the end, when Matthew asked if he had a green light, votes were in favor.</p>

<p><strong>tl;dr</strong>: Forms RFC is ready for development!</p>

<h3>Removing automatic translations</h3>

<p>(Search for 18:30 in the log.)</p>

<p>Ben Scholzen (DASPRiD) raised an item on the agenda regarding translations. In ZF1, and much of the current ZF2 code base, components which might benefit from i18n/l10n concerns allow injecting a Translator; in fact, if not injected, most of these will pull it from the registry, if available. This has led to hard to debug issues running the full test suite, as well as hard to debug issues when on a site with multiple locales possible. </p>

<p>However, the biggest problem is that it makes it almost impossible to use scanners such as xgettext to build up lists of strings that need translations, because there's no single pattern to look for in the code, and because many of the strings are found embedded in class properties.</p>

<p>Ben suggests we remove automatic translation from ZF2. He suggests two possiblities, neither of which is exclusive:</p>

<li>Explicit translations: <code>$label = $translator-&gt;translate('some string');</code> This has the benefit of being easily scanned for, and is completely opt-in; developers would pass in already translated strings where needed.</li>
<li>&quot;Lazy&quot; translation: have the translator return a functor that also implements <code>__toString()</code>: <code>$label = $translator-&gt;lazyTranslate('some string');</code> The benefit to this is that for objects that are loaded dynamically, we could still inject a translator instance; however, the strings would be still easily scanned for.</li>

<p>Some questions were raised about how this might impact error messages from form validation, particularly when using the Builder with annotations. Matthew brainstormed a little, and noted that since the Builder is consumed by a Factory, and the factory would contain things such as plugin brokers, developers could inject configured validators which would then be cloned by the broker (using the prototype pattern), thus effecting &quot;automated&quot; translation. This would obviously need some clear documentation samples. (Search for 18:45 in the log for the examples.)</p>

<p>In the end, we gave Ben a green light for this. The result will mean stripping translation from most ZF components.</p>

<p><strong>tl;dr</strong>: Explicit translations should make for better tooling, looser coupling, and likely more performant code.</p>


<ac:macro ac:name="html"><ac:parameter ac:name="output">html</ac:parameter><ac:plain-text-body><![CDATA[
pre.log {
white-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */
white-space: -pre-wrap; /* Opera 4 - 6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) */
word-wrap: break-word; /* IE 5.5+ */
border: 1px solid darkgray;
padding: 0.5em;
<pre class="log">
18:02 &lt;weierophinney&gt; let's get started!
18:02 &lt;weierophinney&gt; Reminder, agenda is here:
18:03 &lt;weierophinney&gt; First topic: Forms
18:03 &lt;weierophinney&gt; RFC for forms is here:
18:03 &lt;weierophinney&gt; If you haven't read through it yet... start. :)
18:04 &lt;Thinkscape&gt; weierophinney: what changed since 4 weeks ago ?
18:04 &lt;weierophinney&gt; I've incorporated a bunch of changes from the ML and comments, and I _think_ it's up-to-date at this point... unless anybody in here has additions.
18:04 &lt;mwillbanks&gt; weierophinney: I'm not a fan of the "bindModel" method; i would really like to see it more of a "bindObject" because that is more or less what it is
18:04 &lt;weierophinney&gt; Thinkscape: I've clarified the section on the Builder, based on discussions with SpiffyJr and guilhermeblanco, and added some interfaces.
18:05 &lt;DASPRiD&gt; Thinkscape,
18:05 &lt;mwillbanks&gt; i guess the thing about it, is that it started to state that ZF should care about what a "model is" and what a "model is not"
18:05 &lt;weierophinney&gt; mwillbanks: I had that argument with guilhermeblanco yesterday
18:05 &lt;SpiffyJr&gt; It's a model because it helps define the form, so in this context, I think model is accurate.
18:05 &lt;SpiffyJr&gt; Object is equally accurate - I have no preference.
18:05 &lt;weierophinney&gt; mwillbanks: I'm leaning towards using the term "Model" simply because it (a) implies an object, and (b) has a nice symmetry with Zend\View at this point.
18:06 &lt;DASPRiD&gt; SpiffyJr, stdclass ;P
18:06 &lt;Freeaqingme&gt; but some people consider their mappers to be a model, others consider entities their 'model'. Doesnt make it easier to explain..
18:06 &lt;Freeaqingme&gt; weierophinney, true
18:06 &lt;weierophinney&gt; mwillbanks: als, guilherme talked about forms being essentially data transfer objects, and thus "model" specific anyways.
18:06 &lt;Thinkscape&gt; weierophinney: does " @Assert\EmailAddress" really mean "@Filter" ?
18:06 &lt;DASPRiD&gt; Freeaqingme, they have to learn that they are wrong ;)
18:06 &lt;mwillbanks&gt; weierophinney: but only in some cases
18:06 &lt;SpiffyJr&gt; assert = validate
18:06 &lt;Thinkscape&gt; I don't use mappers.
18:06 &lt;weierophinney&gt; Thinkscape: yes -- that's from guilherme, and is a Doctrine annotation. We'd use different annotations.
18:06 &lt;SpiffyJr&gt; Thinkscape, you're asserting that the field is an email address
18:06 &lt;Thinkscape&gt; SpiffyJr: but then you have @filter
18:06 &lt;SpiffyJr&gt; assert = validate, filter = filter
18:07 &lt;Thinkscape&gt; why not @validate ?
18:07 &lt;Thinkscape&gt; because = Zend\Validate
18:07 &lt;SpiffyJr&gt; I just like the word more
18:07 &lt;SpiffyJr&gt; Validate makes more sense for zf2
18:07 &lt;DASPRiD&gt; Thinkscape, Zend\Validator ;)
18:07 &lt;weierophinney&gt; Thinkscape: we'd use the annotations work in Zend\Code, which, IIRC, uses class names.
18:07 &lt;SpiffyJr&gt; But, the glory of annotations, is that they're namespace based
18:07 &lt;SpiffyJr&gt; So you can use whatever you want
18:07 &lt;SpiffyJr&gt; I'll probably use assert but validate by default is probably best
18:07 &lt;weierophinney&gt; SpiffyJr: +1 there
18:07 &lt;EvanDotPro&gt; +1
18:08 &lt;weierophinney&gt; mwillbanks: when is a form _not_ a DTO?
18:08 &lt;Freeaqingme&gt; If we'd be going for annotations, I think there should be an option to still set validators etc programmatically. allows for easier extension
18:08 &lt;weierophinney&gt; mwillbanks: I was trying to come up with examples yesterday, but couldn't think of any.
18:08 &lt;SpiffyJr&gt; Freeaqingme, +1 - a must have, imo
18:08 &lt;weierophinney&gt; Freeaqingme: there will be
18:09 &lt;weierophinney&gt; Freeaqingme: the annotations would build on top of programmatic usage, and simply provide a convenience factor.
18:09 &lt;Freeaqingme&gt; that'd be great
18:09 &lt;SpiffyJr&gt; (a damn sexy convenience feature)
18:09 &lt;EvanDotPro&gt; Freeaqingme: absolutely.. i would imagine that's how the annotations would work anyway :)
18:09 &lt;guilhermeblan&gt; \o/
18:09 &lt;Thinkscape&gt; the rendering part still sucks to me. My argument being: decorators were pain, but once set up (and then elements/forms subclassed) i just worried about data/modelling/fields and not rendering. $form->render() was a bliss. In all other cases I used plain vanila HTML.
18:09 &lt;weierophinney&gt; Freeaqingme: also, note that there's an item to take forms built via the builder and cache them as full objects, which would, of course, utilize the programmatic support.
18:10 &lt;SpiffyJr&gt; Thinkscape, there's nothing wrong with creating your own view helper which, is essentially, a decorator.
18:10 &lt;Thinkscape&gt; Now, there's "something" -- there's a lot work to create i.e. a wrapper... I won't use it - just write HTML
18:10 &lt;Thinkscape&gt; but I don't get the option to have full-form-rendering.
18:10 &lt;SpiffyJr&gt; Yes you do, write a view helper for it.
18:10 &lt;SpiffyJr&gt; Or, we should include one by default
18:10 &lt;weierophinney&gt; Thinkscape: you can basically do decorators via view helpers.
18:10 &lt;SpiffyJr&gt; View helpers === decorators
18:10 &lt;Thinkscape&gt; I know I can
18:10 &lt;weierophinney&gt; SpiffyJr: exactly
18:10 &lt;Thinkscape&gt; I can also write my own Form component. not an argument :)
18:10 &lt;DASPRiD&gt; Thinkscape, i already brought up that point me thinks
18:10 &lt;Thinkscape&gt; I'm talking about what I get out of the box from zf2
18:10 &lt;DASPRiD&gt; so you can do echo $this->renderForm($form);
18:10 &lt;SpiffyJr&gt; weierophinney, Thinkscape +1 for including a default view helper to render an entire form?
18:11 &lt;jurians&gt; DASPRiD: +1
18:11 &lt;weierophinney&gt; Thinkscape: I think we can manage to do similar support via the view helpers.
18:11 &lt;weierophinney&gt; I don't want to prioritize it for beta4, though. There's a lot of work without going into a separate decorator system right now.
18:11 * Freeaqingme writes down to have those reviewed by a senior frontender (am getting comments regularly on zend_form 1 default decorators..)
18:11 &lt;DASPRiD&gt; weierophinney, oh, by the way, html5doctor and other sources say that dl/dt/dd is semantically *not* suited for forms :)
18:11 &lt;Thinkscape&gt; ok, but now we do still have a miriad of those "partial" view helpers... they are useless in my opinion. Too little flexible to use.
18:11 &lt;weierophinney&gt; Once we get the basics in place, if somebody wants to write that part, I'm for it.
18:12 &lt;Thinkscape&gt; The only thing I get is ..... i can shuffle them :\
18:12 &lt;weierophinney&gt; Thinkscape: they're no different than the decorator system is now, really
18:12 &lt;weierophinney&gt; Thinkscape: all the decorators do in most cases is delegate to view helpers anyways.
18:12 &lt;mwillbanks&gt; weierophinney: i guess in the foundations of forms it is a DTO; however, there may be instances where you only want it on the front-end and not on the back-end... meaning the DTO on the PHP side may not make sense; but binding them specifically to models IMO is not good or even the suggestion of which, since not all of the data from forms is to be utilized and in that case I believe it makes sense to state bindDto instead of bindModel
18:12 &lt;Thinkscape&gt; weierophinney: agreed.
18:12 &lt;Thinkscape&gt; weierophinney: we might come up with something better though.
18:12 &lt;mwillbanks&gt; uggg frontend/backend part sounded dirty
18:13 &lt;guilhermeblan&gt; mwillbanks: the DTO is still a model for a form
18:13 &lt;weierophinney&gt; mwillbanks: let's do a poll, then -- tbh, I know what it will do; the naming is simply for end users as far as I'm concerned.
18:13 &lt;guilhermeblan&gt; which can be a VO, an Entity, or a Zend_Db entity
18:13 &lt;weierophinney&gt; guilhermeblanco: or maybe none of those. ;-)
18:14 &lt;Freeaqingme&gt; VO?
18:14 &lt;guilhermeblan&gt; ValueObject
18:14 &lt;wilmoore&gt; But isn't Model binding optional anyhow?
18:14 &lt;guilhermeblan&gt; weierophinney: for rendering one... ya... you can be not using the DTP
18:14 &lt;matuszemi&gt; what happens in case I want to bind a form values into "multi-object"?
18:14 &lt;Freeaqingme&gt; I would go for entity since VO/entity/dto means all the same more or less, but I'm thinking entity is most commonly known/used
18:14 &lt;weierophinney&gt; wilmoore: yes -- but mwillbanks is suggesting we don't use the verbiage "Model" and instead "Object"
18:14 &lt;Thinkscape&gt; weierophinney: so basically the builder works by scanning annotations - regardles of what the class really is ? (mapper, vo, stdclass or whatever) ?
18:14 &lt;DASPRiD&gt; if i understand it correctly, model is juwst for validation
18:15 &lt;DASPRiD&gt; if you dont need the form on the backend, you dont need a model
18:15 &lt;guilhermeblan&gt; matuszemi: you map a master DTO and then you transfer the validate fields from the master form into the desired object
18:15 &lt;DASPRiD&gt; right?
18:15 &lt;Freeaqingme&gt; matuszemi, define 'multi-object'?
18:15 &lt;guilhermeblan&gt; if it's an hierarchy, you can add subforms
18:15 &lt;weierophinney&gt; Thinkscape: it _can_ use annotations. Your definition will determine if it does, and can even override annotations if present.
18:15 &lt;wilmoore&gt; mwillbanks: Model seems fine IMHO
18:15 &lt;Freeaqingme&gt; weierophinney, just checking, would there be any differences with subforms?
18:15 &lt;Freeaqingme&gt; as to now?
18:16 &lt;Evil_Otto&gt; wait, are we talking about creating forms via annotations in the models? (excuse my ignorance)
18:16 &lt;DASPRiD&gt; Evil_Otto, hah
18:16 &lt;weierophinney&gt; Freeaqingme: for the RFC right now, the main differences are: s/SubForm/Fieldset/, and not sure yet if they'd include validation, or if validation is at the form level only.
18:16 &lt;mwillbanks&gt; guilhermeblanco: wilmoore: the big thing that bugs me about the naming is what it suggests in what people "view" models as... it really is a value object and sure you might pass it directly to entities but note that i am saying "entities" not "entity", so in that case it is a ValueObject aka DataTransferObject much like anything else
18:16 &lt;weierophinney&gt; Evil_Otto: as an _option_ yes -- but you could also do everything programmatically or via a vanilla factory.
18:17 &lt;SpiffyJr&gt; weierophinney, ping me if you need input I'm in crunch time at work
18:17 &lt;SpiffyJr&gt; weierophinney, if not I'll read the log later
18:17 &lt;guilhermeblan&gt; mwillbanks: you always pass a DTO... I just added compatibility with the current ZF2 ViewModel
18:17 &lt;weierophinney&gt; SpiffyJr: cool, thx!
18:17 &lt;Evil_Otto&gt; so in theory i could make a change to my model and it would add the element to the form automagically when i go to grab the form next time?
18:17 &lt;weierophinney&gt; Evil_Otto: yes. :)
18:17 &lt;Thinkscape&gt; weierophinney: ok, just wanted to make sure it does not bind to specific "data management pattern". i.e. I usually don't use mappers and don't use vo too often. I want it to be able to digest any object and work with "definition" to build the form.
18:17 &lt;Evil_Otto&gt; Oh I'm going to use the hell out of that.
18:17 &lt;weierophinney&gt; Thinkscape: it doesn't.
18:17 &lt;DASPRiD&gt; Evil_Otto, hehe
18:17 &lt;wilmoore&gt; mwillbanks: I see your point, though I still think Model works fine and forces people to really think about how they are naming things. That said, the path of least resistance seems like going with Object would be fine.
18:18 &lt;wilmoore&gt; mwillbanks: kind of a win-win situation :)
18:18 &lt;weierophinney&gt; wilmoore: I'm fine with a poll, too.
18:18 &lt;Thinkscape&gt; weierophinney: I'd avoid using "model" though, as it's also a pattern. Builder working with "objects" might be a better wording (while giving a few examples of objects people normally will use)
18:18 &lt;guilhermeblan&gt; mwillbanks: also... Object or DTO is a non-specialized terminology... Model is a specialization of a DTO
18:18 &lt;wilmoore&gt; weierophinney: a good poll never hurt anybody :)
18:18 &lt;guilhermeblan&gt; weierophinney: poll +0
18:19 &lt;DASPRiD&gt; ValueObject still sounds good to me as well ;)
18:19 &lt;mwillbanks&gt; guilhermeblanco: depending on the pattern :|
18:19 &lt;weierophinney&gt; guilhermeblanco: I think that's understood -- I think what mwillbanks is getting at is he feels the terminology is too specialized.
18:19 &lt;DASPRiD&gt; or TheThingWillValidatorsAndFiltersAttachedToIt
18:19 &lt;weierophinney&gt; DASPRiD: too verbose
18:19 &lt;DASPRiD&gt; weierophinney, :(
18:19 &lt;weierophinney&gt; both of them. :)
18:19 &lt;Thinkscape&gt; weierophinney: ^^
18:19 &lt;DASPRiD&gt; :P
18:19 &lt;mwillbanks&gt; DASPRiD: i liked that one :)
18:19 &lt;SpiffyJr&gt; subforms = fieldsets now?
18:19 &lt;SpiffyJr&gt; iirc
18:19 &lt;weierophinney&gt; SpiffyJr: yes
18:19 &lt;DASPRiD&gt; weierophinney, i thought we like it verbose :P
18:20 &lt;wilmoore&gt; DASPRiD: your naming just grew on me
18:20 &lt;mwillbanks&gt; DASPRiD: twss
18:20 &lt;weierophinney&gt; SpiffyJr: do you think subforms/fieldsets should be able to validate by themselves? or leave that to the form composing them?
18:20 &lt;DASPRiD&gt; wilmoore, hehe
18:20 &lt;weierophinney&gt; keep it clean, folks
18:20 &lt;weierophinney&gt; Any other questions/concerns/feedback for the forms RFC?
18:21 &lt;Thinkscape&gt; subforms: If we used builder with nested/recursive structures (like object having object) then subforms should also be forms - be build with a (separate) definition.
18:21 &lt;DASPRiD&gt; on a sidenote: can we divide the RFC group into open/done or something? it gets really confusing to see what's still active there
18:21 &lt;weierophinney&gt; My big question is: do I have a green light to proceed at this point?
18:21 &lt;DASPRiD&gt; +1
18:21 &lt;weierophinney&gt; DASPRiD: yes, we need to do so. Since you asked the question, I volunteer you for that task. :)
18:21 &lt;DASPRiD&gt; :P
18:21 &lt;weierophinney&gt; Thinkscape: good point.
18:21 &lt;DASPRiD&gt; as if i knew what's still open there
18:22 &lt;weierophinney&gt; Thinkscape: the way I've conceived it currently is that a form is a fieldset with validation -- we could simply merge the concepts.
18:22 &lt;guilhermeblan&gt; weierophinney: sorry... I gtg
18:22 &lt;weierophinney&gt; laters, guilhermeblanco -- thanks for the help with the RFC!
18:22 &lt;Thinkscape&gt; also: we have FooDefinition and BarDefinition .... if foo object contains bar, bar form is built with BarDefinition.
18:22 &lt;Thinkscape&gt; fieldset vs form ---it's just rendering
18:22 &lt;Thinkscape&gt; structurally, it could be form in a form.
18:22 &lt;Freeaqingme&gt; +1 Thinkscape
18:22 &lt;Thinkscape&gt; Also - and the validateRecursively()
18:23 &lt;Thinkscape&gt; filterRecursively() etc.
18:23 &lt;weierophinney&gt; Thinkscape: well, it's also a matter of validation. Right now, it's simpler if there's only one input filter, but we could compose multiple ones as well.
18:23 &lt;weierophinney&gt; using recursion, yes.
18:23 * weierophinn is getting a headache... he's gone down that road before...
18:23 &lt;Thinkscape&gt; weierophinney: wait ... BarDefinition with object bar has _different_ validators than foo
18:23 &lt;Thinkscape&gt; can't mix those... or you'll be in trouble.
18:23 &lt;Thinkscape&gt; foo contains bar ... $foo->bar instanceof bar
18:23 &lt;mwillbanks&gt; weierophinney: that part scares me :(
18:24 &lt;weierophinney&gt; Thinkscape: STOP! YOU'RE MAKING IT TOO COMPLEX!
18:24 &lt;weierophinney&gt; :)
18:24 &lt;mwillbanks&gt; weierophinney: seem to remember a translate bug deep in the process in zf1
18:24 &lt;Thinkscape&gt; I won't comment on my headache when going through Zend\View last weekend :P :P
18:24 &lt;weierophinney&gt; mwillbanks: that's the next topic :)
18:24 &lt;mwillbanks&gt; weierophinney: strategery :p
18:24 &lt;weierophinney&gt; Any other questions/concerns/feedback for the forms RFC? Ready/not-ready?
18:24 &lt;matuszemi&gt; tbh.. if we keep current subform functionality and getValues() returns array of arrays of arrays of... (super useful when developing module extensions) I'm up for anything ;)
18:25 &lt;weierophinney&gt; Thinkscape: yep, need to get back to you on that. :)
18:25 &lt;weierophinney&gt; matuszemi: fieldsets are meant to have nested structures, so should be no problem.
18:25 &lt;SpiffyJr&gt; did my internet die?
18:25 &lt;SpiffyJr&gt; no comments for 4 minutes...
18:25 &lt;mwillbanks&gt; Thinkscape: i think my team has a good solid solution for DM and entities for that type of stuff; let me check into it
18:25 &lt;Freeaqingme&gt; weierophinney, ready here. With the one note that we shouldnt hack on subforms to it later
18:25 &lt;weierophinney&gt; Freeaqingme: it's part of the design.
18:25 &lt;DASPRiD&gt; mwillbanks, DM? DarkMatter?
18:26 &lt;mwillbanks&gt; DASPRiD: muhahaha
18:26 &lt;Freeaqingme&gt; weierophinney, ready ;)
18:26 &lt;mwillbanks&gt; mwillbanks: data mapper
18:26 &lt;weierophinney&gt; SpiffyJr: yes. Been busy in here. :)
18:26 &lt;DASPRiD&gt; mwillbanks, ah… why are you talking to yourself? :D
18:26 &lt;mwillbanks&gt; :(
18:27 &lt;weierophinney&gt; Green light/red light, folks? It sounds like "yes", but I want to be sure.
18:27 &lt;matuszemi&gt; weierophinney: so we do not nest forms? but form can have elements and element sets?
18:27 &lt;Spabby&gt; green
18:27 &lt;mwillbanks&gt; weierophinney: go
18:27 * DASPRiD looks for the green lightbulb
18:27 &lt;DASPRiD&gt; /set background-color #00ff00
18:27 &lt;DASPRiD&gt; kay, you got green light
18:27 &lt;mwillbanks&gt; DASPRiD:
18:27 &lt;DASPRiD&gt; mwillbanks, :)
18:28 &lt;SpiffyJr&gt; holy scroll
18:28 &lt;DASPRiD&gt; mwillbanks, very nice graphic actually ;)
18:28 &lt;DASPRiD&gt; mwillbanks, except for the bottom…
18:28 &lt;DASPRiD&gt; mwillbanks, badly colored there, should have been excluded
18:28 &lt;weierophinney&gt; matuszemi: fieldsets can be nested; also, sounds like I'll treate fieldsets and forms as equals.
18:28 &lt;SpiffyJr&gt; weierophinney, validate themselves
18:28 &lt;mwillbanks&gt; DASPRiD: well; compliments of google image search
18:28 &lt;SpiffyJr&gt; weierophinney, it's possible you could have a "subform" that's only a subform part of the time
18:28 &lt;SpiffyJr&gt; but also a fully functioning form on its own
18:29 * DASPRiD just noticed that he wrote a micro-RFC in the agenda
18:29 &lt;weierophinney&gt; SpiffyJr: yep, that's the request/discussion in here.
18:29 &lt;SpiffyJr&gt; weierophinney, i had about 100 lines of scroll
18:29 &lt;Thinkscape&gt; SpiffyJr: it will be, actually.
18:29 &lt;mwillbanks&gt; DASPRiD: you're just realizing that?
18:29 &lt;weierophinney&gt; So... I'll take this as a provisional "yes" vote at this time, and get started.
18:29 &lt;SpiffyJr&gt; weierophinney, borrowing internet from the neighbor until my new router arrives?
18:29 &lt;DASPRiD&gt; mwillbanks, heh yeah
18:29 &lt;DASPRiD&gt; mwillbanks, i wrote it at work while doing other stuff ;)
18:29 &lt;matuszemi&gt; weierophinney: cool.. again.. if I can do $mainform->addSubfom($subform) I'm cool..
18:29 &lt;weierophinney&gt; Next topic: DASPRiD wants to talk about translations. :)
18:29 &lt;DASPRiD&gt; \o/
18:30 &lt;weierophinney&gt; matuszemi: $mainform->add($fieldset) -- even easier. :)
18:30 &lt;weierophinney&gt; DASPRiD: you have the floor.
18:30 &lt;mwillbanks&gt; DASPRiD: +1
18:30 &lt;mwillbanks&gt; :p
18:30 &lt;DASPRiD&gt; okay so i hope most people here have read the micro RFC in the agenda
18:30 &lt;mickaelCOLLET&gt; +1
18:30 &lt;DASPRiD&gt; the problem many people had with zf1 is the automagical translation feature
18:30 &lt;DASPRiD&gt; because scanners like xgettext simply cannot extract message ids from configs
18:30 &lt;DASPRiD&gt; except if you write some dirty hacks (i did that a lot)
18:31 &lt;DASPRiD&gt; the idea is to make translations in forms, navigation and so on explicit
18:31 &lt;matuszemi&gt; weierophinney: what happens if you want to reuse subform separatelly? anyway.. let's discuss this later on zftalk.2
18:31 &lt;DASPRiD&gt; just like the path we followed with zf2 the entire time so far
18:31 &lt;DASPRiD&gt; performance wise it shouldn't matter a lot, especially thanks to the new lazy loading of text domains
18:31 &lt;DASPRiD&gt; that plus Bittarman's suggestion of lazy translations
18:32 &lt;DASPRiD&gt; plus the new caching strategy
18:32 &lt;matuszemi&gt; +1 for explicit translations.. I've had same problem.
18:32 &lt;DASPRiD&gt; so, there are two examples in the agenda demonstrating what i suggest
18:32 &lt;DASPRiD&gt; are there any thoughts about/against that?
18:33 &lt;mwillbanks&gt; DASPRiD: green light
18:33 &lt;wilmoore&gt; DASPRiD: +1
18:33 &lt;DASPRiD&gt; weierophinney, since you are doing forms, any concerns there?
18:33 &lt;Gabriel403&gt; I'm pro it
18:33 &lt;weierophinney&gt; DASPRiD: the only thing I see there I'm not sure of is that if you're extending Form to create a custom one, you'd need to inject a translator, so that as you build elements, you have it available.
18:33 &lt;weierophinney&gt; DASPRiD: correct?
18:34 &lt;weierophinney&gt; but that also means we don't have to have direct integration with Translator by default
18:34 &lt;weierophinney&gt; which I like -- makes my job easier. :)
18:34 &lt;DASPRiD&gt; weierophinney, heh
18:34 &lt;DASPRiD&gt; weierophinney, that's the idea behind it
18:34 &lt;DASPRiD&gt; it also removes coupling of i18n from forms, navigation and so on
18:35 &lt;DASPRiD&gt; and well, how the user gets the translator into it when extending is up to him, tho we could supply examples/best practices
18:35 &lt;SpiffyJr&gt; +1 for explicit translations (back to work)
18:35 &lt;matuszemi&gt; ^^ ;) yep..
18:35 &lt;Freeaqingme&gt; +1
18:35 &lt;DASPRiD&gt; who was working on zend\navigation again?
18:35 &lt;SpiffyJr&gt; <--
18:35 &lt;DASPRiD&gt; SpiffyJr, ah great, then you can refactor translator out of it ;)
18:35 &lt;SpiffyJr&gt; ah hell
18:36 &lt;SpiffyJr&gt; did i say me?
18:36 &lt;SpiffyJr&gt; i meant, uh, yah.
18:36 &lt;matuszemi&gt; SpiffyJr: when is it gonna be finished?
18:36 &lt;Gabriel403&gt; wouldn't you translate before you get to the form? so the form only has the text it needs?
18:36 &lt;weierophinney&gt; DASPRiD: I'm +1, then. auto-translation and deep integration of translation in the various components has been a testing nightmare.
18:36 &lt;DASPRiD&gt; weierophinney, question is, what about validators?
18:36 &lt;DASPRiD&gt; weierophinney, i know…
18:36 &lt;DASPRiD&gt; Gabriel403, see ->lazyTranslate() in the agenda example
18:36 &lt;SpiffyJr&gt; matuszemi, uh, soon'ish?
18:36 &lt;SpiffyJr&gt; matuszemi, work just got busy
18:36 &lt;weierophinney&gt; DASPRiD: you can already inject the message strings to use.
18:36 &lt;matuszemi&gt; hours/days? :)
18:37 &lt;SpiffyJr&gt; i'm not doing much with navigation, or wasn't...
18:37 &lt;DASPRiD&gt; weierophinney, ah, so you could just insert lazy translation callbacks there as well
18:37 &lt;weierophinney&gt; DASPRiD: I'd argue we leverage that, and have good examples of how to do it.
18:37 &lt;SpiffyJr&gt; matuszemi, all I had left was tests and community input
18:37 &lt;weierophinney&gt; DASPRiD: yes
18:37 &lt;DASPRiD&gt; weierophinney, sounds good!
18:37 &lt;SpiffyJr&gt; matuszemi, but if i'm moving translation out maybe a bit more?
18:37 &lt;Gabriel403&gt; DASPRiD: weierophinney that's was what i was meaning
18:37 &lt;matuszemi&gt; cool.. nice. so it's available from zf2/master?
18:37 &lt;SpiffyJr&gt; no
18:37 &lt;SpiffyJr&gt; itll be on my branch
18:37 &lt;DASPRiD&gt; Thinkscape, as the usual no-sayer: got any concerns?
18:37 &lt;weierophinney&gt; Gabriel403: it looks like we could accommodate it by either the lazyTranslation or by injecting message strings.
18:38 &lt;DASPRiD&gt; weierophinney, injecting message strings?
18:38 &lt;weierophinney&gt; DASPRiD: each validator allows you to specify the various error message strings already
18:38 &lt;DASPRiD&gt; yup
18:38 &lt;weierophinney&gt; they just provide defaults.
18:38 &lt;DASPRiD&gt; indeed
18:38 &lt;DASPRiD&gt; (very user-unfriendly ones)
18:38 &lt;weierophinney&gt; so, we either document how to inject them, or we use lazyTranslation.
18:39 &lt;weierophinney&gt; either way, should simplify things.
18:39 &lt;DASPRiD&gt; weierophinney, well, the user uses lazy translations by injecting those :)
18:39 &lt;weierophinney&gt; ah, well then. :)
18:39 &lt;DASPRiD&gt; we juwst have to document it well
18:39 &lt;weierophinney&gt; yep
18:39 &lt;Thinkscape&gt; DASPRiD: i'm flattered. Just do it the best way I stopped caring.
18:39 &lt;Gabriel403&gt; weierophinney: if you use notations for adding validation would that mean you'd use di for injecting the messages?
18:40 &lt;DASPRiD&gt; Thinkscape, heh okay ;)
18:40 &lt;weierophinney&gt; Gabriel403: good question.
18:40 &lt;DASPRiD&gt; good point indeed
18:40 &lt;weierophinney&gt; DASPRiD: thoughts on Gabriel403's concerns?
18:40 &lt;weierophinney&gt; actually...
18:40 &lt;DASPRiD&gt; actually?
18:40 &lt;wilmoore&gt; Thinkscape: burn out?
18:40 &lt;weierophinney&gt; Gabriel403: the builder is consumed by the factory
18:41 &lt;Thinkscape&gt; wilmoore: having such label stuck on forehead... no thank you :)
18:41 &lt;weierophinney&gt; Gabriel403: I'd expect we could provide either default configuration or default objects (prototype pattern) to make that happen.
18:41 &lt;wilmoore&gt; Thinkscape: :)
18:41 &lt;wilmoore&gt; Thinkscape: It's done all in love.
18:41 &lt;DASPRiD&gt; weierophinney, but yeah, annotations and explicit translations don't go well together
18:42 &lt;DASPRiD&gt; Thinkscape, yeah, we all like you ;)
18:42 &lt;weierophinney&gt; DASPRiD: you have to configure the builder anyways, so I'd expect you'd know the various validators you might use in your application
18:42 &lt;DASPRiD&gt; weierophinney, mhhh, i'm not too much into that builder yet
18:42 &lt;mwillbanks&gt; wait.... are we talking about translate or are we talking about forms again?
18:42 &lt;DASPRiD&gt; mwillbanks, both right now
18:43 &lt;DASPRiD&gt; mwillbanks, translator + annotations with labels and validation messages
18:43 &lt;mwillbanks&gt; alright; i gotta sit that one out... too much magic for me
18:43 &lt;DASPRiD&gt; mwillbanks, yeah, annotations are also not my area
18:44 &lt;weierophinney&gt; mwillbanks: I actually think we can make it explicit and automatic at the same time here.
18:44 &lt;Gabriel403&gt; I would have thought anotations use default message, adding validation programmatically would expose functionality to check them?
18:44 &lt;Gabriel403&gt; to alter them*
18:44 &lt;weierophinney&gt; Gabriel403: see above -- annotations will match to a validator, which means if we have a prototype or configuration for it already, we can provide the translations.
18:45 &lt;DASPRiD&gt; weierophinney, could you come up with an example?
18:45 &lt;Gabriel403&gt; What DASPRiD said
18:45 &lt;weierophinney&gt; DASPRiD: Factory will likely use the PluginSpecBroker. That allows us to pass in things like "string_length" => array('messages' => array(...))
18:46 &lt;mwillbanks&gt; weierophinney: yes; i will use the explicit; just that annotations don't make me too happy... i understand people like them but it just seems like another one of those lets allow people to do the same thing 3 different ways
18:46 &lt;weierophinney&gt; so, when we have an annotation that maches that validator, it loads from the plugin broker, which gives us a configured object.
18:46 &lt;Evil_Otto&gt; mwillbanks: you must be new here.
18:46 &lt;mwillbanks&gt; weierophinney: not saying its a bad thing; i just enforce non-usage in code reviews for my team
18:46 &lt;Evil_Otto&gt; :D
18:46 &lt;DASPRiD&gt; weierophinney, interesting
18:46 &lt;weierophinney&gt; mwillbanks: they're opt-in only anyways.
18:46 &lt;DASPRiD&gt; weierophinney, what if you have the validator with the same name applied to two different fields, and want two different error messageS?
18:47 &lt;mwillbanks&gt; Evil_Otto: haha; you're always waiting for that punch line
18:47 &lt;DASPRiD&gt; (just had that in a current projecT)
18:47 &lt;weierophinney&gt; DASPRiD: you map different names for the validators, but have them resolve to the same class.
18:47 &lt;Gabriel403&gt; dinner time, will read back in a bit
18:47 &lt;DASPRiD&gt; weierophinney, ah!
18:47 &lt;DASPRiD&gt; weierophinney, however that works with your annotations then :)
18:47 &lt;weierophinney&gt; since we use a class-map by default with the plugin loaders, this is trivial now. :)
18:47 &lt;weierophinney&gt; DASPRiD: yep. :)
18:47 &lt;DASPRiD&gt; okay, this sounds all good to me
18:48 &lt;weierophinney&gt; DASPRiD: annotation can map to a short name -- which the broker can then map to a class
18:48 &lt;weierophinney&gt; any other questions/concerns/feedback for DASPRiD and his translation ideas?
18:48 &lt;weierophinney&gt; green light/red light?
18:49 &lt;matuszemi&gt; green
18:49 &lt;Thinkscape&gt; pink
18:49 &lt;wilmoore&gt; green
18:49 * DASPRiD stabs Thinkscape
18:49 &lt;DASPRiD&gt; Thinkscape, your nickname is actually pruple here :P
18:50 &lt;weierophinney&gt; Thinkscape: reservations? I'd like to hear them, if you have them.
18:51 &lt;Thinkscape&gt; nah. Anything left on agenda ?
18:51 &lt;mwillbanks&gt; GREEN!
18:51 &lt;gammamatrix&gt; i have a question about a pull request i did:
18:51 &lt;gammamatrix&gt;
18:51 &lt;DASPRiD&gt; gammamatrix, wrong channel for that (me thinks)
18:51 &lt;gammamatrix&gt; i brought this up last week
18:51 &lt;gammamatrix&gt; in this meeting
18:52 &lt;DASPRiD&gt; oh, nevermind then
18:52 &lt;DASPRiD&gt; i wasn't there
18:52 &lt;gammamatrix&gt; but you are probably right :)
18:52 &lt;DASPRiD&gt; weierophinney, so, i guess that's a 100% green then
18:52 &lt;DASPRiD&gt; i'd say we are done
18:52 * DASPRiD cleans the floor
18:53 &lt;SocalNick&gt; general request about irc meetings: could whoever is in charge of scheduling meetings send a iCal message to the mailing list so we can add to Google Calendar, or other calendar software?
18:53 &lt;weierophinney&gt; gammamatrix: what's the question?
18:53 &lt;weierophinney&gt; SocalNick: noted.
18:53 &lt;DASPRiD&gt; SocalNick, every week, same time
18:53 &lt;gammamatrix&gt; what is the next step with the pull request?
18:53 &lt;weierophinney&gt; gammamatrix: myself, my team, or CR team needs to review and merge.
18:53 &lt;SocalNick&gt; thx
18:53 &lt;weierophinney&gt; We're a little behind right now.
18:53 &lt;gammamatrix&gt; ok, do i need to mark it as anything?
18:53 &lt;gammamatrix&gt; i am not in a hurry :)
18:53 &lt;weierophinney&gt; (Akrabat, myself, and a few others are finishing up 1.12.0 related code)
18:54 &lt;weierophinney&gt; gammamatrix: nope, you're all set.
18:54 &lt;gammamatrix&gt; thanks!
18:54 &lt;DASPRiD&gt; gammamatrix, when you open a pull request, it is ready to merge
18:54 &lt;DASPRiD&gt; (if it is not, then close it again ;))
18:54 &lt;weierophinney&gt; okay, I'm calling the meeting over at this point!
18:54 &lt;DASPRiD&gt; kay
18:54 &lt;weierophinney&gt; thanks everyone for the feedback!