EllisLab text mark
Advanced Search
2 of 2
2
   
Codeigniter development (v3.0)
Posted: 09 November 2012 05:39 PM   [ Ignore ]   [ # 16 ]   [ Rating: 0 ]
Avatar
Joined: 2012-01-09
117 posts

Ego, is talking down to people like you’re their boss when you’re not.
Ego, is assuming there’s no right opinion other than yours.
Ego, is trying to tell people what to do.
Ego, is giving erroneous code suggestions and not admitting it when proven wrong.
Ego, is having 3 people arguing with you and still trying to demand reversal of an already accepted change.

Ego, is NOT implementing a user-requested feature that I myself don’t and wouldn’t use.
It’s easy to target the “power people”, but at least do your homework and don’t try to hide behind false accusations.

And ego is also claiming that a feature is actually a bug, because you don’t like it. AFAIK, a web spider will not magically know your method names - it has to read them from a webpage. If you create dashed links - it will look at them, if not - it won’t. If you create both types of links - then it’s your fault.

 
Posted: 09 November 2012 05:41 PM   [ Ignore ]   [ # 17 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-10
2919 posts

If a referring site uses underscores instead of hyphens the ‘spider’ will follow that link to a valid page with an incorrect URL. It will most likely be indexed that way.

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 09 November 2012 05:56 PM   [ Ignore ]   [ # 18 ]   [ Rating: 0 ]
Avatar
Joined: 2009-02-19
3819 posts

Why would a referring site use an underscore if the link on the site uses a dash?  I can see that being a problem if a site originally used underscores in links and search engines/referring sites cataloged the link that way and then the site later converted to dashes.  But if the links on the original site had dashes from the get-go, where would a referring site get underscores from?

If a site did convert their url scheme at some point, shouldn’t they be responsible for creating htaccess rewrite rules for dealing with that before the code hits CI?

 Signature 
 
Posted: 09 November 2012 06:04 PM   [ Ignore ]   [ # 19 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-10
2919 posts

@Cronix, Yes but the issue is the developer will be aware of this if he makes the changes. It is under his control and his responsibility.

But with @Narf’s changes the routing change is automatic. The developer has no choice. Everything will still work.

EDIT:
Changing an URL from underscores to hyphens should cause the application fail under normal circumstances and require the developer to review his code. In this case it will not.

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 10 November 2012 12:29 AM   [ Ignore ]   [ # 20 ]   [ Rating: 0 ]
Avatar
Joined: 2007-11-28
2435 posts
wiredesignz - 09 November 2012 06:04 PM

Changing an URL from underscores to hyphens should cause the application fail under normal circumstances and require the developer to review his code. In this case it will not.

This is the first legitimate argument I’ve heard against the route feature. However, the -/_ replacement is only performed on the first segment. The rest of the URI is unaffected. If someone were to create a normal route to do this replacement, the two URLs would still be valid. So there is no difference in that situation. The only time it would create unexpected results is if you tried example-controller without having a route in place. In which case you would get a valid page instead of an expected 404. Given that, I would recommend a config setting somewhere to toggle the dash replacement feature. Because I still think it’s beneficial.

 
Posted: 10 November 2012 01:37 AM   [ Ignore ]   [ # 21 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-10
2919 posts

@Aken, Check again. Both the controller and method segments are checked and modified.

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 10 November 2012 04:01 AM   [ Ignore ]   [ # 22 ]   [ Rating: 0 ]
Avatar
Joined: 2007-11-28
2435 posts

You’re right, I must’ve missed that when I originally looked at the code. That changes my opinion slightly. I still think this could be useful, but I think it need to test it myself some more, see if I can break it and find a way to improve. Some more control over for the user to decide if it is actually utilized could be a nice start.

 
2 of 2
2