what is the reasoning behind using a text field?

Comments

zirafa’s picture

A few reasons:

  • A design goal of this project is to minimize any dependencies on contrib modules.
  • Using a date field increases complexity of configuration and updating and will unnecessarily complicate the UI.
  • A date field is overkill if a text field will do.
  • If someone wants a more powerful date functionality, they can easily add it by installing the date module directly.
gusaus’s picture

I don't think date module is going to add a layer of complexity. Especially if it's already a dependency with other features such as #1263956: Events.

zirafa’s picture

Gus, *any* added contrib module adds complexity to the interface, to the backend, and to updating. Every additional module means worrying about any security problems in that module, being dependent on their release cycle, etc.

I'm familiar with the date module and it is very powerful and *does* add a layer of complexity. It has more advanced form field options, stores data differently, formats data for display differently, and includes a Date API to interact with other modules such as Calendar. Just because it is an easy install or works well doesn't mean it's not complex.

Your point about dependencies has me thinking maybe the Release Date should be removed entirely from the base discography feature and moved or merged into a separate event feature.

discipolo’s picture

doesnt using the date module depend on whether we want to provide sorting, filtering and (faceted) searching on release dates?

i am sure adding release date field via an aditional feature (app) is an approach worth exploring.

we should maybe get some example artists to enter content to see what they need.

zirafa’s picture

It'd be nice to be able to store a simpler default date field that would be compatible with the Date API and could then be used if Date module was needed. Something like http://drupal.org/project/date-time-field would be nice.

ebieymjunior’s picture

I also think that it's a good idea to make the release date a real date, but won't it be better to just use the date api module than to use another module? Unless you're sure that it'll be updated and ported to future versions when needed.

I installed the Pushtape Features module and I must say it's a time saver for if you want to create a discography feature (instead of manually creating a new content type). I did however delete the release date field and replaced it with a date field. Hopefully it won't complicate things when upgrading.

Thanks for your work, it's really appreciated.

zirafa’s picture

I've been mulling this over some more and starting to warm to the idea. Date/Date API does seem like the right way to do this and avoid future problems (I looked a little closer at date-time-field and don't think it's a good route.) I think I'd be willing to make this a date field if we could form alter or modify the input field to simplify it so it isn't so overwhelming.

For now I might just remove the date field entirely from this Feature to avoid any confusion...

zirafa’s picture

Status: Active » Fixed

Release Date field has been removed in drupal.org/project/pushtape_discography feature.

Please open a new issue in that queue regarding adding the field back as a proper date field.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.