Welcome Guest, Not a member yet? Register   Sign In
Status of GET and querystrings in CodeIgniter?

[quote author="pbreit" date="1267501521"]Enabling querystrings in CI is sub-optimal because it changes up all the URLs, it doesn't just allow for querystrings when needed.[/quote]
I give up. After explaining to you 3 times that this is not the case, you keep hammering on the same point. Either you are really really stubborn, or you can't understand basic english. Have you even build a site on CI or are you just ranting because you are bored?

[quote author="pbreit" date="1267501521"] Any framework that wants to be taken seriously needs to fully support one of the most basic aspects of HTTP. [/quote]
Any developer that wants to be taken seriously needs to understand the difference between GET http requests, and Query strings. You seem to confuse the 2 a lot.

[quote author="pbreit" date="1267501521"]
This is the worst search URL I have ever seen:
Why would that bother you? Except for the fact that it's not human readable and maybe not SEO friendly, it doesn't change anything about the functionality. The only difference between this and 'most' other sites is that the ID is some hash instead of some integer.

[quote author="pbreit" date="1267501521"]
This would simply be unacceptable for most web sites.[/quote]
Give me a reason why. Because you invented this concept that it's unacceptable doesn't mean the world agrees.

tl;dr: Stop inventing problems that are not there.

I am definitely not bored. This may seem like a small topic but I think it is actually important and I would really like to see CodeIgniter get better in this respect. Frameworks should help developers use the web well.

Yes, I have been confusing GET and querystring. Sorry about that. It is "querystrings" that I am referring to and which I would like to see better support in CodeIgniter (good enough that they are defaulted "on").

If you think "http://ellislab.com/forums/search_results/0dfcd628ab258c55fdfc8ba83bbb018e/" is better than "http://www.google.com/search?q=querystring" then we cannot have a productive discussion. Yes, it's better for SEO. It's human readable. It can be generated with a form (without needing to know the internals). It is editable. It can be cached. Etc. It is the "correct" way to do search (TBL called it the "search part" in the 1994 URI RFC).

The only viable situation where a Query string might be preferable over a segmented url, is indeed a search query. As far as I know, every other read operation would be easier to do with segmented url's.

For example compare these two:


As you can see, the first url is more human readable, has a better SEO value, and is the normal way of doing things in CodeIgniter. The only problem is that you might want to filter your search and then it gets ugly:




In this particular case the second version is easier. It's still worse for SEO, but the first version is ugly and requires you to either know the order in which to pass arguments/filters, or requires you to build logic that dissects the URL.

To solve this you can you could 'encrypt' the querystring so that it will become 1 argument, and then dissect it once you decrypt it. This is how the search function works.




Either way, it's up to you to decide which of these you would prefer. My point is that I doesn't really matter which you prefer, since CodeIgniter let's you use EITHER or BOTH solutions.

CodeIgniter needs to have good enough querystring support to the point that it is defaulted "on". There's no excuse for a framework not to treat querystrings as first-class citizens. Your examples only address SEO which is one of many reasons querystrings are preferable. Your examples cannot be generated via forms without an interim step. Your examples assume that you have complete control over every interface which totally violates the essence of internet programming. Users should stop defending CodeIgniter's handling of this issue and then maybe we can get it changed. It will only benefit CI.

Instead of being stubborn, maybe you should provide an example when, in your opinion, CodeIgniter will in any way prevent you from doing what you want.

I keep giving arguments for my case, yet you seem to think that a point can be made by repeating it 5 times in a row. Since you claim that CodeIgniter's implementation is lacking, the burden of proof is on you.

Sorry, but there is no way I will change my mind that a modern framework should have querystring support "on" by default. Show me one framework that requires a config change to support querystrings (ie, Cake, Zend, Django, etc). I don't see why the burden is on me when it is you and CI that have the non-standard viewpoint.

So because other framework support it by default, and CodeIgniter doesn't by default, but you have to change a config parameter, CodeIgniter is stupid?
What is your point? If you think CodeIgniter does not work for you, why try to change CodeIgniter? If you love Cake so much, work with Cake.
Can someone please shut this non issue thread down.

Why is there so much push-back on this topic? We are talking about a very basic aspect of web programming. CodeIgniter would only benefit from proper querystring support. I don't love Cake, I think it is wildly over-complicated. Same with Zend. Django and Rails are better but I prefer PHP for various reasons. I am actually trying to have a reasonable discussion on the matter and stommert, n0xie and noctrum just throw insults my way. Is that really the nature of this community? I don't get it.

[quote author="pbreit" date="1267740163"]Why is there so much push-back on this topic? [/quote]
Because there is no problem and you keep saying there is. After giving you countless examples as to why it is not a problem, you keep bringing the topic back up. The only argument you have brought to the table is, that other frameworks give you querystring by default. Well guess what: other frameworks are about 100 times slower.

Ellislabs probably decided to not include the querystring by default, thereby not having to parse the url every request, thereby shaving memory and load time of the entire application. As an added bonus, they can filter much more 'harmful' characters by default. The fact that nobody seems to miss it, should be a pretty strong indicator that they made the right decission.

Now they probably realised that for a lot of services, the querystring is needed, so they added the option to activate it if you had need for it.

I have no doubt that you will just repeat your statement that it should be 'on' by default, since repeating your point seems to be your way to plead your case. If you wanted a real discussion about the topic, you could have started by giving examples or arguments WHY you think it should be addressed.

To me this was a stupid argument to begin with, so this will be my final reply.

Now that is a much better reply than all of your previous ones put together. But I do feel like I have provided very good evidence to support my view (all other frameworks support it, all search engines use querystrings, work better with forms, some services like paypal and google require it, proper web programming, etc)(I guarantee that TBL and Ray Fielding would agree with me).

Speed and security are the only two decent arguments I considered but I don't think either are an issue on 2010. I can kind of see the benefit of steering developers away from querystrings since many developers mis-use querystrings to do RPC or identify resources. But I don't think that's a great reason either. I still think the case overwhelmingly favors first-class querystring support in frameworks.

Theme © iAndrew 2016 - Forum software by © MyBB