title: Specific Question About Proper Design
body: <p>Now, I know this question is very opinion oriented because people generally design their apps differently... However, I want to know if I'm doing something incorrectly, or generally frowned upon in the objective c programming community, or if you have any suggestions as to how an experienced obj c developer might design this differently...</p>
  
  <p>LOCATION is a struct and BULLET is an enum defined in a Constants.h header file, BulletV is a subclass of UIView, and Bullet is a subclass of NSObject</p>
  
  <p>I have the following code:</p>
  
  <pre><code>#import "Bullet.h"
  
  @implementation Bullet
  
  @synthesize Type;
  @synthesize Location;
  @synthesize Strength;
  
  - (id)initWithLocation:(LOCATION)location Type:(BULLET)type Strength:(int)strength
  {
  
      self = [super init];
  
      if (self)
      {
          self.Location = location;
          self.Type = type;
          self.Strength = strength;
      }
  
      return self;
  }
  
  @end
  
  @implementation BulletV
  
  @synthesize Type;
  
  - (id)initWithLocation:(LOCATION)location Type:(BULLET)type
  {
      self = [super initWithFrame:CGRectMake(location.x - 10.0, location.y - 2.0, 20.0, 40.0)];
  
      if (self)
      {
          self.center = CGPointMake(location.x, location.y);
          self.Type = type;
      }
  
      return self;
  }
  
  - (void)drawRect:(CGRect)rect
  {
      switch (self.Type)
      {
          case Normal:
              self.backgroundColor = [UIColor redColor];
              break;
          default:
              break;
      }
  }
  
  @end
  </code></pre>
  
  <p>Now, I am relatively new to MVC.. but it seems like keeping the model and the view separate creates a whole lot of duplications, which i hate in my code..</p>
  
  <p>For example, the fact that we have 2 of the same named Properties (Location and Type) utilized in these implementation blocks kind of bothers me, but I don't know how I would do this any other way while still maintaining separation between the model and view.</p>
  
  <p>Also, both init methods for the view and model are very similar, with the exception that the model also includes a strength parameter..</p>
  
  <p>I have a very java-oriented mindset when programming, I like to have individual files for each object, and for each object to have a state and certain actions.. Now, this new design disallows for any actions to be utilized in these headers, because they need to be placed in a controller.</p>
  
  <p>Any comments are welcome, if this is the way you would make a "bullet object" (more like just a rectangle) in your app, then feel free to comment so, but it just doesn't seem right to me. Feel free to give your insights.</p>