Storing & Visualising Muscles (and more) in Drupal - Your views on a new module for fitness instructors

Wouter - June 1, 2009 - 22:07

Hi,

I am currently developing an online platform for a personal (fitness) trainer. Customers will receive an account on this platform where they'll be able to interact with their personal trainer, access a database of exercises (and related images and other media) and keep track of their activities and planning.

One of the key content types here will be 'exercise', with details on specific fitness exercises. One thing we'd like to add to this content type is which muscles are used in the exercise.

What I'd like to develop is a way for the author of an exercise to select a number of muscles which, instead of showing just words to the viewer of the exercise node, results in an image of a male or female with the right parts of the body marked in colour.

Seeing that when developed properly, this could be a useful feature for many others, I'd like to throw the idea out there, find out with you lot what the best approach would be and perhaps find some people who would be willing to work on this as well.

A number of questions I'd like to start off with :

1) CCK Field or Taxonomy ?

How do we store the muscles that a certain node is connected to ? Do we create a vocabulary or do we make it a CCK field type ? I'm inclined to choose the latter, but I'm eager to hear your view on this.

2) Method of visualization

Many ideas come to mind here. Whereas I've got some Drupal coding experience, my experience with graphical tools like flash or flex is nearly non-existant.

In a way we need to have a tool or plugin that acceps a number of parameters (such as muscles, gender, dimensions, colours...) and which outputs the proper image of a human with the correct zones marked in colour.

Seeing that a HTML/CSS combo doesn't really sound up to the job, which technology would be *most* useful here ? Flash ? Flex ? Something else ?

3) How generic do we make this ?

As with any open source project, the more people find a tool useful, the more support it receives from people willing to contribute. Hence the following points could be considered:

- Maybe a muscle layer might not be the only useful thing here. Maybe other people would, eventually, like to add other layers as well such as the skeleton or internal organs for example. When building this module, we should perhaps keep in mind such future features.

- Maybe there are some veterinarians out there who'd like to be able to use this tool as well, so instead of just sticking to humans, maybe a future version of this module could support different kinds of organisms.

Questions like the above two should be considered in order to start off with an architecture that is most suitable for these kinds of expansions. Any other considerations worth noting here ?

To conclude :

- If this project sounds interesting enough to some of you, I'll set up a group to get our heads together on this one.
- Any other experienced Drupaleers who might be less interested in working on this, but would still like to offer some good advice on how to tackle this challenge the Drupal Way : Most welcome to do so!
- If, for some reason, I missed the fact that there is a shiny module out there that can do the trick already then I'd love to hear about it (and will apologize for my bad search skills).

Kinds regards,
Wouter

I would use CCK node

danielb - June 1, 2009 - 22:35

I would use CCK node reference to link the nodes together. Save taxonomy for categorisation on some other aspect that is easier for humans to understand - like the purpose of the excercise or how high impact it is.
I would use the Drawing API (just because I'm familiar with it) to do the diagram of the human on the fly. Otherwise generate an XML feed which a Flash SWF can use show the appropriate picture.

 
 

Drupal is a registered trademark of Dries Buytaert.