Welcome Guest, Not a member yet? Register   Sign In
alternate uri syntax
#1

[eluser]TheFuzzy0ne[/eluser]
Hi everyone. I was thinking about CodeIgniter's uri_to_assoc() function, and I was wondering if anyone agreed with me that segments with the following syntax would be easier to read and maintain:
Code:
http://mysite.tld/controller/method/param1=some_value/param2=some_other_value/

Personally, I think it makes it clearer where the pairs are. Can anyone think of any compelling reason why I should avoid using this method?

Another great thing about this method, is that you could simply iterate through each of the segments, and tell if it's meant to be a pair, so the function wouldn't really have to know where to start creating the key value pairs, and I also believe you're less likely to end up with a busted app because someone inserted a segment somewhere they shouldn't have.

I'd be interested to hear your thoughts.




Theme © iAndrew 2016 - Forum software by © MyBB