Welcome Guest, Not a member yet? Register   Sign In
Getting the super-object $CI in Router class?
#21

[eluser]TheFuzzy0ne[/eluser]
He said to call him old fashioned, not to call him a lazy programmer. Tongue

To be honest, I see no problem with the first version of the URL, as it's easy enough to just add a route through to it.
#22

[eluser]jedd[/eluser]
xwero and Colin - with the greatest respect, and happily acknowledging your claim that I am a lazy programmer, while also making a tacit nod to the measurably more elegant / aesthetic URL that you're talking about .. I'm still not getting it. Yes, I can see that it's easier to type, but by that logic you should encourage businesses to choose two-letter TLD's rather than three. Similarly you should sell a client on the idea of having an abbreviation of their company name as their hostname. You should discourage them from using SSL because that's an extra character in the URL.

And yet.

How often do users, actual users not software testers, type in a 'contact us' style URL? It's a click from the main page. It's possible that you can make this easier, but I don't see how. Yes, 'contact us' is probably a bad example - who bookmarks the company info page? - but the same logic applies to any given page on a web site. The user will either book mark it directly, or have the main page bookmarked and be happy to do one or two clicks to get to where they know they're going. They are far more likely to know how to do this, and be willing/comfortable doing it, than to be typing in the full URL (and how do they know this URL?) of each page they happen to be going to, every time they want to go there.

Quote:What do you rather type http://host.com/page/view/contact_us or http://host.com/contact_us.
This is an unfair comparison, as I've already suggested one solution - redirecting (choose your particular method) host.com/c/ --> host.com/page/create ... and host.com/v/ --> host.com/page/view ... and so on.

If your client thinks saving two characters is going to make a measurable difference to their business outcome, then they need their expectations readjusted.

As an aside, with the second URL you mention there - http://host.com/contact_us - how do you determine if it's a view or an edit or a create, from the information in the URL?


Oh, and yes, I do know I'm arguing this point for no particular reason. Yes, I can, as I mentioned earlier, almost see the benefit of pulling page (or controller) meta-information from the DB. Yes, I can see why Colin reckons it makes sense that, as a framework, CI should allow this rather than make it impossible/very hard. Yes, I lack the experience you guys have - so it's most likely that I just haven't come up across the situations you have, where this would make sense, yet.

But I still think it's a dodgy idea. Wink
#23

[eluser]xwero[/eluser]
jedd, flokky is working on a cms that allows the client to create the urls so it is going to be expected the url the client creates is the url that is reachable. So my other comment gives you the wrong impression about the idea i was trying to get across.

The manipulation of the route/content happens in an admin section of the site most of the times but even if you want to add manipulating segment you better add it after the actual segment because it's "secret".




Theme © iAndrew 2016 - Forum software by © MyBB