[TYPO3-50-general] TCEForms
Sven Wilhelm
wilhelm at moduleBox.com
Fri Oct 13 13:54:30 CEST 2006
> > My favorite way there is to have a strong object definition and be able
> > to generate default views and controllers for that by dedicated
> > generators.
>
> Well, that's so general that it can't be wrong ;-)
Perfect, and also the answer is so general that you have no really
feedback on that :)
The idea behind is to generate object definitions in maybe xml schema.
If you have an object defined like that (just general now)
object name="User"
Firstname String
Surname String
Email EmailAdress
Phone InternationalPhoneNumber
...
you have at least two strong datatypes in your object, the EmailAdress
and the InternationalPhoneNumber.
What can I do with strong datatypes?
-> Generate Validator
-> What do I need for that?
-> Validator Name
-> Regular Expression
-> Build the HTML, build the complete edit mask,...
How can I define strong datatypes?
Simply in xml schema.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.modulebox.com/Namespaces/2006/BasicDataTypes"
xmlns:tns="http://www.modulebox.com/Namespaces/2006/BasicDataTypes">
<xsd:simpleType name="EmailAddress">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[\w-\.]+@([\w-]+\.)+[\w-]{2,4}"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="SipUrl">
<xsd:restriction base="xsd:string">
<!-- format for
sip:sip-Id.additional at my.provider.de[:PortNumber] -->
<xsd:pattern value=""/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="InternationalPhoneNumber">
<xsd:annotation>
<xsd:documentation>http://de.wikipedia.org/wiki/Internationales_Nummernformat</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:pattern value="pattern is: +49 30 123456"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
Too general?
I don't know what you expect?
Tell me!
Else supporting is not possible.
Sven
More information about the TYPO3-project-5_0-general
mailing list