Welcome Guest, Not a member yet? Register   Sign In
Poll: Expanded driver mechanism?
You do not have permission to vote in this poll.
9 64.29%
0 0%
5 35.71%
Total 14 vote(s) 100%
* You voted for this item. [Show Results]

Expanded driver mechanism?

Should the CI3 driver mechanism be beefed up to support additional kinds of things, like template engines ?
Granted, template engines might be a poor example, as no two have the same interface.
The driver mechanism works well for databases and sessions ... what else could it be used as a pattern for?

Disclaimer: Putting forward an idea without implying any endorsement of it.
James Parry
Project Lead

(This post was last modified: 04-11-2015, 01:48 PM by ivantcholakov.)

For parsers.


email, translations (file or database based for example), maybe the Image library.

I saw a scheme http://www.webiny.com/blog/2015/02/06/th...community/ with added abstraction - something that is called "bridge" between (external?) components. I don't know whether it is sane enough.

I would use for now the term "driver" also for APIs that abstract the application from APIs of external components, installed with Composer or whatever other way. IMO it would be a good rule APIs of the external components with important common purpose (parsers, email) not to be used directly, but through interfaces provided by CodeIgniter. That would make external components replaceable.

It would be nice if the pattern were better documented, and perhaps more consistently implemented (and if drivers were more easily extended). It's difficult to see much commonality between the implementation of drivers for the database and for sessions.

I implemented a simple authentication/authorization "driver" system and one to replace the form library for Bonfire (neither of which I ever really got around to integrating into Bonfire). More recently, I implemented a driver system for the library used to convert Markdown/CommonMark documents in Bonfire's docs module.

Almost anything which allows for a (relatively) simple interface, potentially including template libraries, can be implemented like this, it's just a matter of whether it is actually useful for the specific feature and what impact it might have on the overall performance of that feature.

Theme © iAndrew 2016 - Forum software by © MyBB