views:

103

answers:

2

For example, take my Actor class:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace FreeIMDB
{
    class Actor
    {
        public string Name { get; set; }
        public Image Portrait { get; set; }
        public DateTime DateOfBirth { get; set; }
        public List<string> ActingRoles { get; set; }
        public List<string> WritingRoles { get; set; }
        public List<string> ProducingRoles { get; set; }
        public List<string> DirectingRoles { get; set; }
    }
}

This class will only be used to stuff information into it, and allow other developers to get their values.

What are these types of classes officially called? What is the correct nomenclature?

+5  A: 

DTO - Data Transfer Objects. ActorDTO in your example.
EDIT: It is called POCO (Plain old CLR objects) or POJO in case of java, I guess.

ref: http://en.wikipedia.org/wiki/Data_Transfer_Object

shahkalpesh
yep Plain old Java objects.
Yassir
A POCO/POJO object can do much more than act as a structure. In this case, I believe DTO is more apt.
Ed Lee
In the good ol' days we used to call 'em "Property Bags".
Robaticus
@Robaticus - I *normally* associate a "Property Bag" with something that will take ad-hoc named properties (like `dynamic` expandos, etc).
Marc Gravell
@marc - sounds reasonable as well.
Robaticus
A: 

'Entities'

Usually used to represent a saved state of an object. Mostly used in context to databases or data structures.

Although, it's generally looked-down upon to include it in the name itself (at a prefix or suffix).

Common practice is to name a entity with a singular-form name, and collections of entities with the plural form. Even if it isn't grammatically correct.

Evan Plaice