• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Database and Model Implementation

vbresults

Well-known member
#1
I admire the way CakePHP's data sources are diverse, and how accessing the data is very abstracted through the use of models. The abstraction in question allows support for MySQL, SQLite, PostgreSQL, MSSQL, DB2, Oracle, Firebird, Sybase, ADODB, ODBC, or even a custom source. Does xF implement anything like this? It would be nice to not look at SQL queries anymore. :)
 
#2
Database abstraction is certainly welcomed in any framework but i think it would be hard to optimize the sql queries when we're not focused on one database, mainly mysql since that's what most people use.
 

vbresults

Well-known member
#3
Database abstraction is certainly welcomed in any framework but i think it would be hard to optimize the sql queries when we're not focused on one database, mainly mysql since that's what most people use.
Sounds like tunnelvision. Designing forum software around one DBMS is flawed for a few reasons: there are several modern institutions using MSSQL or ADODB, corporations using Oracle, and regular people using SQLite. Forcing on a single DBMS effectively cuts off many sectors that would otherwise use xF.
 

Mike

XenForo developer
Staff member
#4
MySQL is the only targeted database. The models are generally implemented using MySQL specific syntax, though we're using Zend_Db currently, which does provide us with the potential for abstraction in some situations (eg, limit).
 

vbresults

Well-known member
#5
MySQL is the only targeted database. The models are generally implemented using MySQL specific syntax, though we're using Zend_Db currently, which does provide us with the potential for abstraction in some situations (eg, limit).
That is unfortunate. :(

I suppose at this stage it is too much work to implement such a thing anyway.
 

Danny.VBT

Active member
#7
MySQL is the only targeted database. The models are generally implemented using MySQL specific syntax, though we're using Zend_Db currently, which does provide us with the potential for abstraction in some situations (eg, limit).
Are you planning on sticking with Zend_Db or will it be factored out with other Zend components as development progresses?

Edit: I suppose it doesn't matter, from a modder's perspective, as you probably have a wrapper around it anyways.
 

Danny.VBT

Active member
#11
It's both a library and framework, depending how you use it. I'm using the complete MVC framework for a client, and although it took a while to grasp, it has sped overall development time dramatically.
 

Dismounted

Well-known member
#12
I'm using the complete MVC framework for a client, and although it took a while to grasp, it has sped overall development time dramatically.
I found that Zend had a relatively steep learning curve, especially when you're really just "wondering" around the framework. However, as is the nature of frameworks, development becomes both easier and quicker as you learn it.

Personally, I currently prefer Kohana, I find its nice and light, but still has many advanced and useful features (ORM!!). On top of that, you can plug in stuff from Zend if you like, which is nice.
 

Mike

XenForo developer
Staff member
#14
...for the 5% of PHP 5.3 installs. :)

I would've most definitely liked to use 5.3. Closures and late static binding would've been very handy...
 

Mike

XenForo developer
Staff member
#16
Yes. We do take advantage of one small change related to dates, but that's the only specific thing. 5.3 is just better performing in general though.
 

Andy.N

Well-known member
#18
Yes. We do take advantage of one small change related to dates, but that's the only specific thing. 5.3 is just better performing in general though.
Good to hear. Are there any ideal server setup you recommend?
Like version of PHP, mySQL, APC, memcache, etc

We just had ourselves a few nodes on vps.net to prepare for this.