Quote from: xwisdom at Dec 07, 2005, 03:33 PM
Currently we have around 45 tables present in MODx. This would that propel would create 45x2 = 90 classes and if we add php 5 to that we have 90x2 = 180 classes.
Not true, most of those tables will go away or, since many are cross-reference tables, though the tables wouldn’t go away, the objects would only be used/loaded in conjunction with the objects they are cross-referencing.
Quote from: xwisdom at Dec 07, 2005, 03:33 PM
Now what is we have say 10 widgets on a page that works on separate tables each? Then we would need 10*5=50 classes to get those widgets working.
Again, not true; widgets are one class of objects. This class structure is proven, accepted, and though to a procedural programmmer, may seem like overkill, absolutely necessary for the proper development of OO design patterns.
Quote from: xwisdom at Dec 07, 2005, 03:33 PM
IMO I don’t think we need to show developers core tables. They need to see the system as objects. That is to say they see the Users object, the Documents Object the Widgets Object, the Templates Object, etc.
That’s exactly what this does; I simply, for proof of concept reverse engineered the object model directly from the current data structure. And I’ve actually just completed rewritting the schema to follow a more proper object model despite the table structures, which I didn’t have to change at all (except for a few things that needed to be changed, like TINYINT with 1 or 0 possible values turned into BOOLEAN, and INTEGER fields storing UNIX timestamps to the TIMESTAMP type).
The classes are Documents, Templates, Users, Snippets, Chunks, Plugins, Modules, UserGroups, UserRoles, etc.
Quote from: xwisdom at Dec 07, 2005, 03:33 PM
I’m not for allowing developers to interact directly with the core tables. Developers should only interact with the core objects. This however does not mean that they are limited to the system.
That’s exactly what this system prevents. No one ever touches the tables, at all, even us!
Quote from: xwisdom at Dec 07, 2005, 03:33 PM
I’m for using simple systems that’s why I started using with Etomite after dropping Typo3. I just could not bother with it’s complex systems.
To me, this object model is very simple while still providing us flexibility. Nothing complicated about it at all, unless you just don’t understand object-oriented design.
Quote from: xwisdom at Dec 07, 2005, 03:33 PM
If writing a snippet to get a document can’t be as simple as the Eto APIs then I think we have lost sight of the simple developer. While we would have attracted some of the OO guys we will certainly lost those who are not OO or can’t understand it.
Simple developers is not a real thing. There are those that understand how to develop procedurally (mostly hackers and those that took a few programming courses in college) and those that understand how to develop OO (usually requires training in OO programming techiques and philosophies), and those that don’t understand either and simply copy what they see. I believe if people see the examples, it will be easier to follow that anything we have now. Code will be smaller, sleeker, and you’d never have to see another SQL query again, unless you wanted to manually to some custom table you need optimized outside of the abstraction layer.
Quote from: xwisdom at Dec 07, 2005, 03:33 PM
IMO we can learn from Propel and create something that’s more specific and requires a less complex structures but offers the similar benefits.
I disagree; it would take us years to completely understand the entire persistence framework, class generation techniques, and allowances for deploying to PHP4 and 5. This was developed by the guys who developed Apache Turbine, a similar framework for Java, and has the benefit of years of design and implementation efforts behind it.