How should look the address and the arguments in the framework?
Do you write:
Do better the record:
I would ask for example, as is the intermediate frameworks
preguntado el 08 de noviembre de 11 a las 11:11
The framework I'm most experienced with (CodeIgniter) mainly uses this approach, calling it "url segmentation"
The URL is retrieved through $_SERVER array and then exploded ("/") and a master class (which acts as an entry point) assigns the different chunks to the competend handler (first segment to controller, second to a method, the rest to the said method as an array of parameters; you might use function_get_args() there, for example, to retrieve them)
Another common options, and easier to implement, is using query strings
which you can easily retrieve with the $_GET array and rewrite in in .htaccess to look "Prettier". That's how pretty urls are there for :)
Actually this should not play a role for you. However a framework does this, it should offer you access to both controllers and arguments.
El primer ejemplo
has the benefit that you can better distinguish between the command
controller/method and it's arguments
arg=1&arg=2 so this looks more affine to HTTP here.
Some will tell you that these URLs are not SEO friendly, but we see more and more search engines that make use of the semantics here, so the full story is that both variants are SEO friendly and only if you mix both concepts, you will gain maximum control for SEO.
In any case should a framework allow multiple ways so you're able to make use of what you think is most useful to your needs. That's normally called routing.
Well, generally frameworks has url pattern like
Esta es una mejor manera