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

Database and Model Implementation

Discussion in 'XenForo Pre-Sales Questions' started by vbresults, Aug 6, 2010.

  1. vbresults

    vbresults Well-Known Member

    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. :)
     
    Charles likes this.
  2. Brandon_R

    Brandon_R Guest

    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.
     
  3. vbresults

    vbresults Well-Known Member

    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.
     
  4. Mike

    Mike XenForo Developer Staff Member

    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).
     
    Danny.VBT likes this.
  5. vbresults

    vbresults Well-Known Member

    That is unfortunate. :(

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

    vbresults Well-Known Member

    On a similar note, why reinvent the wheel by creating a new framework?
     
  7. Danny.VBT

    Danny.VBT Active Member

    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.
     
  8. Brandon_R

    Brandon_R Guest

    Are you guys not fond with the Zend framework?
     
  9. vbresults

    vbresults Well-Known Member

    It's more like a library :p
     
  10. Dismounted

    Dismounted Well-Known Member

    A big one at that. :p
     
  11. Danny.VBT

    Danny.VBT Active Member

    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.
     
  12. Dismounted

    Dismounted Well-Known Member

    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.
     
  13. vbresults

    vbresults Well-Known Member

    Lithium will blow everything out of the water. :)
     
  14. Mike

    Mike XenForo Developer Staff Member

    ...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...
     
  15. Andy.N

    Andy.N Well-Known Member

    Mike,
    Would you recommend php 5.3 for XF installation?
     
  16. Mike

    Mike XenForo Developer Staff Member

    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.
     
  17. Brandon_R

    Brandon_R Guest

    Lets not forget anonymous functions :)
     
  18. Andy.N

    Andy.N Well-Known Member

    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.
     
  19. vbresults

    vbresults Well-Known Member

    Latest Nginx + PHP >= 5.3.3 (php-fpm :D ...) works wonders.
     
  20. Andy.N

    Andy.N Well-Known Member

    I have litespeed instead of nginx
     

Share This Page