[TYPO3-core] New TYPO3 Coding Guidelines

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 - 3 | Next >

[TYPO3-core] New TYPO3 Coding Guidelines

by Francois Suter-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

After a long wait the new TYPO3 Coding Guidelines have been released
last Friday. So head over to typo3.org and get your copy [1]! These new
rules apply to all pending or future patches with immediate effect.

You can read a longer announcement in the Core Blog [2].

Happy coding to all!


Francois Suter & Michael Stucki


[1]
http://typo3.org/documentation/document-library/core-documentation/doc_core_cgl/current/

[2] http://buzz.typo3.org/teams/core/article/new-typo3-coding-guidelines/
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Parent Message unknown Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Philipp Gampe-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am 06.07.2009, 22:18 Uhr, schrieb Francois Suter <fsu-lists@...>:

> Hi all,
>
> After a long wait the new TYPO3 Coding Guidelines have been released  
> last Friday. So head over to typo3.org and get your copy [1]! These new  
> rules apply to all pending or future patches with immediate effect.
>
> You can read a longer announcement in the Core Blog [2].
>
> Happy coding to all!
>
>
> Francois Suter & Michael Stucki
>
>
> [1]  
> http://typo3.org/documentation/document-library/core-documentation/doc_core_cgl/current/
>
> [2] http://buzz.typo3.org/teams/core/article/new-typo3-coding-guidelines/

Nice... somethink to read before going to bed :)

Just curious ... but why is there a french flag ?

Thanks for all you efforts

Cheers
Phil

--
I never knew how good Opera is as a newsreader! Try it!
(used Thunderbird and Evolution before)
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Parent Message unknown Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Lars Houmark-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2009-07-06 15:18:25 -0500, Francois Suter <fsu-lists@...> said:

> [1]
> http://typo3.org/documentation/document-library/core-documentation/doc_core_cgl/current/

Great
>
stuff, but a shame and confusing that typo3.org cannot show the correct
indents. It kinda makes the entire document become "blurry" and should
someway be corrected.

If TYPO3 cannot handle it in the RTE (I should think it can) it should
at least be noted that the indents in the online version is not correct
and one of the other formats should be used to get the right indents.

--
Lars Houmark
Member of the TYPO3 Security Team

_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Parent Message unknown Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Lars Houmark-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

And sorry for the crosspost :)

--
Lars Houmark
Member of the TYPO3 Security Team

_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Christopher Torgalson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Mon, Jul 6, 2009 at 5:29 PM, Lars Houmark<lars@...> wrote:

> On 2009-07-06 15:18:25 -0500, Francois Suter <fsu-lists@...> said:
>
>> [1]
>> http://typo3.org/documentation/document-library/core-documentation/doc_core_cgl/current/
>
> Great
>>
> stuff, but a shame and confusing that typo3.org cannot show the correct
> indents. It kinda makes the entire document become "blurry" and should
> someway be corrected.
>
> If TYPO3 cannot handle it in the RTE (I should think it can) it should
> at least be noted that the indents in the online version is not correct
> and one of the other formats should be used to get the right indents.

I thought the same. I don't think it's the RTE though--flow3 has no
such problems in the docs. Perhaps it's the OpenOffice doc -> HTML
conversion? The TER has the same problem...

--
Christopher Torgalson
http://www.typo3apprentice.com/
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Parent Message unknown Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Xavier Perseguers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

> stuff, but a shame and confusing that typo3.org cannot show the correct
> indents. It kinda makes the entire document become "blurry" and should
> someway be corrected.

Do you have examples?

I see this where the "preformatted" was not used or not used /correctly/:

- § XCLASS declaration
- § Comments (no indent with inner "if")
- § Curly braces (no indent with inner "if")
- § Conditions (idem)
- § Switch (idem)
- § Loops (idem)
- § Strings (double quote for "Hello $userName" are English ones, not
computer-ones - the straight ones)
- § PHP5 features (no indent with inner comment)
- § Functions (and a few others, always this problem with inner indent)
- § Using phpDoc: Example is not using preformatted style and as stuff
is very badly rendered
- § The ChangeLog file: wrong indent for star items

--
Xavier Perseguers
DBAL-Member

http://xavier.perseguers.ch/en/tutorials/typo3.html
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Christopher Torgalson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jul 6, 2009 at 11:19 PM, Xavier Perseguers<typo3@...> wrote:
> Hi,
>
>> stuff, but a shame and confusing that typo3.org cannot show the correct
>> indents. It kinda makes the entire document become "blurry" and should
>> someway be corrected.
>
> Do you have examples?

Do you mean of improperly formatted code? How about every single
example where there's code between braces in the PHP file formatting
section [1]...

[1] http://typo3.org/documentation/document-library/core-documentation/doc_core_cgl/4.3.0/view/1/3/#id4563046

All the same, thanks to Dmitry et al for producing these nice, new guidelines.

--
Christopher Torgalson
http://www.typo3apprentice.com/
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Parent Message unknown Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Marc Wöhlken :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
can any one explain why the CGLs require developers to use a closing php
tag [1]?

Many other projects (e.g. zend framework [2]) do insist on NOT having a
closing php tag as this may cause problems when there is whitespace at
the end of a file as explained in the TYPO3 CGLs, too.

CU
 Marc

[1]
http://typo3.org/documentation/document-library/core-documentation/doc_core_cgl/4.3.0/view/1/3/#id4563046
[2]
http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html
--
...........................................................
Marc Wöhlken                     TYPO3 certified intregator

Quadracom - Proffe & Wöhlken

Rembertistraße 32              WWW: http://www.quadracom.de
D-28203 Bremen                E-Mail: woehlken@...
______________             PGP-Key: http://pgp.quadracom.de
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Parent Message unknown Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Ernesto Baschny [cron IT] :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Marc Wöhlken wrote: on 07.07.2009 22:07:

> can any one explain why the CGLs require developers to use a closing php
> tag [1]?
>
> Many other projects (e.g. zend framework [2]) do insist on NOT having a
> closing php tag as this may cause problems when there is whitespace at
> the end of a file as explained in the TYPO3 CGLs, too.

I only know "zend framework" proposes this non-sense and other projects
probably copy that style.

Why should that be any good?

It looks odd (opening a tag and not closing it, "this file looks
truncated"), and it can create errors if you start concatenating PHP
files together (maybe to cache them, e.g. in typo3conf/temp*.php files?).

Our CGL doesn't allow white spaces after the closing PHP tag, which
should make any other problem which is potentially fixed by this "hack"
a non-issue.

So I am also for this clean guidelines (which BTW is also what TYPO3 5
and FLOW3 CGLs say).

Cheers,
Ernesto
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Francois Suter-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

> Just curious ... but why is there a french flag ?

It's a TER bug :-(

Cheers

--

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Parent Message unknown Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Francois Suter-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

> stuff, but a shame and confusing that typo3.org cannot show the correct
> indents. It kinda makes the entire document become "blurry" and should
> someway be corrected.
>
> If TYPO3 cannot handle it in the RTE (I should think it can) it should
> at least be noted that the indents in the online version is not correct
> and one of the other formats should be used to get the right indents.

Yes, it's a shame, but it has nothing to do with the RTE. The CGLs are
written like every other manual in Open Office. The SXW file is then
transformed to HTML by extension ter_doc.

The problem is that (if you look at the HTML source code) a block of
"Preformatted Text" from OpenOffice is transformed is rendered with a
<pre> tag around each code line and not around the whole block. One of
the many things that could be improved in ter_doc, but we need longer
days...

Anyway such documents are meant to be looked at in SXW or PDF format (a
PDF version is provided in extension doc_core_cgl). The HTML rendering
is a convenience (which doesn't mean it shouldn't be improved, but you
need to buy me a bag of extra time ;-) ).

Cheers

--

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Francois Suter-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

> I thought the same. I don't think it's the RTE though--flow3 has no
> such problems in the docs. Perhaps it's the OpenOffice doc -> HTML
> conversion? The TER has the same problem...

Exactly. See my reply to Lars.

Cheers

--

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Parent Message unknown Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Francois Suter-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Karsten,

> Awesome to see them finally published! Wouldn't that warrant a
> noteworthy news item on the typo3.org front page?

Maybe it could, but I don't have the rights to produce news items for
typo3.org ;-) Also there's a plan to have posts from buzz appear on
typo3.org, but I don't know when that will happen.

> And it might be cool to point out those are for v4, while for FLOW3 and
> v5 there are other guidelines.

Yup, Robert pointed that out too. I updated the news item on buzz.

Cheers

--

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Xavier Perseguers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

> Yes, it's a shame, but it has nothing to do with the RTE. The CGLs are
> written like every other manual in Open Office. The SXW file is then
> transformed to HTML by extension ter_doc.
>
> The problem is that (if you look at the HTML source code) a block of
> "Preformatted Text" from OpenOffice is transformed is rendered with a
> <pre> tag around each code line and not around the whole block. One of
> the many things that could be improved in ter_doc, but we need longer
> days...

IIRC you get correct new lines without extra <pre> tags if you enter
line breaks instead of new paragraphs in OpenOffice (Shift+Enter).

--
Xavier Perseguers
DBAL-Member

http://xavier.perseguers.ch/en/tutorials/typo3.html
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Francois Suter-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

> IIRC you get correct new lines without extra <pre> tags if you enter
> line breaks instead of new paragraphs in OpenOffice (Shift+Enter).

OK, I'll check. Thanks.

--

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Parent Message unknown Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Dmitry Dulepov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

Marc Wöhlken wrote:
> can any one explain why the CGLs require developers to use a closing php
> tag [1]?

Becase we do.

> Many other projects (e.g. zend framework [2]) do insist on NOT having a
> closing php tag as this may cause problems when there is whitespace at
> the end of a file as explained in the TYPO3 CGLs, too.

We are not others :)

--
Dmitry Dulepov
LinkedIn: http://www.linkedin.com/in/dmitrydulepov
Twitter: http://twitter.com/dmitryd
Skype: liels_bugs
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Parent Message unknown Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Peter Russ :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

--- Original Nachricht ---
Absender:   Marc Wöhlken
Datum:       07.07.2009 22:07:

> Hi,
> can any one explain why the CGLs require developers to use a closing php
> tag [1]?
>
> Many other projects (e.g. zend framework [2]) do insist on NOT having a
> closing php tag as this may cause problems when there is whitespace at
> the end of a file as explained in the TYPO3 CGLs, too.
>
> CU
>  Marc
>
> [1]
> http://typo3.org/documentation/document-library/core-documentation/doc_core_cgl/4.3.0/view/1/3/#id4563046
> [2]
> http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html

Marc,

sometimes it's better not to discuss and do what you think it's better
to do. IMHO Zend is right and it's pretty helpful in debugging Restful
Services.

We should be prepared for next release of CGL ;-)

jm2c.


--
Fiat lux! Docendo discimus.
_____________________________
uon GbR

http://www.uon.li
http://www.xing.com/profile/Peter_Russ
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Parent Message unknown Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Steffen Kamper-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

please be careful when answer in this thread. As there was no followup
the answers appear in three lists. I suppose to use dev list only

vg Steffen
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Francois Suter-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

> please be careful when answer in this thread. As there was no followup
> the answers appear in three lists. I suppose to use dev list only

Ah, so that's what I should have used. I set a "Reply to" but that's
apparently not the right option for newsgroups.

Now I know for next time ;-)

Cheers

--

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Parent Message unknown Re: [TYPO3-core] New TYPO3 Coding Guidelines

by Ingo Renner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Marc Wöhlken wrote:

Hi Marc,

> can any one explain why the CGLs require developers to use a closing php
> tag [1]?

because we feel it's cleaner that way

> Many other projects (e.g. zend framework [2]) do insist on NOT having a
> closing php tag as this may cause problems when there is whitespace at
> the end of a file as explained in the TYPO3 CGLs, too.

as Dmitry pointed out already: We are TYPO3, not the other folks... :)


best
Ingo

--
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2

_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
< Prev | 1 - 2 - 3 | Next >