Re: [zeta-dev] Survey on PHP library release modes

2010-11-27 Thread Maxime Thomas
2010/11/27 Jerome Renard 

> Hi Tobias,
>
> On Sat, Nov 27, 2010 at 7:40 PM, Tobias Schlitt 
> wrote:
> > Hi,
> >
> > I'm about to start a little online survey to check out how users in the
> > PHP world would love to see their favorite libraries being released.
> > I'll mainly do this out of private interest, but it might also help us
> > to optimize our release process.
> >
>
> Excellent idea :)
>
> > Find below some questions for discussion. Whenever there is no
> > additional info, only a single answer may be chosen.
> >
> > 1. Which libraries / frameworks do you use?
> >
> > (multiple answers possible)
> >
> >
> > - ADOdb
> > - Apache Zeta Components
> > - Cake PHP
> > - CodeIgniter
> > - Doctrine 1
> > - Doctrine 2
> > - eZ Components
> > - Horde
> > - PEAR
> > - Propel
> > - Seagull
> > - Symfony
> > - Zend Framework
> > - Another framework / library (free text)
> > - I code everything on my own
> >
> > 2. What is your preferred way of installing PHP libraries?
> >
> > - PEAR
> > - Custom installer
> > - Manual download
> > - OS based package management
>
> I would just add something like (apt-get, yum, rpm), just to avoid any
> confusion
> from beginner users.
>
> > - Version control (SVN external, Git sub-module, etc.)
> > - Something else (free Text)
> >
> > 3. Do you prefer bundles over single component installs?
> >
> > - I want to install each component separately
> > - I want a bundle with all components from a library
> >
> > 4. How would you expect a PHP library project to do releases?
> >
> > - Irregularly whenever something is ready
> > - Regularly with multiple additions bundled
> >
> > 5. How do you want to deploy PHP library components?
> >
> > - I bundle library components with my application
> > - I deploy libraries and application separately
> >
> > Do you have anything to add / change?
> >
>
> Even though I think it looks really good, would you think relevant
> to add a question about depedency ? For example framework
> needs external dependency X or Y.
>
> How do they prefer installing this dependency ?
> Possible options:
> - via PEAR
> - I want to get it bundled with the framework
> - I want to install it manually
>
> Not sure I am completely clear here. If it's not just tell me :)
>
> --
> Jérôme Renard
> http://39web.fr | http://jrenard.info | http://twitter.com/jeromerenard
>

Excellent idea.

We can also ask :
- the job of the person answering : system admin / webmaster / not IT
- the platform : Unix / Linux systems or Windows
- the level of industrialization : tailor made platform (you have every
things installed as you want), shared platform (the web hosting company has
decided for you you what you can do or not), generic platform (you grouped
some of your application and factorize software layers : using PEAR, Zend or
whatever).

I think we have to segment the survey's answer because some will use it in
one way and other in the other way.

Will you publish the results of the survey ?

Maxime
maxime.tho...@wascou.org | www.wascou.org | http://twitter.com/wascou


Re: [zeta-dev] Survey on PHP library release modes

2010-11-27 Thread Jerome Renard
Hi Tobias,

On Sat, Nov 27, 2010 at 7:40 PM, Tobias Schlitt  wrote:
> Hi,
>
> I'm about to start a little online survey to check out how users in the
> PHP world would love to see their favorite libraries being released.
> I'll mainly do this out of private interest, but it might also help us
> to optimize our release process.
>

Excellent idea :)

> Find below some questions for discussion. Whenever there is no
> additional info, only a single answer may be chosen.
>
> 1. Which libraries / frameworks do you use?
>
> (multiple answers possible)
>
>
> - ADOdb
> - Apache Zeta Components
> - Cake PHP
> - CodeIgniter
> - Doctrine 1
> - Doctrine 2
> - eZ Components
> - Horde
> - PEAR
> - Propel
> - Seagull
> - Symfony
> - Zend Framework
> - Another framework / library (free text)
> - I code everything on my own
>
> 2. What is your preferred way of installing PHP libraries?
>
> - PEAR
> - Custom installer
> - Manual download
> - OS based package management

I would just add something like (apt-get, yum, rpm), just to avoid any confusion
from beginner users.

> - Version control (SVN external, Git sub-module, etc.)
> - Something else (free Text)
>
> 3. Do you prefer bundles over single component installs?
>
> - I want to install each component separately
> - I want a bundle with all components from a library
>
> 4. How would you expect a PHP library project to do releases?
>
> - Irregularly whenever something is ready
> - Regularly with multiple additions bundled
>
> 5. How do you want to deploy PHP library components?
>
> - I bundle library components with my application
> - I deploy libraries and application separately
>
> Do you have anything to add / change?
>

Even though I think it looks really good, would you think relevant
to add a question about depedency ? For example framework
needs external dependency X or Y.

How do they prefer installing this dependency ?
Possible options:
- via PEAR
- I want to get it bundled with the framework
- I want to install it manually

Not sure I am completely clear here. If it's not just tell me :)

-- 
Jérôme Renard
http://39web.fr | http://jrenard.info | http://twitter.com/jeromerenard


[zeta-dev] Survey on PHP library release modes

2010-11-27 Thread Tobias Schlitt
Hi,

I'm about to start a little online survey to check out how users in the
PHP world would love to see their favorite libraries being released.
I'll mainly do this out of private interest, but it might also help us
to optimize our release process.

Find below some questions for discussion. Whenever there is no
additional info, only a single answer may be chosen.

1. Which libraries / frameworks do you use?

(multiple answers possible)


- ADOdb
- Apache Zeta Components
- Cake PHP
- CodeIgniter
- Doctrine 1
- Doctrine 2
- eZ Components
- Horde
- PEAR
- Propel
- Seagull
- Symfony
- Zend Framework
- Another framework / library (free text)
- I code everything on my own

2. What is your preferred way of installing PHP libraries?

- PEAR
- Custom installer
- Manual download
- OS based package management
- Version control (SVN external, Git sub-module, etc.)
- Something else (free Text)

3. Do you prefer bundles over single component installs?

- I want to install each component separately
- I want a bundle with all components from a library

4. How would you expect a PHP library project to do releases?

- Irregularly whenever something is ready
- Regularly with multiple additions bundled

5. How do you want to deploy PHP library components?

- I bundle library components with my application
- I deploy libraries and application separately

Do you have anything to add / change?

I plan to use a Twtsurvey [1] for this or do you know anything better?

Regards,
Toby

[1] http://twtsurvey.com/

-- 
Tobias Schlitthttp://schlitt.infoGPG Key: 0xC462BC14
Want to hire me? Need quality assurance?http://qafoo.com
eZ Components are Zeta Components now!  http://bit.ly/9S7zbn


[zeta-dev] Patch: Re: [zeta-dev] Documenting our coding style

2010-11-27 Thread Tobias Schlitt
Hi,

find attached the patch I commited in order to document our coding style
for review.

Regards,
Toby

-- 
Tobias Schlitthttp://schlitt.infoGPG Key: 0xC462BC14
Want to hire me? Need quality assurance?http://qafoo.com
eZ Components are Zeta Components now!  http://bit.ly/9S7zbn
Index: guidelines/implementation.txt
===
--- guidelines/implementation.txt	(revision 978835)
+++ guidelines/implementation.txt	(working copy)
@@ -1167,6 +1167,171 @@
 original string and the lowercase string at the same time or using only
 lowercase characters at all times.
 
+
+Coding standard
+===
+
+The Zeta coding standard is derived from the coding guidelines used in eZ
+Publish. It may feel uncommon to you, if you coded in the manner of PEAR
+before, but it feels a lot more readable, once you get used to it. Please stick
+to the following rules, when you provide code to Apache Zeta Components.
+
+Names
+-
+
+All names are in nerdCase (headless camel case). This applies to variable,
+property, function method and also class names. Examples are::
+
+class ezcWebdavTransport
+
+static public $parsingMap = array();
+
+public final function parseRequest( $uri )
+
+$response->validateHeaders();
+
+Note that class names always start with the prefix ``ezc``, so the actual name
+of the class is in CamelCase. The only exception for this naming rule are class
+constants, which are written fully in UPPERCASE and, if they consist of
+multiple words, are devided by underscores (``_``). For example::
+
+const VERSION = '//autogentag//';
+
+const XML_DEFAULT_NAMESPACE = 'DAV:';
+
+For conventions on names, please rever to the `Naming conventions`_ section.
+
+Brackets
+
+
+There are three simple rules on how you need to handle brackets:
+
+Parenthesis
+~~~
+
+After every opening parenthesis and before every closing parenthesis there is a
+whitespace::
+
+if ( ( $someThing === 'some' || $anotherThing === 'another' ) )
+
+The whitespace is typically a simple space character, but might also be a
+newline, if you need to indent code in parenthesis.
+
+Square brackets
+~~~
+
+There is no space after an opening square bracket and none before the closing
+conterpart::
+
+$this->properties['namespaceRegistry'] = null;
+
+Curly brackets
+~~
+
+Every curly bracket is preceeded and followed by a newline::
+
+public final function parseRequest( $uri )
+{
+// …
+if ( isset( self::$parsingMap[$_SERVER['REQUEST_METHOD']] )  )
+{
+try
+{
+// …
+}
+catch ( Exception $e )
+{
+// …
+}
+}
+// …
+}
+
+The only exception for this rule are curly brackets inside double quoted
+strings, which are used to mark a variable replacement::
+
+$foo "This is a {$foo} string with {$bar[23]}";
+
+Line length
+---
+
+A code line should not be longer than 80 characters. In case a line in your
+source code becomes longer, you need to wrap it and use proper `Indentation`_.
+
+Proper wrapping and indentation depends on the situation. For example, for a
+method signature, a proper wrapping would be::
+
+public function doSomething(
+ezcSomeClass $foo,
+ezcAnotherClass $bar,
+$doItRight = true,
+$someIntValue = 10
+)
+
+In case of a long condition, you should try to group the condition elements
+semantically, as good as possible::
+
+if ( ( $someThing === 'some' || $anotherThing === 'another' )
+&& ( $foo !== $bar ) )
+
+Indentation
+---
+
+Indentation is performed by **four spaces**, tabs or a different ammount of
+spaces for indentation is not allowed. Code blocks are indented in two
+different cases:
+
+1. After an opening curly bracket
+2. In case a code line becomes to long
+
+Properly indented code looks like this::
+
+public final function parseRequest( $uri )
+{
+$body = $this->retrieveBody();
+$path = $this->retrievePath( $uri );
+
+if ( isset( self::$parsingMap[$_SERVER['REQUEST_METHOD']] )  )
+{
+try
+{
+// Plugin hook beforeParseRequest
+ezcWebdavServer::getInstance()->pluginRegistry->announceHook(
+__CLASS__,
+'beforeParseRequest',
+new ezcWebdavPluginParameters(
+array(
+'path' => &$path,
+'body' => &$body,
+)
+)
+);
+
+$request = call_user_func(
+array( $this, self::$parsingMap[$_SERVER['REQUEST_METHOD']] ),
+$path,
+$body
+);
+}
+catch ( Exceptio

Re: [zeta-dev] PHPUnit's usage

2010-11-27 Thread Jerome Renard
Hi Sebastian,

On Sat, Nov 27, 2010 at 10:57 AM, Sebastian Bergmann
 wrote:
> Am 27.11.2010 10:51, schrieb Jerome Renard:
>> for those of you who are forced (like me) to use PHPUnit 3.4.* and can
>> not (or do not want to) upgrade,
>> you can run the following command to restore the PHPUnit 3.4.*
>> compatible version of UnitTest/
>
>  Why are you forced to use PHPUnit 3.4?

Because I work on something else that seems to be incompatible with the latest
PHPUnit stable version. And since I can not commit fixes I am stuck
with PHPUnit 3.4
Hopefully that will be fixed in a couple of weeks :)

-- 
Jérôme Renard
http://39web.fr | http://jrenard.info | http://twitter.com/jeromerenard


Re: [zeta-dev] PHPUnit's usage

2010-11-27 Thread Sebastian Bergmann
Am 27.11.2010 10:51, schrieb Jerome Renard:
> for those of you who are forced (like me) to use PHPUnit 3.4.* and can
> not (or do not want to) upgrade,
> you can run the following command to restore the PHPUnit 3.4.*
> compatible version of UnitTest/

 Why are you forced to use PHPUnit 3.4?

-- 
Sebastian BergmannCo-Founder and Principal Consultant
http://sebastian-bergmann.de/   http://thePHP.cc/



signature.asc
Description: OpenPGP digital signature


Re: [zeta-dev] PHPUnit's usage

2010-11-27 Thread Jerome Renard
Hi all,

for those of you who are forced (like me) to use PHPUnit 3.4.* and can
not (or do not want to) upgrade,
you can run the following command to restore the PHPUnit 3.4.*
compatible version of UnitTest/

svn up -r987381 ./UnitTest

Ref : 
https://fisheye6.atlassian.com/changelog/zetacomponents/trunk/UnitTest?cs=987381

'Hope that helps :)

-- 
Jérôme Renard
http://39web.fr | http://jrenard.info | http://twitter.com/jeromerenard


Re: [zeta-dev] Documenting our coding style

2010-11-27 Thread Jerome Renard
Maxime,

On Sat, Nov 27, 2010 at 10:29 AM, Maxime Thomas  wrote:
> I saved in my bookmarks this one : http://pear.xplib.de/get/
>
> Max
>

Cool, thanks :)

-- 
Jérôme Renard
http://39web.fr | http://jrenard.info | http://twitter.com/jeromerenard


Re: [zeta-dev] Documenting our coding style

2010-11-27 Thread Maxime Thomas
I saved in my bookmarks this one : http://pear.xplib.de/get/

Max

2010/11/27 Jerome Renard 

> Hi,
>
> On Fri, Nov 26, 2010 at 2:23 PM, Derick Rethans  wrote:
> > On Tue, 16 Nov 2010, Tobias Schlitt wrote:
> >
> >> for another project I needed to give advice on the coding standard used
> >> by Apache Zeta Components. There is some very old version of the eZ
> >> Publish coding style in [1] (from 2001) but no reliable, recent source.
> >> So I think we should document our coding style on the website.
> >>
> >> Please complete / correct my following brainstorming:
> >>
> >> - Indentation with 4 spaces
> >>   - After a "{"
> >>   - On breakup of long lines (> 78 chars) after a "("
> >> - "{" and "}" on a new line
> >> - 1 space after "(" and before ")"
> >> - No space after "[" and before "]"
> >> - 1 space after ","
> >> - 1 space before and after "."
> >> - Almost always camelCase
> >>   - classes always start with ezc followed by an upper case char
> >>   - constants all in upper case with "_"
> >
> >
> > There is also a script at
> >
> http://svn.apache.org/repos/asf/incubator/zetacomponents/scripts/syntax-check.sh
> > that has a few rough automated checks.
> >
>
> I remember I used a PHP Code Sniffer standard for ZC is it still
> available somewhere ?
> I tried the old URL and it seems it's no longer there.
>
> Best Regards,
>
> --
> Jérôme Renard
> http://39web.fr | http://jrenard.info | http://twitter.com/jeromerenard
>


Re: [zeta-dev] Documenting our coding style

2010-11-27 Thread Jerome Renard
Hi,

On Fri, Nov 26, 2010 at 2:23 PM, Derick Rethans  wrote:
> On Tue, 16 Nov 2010, Tobias Schlitt wrote:
>
>> for another project I needed to give advice on the coding standard used
>> by Apache Zeta Components. There is some very old version of the eZ
>> Publish coding style in [1] (from 2001) but no reliable, recent source.
>> So I think we should document our coding style on the website.
>>
>> Please complete / correct my following brainstorming:
>>
>> - Indentation with 4 spaces
>>   - After a "{"
>>   - On breakup of long lines (> 78 chars) after a "("
>> - "{" and "}" on a new line
>> - 1 space after "(" and before ")"
>> - No space after "[" and before "]"
>> - 1 space after ","
>> - 1 space before and after "."
>> - Almost always camelCase
>>   - classes always start with ezc followed by an upper case char
>>   - constants all in upper case with "_"
>
>
> There is also a script at
> http://svn.apache.org/repos/asf/incubator/zetacomponents/scripts/syntax-check.sh
> that has a few rough automated checks.
>

I remember I used a PHP Code Sniffer standard for ZC is it still
available somewhere ?
I tried the old URL and it seems it's no longer there.

Best Regards,

-- 
Jérôme Renard
http://39web.fr | http://jrenard.info | http://twitter.com/jeromerenard