-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: behavior aliases #330
Comments
What aproach would be then for the serialization ? The goal is to reduce the payload ? |
It would make the object nicer on the frontend (always painful to write |
Agree that is painful to write the interfaces to access the subschemas, the question is how we normalize on serialization the different interfaces, I mean, if we define guillotina.behaviors.dublincore.IDublinCore to dublincore and there is a field on top called dublincore, how we will be deterministic about where the content belongs. What about a definition of how a field that is a subschema is serialized and deserialized. Something like no option to have fields with 'b.' at the begining so we can use: b.dublincore ? |
@bloodbare conflicts would be rare I think but yes, produce a situation with unclear behavior. I'm not sure about "b.dublincore" though.. hmmm. Also could do I'd prefer just simple alias though. |
Another question: do we serialize with alias or with full dotted name? |
and is "alias" the right term. Should it just be "name"? |
I think I still want to do this. Any more thoughts on this? What about configuration validation so you can't have an alias that is a field or something like that? |
doesn't plone have something thats called a "named behavior" to make life easier with theses dotted names? maybe i am missing the point, but a "guillotina.dublincore" or "g.dublincore" similar would be nice. way nicer then the whole dotted name. |
@iham I'm not aware of anything like this in plone. I'd prefer an alias over some sort of |
For Plone we introduced behavior shortnames a while ago and use them. Look at https://docs.plone.org/external/plone.app.dexterity/docs/reference/standard-behaviours.html for a list of the names. Using a namespace prefix like |
awesome! thanks @jensens ! |
closing, not doing for now. |
Instead of needing to reference complete behavior interfaces names, be able to register a behavior with an alias.
For example, a PATCH like this:
Could be changed to:
Registering behavior would change to add "alias" option for the configurator.
The text was updated successfully, but these errors were encountered: