Welcome Guest, Not a member yet? Register   Sign In
GET poll
#1

[eluser]CI shocki[/eluser]
I know this topic has been discussed in the past already. I developed some CI apps now and really tried hard not to use GET. At the end I just couldn't mangage certain things without GET or it felt very unnatural and complicated to do so. I tried to solve it with segments. And while this makes sense for detail views for example. It doesn't make sense in every case. I know I can use "$this->uri->uri_to_assoc(n)". But the paramaters have to be "symterical in that case". If you have something like:

index.php/user/search/name/joe/1/location/UK/gender/male

The whole thing won't work anymore.

A few examples where I had problems:
a) affiliate programm where you can append certain GET vars with the URL
b) everything that has to do with searching. Lets say you would like to append something like &order=date to the URL.

Anyway. CI is a framwork which claims not to restrict the user. I think it should be up to the user, to decide if he want's to use GET or not. Since I have the feeling, that many others feel the same way like I do and I am not shure discussions will solve this problem, I am starting a little poll.

Greetings
shocki
#2

[eluser]Lone[/eluser]
I personally really love the URI segment usuage in CI and have always found a way to make it work - just takes a bit of extra thinking when it comes to doing a search etc. I think the URI usuage in CI is very intuitive and saves having to have so much htaccess dependance.

Im not certain what your trying to achieve with the first example as the '1' just seems to be randomly placed to make it not work using uri_to_assoc? If you could use GET how would have that url looked - regardless with GET you do always need symmetrical/even number of parameters.

For your other examples

a. I would be inclined to have one landing page that sets the affiliate ID and then save it to the session for that user - then you can have clean urls the whole way and not need to store the id in ever url.

b. Wouldn't you just add 'order/date' to the end of the url?
#3

[eluser]wiredesignz[/eluser]
$_GET is an essential part of the web protocol and shouldn't be excluded for the sake of some weird concept of SEO and/or security.

Anyway, $_GET is functional in CI, so this thread is pointless.
#4

[eluser]CI shocki[/eluser]
Hi Lone,

Quote:Im not certain what your trying to achieve with the first example as the ‘1’ just seems to be randomly placed to make it not work using uri_to_assoc?

Ok. The example is a bit abstract. I admit.
Take this example:
/class/function/10/name/john (the 10 is the Number for pagination class). This is actually the problem I had. Of course the number could be at the end. But I dont know how many parameters I will use in advance.

Quote:I would be inclined to have one landing page that sets the affiliate ID and then save it to the session for that user - then you can have clean urls the whole way and not need to store the id in ever url.
I tried that. But sessions are giving me certain problems in that case.
#5

[eluser]CI shocki[/eluser]
Quote:$_GET is an essential part of the web protocol and shouldn’t be excluded for the sake of some weird concept of SEO and/or security.

Anyway, $_GET is functional in CI, so this thread is pointless.

Yes. But it is not used in CIs concept. Take the pagination class for example. You cannot use GET for page numbers for example.
#6

[eluser]wiredesignz[/eluser]
Write your own Pagination class, the entire framework is abstracted for this very purpose.

If the tools you are using don't work for you, then either modify them, or write new ones.
#7

[eluser]Lone[/eluser]
We actually had the same issue originally when it came to the use of pagination class and resolved it by having the following url from your example:

/class/function/name/john/offset/10

I can't remember what we changed in the pagination class to achieve it but we got it working Smile I might get David to post it up tommorrow as he had more experience then me doing this.
#8

[eluser]wiredesignz[/eluser]
CodeIgniter doesn't restrict your ability to write functional applications, Your own lack of imagination does.

Using $_GET doesn't break any programming rules that I know of, in fact it is essential when you use third party Web services or Ajax.
#9

[eluser]CI shocki[/eluser]
Quote:Write your own Pagination class

That's what I did. I am just curious if the users would like to see GET integrated. That's why I started the poll Wink

Quote:We actually had the same issue originally when it came to the use of pagination class and resolved it by having the following url from your example:

/class/function/name/john/offset/10

Mhh. Maybe this is something that makes the pagination class more usefull.
#10

[eluser]wiredesignz[/eluser]
$_GET is integrated, it has been since Version 1.6.0




Theme © iAndrew 2016 - Forum software by © MyBB