ArconneR Posted July 2, 2010 Share Posted July 2, 2010 Hi everyone! I'm developing a stat tracking web app for the iPhone (based on the iWebkit framework) that is primarily comprised of form pages. Many of the forms will be reused for different sections of the app with only slight modifications to labels, titles, etc. The forms will also process the data the same way but will just submit to different mysql tables. Because of the reuse of these forms I want to minimze the number of files that will need to be edited for each instance they're used. What are some of the pros/cons related to including the php form processing code WITHIN the form vs. a separate php processing file?Obviously I'll have fewer files but didn't know if one method is generally preferred over the other. Quote Link to comment https://forums.phpfreaks.com/topic/206544-pros-cons-include-form-processing-script-in-same-file-or-separate-file/ Share on other sites More sharing options...
Mchl Posted July 2, 2010 Share Posted July 2, 2010 The general trend is to separate user interface from business logic from plumbing (database connections, logging, error handling) Quote Link to comment https://forums.phpfreaks.com/topic/206544-pros-cons-include-form-processing-script-in-same-file-or-separate-file/#findComment-1080375 Share on other sites More sharing options...
ArconneR Posted July 5, 2010 Author Share Posted July 5, 2010 Hi Mchl, Thanks for the quick response and straight-forward answer! Moving along based on your input. Quote Link to comment https://forums.phpfreaks.com/topic/206544-pros-cons-include-form-processing-script-in-same-file-or-separate-file/#findComment-1081175 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.