Comments (5)
i started working on making the twig test a full functional test that does not mock anything of createphp. this requires the whole phpcr-odm stack to dev, because the only mapper we have atm is the DoctrinePhpcrOdmMapper... but it actually works (and i fixed a couple of errors in the phcpr-odm doc along the way of bootstrapping this in the test).
anyways, now i am stuck on the problem that since the last refactorings, there seems to be no way to have simple collections of just strings, like the tags we have in our sample model. i won't find a solution for that problem tonight, but will try again on friday.
from createphp.
Am 14.11.12 21:40, schrieb David Buchmann:
i started working on making the twig test a full functional test that
does not mock anything of createphp. this requires the whole phpcr-odm
stack to dev, because the only mapper we have atm is the
DoctrinePhpcrOdmMapper... but it actually works (and i fixed a couple of
errors in the phcpr-odm doc along the way of bootstrapping this in the
test).anyways, now i am stuck on the problem that since the last refactorings,
there seems to be no way to have simple collections of just strings,
like the tags we have in our sample model. i won't find a solution for
that problem tonight, but will try again on friday.
yeah, no problem, we're not in a hurry :-)
Anyways, about the mapper: I had this problem, too in some unittests and
made the MockMapper class (which uses a simle array format as "storage
object"). Since mapper is framework-specific and adheres to an
interface, I don't find it so bad that it's fake. If the phpcr thing is
working, that's fine, too, even if it sounds a bit heavy :-)
—
Reply to this email directly or view it on GitHub
#37 (comment).
from createphp.
thanks for the tip, MockMappers seems to be able to do what i need, much nicer than having all of doctrine in the project.
however, i am still unsure what to do. the problem is with things like tags where we neither specify a "type" in the mapping nor are the single tags objects that the type factory could find rdf types for. what would be the right behaviour? should we provide a simple plaintext default type for such cases? its only a problem with collection items that are not themselves again complex types...
and does anybody have a good example of the html tags that are needed to make the createjs tags widget work? http://createjs.org/guide/#tags
@bergie do you happen to have an example of how the tags should look like in html?
from createphp.
Am 16.11.12 17:38, schrieb David Buchmann:
thanks for the tip, MockMappers seems to be able to do what i need, much
nicer than having all of doctrine in the project.however, i am still unsure what to do. the problem is with things like
tags where we neither specify a "type" in the mapping nor are the single
tags objects that the type factory could find rdf types for. what would
be the right behaviour? should we provide a simple plaintext default
type for such cases? its only a problem with collection items that are
not themselves again complex types...
Hm, I don't know how this is supposed to work in Create.js, but ow
exactly does it work on your end? I mean, if tags are not some form of
staorage entity, I imagine they must be something like a property of
another object, right? So like f.x. a comma-separated string that gets
saved in the DB's "article" table in the "tags" column. If this is the
case, then maybe it would be best not to use a collection here, but
rather define tags as a normal property and then configure a different
editor (e.g. jquery.ui autocomplete) for it. I'm not sure if Create.js
supports this yet, but it should, since at some point, we will want to
use datepickers and the like, too
from createphp.
storage in phpcr is a multivalue field. in an orm a serialized array could be used. or a separate table with n-m relations. there is this tag plugin in create.js that afaik treats tags somehow as entities (CRUD of items in the dom structure but it does not end up being persisted separatly like a normal collection.) this is why i would love to see a working real-world example of the tags plugin with the minimum/best-practice html structure.
from how our mappings looked before, i start to think we could just configure a Type for string, as we have one for each entity class. but that type would then have one single property, the string value.
the plugin used to work in the cmf sandbox, but does no longer and either way i have no clue what we where doing... @bergie, is there a good example of that html structure somewhere? would love to do it the right way.
from createphp.
Related Issues (20)
- how to properly create new items in collections HOT 15
- duplicate add buttons in collections HOT 6
- improve granular rendering HOT 14
- Twig extension broken HOT 2
- undefined method RdfTypeFactory::getTypeByClass() in CreatephpExtension.php HOT 2
- error handling HOT 5
- Provide full access to node rendering API in Twig extension HOT 8
- Tag a new release HOT 8
- Hello World not working (support request) HOT 1
- Correct property configuration (support request) HOT 1
- do not use class name publicly HOT 1
- mixing mappers HOT 11
- Repository class name for ORM has slashes instead of backslashes because it's passed in the URL HOT 5
- Inheritance of RDF mapping
- RDF mapping by annotations and by yml
- usage of xmlns:prefix attribute 'not allowed' in html5 tags HOT 2
- Changing editor for different content types HOT 4
- release 1.1 HOT 7
- Images upload HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from createphp.