title: Correct way of defining a model in Ionic 3
body: <p>What is the correct way of defining a model in Ionic 3 with getters and setters? </p>
  
  <p>I followed this. </p>
  
  <pre><code>export class ItemModel{
      private _name: string;
  
      constructor(private n: string){
        this._name = n;
      }
  
      get name(): string
      {
          return this._name;
      }
  
      set name(name: string)
      {
          this._name = name;
      }
  }
  </code></pre>
  
  <p>Is it correct? </p>
  
  <p>In some forums it was mentioned about a need to keep the code very short. So does that mean using getters and setters would affect the performance somehow?  </p>