[Typo3] Extension design issues

Florian Niedermann florian.niedermann at gmx.net
Sat May 14 16:10:54 CEST 2005


Hi *,

my questions concern some design issues of quite a large extension. Some
background: The extension is meant to provide a variety of functions for a
university department. We have quite good PHP and SQL knowledge and have
built some smaller sites with Typo3 in the past, but we don't want to run
the risk of making some major design flaws in our extension. That's why it
would be great if some of the more experienced Typo3 extension developers
could comment on the following points:

1. Database design
So far, we've completely designed the extension in the kickstarter,
including the database tables. But I've found some things where I have some
problems:

1.1. N:M relations
Consider the following scenario:
A student can participate in N lectures, while a lecture "has" M students -
a classical N:M relation.
The kickstarter hasn't got an option for n:m relations. Instead, it only
creates M:M relations. I would solve this issues by creating a seperate
table in the kickstarter which represents the association table and links to
exactly one entity of the table student and one entity of the table
lecture - what do you think of this way?

1.2. DATE
Typo3 always uses the unix timestamp format. Is it possible just to use
DATE? I haven't fount out how. I ask this question since we'll have to
display the date in a variety of frontend plugins and so far haven't found
out how to correctly extract the date from a unix timestamp.

1.3. Using INNODB
Is it problematic to use the InnodDB table type in Typo3? (reasons see below
questions) Especially, is it possible to convert the fe_users table into a
InnoDB table (we have so far not encountered any problems with this, but it
never hurts to ask..)?

1.4. FOREIGN KEY relations
Since Typo3 per default uses the MyISAM table type, it is understandable
that the Kickstarter doesn't create the FOREIGN KEY constraints on database
relations. Is it possible to add this constraint in ext_tables.sql (assuming
InnoDB tables, correctly set indices etc.) without complications? (once
again, I've done it and there weren't any problems so far, but I haven't
tested it on a larger scale)

2. Configuration of FE Plugins
Scenario: One FE plugin is meant to display different junks of information,
depending on the page it is located. So far, we have done the configuration
of the plugin in the template,  thus something like
plugin.tx_wi2info {
	studentPageID = 10
      employeePageID = 20
}
I've seen that many plugins do it that way, but it doesn't seem to be quite
the right way to  do it. Is there any way to do the configuration on the
page where the plugin is included?

Regards & thanks a lot,

Florian




More information about the TYPO3-english mailing list