I have been knee-deep in Wordpress development for the last couple of months. Overall I have been very impressed with it. The admin interface is very intuitive, very interactive with wise use of AJAX interactivity, a very complete line of available "widgets" ("modules" in Drupal terms), themes are pretty easy and logical to develop, or customize, online documentation is good and the user community is very active.
That makes it come as a real surprise to me at what a cluster ^@%#@ the widget data model is on the back end. I am guessing there is some, good, logical reason for this method, but I can't for the life of me find.
One sets up "sidebars", or, predefined areas within the template in which widgets can be placed. You can name them whatever you want to make it logical for you to work with and initialize the sidebar in the functions.php file of the theme. It makes a nice easy interface, as you select which sidebar you want to work with, by the name you gave it, then add widgets to it at will. Awesome.
When you save the widget configurations it stores all this info in a long (or series of long) serialized block(s) of data and doesn't even use the name you gave the sidebar. It appears to store the sidebars using the index number of that sidebar in the array of sidebar initializing.
Well, then come the time you need to add a sidebar as you further develop your template, you have no choice but to put the new sidebar at the end of the list, if you put it in the middle of the list, it screws up the index number of all the sidebars after it and the widgets start appears in places they shouldn't be.
An absolutely ridiculous way to store this information.
/rant
0 comments:
Post a Comment