Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter via ASP.NET/C# OO programming, need advice!
#1

[eluser]andychurchill[/eluser]
Because of my OO/C# background and being new to CI, I was trying to find a tutorial/example of a simple OO/CI project, e.g. a simple idea such as Group / People / Person sort of example, which shows how an instance of a Group can have a People Collection, which would be a collection of Persons?

Before I started looking at CI, I originally set up a PHP project and used this tutorial as an example of creating PHP collection using the ArrayObject, with an ISortable and ICollection interface. (see http://www.devshed.com/c/a/PHP/Collectio...Sorting/2/)

This was working a treat. However, I'm now looking into moving into an MVC framework, and I'm trying to understand how that kind of approach would fit into a CI project. Assuming that my collections/objects are to be populated from a 3rd Party WebService (Get Methods, no POSTs or DB work of any kind) I'm trying to work out if I would recreate these as models as they are data objects. I was using NuSoap for the WS access before, and I notice there's a CI library for this, which I'm assuming I'll need to get.
#2

[eluser]wiredesignz[/eluser]
[quote author="andychurchill" date="1251250353"]...I'm trying to work out if I would recreate these as models as they are data objects...[/quote]

Models are not data objects themselves.

Models "encapsulate" the data access layer of an application, wether it is DAO, ORM, Active Record or any other form. The model only provides the interface to that layer.
#3

[eluser]andychurchill[/eluser]
Ok, so my class structures would still sit inside my libraries folder, then have my objects load a relevant model when the object is to be populated by retrieving data from the third party web service?

I think I get it now Smile




Theme © iAndrew 2016 - Forum software by © MyBB