My idea is an extension of existing RFC discussion here. As PDO is bundled with PHP itself, a lot of duplication in current DBAL used for phpBB can be reduced. Prepared statements provide a lot of flexibility too.
- PDO can be used to maintain FreeTDS/Microsoft SQL Server/Sybase, Firebird/Interbase 6, MySQL 3.x/4.x/5.x, PostgreSQL, SQLite 3 and SQLite 2, Microsoft SQL Server/SQL Azure and a lot of others(with active support for all of them).
- Exceptions and error handling is easier; with the
- Large objects(using
PDO::PARAM_LOB) can also be stored and streamed to/from databases(such as avtars). I have not tried it myself though.
- Cleaner code, with a lot of predefined methods. A simple extension of class is all that will be needed.
- A database-specific PDO driver is needed to access a database server.
I will be starting from scratch. A note can be taken into account of an unavailable repository from evil3 on the aforementioned RFC thread. A lot of progress and bugfixes have been done/released for PDO since the linked discussion on Area51 developments board. To name a few(which were also discussed/raised-as-flags in RFC thread) SSL support and buffered query support.
Project Summary and Timeline
Creating a new database abstraction layer extending PDO for MySQL. This will require/act-as a replacement of the current(too old, imo; but still working great) DBAL being used in releases of phpBB. Also, since it can be extended to support other drivers I'd be glad to stay with the phpBB community and keep developing it. My proposed timeline for this project shall be:
- Get acquainted with current DBAL, read the
mysqli.phppresent in the
/includes/db/driverdirectory - 1 week.
- Discuss the base methods required for new classes with mentor - 1 to 2 weeks. None or a minor programming done until now.
- Write the classes
pdo_mysqlfollowing the coding guidelines but not necessarily supporting current DB calls in phpBB - 1 month. This patch is ready to be submitted for mid-term evaluation.
- Collaborate work with mentor(s). Discuss necessary changes - 5 to 10 days.
- Tweaking the current classes to facilitate working with the major phpBB development - 1 week.
- Testing and modifying accordingly the finalized model with constant discussions on IRC and with mentor - 2 or 3 weeks.
- Finalizing project. Minor cleaning up. Get the files ready for final submission - 3 to 5 days.
- Further implement it for sqlite3 driver (after the GSoC period).
My name is Amritanshu Varshney. I'm a resident of India(GMT +5:30) and a student of Mathematics and Computing at Indian Institute of Technology, Kharagpur in Kharagpur, West Bengal. I can work on this project with dedication since I currently have no other project/work requiring my immediate attention(for at least two months). I can provide a net of 5 to 8 hours on a daily basis averaging to 35 hours for the weekdays(Monday through Friday). Also, on weekends my work time can increase up to 10 hours/day giving a total of at least 50 hours a week.
I have been working primarily with PHP for the past 2 years. I'm also an active user on Stack Overflow and keep regularly answering questions on PHP, MySQL, jQuery, HTML and other web-development languages. I have also been using phpBB and modifying it, mostly templates, in my leisure time. So far, I've only sent three pull requests one of which has been merged and two are still awaiting.
I'm quite familiar with
PDO_MYSQLdriver and hence, my primary aim during the project is just for developing MySQL. My work progress can be tracked easily on my GitHub account. I use the nickname hjpotter92 everywhere and can easily be seen around on several places like IRC, phpBB community, GitHub etc. I can be contacted at email@example.com
This will be my first project and I'm really excited towards it.
Excerpts from linked RFC
Here are some points/quotes from the previously linked RFC thread.
- From imkingdavidI think converting to PDO would be a great idea. It would be ton of work, but I think it would be a lot more efficient and cleaner.
- From naderman I would very much like to see these as an alternative to the existing drivers. They could especially be used as a basis for future drivers. If they work just as well they could theoretically replace the existing ones.
- From igorw If other things come up it could always be pushed back to 3.2. I'd personally like to use this chance and improve the code base.