Module Structure question from perspective of PHP dev I'm new to drupal, and am unsure how to aproach writing a module. My uni is moving to drupal, and I'm working on getting a courses module to display information about courses at the uni.

List of things I need to implement


A list of courses in a specific subject that can be put in many places on the site, with differnt subjects
Search page

I think I understand how to do this one, at least

List of courses based on search parameters
List sections in a specifc course and term


I've figured out how to make custom pages and pass data around in the url by follwoing the drupal menu example. From here, I could just custom write everything, and return straight html, and it seems like that would work, but not be the "correct" way to do it in drupal.

The data will be available in an API of sort, I don't know much about it yet. NOrmally I would just make a data class that had sample data in it, and deal with the data later, but it seems like this won't work in drupal.

Should I be aproaching this by trying to get the views module to do the views for my module? It seems like this would be the correct way to do it, but the query is stupidly complex SQL, and the output can't just be a list.

Also, where is a good tutorial on how I should be using content types? It seems like I should be using that effectively as a data class, that somehow gets passed to a view(possibly the views module, maybe just a view I write myself for a page), which renders it, but I haven't been able to figure it out.

Sorry that there is no concrete answer for this, I just really need pointers on how to aprocah drupal modules.
Content Types and /or entities would be the way to go about this.  Content types you can think of as objects that are fieldable.  So for example your course would have fields that would represent an objects property.  All content types are node and accessed similarly and can be distinguished by a node id (nid).  Content types automatically integrate into views.  

Views can be used to display your data on the courses and they can be filtered by using exposed filters, or filtered by using contextual filters (arguments from the URL).  Content types are automatically usable in views along with their fields

Entity references are the backbone of relationships in drupal.  In an object sense you can have a one to one, one to many relationships with other objects or content types.  So your course may have sections and what not so in drupal you would create a content type of both Course and Section and then reference them using the entity references module.  See entity reference module which must have the entity api module

Taxonomy is a way to tag stuff so if you want to tag a course a certain subject you could use a field that is a taxonomy reference.