Welcome Guest, Not a member yet? Register   Sign In
Please consider querystring support in 2.x
#1

[eluser]pbreit[/eluser]
I just want to register a very strong request to support querystrings by default in 2.0 or 2.x. I think most CI developers would greatly benefit from this and many more developers would be able to use CodieIgniter. Thank you.
#2

[eluser]Mat-Moo[/eluser]
RTM
http://ellislab.com/codeigniter/user-gui.../urls.html
#3

[eluser]pbreit[/eluser]
Yeah, but if you enable querystrings, you lose segments. One of the problems is that the absence of querystrings has led quite a few CI developers to consider the absence acceptable which is a big community problem. The forums are littered with possible work-arounds but it's hard to determine if any of them are reliable. It would be best for CodeIgniter to support querystrings "out-of-the-box". This should be a relatively non-controversial belief.
#4

[eluser]n0xie[/eluser]
Didn't we already have this discussion? Querystring is enabled in CodeIgniter, if you do it right. It's just turned off by default.
#5

[eluser]pbreit[/eluser]
I am still not clear on the best way to enable. There are dozens of different suggestions on the forums. Setting enable_query_strings to TRUE is not a good answer since it disables segments (so please stop recommending this by itself; it's a disservice to developers).

I also think it's a problem that CodeIgniter developers feel that it is acceptable to develop web sites without querystrings. Frameworks should help developers develop in good ways. The search function for these forums is a good example of how not to implement search.
#6

[eluser]mddd[/eluser]
The 'search' argument keeps coming back in this discussion. But it has nothing to do with the topic. You can build a search with no problem at all, using a url like 'www.example.com/search/my+search+keywords'. That would do exactly the same as 'www.example.com/search?q=my+search+keywords'.

The fact that this forum caches results using some kind of unique id to keep track of the results, has nothing to do with the question of query strings.

Like other frameworks, CodeIgniter has a set of starting points and views, providing structure in the development process. Other frameworks have different assumptions and views.

Saying that developing without query strings is a problem, is your point of view. I don't use query strings and my projects work fine.
#7

[eluser]pbreit[/eluser]
Fine, you picked the most basic search example. How about a search with a few parameters? Yes, search is one area where querystrings are not only widely used (universally, in fact) but correctly used.

The other huge area are 3rd party services. Not everyone creates self-contained web sites. In fact, the great thing about the internet is integrating with other services.

Why do you guys defend this deficiency. I don't get it. Seriously. It's not *my* point of view. It is the point of view of the vast majority of web developers including folks like Tim Berners Lee, Roy Fielding, Rasmus Lerdorf, et al.
#8

[eluser]mddd[/eluser]
So? What's wrong with www.example.com/homes/ny/400k/500k/app/p10 for a search of New York appartments between $400-500k, showing page 10 of the results? I just mean to say: there is no 1 correct way to do this. Calling a url like I wrote above is just as valid as calling a url with a query string attached.

You might not understand why we like the way CI does it, but likewise, I don't get your obsession with having the get variables. It is up to everyone to build a site the way THEY like.

You are right that get variables are a totally legitimate way of using the web. But it is not a *requirement* to use them in your site.
Seriously, if it is such a big deal to you, just use a framework that better suits your needs.

And, finally, like has been said many times: CI DOES support them if you want them.
#9

[eluser]cahva[/eluser]
I dont know whats the fuss about. Enabling query strings does NOT mean that you lose segments. Thats bullcrap as Dr.Phil would say. So they can co-exist and you get the goodies from both worlds. For example I have couple of ecommercesites where I need query strings because most payment gateways return stuff using that. There is no problem whatsoever to use it. For example one of gateways it will return to my shop like this:
Quote:http://www.mydomain.com/checkout/success...METHOD=123
So there you have perfect example of having segments (controller Checkout with method success with parameter gateway_name) and querystring which I can access using $this->input->get('ORDER_ID') etc.

I too think that it could easily be enabled by default because theres no harm in that. But its just a config setting(s) that can be enabled when needed(and 95% of the time its not needed).

Oh yeah, this atleast works with apache(mod_php) and config settings set to this:
Code:
$config['uri_protocol']    = "PATH_INFO";
$config['enable_query_strings'] = TRUE;
#10

[eluser]n0xie[/eluser]
If changing the uri protocol is too 'restricting' for you : http://github.com/dhorrigan/codeigniter-query-string




Theme © iAndrew 2016 - Forum software by © MyBB