[Phpmyadmin-devel] [GSoC] OO PMA project proposals

Michal Čihař michal at cihar.com
Thu Mar 25 09:44:13 CET 2010


Hi

Dne Sat, 13 Mar 2010 13:18:28 +0100
Edouard SWIAC <edouard.swiac at gmail.com> napsal(a):

> Thanks for your observations Marc.
> 
> > About PDO, the last time I had a look at it, there were no practical 
> > reasons to support it.
> 
> I think there is at least one major reason to support it (PHP version independently). Since PMA accepts two data access interface ,mysql_* and mysqli_*, using PDO would avoid maintaining these 2 interfaces in adapters functions (such as PMA_DBI_fetch_row ...). Moreover, mysql_* and mysqli_* API are so nearly identical, that almost the same code is written twice. As you know PDO handles these two drivers natively, lowering the burden of code to write and maintain. 

Well the thing is that both mysql/mysqli drivers in phpMyAdmin share
fair amount of code, so it's not that much of code to maintain (not
that it requires much maintenance at all). Moving to PDO is about
new code to write and test and introduces another dependency (I have no
idea how common is to have pdo enabled on hostings). We might end up
having PDO in addition to current interfaces and I really don't see
benefit of this situation.

> Coming back to architecture, templating (currently is active discussion) is a good way to go towards MVC. What do you think about it ? From what I see in PMA source code, some parts are developed with classes (Confirm, Error, File ...), so the project may consists in pursuing this objective, in order to smoothly convert the procedural code base into an oriented one.

Well be it objects or not, I rather think the code needs to be split to
smaller functional blocks. Having several hundredths lines in single
function makes it hard to review and even harder to properly test.

-- 
	Michal Čihař | http://cihar.com | http://blog.cihar.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20100325/01034349/attachment.sig>


More information about the Developers mailing list