Re: Using

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

 



Jay Blanchard wrote:
[snip]
...stuff...
[/snip]

This is really a broad request, and you'll get as many opinions as there
are posters. Instead of IFs you may want to use a SWITCH
(http://www.php.net/switch). Why do you want to do the application all
in one file? Is it small enough to be justified? Place common functions
in an included file. Comment all of your code. Comment some more. Write
a flowchart before you write even one line of code. Read an entire book
on basic programming practices. Edit your flowchart. Then write some
code and test. Eat lunch. Write some more code and test. Modify your
flowchart. Read some more. Read each and every post to this list. Spend
some time with the manual. You can use OOP in a single file application.
Eat dinner. Take a nap. Look at your flowchart and make changes where
needed. Add comments to the code when you change a section. Have fun,
and when you get stuck and cannot find the answer in TFM or on TFW or in
TFA send a specific request to the list and we'll all be glad to help.


I don't know, I just always thought of it as "clean" to write an application inside of a single file itself. While I'm still fairly new to procedural programming, this may not be the proper way to do things.


I've used switch statements to do this, which I've found to work quite well - but again, I ust didn't know if this was common or correct. I know that this could be split a million different ways, but those million different ways we what I am after. I'd like to find a way that is both easy and useful for me to use, as well as a way that may conform to some sort of standard.

Sorry for the dumb topic, I sent the mail before I finished the subject, and didn't feel like spamming others with more mail for a simple mistake such as that.

Thanks
-dant

--
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