Quantcast

Proposal for Zend\Uri 2.0 ready for review

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Proposal for Zend\Uri 2.0 ready for review

Shahar Evron
Hi all,

I've finally found the time to finish up a proposal for Zend\Uri 2.0.
This proposal is now ready for review at
http://framework.zend.com/wiki/display/ZFPROP/Zend_Uri+2.0+-+Shahar+Evron -
your comments are most welcome.

In my proposal, I've tried to focus on several changes I want to see in
Zend\Uri, namely:

- Adherance to clear standards (RFC-3986 mostly)
- Loose acceptance of characters when parsing URI strings to objects
- Strict validation / encoding when generating URI strings from objects
- Ability to represent arbitrary URI schemes through a generic URI class
- Ability to add user defined scheme classes
- Ability to represent relative URIs
- Ability to perform operations on URIs such as merging, resolving
relative URIs, normalizing etc.

I am mostly interested in feedback on the following points:

- Validation and encoding API - I am not sure about exposing it all as
static methods. It makes some sense but then again I think things like
host validation should be more flexible. LSB in 5.3 allows overriding
it, but it might make more sense to expose a ->setHostValidator(),
->getHostValidator() methods that will give access to a
Validator\Hostname instance (this is an example).

Perhaps it makes sense to make validation methods dynamic, and encoding
methods static (and perhaps separate them to a separate
\Zend\Uri\Utility class, for example).

- The makeRelative() method - perhaps it can be dropped. I don't have a
clear use case for it, but it exists in similar libraries and might be
useful to some people.

- The Factory class (makes sense to me but I don't know how common this
pattern is in other parts of ZF)

- General adherance to ZF 2.0 standards and policies. These seem to
change too often for me :)

- Anything else you might have to say.

Shahar.

--
Shahar Evron <[hidden email]>

Product Manager
Zend Technologies
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal for Zend\Uri 2.0 ready for review

Shahar Evron
I forgot to say: a prototype implementation is available at
git://arr.gr/zf2.git on the zend-uri-se branch. I will continue to
update this branch in the next few weeks as the proposal is refined.

Shahar.

On 2/8/10 21:13 PM, Shahar Evron wrote:
> I've finally found the time to finish up a proposal for Zend\Uri 2.0.
> This proposal is now ready for review at
> http://framework.zend.com/wiki/display/ZFPROP/Zend_Uri+2.0+-+Shahar+Evron -
> your comments are most welcome.
>

--
Shahar Evron <[hidden email]>

Product Manager
Zend Technologies
Loading...