|
Multi-DB Support
|
|
Written by Alex de Azevedo
|
|
Hi all,
after something like a month just keeping in contact with my mentor and with any posts, it's time to update community about my development progress status, uh ?
During the last 4 weeks, i've been working on the core of my project, but not yet on it's implementation on Joomla! core. I had not enough contact with Plamen ( Joda's creator ). I decided, based on his suggestions posts and Anthony's comments start a new version for Joda.
Based on both Torque (Apache Foundation) and Propel ORM, Joda have a simple data structure, and is very compact. I'm using the PDO extension like expected as database abstraction layer.
Joda is based on a YAML ( http://en.wikipedia.org/wiki/Yaml ) configuration file, that will be set according to the project, database or module. I have also implemented the possibility of work with as many different development enviroments as developer needs. It means that just few lines should have to be inserted at configuration file, to keep your Joda powered module/project working in a different database. With YAML, the configuration file is very intuitive and pratical to edit.
I divided Joda in two parts.. A ORM and the query builder. I'm currently working on the query builder, and the relationship support for some databases. The basic ORM is almost done.
I also divided and categorized the different database query engines like drivers. I've initially wrote drivers for MySQL, PosgreSQL and SQLite. I'll also get in touch with Anthony, in order to decide the next database drivers, to write. They are very simple, and basic. More features will be implemented in future.
I'll move now everything to code base and try to keep SVN updated .. and expect to release something functional next week. :D
|
|
Multi-DB Support
|
|
Written by Alex de Azevedo
|
|
During the last two weeks, I've studing alternatives to bring success to this project. I finished my research with two main ways to follow and now is time to start following on of these 2 ways.
My initial idea is to use an existent ORM and just implement it to Joomla! core. After analise this possibility we assumed that this solution isn't interesting for our specific case on Joomla.
The other idea is to build our own ORM+Query Builder, trying to use existent Joomla! database components or maybe some database abstraction layer like PDO or MDB2. Kept the initial idea of make something PHP 5.2 or above support, I prefered to work together and bring an existent Joomla! multi-db plataform to Joomla! Core, contributing to it and make it stable.
Joda was chosen because have almost the same purpose of my challenge, and once being a GPL solution, no problems in contribute to it sharing ideas to make something efficient and stable to incorpore Joomla! Core. Joda was idealized by Plamen Petkov and intended to make Joomla! extensions and modules support multiple DBRMS. Plamen and I are currently in touch to share ideas. The objective is to merge the two ideas into a single one that will be part of Joomla Core. |
|
Multi-DB Support
|
|
Written by Amy Stephen
|
Alex de Azevedo is an undergraduate student in computer science in Brazil. He is very talented in database technologies, ORM and implementation issues related to multi-database development. Alex has used Joomla! to develop Web sites but has not yet developed using Joomla!'s application architecture. He is eager to put six years of PHP development experience to use with the new Joomla! framework, to start an open source development career and to be a part of the Google Summer of Code program.
Mentor: Anthony Ferrara is the team lead of the Joomla! Bug Squad, and a member of the Joomla! Developer and Joomla! Extension Directory teams. He started with Mambo in 2005 and has continued with Joomla! providing the community with JoomlaPerformance, caching extensions, and his assistance. Professionally, Anthony is a PHP developer and MySQL DBA. He is a fire department volunteer, a pilot, and one who loves learning, with interests in math, physics, programming, music, good beer, and life.
|
|
Multi-DB Support
|
|
Written by Alex de Azevedo
|
|
I suggest a total revamp of Joomla database manipulation. The main goal of this project will be the possibility of make joomla! support a large scale of databases. The initial idea includes the use of a ORM like Propel or Doctrine ( in my opinion the best PHP Database ORMs available actually ). The possibility of reduce code lines, abstract database queries will also contribute to a fast development and coding standards between Joomla! programmers. This multiple database support will be also be a good stuff for people who have more than one database option on shared hostings or just want to improve the performance of their joomla! website choosing a faster database system. Power of decision. These ORMs have a powerful and intuitive query abstraction that can help programmers to reduce code line, improve coding standards and take easy work with any kind of database, without warn with the query syntax.
The main problem of this idea, like reported by mentor Anthony Ferrara, is the compatibility of this new feature with PHP4. Actually Propel and Doctrine both require PHP 5.2.x+, and this idea will be unusable today, because maintain the PHP4 support is still a fact in Joomla Development Really. The idea of create a new ORM system also can be a good option or solution to this compatibility issue and complety possible to be done, in my reality.
Theses changes for Joomla! will also be a big step to the next Joomla! programmers that will only have to know how to develop using one of these ORM or own suggestion, improving code quality, standard and consequently development speed.
My experiences with Joomla?! Actually I’m just a common user of Joomla, that saw in this idea a new possibility to expand Joomla! idea on web and get more users with different hosting platforms. |
|