title: What is the recommended way to use ActiveRecord in CodeIgniter models?
body: <p>I believe this has been asked before with different words, I already did a search on similar questions and found:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/6332552/codeigniter-instance-of-model-class">CodeIgniter instance of model class</a></li>
  <li><a href="https://stackoverflow.com/questions/3228079/using-models-in-codeigniter">Usind models in CodeIgniter</a></li>
  </ul>
  
  <p>However, being mainly a C# developer I sometimes find difficult to separate previous knowledge of the language with other tools, such as PHP. My philosophy is to follow the de facto standards of the language itself.</p>
  
  <p>That being said, I have used several ORM tools such as Db4objects, DevExpress XPO, EntityFramework and many more. What I find quite different from the .Net approach to the ActiveRecord implementation in CodeIgniter is how Models are used, for example, in CI you´d normally have a model instance loaded and use it almost like a static method to do all operations and then pass some sort of data as parameter either as an array or several parameters:</p>
  
  <pre><code>$this-&gt;load-&gt;model('User_model');
  $this-&gt;User_model-&gt;save($username, $password);
  </code></pre>
  
  <p>Or:</p>
  
  <pre><code>$this-&gt;load-&gt;model('User_model');
  $this-&gt;User_model-&gt;save(array(
    'user' =&gt; 'theuser',
    'password' =&gt; 'thepassword'
  ));
  </code></pre>
  
  <p>So you´ll end up using the same instance to do all operations, but sometimes that can be confusing, especially coming from another object oriented language, I often find myself doing this:</p>
  
  <pre><code>$user = new User_model();
  $user-&gt;username = 'theusername';
  $user-&gt;password = 'thepassword';
  $user-&gt;save();
  </code></pre>
  
  <p>As seen, I invoke a method on an instance to do actual work, the save method would look like:</p>
  
  <pre><code>function save() {
    $this-&gt;db-&gt;set('username', $this-&gt;username);
    $this-&gt;db-&gt;set('username', md5($this-&gt;password));
    $this-&gt;db-&gt;insert('User');
  }
  </code></pre>
  
  <p>Is there some recommended standard to do this kind of operations in CI? I do know there must be pros and cons but I don´t see anything about this topic on the CI Documentation.</p>
  
  <p>Thanks in advance!</p>