I believe names are pretty important to get right. It helps make things clear, and I find the logic goes in the right spots when you have a clear idea as to what the abstractions are and what they are called.
I am also developing in Ruby, and while I have a really strong test suite, changing a model name takes awhile, so I’d rather at least try and get it right.
The problem:
Here are 3 model concepts, but I don’t know what the best names would be for them.
-
Users can create courses or learning programs. This is a template of what a course consists of, but it’s not a course itself. Does that make sense? It contains all the information that would be in a course… in the same way a Class contains all the data/methods for an object. It’s like the “meta” of a course. The best names I can come up with are
LearningProgramorCourseTemplate -
Companies/education facilities can create courses. These courses are based on the template in point 1. These are REAL courses – i.e. they have a real date and real people actually sign up/participate in them. I guess the best name I can come up for this is
Course. It points to 1 of the models in point 1. -
People can take take courses, but they have their own copy of the course that only applies to them, so we need a model to house all of the specific information pertaining to that course. It’s basically a Many-to-many relationships with
Coursein point 2. The best names I can come up with isActiveCourse,CourseInstance,CourseProgress,CourseParticipant
I am not liking my names at all. Can someone help me come up with 3 better names?
Nice question. How about
CourseDescription,CourseOfferingandCourseEnrolement?Rationale:
(3) is really a relation “Person is enrolled in Course” (as you noted).
(2) is also a relation: “Course is offered by Organisation”.
hth.