plone / plone.app.contenttypes

Dexterity-based content types for Plone
https://pypi.org/project/plone.app.contenttypes
13 stars 48 forks source link

API inconsistency with getQuery method #283

Closed rodfersou closed 8 years ago

rodfersou commented 8 years ago

With archetypes we have two methods:

With dexterity we have just one method:

hvelarde commented 8 years ago

@pbauer we are talking about the Collection content type here

thet commented 8 years ago

@rodfersou getQuery in archetypes return a list of plone.app.contentlisting objects? That's actually something I would expect for a results API method, or not? -- clarification -- only considereing the API method names, I expect getQuery to return the query, and something like results to return the results. getQuery returning the results feels wrong.

IMO, Dexterity doesn't have to be API compatible with Archetypes. I'd go for a better API instead of staying compatible - the compatibility is lost in many places anyways. Addons have to adapt to support both.

hvelarde commented 8 years ago

@thet I don't agree and this is the kind of decisions that make the life of add-on developers more difficult. it would be way easier just to add a getRawQuery method to plone.app.contenttypes and problem solved.

for the rest of the API, it has to be discussed on a broader level. I agree we can enhance it, but we can't come out with a broken API and expect every single add-on developer waste time figuring out "solutions" and implementing then in different ways on every add-on.

davilima6 commented 8 years ago

I agree with you both so +1 for adding a deprecated method.