Hey guys,
I don't know if any of you realized this, but I added (and commented
out) some HTML coding in the install.php for users to *choose* their
own backend. Now, I'm not saying that it's going to be added, because
I think we should talk about it. I've mostly just done a lot of
thinking about it in my head.
But I think it's important to offer other DB solutions to users, for a
couple of reasons. It will mean we are that much better than other
forums (how many forums let users get to pick their own DB?). In
addition, more people will feel more confident in UPB, because not
only do we offer our own custom database solution, but we offer
multiple ones, which means users can pick which ever ones he or she
feels comfortable with. I don't see it as a kick to the groin to
TextDB, but as an expansion of UPB to a wider audience.
So, how would one implement a forum that has the ability to use an
array of different databases? With all the different syntaxes and
methods to queries, supporting passwords, etc. I thought of the
perfect solution: We use TextDB syntax. TextDB queries are already
written in the forum, so it would require the least amount of code
change and has a lower chance of breaking the forum than trying to use
SQL syntax or something. Also, if we were to switch to another query
structure, we would have to worry about script/record injection into
the database, and then it gets messy. With TDB, there is no chance of
malicious intent to infect or infiltrate the database. TDB provides
superior syntax than the others!
So, how to we translate TDB methods into SQL/other queries seamlessly
into UPB? It is so easy, the answer is right in front of our faces:
Classes. We have one DB abstraction layer class that separates UPB
from the database. That way, you have nice clean, easy to impliment
coding, and this abstraction layer's job is to connect and query the
correct database. It's similar to Jonathan's DB abstraction class,
except my idea uses TDB syntax.
Additionally,
php.net also saw the value in a database abstraction
layer, so they built their own, which should help us develop one
ourselves:
http://php.net/pdo
http://php.net/class.pdo
So tell me what you guys think. I am very excited to start this
project, but I won't go for it if we all don't go for it.
--Jerroyd