I'm not really suer about what you are talking. My main technologies are
XHTML, CSS, and JavaScript.  What is "display logic"?

PHP was born as a display logic language. It then matured to the point where it can also be used as a business logic language. The "backend pieces" that you mention are business logic [1]. Display logic controls the display, or what the users sees and interacts with. XHTML is the structure for the display, but it is static. To make your site or application dynamic, you need a scripting language to allow you to use variables, dynamically write blocks of code, have conditions, etc. Most web languages can be used for both display and business logic, but the most common are PHP and SMARTY.

Here is a simple example. You have a database with records of users. You want to display a table on a page that lists all of the users. So, your business logic queries the database, does any processing needed, and then sends it over to the display, usually as an array. The display then picks the data up and spits it out to the screen, inserting the values into templates and/or generating HTML along the way. In this case, you could have the display logic loop through the array of users and generating HTML to produce rows of a table. Not all applications have this strict of a separation between the business and the display, but the process is still the same.


[1] http://en.wikipedia.org/wiki/Business_logic

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to