Newbie question. What is the best structure of a php-app?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I'm fairly new to PHP but not to programming as such. Currently I sat up XAMPP with xdebug, Netbeans and Eclipse to get a feeling. I can write and run php-files but I am wondering how I should construct a more complex application that runs over several pages between a login and a logout.

How would I structure such an application so that it is possible to run it in the debugger from the beginning? E.g. as a simple example I may build an index.html that has a menue with links to 3 php-files.
1)   login.php
2)   enter_data.php
3)   list_data.php
as html-links within an ul-list.

The user should at first click on login where user/password gets entered an a session starts.
Then the application comes back to index.html.
Now he might click 2) ...

Is it possible to run the whole application from the start on?
index.html is no php so xdebug won't process it and therefore the IDEs may start index.html but can't show the stage where the page is just waiting e.g. for a click on "login" and later branch for the other options.

Even if I write an index.php that shows the menue eventually the script just dumps the html that'll wait for the following clicks.
Those following steps are far more likely in need to be debugged.

Is it neccessary to debug those subpages separately even though they need prior steps like login.php that store some infos in a session or cookie that later scripts need to rely on?
Can I somehow watch what is going on from the index.html on?

Until now I just found documentation that explains the php language. Thats good too but I'd need to get an idea about the "web-app-thinking" that consist of just pages where the designer has to hope that the user stays within the applicationflow instead of clicking unexpectedly on the back-button or just jumping off to some other site if he likes to.

In contrast to this desktop-apps seem to be less demanding because I know where a user can navigate from a certain stage within the app and I could step from program start to stop with the debugger if I feel the need to.

Is there a tutorial that explains how to build consistent web-apps beyond the details of php language?


regards...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux