/Me loves strict naming conventions. Agreed.

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag von Felix Gilcher
Gesendet: Freitag, 22. August 2008 16:08
An: Mailing List Dev Agavi
Betreff: [Agavi-Dev] RFC: strict naming conventions for Actions, Views,
Models

Hi everyone out there,

we'd like to introduce strict naming conventions for actions, views  
and models in Agavi 1.0. Currently for an action Foo.Bar which is  
located in the module Boing, the following names are allowed:

- fully qualified (as generated by the agavi build script):  
Boing_Foo_BarAction
- half qualified: Foo_BarAction and Boing_BarAction
- unqualified: BarAction

The same goes for views.

Models exhibit similar behavior: a model Foo in the module Boing can  
be named

- fully qualified: Boing_FooModel
- unqualified: FooModel

This is legacy mojavi behavior and all sort of messy[1]. We'd like to  
change that behavior for 1.0 to only allow the full names in any case.  
There's a couple of reasons for that:

- The shorter names are ambiguous, causing name collisions and weird  
errors when forwarding or loading models across modules. Nobody who'd  
like to keep the remains of his sanity should be using the short names  
anyway.

- We could support renames of modules via the agavi build script - it  
could do all the magic of renaming the classes etc. in at least 95% of  
all use cases (there might be some corner cases where we can't do it).  
Currently renaming of modules is a royal PITA.

- We could support autoloading of actions and views directly in the  
framework, which would solve a certain class of problems (FooAction  
extending BarAction and slotting BarAction - I haven't seen a use case  
for that, but I've had reports of that being a problem) (greetings  
Thorsten, are you out there? ;)

- We'd reduce the code base, creating less opportunity for bugs :)

We think that the list of advantages justifies a minor BC break from  
0.11 to 1.0, especially since fixing the application would only  
involve renaming a defined set of classes. We could include a script  
in 1.0 that points you to problematic classes.

Any thoughts on this? Will this change get someone into major trouble?

regards

felix

[1] Thanks PHP, no one ever needs namespaces, no, not at all. </rant>
--
Felix Gilcher

Bitextender GmbH
Paul-Heyse-Str. 6
D-80336 München

T: +49 (0)89 57 08 15 16
F: +49 (0)89 57 08 15 17
[EMAIL PROTECTED]
http://bitextender.com/

Amtsgericht München, HRB 174280
Geschäftsführer: David Zülke, Florian Clever
--
Felix Gilcher

Bitextender GmbH
Paul-Heyse-Str. 6
Munich, 80336
Germany

T: +49 (0)89 57 08 15 16
F: +49 (0)89 57 08 15 17
[EMAIL PROTECTED]
http://bitextender.com/

Amtsgericht Muenchen, HRB 174280
Managing Directors: David Zuelke, Florian Clever


_______________________________________________
Agavi Dev Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/dev


_______________________________________________
Agavi Dev Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/dev

Reply via email to