What are advantages and dissadvantages of this specific approaches to view the pages to user according the url?
As far as I know there are two basic approaches to build webpage:
- www.whatever.com/index.php?page=userProfil.php
- www.whatever.com/userProfil.php
Well I call the points 1 and 2 models and suppose I want to use php + mysql + apache + clientside javascript (for user checking) - just for background info. If I use sererlets, jsp and Tomcat the the basic thoughts of the model would be almost same but I think some little differences would be there. So end it by my platform is php +mysql ...
Another thing is that for the purpose of security and future proof (changing platform from php to another) is not good idea (heard that) to show the ".php" or ".html" or whatever file type it is.
So there is option to use this (for pretty url): - www.whatever.com/userProfile/
If I googled well its called mod_rewrite and I use some rules to transform my models (see add 1 and 2) to the add 3.
And let's be honnest I don't actually understand a lot to the add 3 for now.
SO:
- I think the models 1 and 2 I could call "file structure models". I mean add1 I have one page (one file) and include some modules. So in add 1 I call one file every time. Add 2 I have new file for every page. Hence for add 2 I call multiple file - for different page different file.
- For add 3 the points 1 and 2 are kinda hidden for user - which I think is good, cause he don't know my file structrure (its + for security) and it look better and its better user readable.
Conclusion and the QUESTION:
Advantages and dissadvantages of add 1 and 2 - the file structure
Advantages and dissadvantages of add 3
Basic overview abouve add 1 and 2 combined with add 3 (1,2 file struture + add 3 is how to look like)
I know how to use add 1 and 2, so I probably use one of it and later I wanna add the add 3 (when I lear it) - is it possible?