Joomla! Discussion Forums



It is currently Wed Nov 25, 2009 1:26 am (All times are UTC )

 




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: ItemID Data Model Issues
Posted: Thu Jul 27, 2006 11:23 am 
Joomla! Guru
Joomla! Guru
Offline

Joined: Wed Sep 21, 2005 9:27 am
Posts: 691
Location: Somewhere
I still don't understand need for such a long discussion, sorry.

Have a look at database - for me there is no datamodel visible being dependant on ItemId:

There's a sectionid and a catid for each content item and more (parent etc.).

When there would be a datamodel having ItemId as primary key - why do you need this?

For me, being a programmer since almost 30 years now, there's no need for more. You can already have a more granular resolutiion to be able to have a well structured homepage according existing data in database.

Assigning a sectionid and / or a catid to an itemid to get a menu is fine but, why is this such a must have for content items?

Maybe one (or more) developer is able to explain this to me. Stupid me is unable to understand why there is such an artificial pitfall without visible reason.

IMNSHO it would be relative easy to change some SQL statements and functions to display each and every item where it should happen without this overhead related to ItemId. Even better integration of "external data" (data collected by some extension) would be easy.

p.s.:
Related to datamodel - where is a valid datamodel of Joomla! (ERD)?
I do not mean a description of workflow. The visible reason for this problem is at workflow!

_________________
Don't confuse me with facts. Read
http://www.heise.de/security/Massenhack ... from/rss09


Top
   
 
Posted: Thu Jul 27, 2006 7:57 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso
Offline

Joined: Tue Sep 13, 2005 12:22 am
Posts: 4109
Location: Omaha, Nebraska, USA
Topic split from: http://forum.joomla.org/index.php/topic ... #msg413507

Moving to "General Discussion" board

_________________
Kenneth Crowder - Omaha, Nebraska, USA
Global Moderator - Community & Leadership Team
Joomla! ...because open source matters
Recipes for people with food allergies: http://intolerantoffspring.com


Top
  E-mail  
 
Posted: Thu Jul 27, 2006 8:37 pm 
Thanks, Ken, for moving this item. Knowing Diri and me, this might go back and forth a bit since we like to talk about databases and especially the ItemID. The other question was answered and I didn't want to force everyone into this fun for us, but probably not for everyone, data geek speak!  8)

Amy

++++

Hey Diri!

First of all, I have to tell you how really freaky it was that you responded to that question. You and I have not chatted for awhile and as I was posting to that topic last night, I was thinking about you and how we have talked about this in the past.

So, that was pretty amazing to see your post!  :)

++++

Easy Question - where is the data model?

v 1.0.X - http://img142.imageshack.us/img142/2519 ... les1ge.png
v 1.5 - http://img395.imageshack.us/my.php?imag ... emafn6.png

++++

If you have not already, spend some time with these FAQ's. Try to recreate some of those conditions.

1. FAQ: "You are not authorized to view this resource. You need to login. < http://forum.joomla.org/index.php/topic,19443.0.html >
2. WIP: ItemID problems - Possible solutions/workarounds < http://forum.joomla.org/index.php/topic,4259.0.html > PLUS: Discussion of this FAQ: four pages loaded with more issues

++++

Now, the "data model" issue.

WHY THE EXISTING DATA MODEL DOES NOT WORK

The ItemID is really a parameter -- it relates to the primary key: id of the jos_menu table. The link column in this table contains the < beginnings of the > URI. The jos_menu is the connector of any object (content, modules, components) and Joomla!. In Joomla!, ItemID is the big boss and it is used to construct the web page.

If objects (content, modules, components) are not associated with a menu item, there will be no row in the jos_menu table. So, if these objects are referenced in some way, Joomla! is going to be confused at some point in building the page.

WHEN JOOMLA! GETS A PAGE REQUEST

It exacts the ItemID value from the URL. It looks it up in the jos_menu table.

Without an ItemID value, Joomla! is unable to:
1. determine what page is presented;
2. display modules associated with that page;
3. determine who is authorized to use that page;
4. build a correct pathway (breadcrumbs);
5. know what menu item to expand in the case of parent menus;
6. it has no idea which menu item should be marked as activemenu for the CSS.
(There is obviously more, this is off the top of my head.)

Some examples of ItemID problems you have likely seen in your travels:
1. "You are not authorized to view this resource.";
2. Pathway is blank,
3. Pathway is "Home > Home",
4. Home page cannot be found (ItemID must be 1 for the first menu item of the main menu);
5. RSS feeds, related items, related modules, read more, SEF, search issues where item found in search list, but just try clicking it.

To complicate matters – over the years, little patches have made to overcome parts of this problem, sometimes under bizarre conditions. The last thread that I asked Ken to split this discussion away from is a sad example of actually fixing a real problem but, breaking a "patch " that really work did NOT work all the way through, but gave enough of an appearance of working since many people didn't notice the real problems.

+++++

WHAT SHOULD HAPPEN WITH THE DATA MODEL?

First, jos_menu does not contain a list of all items that can be presented in Joomla!. It is a mid-range data structure. A lower level structure is needed. That is where the interface interacts with the objects. The menu item is further up in the events.

So, what is the answer? Diri, I have not sat down with a tool and the code and lost myself in it. I believe this to be a conceptual data model problem, rather than physical. And, I am fairly convinced we are missing at least one entity and lots of relationships. My gut feel is that we are missing the page entity, but I am not 100% certain. I would absolutely need to spend a bunch of time with it, and dig deep into the code and the interface.

Assuming a new page table and thinking out the physical implementation, a bit, of a page table:
1. There could be one row in the "page" table for each content item and each component (including the frontpage.)
2. There would also be one row in the "page" table for each menu item.

Relationships would be to page, not menu item:
1. Menu items would relate to "page."
2. Modules would be displayed based on page value, not menu item.
3. Templates would be the same.
4. ACL would relate to the page (and other lower level objects).
5. Searches would look there instead of through the menu.

The breadcrumb determination would start at page to give the right most position, work its way through any related menu items, then to home on the left. Any "page" without a related menu item would default to "Home" on the left.

This should accommodate situations where content items are on multiple menu items and referenced in multiple sections and categories, as well.

For deployment, we would be adding a table and it would have more rows than any other table given all possible combinations, but, these would be key values, so storage wouldn't be as enormous. Plus, you probably could logically deduce rows, too, by not actually creating the itemized content item and component rows, but look them up in their own tables. < All of that is implementation stuff; shouldn’t impact the conceptual design.. >

I am, of course, VERY interested in your take on this. You and I have discussed this before but not gotten into any detail. So, please, play with it and see what you think. I would be honored to review anything you produce on this that would help make it clear what the issue is.

But, I am very confident this is a data model problem. And, it is a conceptual model issue, rather than only physical. Only conceptual data model problems cause this type of disruption and debugging nightmares for this long.

I look forward to hearing your thoughts on this.

Thanks, Diri...Amy  :)


Top
   
 
Posted: Fri Jul 28, 2006 7:58 am 
Joomla! Guru
Joomla! Guru
Offline

Joined: Wed Sep 21, 2005 9:27 am
Posts: 691
Location: Somewhere
AmyStephen wrote:
First of all, I have to tell you how really freaky it was that you responded to that question.

Hi Amy,

I would not be that astonished about my posting because this is the most irritating and disappointing issue with Joomla!. As a result it is all but no easy to use system - the opposite applies. This is the reason why I don't understand need of such discussions and more than one single thread to get the problem mentioned and solved afterwards.
AmyStephen wrote:

And ... where is a working one? ;)
AmyStephen wrote:
If you have not already,

I have allready been there. Been there, done this and done that. I see all but no reasonable solution except hacking Joomla! in case of using it.

AmyStephen wrote:
Now, the "data model" issue.

WHY THE EXISTING DATA MODEL DOES NOT WORK


AmyStephen wrote:
WHEN JOOMLA! GETS A PAGE REQUEST


You are absolute correct with your description. Now we are at most fundamental question in relation of datamanagement:

What is such a management system used for?

Two choices:

  • manage data
  • manage extensions of the very system

The answer should be easy.

Let's go back to the roots:
A CMS must do both jobs. Nevertheless publishing content in a comfortable way and satisfying presentation of content are the reasons to use such a system.

Mambo (and nowadays Joomla!) is / has been focused to manage extensions instead of content. Would this sentence be false the problem with ItemId would have never been an issue.

In very moment you have more than one basic section holding one category for content and no reason to provide another menu item you are in trouble for this. This can not be true.

Again in other words and only one sentence:
Most prominent job for a CMS is managing  content, not menus.

As I wrote before:

There is everything available to show each and every content at every place in a structured website. Data are simply not used to do the job.

Compare it with a warehousing system / POS:

You have a clerk, a customer and a product. Related to product you might have a vendor and a manufacturer. Related to customer there might be different ones (discount, private or commercial, ...).

Think about data needed to develop such a system from order of product, over storage and sale to fulfillment.

Now we compare a CMS with such a system:
The product is content. The customer is the visitor of the site. The clerk is the person hacking content into the system.

You can be concentric on clerk, on customer or on product. There will be lesser chances to concentrate on manufacturer or vendor.  ;)

I bet the system will not work correct as long as workflow is not based on product. Everything else has to be an extension.

As long as developers won't accept to change behaviour of Joomla! and follow a direction which can not work without hacks or real overhead the problem most probably will become even more worse.

Sorry.The deeper I dive into Joomla! it looks like a case study to have a proof of concept for me in this relation. As much as I like Joomla! for itself, change of behaviour should happen yesterday - not tomorrow.

cu, diri

_________________
Don't confuse me with facts. Read
http://www.heise.de/security/Massenhack ... from/rss09


Top
   
 
Posted: Fri Jul 28, 2006 2:19 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 5759
Location: New York
Maybe one of you could think about my quesiton here:

http://forum.joomla.org/index.php/topic,80664.0.html

Still puzzling about this one.

_________________
Read your words before posting and think about how other people will read them.
Be polite. Be kind. Be constructive. Say thank you.
Freedom-Equality-Trust-Community-Collaboration-Usability
http://opensourcematters.org/index.php?Itemid=134


Top
   
 
Posted: Sat Jul 29, 2006 9:26 pm 
I am not ignoring either one of you, by the way.

Diri - I gave you my talk on time already! You remember my talk on time, right? Because no one likes my talks the first time, let alone hearing them again! lol... What we have to do, Diri, is become a part of the solution. So, our analysis is interesting and fun and challenging, but, until we come up with a solution, we are just exercising our brains for no purpose at all -- kind of like fashion models walking down a runway! I think we are obligated to this issue. We are not done.

Another point for us to remember in all of this - is that there is huge backwards compatible issues that prevent the developers from being able to make database shifts. I suspect if they were able, if they were building it for themselves and didn't have to concern themselves with others, they might do things differently. Don't you think? ;-)

You are a lot of fun, Diri. I enjoy you. Be careful not to be too harsh, though, we don't ever want to discourage people who freely give their time, their youth, and their creativity to us! And, we never want to pretend that we know anywhere near what they know, having written the applications themselves. But, do keep thinking about it - about how to solve the riddle and give a good transition path for the plug ins. That is our job as hackers! (And to contribute a solution, too!)

You can email me AmyStephen@msn.com if you want to talk more. It's probably a better off-forum discussion, anyway. Glad to hear from you if you are interested!

Take care! Thanks for the stimulating thinking!
Amy


Top
   
 
Posted: Sun Jul 30, 2006 9:41 am 
Joomla! Guru
Joomla! Guru
Offline

Joined: Wed Sep 21, 2005 9:27 am
Posts: 691
Location: Somewhere
AmyStephen wrote:
What we have to do, Diri, is become a part of the solution.

I already spend a lot of time for Joomla! to find a solution which can be integrated without braking anything. It "only" takes kind of additional tier between content and current code. Problem is time needed to get through v1.0.x and no real documentation. Starting with v1.5 is no choice for me currently - there are to much changes to await before next alpha or beta will be released. There must be some more stability in code to change "kernel" of Joomla! the way needed to accomplish the aim.
AmyStephen wrote:
Be careful not to be too harsh, though, we don't ever want to discourage people who freely give their time, their youth, and their creativity to us!

That's the veryvery last I want to achive. I do want to help to improve Joomla! but, I can not spend my hole time for this. There are costs for living (and working).

AmyStephen wrote:
You can email me

As time permits I will do it. Currently I'm working on a project with deadline 30.06.2006 ...  :-[

cu, diri

_________________
Don't confuse me with facts. Read
http://www.heise.de/security/Massenhack ... from/rss09


Top
   
 
Posted: Sun Jul 30, 2006 12:18 pm 
Thanks, diri, we will talk later, I am certain. I saw you and the list of DBA's with their data modeling tools lining up at our favorite thread! It is nice of Louis to invite involvement for the new model! I can't wait. Good luck with your deadline!

Amy


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

Quick reply

 



Who is online

Users browsing this forum: AmyStephen and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group