Many know me to be a big fan of the Drupal community. I like how they collaborate around development. This community culture has been the reason behind a rich array of highly interchangeable Modules that can be used in different ways for different site building needs.
Often, when Joomla! and Drupal are compared, it is said that Joomla! is for newbies or hobbyists and Drupal, on the other hand, is said to be the development platform of choice for robust applications when you need customize, high-end solutions.
Not to take anything away from Drupal, but Joomla! is an extremely flexible development environment. We need to do a better job of sharing clever approaches and discussing the advantages of developing in Joomla!.
With the Molajo project, we want to make changes to the ACL environment, a few changes to JForm and JHTML fields, and implement a system-wide Copy/Move Facility for all Joomla! Managers. As is our policy, all core improvements are submitted to the project as patches. Unfortunately, these changes have not been accepted, so we find ourselves in a situation many developers find themselves in: Do you go without these features? Hack the core? Or, can you override those classes and functions preferred differently?
Our goal is never to hack the core but rather to force ourselves to find other ways of bending Joomla! to our will. So, after much exploration, I want to share some of the methods that can be used to override Joomla! Core Classes .
This is an easy-to-review Joomla! 1.6 System Plugin called Override. It is a learning Extension, not something for non-developers. Take a close look at the override.php file. It is well documented and can be used to explain methods that you might consider as you are developing.
Some of these methods need to be used with caution and only in certain circumstances. Since we are providing a distribution of Joomla! 1.6 we need to have tighter control of the overall application.
As we move forward with Joomla! 1.6, the more we collaborate as a developer community, the more we will agree upon framework changes that we can prove with community use and offer to the project for core consideration. We should also begin considering integration standards and practices that improve integration with our extensions.
Let me know what you think of the plugin and please share other ways that you extend and override and otherwise force Joomla! to behave, exactly as you wish.
This is a clever way of loading modified joomla core files :)
Its hard to define a "core hack". With your override you load a modified core file, which is in fact the same result as overriding the physical file in the joomla library directory. The only difference is the location of the modified joomla library.
My suggestion would be to just directly apply the changes to the joomla core files. That will also mean it is easier to merge from the joomla branch into the Molajo branch (as the location of the file is the same)
Thanks again for your hard work, Marius
Another question for you Amy. Are there any database changes for Molajo?
If not then upgrading a Joomla 1.6 site to a Molajo site would be as easy as unzip'ing a molajo package. Thanks, Marius
RE: My suggestion would be to just directly apply the changes to the joomla core files. That will also mean it is easier to merge from the joomla branch into the Molajo branch (as the location of the file is the same)
Early in the SVN establishment, we ran into a lot of issues with conflicts by merging in the Joomla! trunk. This was most critically seen in the installation application as we had modified the core installation and sample data SQL's. Therefore, we decided to truly hack the installation application to add a second core installation SQL to process additional database entries and using a feature added during beta, we added the option for a Molajo sample data while leaving the core's sample data. I think the approach that we're taking is the best route to avoid conflicts and push the framework to the limits as far as just how extensable it is.
Regarding database changes, no, there are not any changes to the core table structure. In the second installation file I previously mentioned, we drop the data from seven tables and repopulate it to match what we're providing. Our true changes include removing the core changes in favor of the Construct Framework for the front end and Minima for the admin side, changing the update sites to pull for Molajo vice Joomla!, and adding a few extensions to the core installation.
You could do an SVN checkout of the Molajo trunk today and it would be Joomla! 1.6 with a few additional options, nothing more right now.
Problem is that all database classes are loaded before any plugin so JLoader::register() doesn't work in this case. Best (but not good) solution I found is to create new database connector (e.g. 'mysqlix.php', class JDatabaseMySQLix) and to set $dbtype = 'mysqlix'; in configuration.php. Bad thing is that in global config we still have only "mysql" and "mysqli" so 'mysqlix' setting can be easily lost.
I have also tried with "wrapper" classes (like Joomfish or old Nooku) that works ok on 1.5 but not on 1.6.
© 2012 Created by Amy Stephen.
You need to be a member of All Together, As A Whole to add comments!
Join All Together, As A Whole