ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Anyone interested in some serious look at internals of CMS systems?

<< < (2/4) > >>

Rover:
Hey M,

As I re-read my post, I realize it may have come off as somewhat of a put-down.   :huh:  I trust that you remember the respect and admiration I hold for you and read it with my "mental" intent. :)

Internal Structural choices?  Is this an MVC vs. "everything else" quest?  I'm not doubting your desire, just trying to understand.

This almost feels like a which web development framework is best discussion and I'm sure that's not your intention.  It just gets really foggy sometimes in the Web Dev world. :)  At least for me.

I'm currently suffering from Analysis Paralysis for PHP Dev.   Zend, Pear, Cake, Yii, etc. etc. ad nauseum.

For the sake of mouser's goal... please reply to any comments of mine re: PHP frameworks in a new thread. ;)

mouser:
I guess the kind of thing i was interested in is more internal structural decisions like:

* How is the plugin/extension system designed?
* How is the installation system designed?
* How are users, and more importantly GROUPS of users represented in the database?
* How is the permission system handled?
* How is upgrading handled?
* How are hooks and events handled?
* How is translation handled?
* How is logging handled?
* How is security handled and what kinds of options exist for monitoring and dealing with problems?
* What kind of support for versioning exists?
* What kind of choices were made about what to build into core vs. what to write as extensions?

Rover:
I guess the kind of thing i was interested in is more internal structural decisions like:

* How is the plugin/extension system designed?
* How is the installation system designed?
* How are users, and more importantly GROUPS of users represented in the database?
* How is the permission system handled?
* How is upgrading handled?
* How are hooks and events handled?
* How is translation handled?
* How is logging handled?
* How is security handled and what kinds of options exist for monitoring and dealing with problems?
* What kind of support for versioning exists?
* What kind of choices were made about what to build into core vs. what to write as extensions?-mouser (February 18, 2013, 10:41 PM)
--- End quote ---

WOW!  Each of those could almost be a Thread Topic of their own.

I've been pretty impressed with  some of the designs I've seen in the past.  I like the model where you include skeleton hook files at various stages of the page build.  That seems to let you handle upgrades, plug-ins, versions and translations.  It also tends to scatter your logic across dozens of files, so you really have to know where your going to make changes.  Something like this:


--- Code: Text ---....include(main_menu.php.inc);include(post_main_menu_hooks.php.inc);....
where post_main_menu_hooks.php.inc would contain something like:


--- Code: Text ---[std include validation and setup]// Add your post main menu hook includes here:include(sample_menu_hook.php.inc); // contains nothing -- just a sample
You can do the same for language, etc. 

Group, permissions and users have been badly handled from most of the examples I've seen.  A module that can integrate with anything would be the best. ;)

I have some ideas on users and groups but I don't like them because they're extremely tedious.  It would basically require non-public information to be listed by element (Table or Field) with Group Membership requirements to View or Edit.  (You could add RO and RW fields)

I always get intimidated by the scope of the project when I think about it too much. :)

Rover:
Alright Mouser, yes I am.  If only for the (possibly foolish) belief that CMS should be easy.

I have a couple of Internet sites and maintain several Internal sites for various and sundry web content sharing.  Every time I start thinking about how to integrate I get sick.  From an enterprise perspective, every CMS I have seen is woefully inadequate.  Oh sure, I can add 37  plug-ins (that may or may not be compatible) to instantiate adequate control and authentication, but the first time I apply a zero day patch, 1/2 of my plug-ins break.

There OUGHT to be a better way!  Web is supposed to be easy.  It's mainframes that are hard... right?

How do you propose we investigate, evaluate and potentially improve upon our target CMS's?  (You know I value your thoughts/insights)

kwacky1:
I feel like a broken record whenever CMSs are mentioned on DC, so please excuse me while I climb on my horse.  ;)


* How is the plugin/extension system designed?-mouser
--- End quote ---
ModX is basically a framework, one of it's greatest features are the use of what they call chunks and snippets, a chunk is simply a piece of html and a snippet a piece of php code. These pieces can be inserted anywhere in to your template which makes life incredibly easy. Extensions/addons are usually just a collection of chunks and snippets. One of the features added for Revolution 2.0 was a transport system that means you can easily build a package that can be simply installed by the user.
Plugins, separate again, can be event driven, for example before or after a page is rendered. When the event happens, so does your plugin.


* How is the installation system designed?-mouser
--- End quote ---
Most CMSs I've had experience with are pretty much the same, you have a wizard based interface that does a few pre-req checks, gets the database info and then executes a sql script to create the tables and update any config files.
If, however, you go with their cloud offering (yes, they do have a free dev account), installation is done in seconds at the click of a button.


* How are users, and more importantly GROUPS of users represented in the database?-mouser
--- End quote ---
In Evolution 1.0, users and groups were a bit strange but in Revolution 2.0 they've gone for ACLs. It can be a bit much to get your head around when coming from the old way, which was strange, but simple. But I find that it makes more sense.
As for the database structure, to me it makes sense.
Users are in a table that is pretty much just username and password.
An attributes table contains the other bits and pieces like email, phone, etc.
Then a groups table that contains the groups you've defined
and a table that links users to groups as a user can be in more than one group.


* How is the permission system handled?-mouser
--- End quote ---
Permissions are a collection of policies, the policies define what a user can and can't do, like edit a document, view certain menu items.


* How is upgrading handled?-mouser
--- End quote ---
Download new package, upload to host, re-run setup, wizard handles the upgrade process.
Via ModX Cloud? click a button, done in seconds.


* How are hooks and events handled?-mouser
--- End quote ---
As mentioned above in relation to plugins. Certain events are defined, when you create or install your plugin you select which events will trigger your code.


* How is translation handled?-mouser
--- End quote ---
Revolution 2.x really went all the way with this. There is full lexicon management, you can change any word you like.
So to start with, all words are seperated into namespaces for various parts of the system.
In the lexicon directory you have a folder for each language and each language has a set of php files which define the value of each string... eg

--- ---$_lang['help_title'] = 'Help';On top of that any changes to the default lexicon are stored in the database, meaning you can revert any change quite simply and if you want to call documents Bananas, then go ahead and do so.


* How is logging handled?-mouser
--- End quote ---
The api has a logging method which logs to a file, you can call the method with flags like error/warning/info from any of your custom scripts. The log file can be viewed/cleared via the management intercace.


* How is security handled and what kinds of options exist for monitoring and dealing with problems?-mouser
--- End quote ---
This is more a process kind of question I'm guessing. The team seem pretty committed to squashing vulnerabilities, I'm not sure what monitoring goes on internally.


* What kind of support for versioning exists?-mouser
--- End quote ---
Out of the box, none really, but as with most things in the CMS world, there is an Add-On available.


* What kind of choices were made about what to build into core vs. what to write as extensions?-mouser
--- End quote ---
I like this question, because not every CMS can be for everybody so a line has to be drawn somewhere as to what's included out of the box and what gets bolted on afterwards.
First and foremost, ModX is a framework, what it does out of the box is give you incredible flexibility.
One of the things v1.0 did poorly, was blogging, out of the box, 2.0 is not too crash hot either (ie. it's not wordpress), but one of the lead developers wrote and add-on. Install it, and bam, now you have full on blogging.
Another thing left out of the box in 2.0, TinyMCE, because you don't have to use TinyMCE if you don't want to but it is the most popular addon download.

I hope that's piqued your interest, feel free to ask me more technical/direct questions on any part you wish to know more about.

All of this info is drawn from my personal experience, I'm just an avid user who's been developing web sites with all sorts of crazy requirements since I first discovered ModX in 2008.

kwacky1

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version