[zen-52] Renamed abstract classes in Zend\Mvc

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[zen-52] Renamed abstract classes in Zend\Mvc

Sascha-Oliver Prolic
Hi all,

According the coding standards abstract class names SHOULD begin with
the term, "Abstract". As examples, "AbstractAdapter" and
"AbstractWriter" are both considered valid abstract class names.
Currently we have 2 abstract classes in Zend\Mvc: the ActionController
and the RestfulController class. Both would be renamed to
AbstractActionController and AbstractRestfulController.
See https://github.com/zendframework/zf2/pull/1567

This will lead to a lot of breaks in modules. What do you think? We
can make an exception here and leave the names as they are, or force
consistency and refactor all usages of these.

Sascha

--
Sascha-Oliver Prolic
Reply | Threaded
Open this post in threaded view
|

Re: [zen-52] Renamed abstract classes in Zend\Mvc

Marco Pivetta
You can still keep an @deprecated abstract class extending AbstractActionController to make the transition smoother...

Marco Pivetta

http://twitter.com/Ocramius     

http://marco-pivetta.com    



On 23 June 2012 14:57, Sascha-Oliver Prolic <[hidden email]> wrote:
Hi all,

According the coding standards abstract class names SHOULD begin with
the term, "Abstract". As examples, "AbstractAdapter" and
"AbstractWriter" are both considered valid abstract class names.
Currently we have 2 abstract classes in Zend\Mvc: the ActionController
and the RestfulController class. Both would be renamed to
AbstractActionController and AbstractRestfulController.
See https://github.com/zendframework/zf2/pull/1567

This will lead to a lot of breaks in modules. What do you think? We
can make an exception here and leave the names as they are, or force
consistency and refactor all usages of these.

Sascha

--
Sascha-Oliver Prolic

Reply | Threaded
Open this post in threaded view
|

Re: [zen-52] Renamed abstract classes in Zend\Mvc

HHGAG
In reply to this post by Sascha-Oliver Prolic
Hi,

please don't think at BC in a beta state.  

Hasan H. Gürsoy (HHGAG)

Sascha-Oliver Prolic <[hidden email]> schrieb:

>Hi all,
>
>According the coding standards abstract class names SHOULD begin with
>the term, "Abstract". As examples, "AbstractAdapter" and
>"AbstractWriter" are both considered valid abstract class names.
>Currently we have 2 abstract classes in Zend\Mvc: the ActionController
>and the RestfulController class. Both would be renamed to
>AbstractActionController and AbstractRestfulController.
>See https://github.com/zendframework/zf2/pull/1567
>
>This will lead to a lot of breaks in modules. What do you think? We
>can make an exception here and leave the names as they are, or force
>consistency and refactor all usages of these.
>
>Sascha
>
>--
>Sascha-Oliver Prolic
Hasan H. Gürsoy (HHGAG)
Reply | Threaded
Open this post in threaded view
|

Re: [zen-52] Renamed abstract classes in Zend\Mvc

mattcockayne
Its a beta... BC is perfectly acceptable. 

On Sat, Jun 23, 2012 at 2:59 PM, Hasan H. Gürsoy <[hidden email]> wrote:
Hi,

please don't think at BC in a beta state.

Hasan H. Gürsoy (HHGAG)

Sascha-Oliver Prolic <[hidden email]> schrieb:

>Hi all,
>
>According the coding standards abstract class names SHOULD begin with
>the term, "Abstract". As examples, "AbstractAdapter" and
>"AbstractWriter" are both considered valid abstract class names.
>Currently we have 2 abstract classes in Zend\Mvc: the ActionController
>and the RestfulController class. Both would be renamed to
>AbstractActionController and AbstractRestfulController.
>See https://github.com/zendframework/zf2/pull/1567
>
>This will lead to a lot of breaks in modules. What do you think? We
>can make an exception here and leave the names as they are, or force
>consistency and refactor all usages of these.
>
>Sascha
>
>--
>Sascha-Oliver Prolic



--
Matt Cockayne

Zucchi ! Digital Perfection
Managing Director

t: +44 (0) 161 435 6060
m: +44 (0) 843 557 1751
a: 26 Avon Rd / Cheadle / Cheshire / SK8 3LS



Reply | Threaded
Open this post in threaded view
|

Re: [zen-52] Renamed abstract classes in Zend\Mvc

Goran Jurić
In reply to this post by HHGAG

On Jun 23, 2012, at 3:59 PM, Hasan H. Gürsoy wrote:

> Hi,
>
> please don't think at BC in a beta state.  
>
> Hasan H. Gürsoy (HHGAG)

+1

Goran Jurić
http://gogs.info
Reply | Threaded
Open this post in threaded view
|

Re: [zen-52] Renamed abstract classes in Zend\Mvc

weierophinney
Administrator
In reply to this post by HHGAG
-- Hasan H. Gürsoy <[hidden email]> wrote
(on Saturday, 23 June 2012, 04:59 PM +0300):
> please don't think at BC in a beta state.  

Our betas do not guarantee BC; we're doing gmail-style betas, rolling
new features and refactors between releases.

The main arguments at this point is whether renaming them to include the
Abstract prefix will (a) break a lot of apps, or (b) cause semantic
confusion for users. I'd argue (b) is possible, as we've never prefixed
the base controller implementations with "Abstract" across either
version of the framework.

However, I'm willing to change them, if enough folks think it will lead
to greater consistency.


> Sascha-Oliver Prolic <[hidden email]> schrieb:
>
> >Hi all,
> >
> >According the coding standards abstract class names SHOULD begin with
> >the term, "Abstract". As examples, "AbstractAdapter" and
> >"AbstractWriter" are both considered valid abstract class names.
> >Currently we have 2 abstract classes in Zend\Mvc: the ActionController
> >and the RestfulController class. Both would be renamed to
> >AbstractActionController and AbstractRestfulController.
> >See https://github.com/zendframework/zf2/pull/1567
> >
> >This will lead to a lot of breaks in modules. What do you think? We
> >can make an exception here and leave the names as they are, or force
> >consistency and refactor all usages of these.
> >
> >Sascha
> >
> >--
> >Sascha-Oliver Prolic

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
Reply | Threaded
Open this post in threaded view
|

Re: [zen-52] Renamed abstract classes in Zend\Mvc

Jurian Sluiman
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: [zen-52] Renamed abstract classes in Zend\Mvc

Sascha-Oliver Prolic
2012/6/25 Jurian Sluiman <[hidden email]>:

> 2012/6/25 Matthew Weier O'Phinney <[hidden email]>
>>
>> The main arguments at this point is whether renaming them to include the
>> Abstract prefix will (a) break a lot of apps, or (b) cause semantic
>> confusion for users. I'd argue (b) is possible, as we've never prefixed
>> the base controller implementations with "Abstract" across either
>> version of the framework.
>>
>> However, I'm willing to change them, if enough folks think it will lead
>> to greater consistency.
>
>
> Well, for Zend Framework 1 this was inconsistent as well, as the Coding
> Standards [1] dictated abstract classes should have an Abstract suffix (see
> for example Zend_Controller_Plugin_Abstract or
> Zend_Controller_Request_Abstract).
>
> As for convenience in the meantime there could be a @deprecated abstract
> class extending AbstractActionController like Marco suggests. And people can
> always alias their imports:
>
>> namespace Foo\Controller;
>>
>> use Zend\Mvc\Controller\AbstactActionController as ActionController;
>>
>>
>> class IndexController extends ActionController {}
>
>
> So a) there is a smooth transition and b) people could programmatically
> replace all their imports with the right class (along the lines how Ben
> changed import statements too [3]).
>
> [1] http://framework.zend.com/manual/en/coding-standard.naming-conventions.html#coding-standard.naming-conventions.abstracts
> [2] http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Controller/Action.php
> [3] https://github.com/zendframework/zf2/pull/1001
> --
> Jurian Sluiman

I am against a @deprecated class. We want to ship a brand new and
shiny Zend Framework 2, things shouldn't be already deprecated in a
2.0.0 release. My vote is for renaming to use Abstract-Prefix. The
change is easy to make, a lot of modules break, but will get repaired
very fast.

Best Regards

Sascha

--
Sascha-Oliver Prolic
Reply | Threaded
Open this post in threaded view
|

Re: [zen-52] Renamed abstract classes in Zend\Mvc

HHGAG
In reply to this post by Sascha-Oliver Prolic
+1

We've about 95 modules and don't see any problems to do this little search and replace...

Hasan H. Gürsoy (HHGAG)

Sascha-Oliver Prolic <[hidden email]> schrieb:

>2012/6/25 Jurian Sluiman <[hidden email]>:
>> 2012/6/25 Matthew Weier O'Phinney <[hidden email]>
>>>
>>> The main arguments at this point is whether renaming them to include the
>>> Abstract prefix will (a) break a lot of apps, or (b) cause semantic
>>> confusion for users. I'd argue (b) is possible, as we've never prefixed
>>> the base controller implementations with "Abstract" across either
>>> version of the framework.
>>>
>>> However, I'm willing to change them, if enough folks think it will lead
>>> to greater consistency.
>>
>>
>> Well, for Zend Framework 1 this was inconsistent as well, as the Coding
>> Standards [1] dictated abstract classes should have an Abstract suffix (see
>> for example Zend_Controller_Plugin_Abstract or
>> Zend_Controller_Request_Abstract).
>>
>> As for convenience in the meantime there could be a @deprecated abstract
>> class extending AbstractActionController like Marco suggests. And people can
>> always alias their imports:
>>
>>> namespace Foo\Controller;
>>>
>>> use Zend\Mvc\Controller\AbstactActionController as ActionController;
>>>
>>>
>>> class IndexController extends ActionController {}
>>
>>
>> So a) there is a smooth transition and b) people could programmatically
>> replace all their imports with the right class (along the lines how Ben
>> changed import statements too [3]).
>>
>> [1] http://framework.zend.com/manual/en/coding-standard.naming-conventions.html#coding-standard.naming-conventions.abstracts
>> [2] http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Controller/Action.php
>> [3] https://github.com/zendframework/zf2/pull/1001
>> --
>> Jurian Sluiman
>
>I am against a @deprecated class. We want to ship a brand new and
>shiny Zend Framework 2, things shouldn't be already deprecated in a
>2.0.0 release. My vote is for renaming to use Abstract-Prefix. The
>change is easy to make, a lot of modules break, but will get repaired
>very fast.
>
>Best Regards
>
>Sascha
>
>--
>Sascha-Oliver Prolic
Hasan H. Gürsoy (HHGAG)
Reply | Threaded
Open this post in threaded view
|

Re: [zen-52] Renamed abstract classes in Zend\Mvc

Goran Jurić
In reply to this post by Sascha-Oliver Prolic

On 25. lip. 2012., at 16:34, Sascha-Oliver Prolic wrote:

> I am against a @deprecated class. We want to ship a brand new and
> shiny Zend Framework 2, things shouldn't be already deprecated in a
> 2.0.0 release. My vote is for renaming to use Abstract-Prefix. The
> change is easy to make, a lot of modules break, but will get repaired
> very fast.
>
> Best Regards
>
> Sascha


+1

Goran Jurić
http://gogs.info/
Reply | Threaded
Open this post in threaded view
|

Re: [zen-52] Renamed abstract classes in Zend\Mvc

Antoine Hedgecock
Im also against having a deprecated class when its shipped.
But my recommendation if we do decide to keep it then it should be an empty class called "ActionController" that extends the AbstractActionController

so all the code actually works without any breaks, just my five cents :)

Best regards
Antoine Hedgecock
Senior developer / Server technician 
PMG Media Group AB
Tel: +46707972145

On Jun 25, 2012, at 6:50 PM, Goran Jurić wrote:


On 25. lip. 2012., at 16:34, Sascha-Oliver Prolic wrote:

I am against a @deprecated class. We want to ship a brand new and
shiny Zend Framework 2, things shouldn't be already deprecated in a
2.0.0 release. My vote is for renaming to use Abstract-Prefix. The
change is easy to make, a lot of modules break, but will get repaired
very fast.

Best Regards

Sascha


+1

Goran Jurić
http://gogs.info/

Reply | Threaded
Open this post in threaded view
|

Re: [zen-52] Renamed abstract classes in Zend\Mvc

Antoine Hedgecock
Ill write a patch for it tomorrow :)

Best regards
Antoine Hedgecock
Senior developer / Server technician 
PMG Media Group AB
Tel: +46707972145

On Jun 25, 2012, at 11:02 PM, Antoine Hedgecock wrote:

Im also against having a deprecated class when its shipped.
But my recommendation if we do decide to keep it then it should be an empty class called "ActionController" that extends the AbstractActionController

so all the code actually works without any breaks, just my five cents :)

Best regards
Antoine Hedgecock
Senior developer / Server technician 
PMG Media Group AB
Tel: +46707972145

On Jun 25, 2012, at 6:50 PM, Goran Jurić wrote:


On 25. lip. 2012., at 16:34, Sascha-Oliver Prolic wrote:

I am against a @deprecated class. We want to ship a brand new and
shiny Zend Framework 2, things shouldn't be already deprecated in a
2.0.0 release. My vote is for renaming to use Abstract-Prefix. The
change is easy to make, a lot of modules break, but will get repaired
very fast.

Best Regards

Sascha


+1

Goran Jurić
http://gogs.info/