![]() |
structure object error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: structure object error (/showthread.php?tid=8041) |
structure object error - El Forum - 05-02-2008 [eluser]jorgeakanieves[/eluser] I have built a codeigniter special app to load a schema view sending from requested controller the body to schema and loading from here the rest of views(header, footer, and else...). The problem is herency and objects arquitecture. In schema error.php i´ve the same objects than home.php but in html_class.php or header_class or footer_class, i´ve missed these objects. why? structure object error - El Forum - 05-02-2008 [eluser]jorgeakanieves[/eluser] I have solved this creating in each class the CI instance ($this->CI=& get_instance() ![]() but I think it reloads the objects and overloads the page load. The object strutcture is on schema solution image. do you think is it a good practice object structure? structure object error - El Forum - 05-05-2008 [eluser]jorgeakanieves[/eluser] anybody give an opinion? structure object error - El Forum - 05-05-2008 [eluser]Mirage[/eluser] Well, I'm trying to get my head around your schematic. It looks as if your schema.php is a sort of 'base-controller' which you extend to your final ('home') controller. I've done this in some situations, so there's nothing inherently 'bad' about your approach. What are your specific concerns? structure object error - El Forum - 05-06-2008 [eluser]jorgeakanieves[/eluser] I´m worried about heavy objects and recursion, you know? the time to load the page may be high if I load several libraries... structure object error - El Forum - 05-06-2008 [eluser]Mirage[/eluser] Well, I don't know what your hosting environment is, but my experience is that 'including' files incurs the least performance penalties. Building up [remote] database connections is costly, fetching humongous resultsets for displaying a single record is costly, endless iterations in poorly constructed loops can be costly. Bloated resources (javascript libraries, images) [can] make your pages slow long before the dynamic stuff does. Your approach of course has much to do with your or your clients goals. The people I do work for don't care about speed as much as they do about time-to-market. Being first comes before being best (aka fastest) [to them]. Priority One: Get things working the way you want/need them to! You're the one who has to write and [likely] maintain the code. So be comfortable with your approach from that perspective. Scalability and speed are great problems to have. But you need to get there first. And once you arrive there a lot's of solutions to help get your performance up. There's a really nice breakdown by Elliot Haughin on which things make a difference: http://www.haughin.com/2008/02/13/optimizing-and-scaling-your-codeigniter-application/ But still - don't spend too much time worrying about it upfront. Hope this helps. structure object error - El Forum - 05-10-2008 [eluser]jorgeakanieves[/eluser] Thanks a lot. I´m trying to do my best. Time is not the problem, I´m developing a personal build application. |