[TYPO3-GSoC] Re: Status Update: BuilderFoundation & TemplateBuilder

Jacob Floyd cognifloyd at gmail.com
Tue Jul 23 08:44:33 CEST 2013


Update: 23 July 2013

☠ Too many unknowns...
☠ I thought this would be a lot easier to design/build... oops. But I think the work I've done (and will do) is still very valuable, even if I can't finish everything I'd originally planned to finish this summer. (Reminds me of something robert_we has been tweeting about, something along the lines of #NoEstimates... *facepalm*) I'm trying to get something out that other people can test and play with ASAP.

✔ Posted the part of my UML diagram that shows the BlobQuery stuff. (very cool stuff in a very geeky way)
- http://cognifloyd.blogspot.com/2013/07/builderfoundation-blobquery.html
✔ Turning UML diagram into code
➜ Continue working out the process of how to work with blobs in a derivative (FlowQuery is a *huge* part of that).
➜ Continue turning BlobQuery into a reality and write tests that show how this is meant to work.

✔ Came up with what I think is an elegant explanation of the purpose of Blobs in the BuilderFoundation (feedback please):
A blob provides a semantic editing API for a particular kind of file. Instead of using some string-manipulation-kung-fu with fantastic regex expressions to edit a file--hopefully without breaking something--a blob allows you to treat a file in a more semantic manner. Instead of using regex to add a <f:base/> tag to an html template, you would load a blob with that html template, and do tell it, in(head)->insert(base).

A more technical explanation: A blob represents a file, a stream, or a portion of a file or stream. It could be a string representation (ie plain text), or it could be a more abstract representation of what is in that file, or what should be in a collection of files in a particular package. It's meant to be something like a general purpose abstract syntax tree with the express purpose of being editable. The Blob API is a Domain Specific Language built on and extending FlowQuery. Each action you can do on a Blob--each part of the DSL or Blob API--is called a BlobOperation (which is essentially, just a FlowQuery Operation).

One of the benefits of having a unified approach to interacting with these Blobs is that I will be able to use some AOP aspects to wrap all of the Blob Operations and record them (possibly in YAML) to provide an undo/redo/migration service and a round-tripping service that works across all BlobTypes.

✔ Researched HTML editing in PHP, including how to select elements
ⓘ Github issue that discusses my research and conclusions on the topic: http://bit.ly/1bYKVVh
- Fizzle is an interesting option to use as a selector, but is designed to work more with objects, and I'm not sure that I can contort it enough to make it work for selecting sections of an HTML doc or a Fluid Template.
- Currently Flow is using symfony/DomCrawler to interact with HTML files, but there are lovely warnings in the docs that say it is not meant for editing HTML files, and that's my main purpose.
- CSS Selectors can't select inner/outer like TV's custom selectors - but this feature is important.
- Neither Fizzle nor DomCrawler meet the needs of the TemplateBuilder.
- The TemplateBuilder should allow for using CSS Selectors when they are powerful enough, but will only generate XPath selectors internally. If someone provides a CSS Selector, it will be stored/used as is (possibly converted to an XPath using symfony/CssSelector), but for the most part the selector language for HTML and Fluid Templates will be XPath.
https://github.com/cognifloyd/Cognifire.BuilderFoundation/issues/18#issuecomment-21032461

♫ My birthday is 24 July (that's tomorrow!) and I'll be 26.

ⓘ Changesets that this project depends on, and need to be reviewed:
- https://review.typo3.org/#/q/topic:package-by-type,n,z
ⓘ Current plans and notes available (newest first):
- https://github.com/cognifloyd/Cognifire.BuilderFoundation/wiki/Epic-discovery (pictures of the stories on my whiteboard)
- More notes on my whiteboard and in my notebook...
- http://bit.ly/CBP-Chart-Scope (Charts and what is in-scope for this GSoC here)
- http://bit.ly/CBP-Basics
- http://bit.ly/Design-T3BP
- http://bit.ly/FluidBPProposal
ⓘ I will be working in my namespace, Cognifire, until everything is ready to be pushed to git.typo3.org
ⓘ Follow my GSoC work on github (working in the proof-of-concept branch for now)
- https://github.com/cognifloyd/Cognifire.BuilderFoundation
- https://github.com/cognifloyd/Cognifire.TemplateBuilder
- https://github.com/cognifloyd/Cognifire.EmptyBoilerplate
ⓘ I'm using the name BuilderFoundation

~~~
Legend:

✔ done
➜ next steps
☠ impediment
ⓘ background info
♫ celebrated


More information about the TYPO3-gsoc mailing list