CodeIgniter Forums
More base models? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29)
+--- Thread: More base models? (/showthread.php?tid=61376)



More base models? - jlp - 04-11-2015

The current CI_Model assumes an RDB.
Should be have other models that could be extended, such as a NoSQL or a file directory model?

--------------------------------
Disclaimer: Putting forward an idea without implying any endorsement of it.


RE: More base models? - mwhitney - 04-13-2015

I voted "Maybe" on this one primarily because the model itself makes no assumption about the underlying data, which is, for the most part, a good thing. However, it would be nice if there was a data access layer which was not so strictly bound to a SQL database, so we could easily create models which used other data stores which may (or may not) eventually be migrated to a traditional SQL database.

Since the data access layer in CI is primarily accessed through $this->db, it's a little difficult to fully embrace the idea of simply extending what's already there (vs. creating some sort of replacement, perhaps with $this->db acting as a compatibility layer). On the other hand, replacing $this->db would create a nightmare for upgrading existing projects.


RE: More base models? - twpmarketing - 04-13-2015

I'm also going with "maybe".  At this time, my designs all use an RDB and it has been years since a "flat-file" was useful (in my work).  That is not to say it may never happen, but it is rare.
[edit] missing word...