README.txt 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. FPTemplate examples
  2. ===================
  3. These examples demonstrate some uses of templates (with FPTemplate) when
  4. generating HTML pages by CGI/FCGI programs or Apache modules.
  5. The main idea is to leave the web page design and look&feel to the web page
  6. designers. Separating the web page design from the back-end CGI/FCGI/Apache
  7. application makes it possible to design, change or redesign a whole website
  8. without modifying a single line of code in the CGI/FCGI/Apache application.
  9. Back-end programmers and web page designers can easily work parallel, and
  10. neither side needs extensive knowledge of the other (does not hurt, just not
  11. necessary most of the time).
  12. With all this said, none of the examples are focusing on nice look and feel in
  13. their template designs, merely on demonstrating the functionality and use of
  14. templates, template-tags and template-tag-parameters with live applications.
  15. Examples list:
  16. 1. /simpletemplate/*.*
  17. The simplest template with one template tag in it to be replaced by the
  18. CGI/FCGI/Apache application when generating the response page -> {TagName1}
  19. See README.txt
  20. 2. /tagparam/*.*
  21. Demonstrates the set up and use of template tag parameter(s)
  22. -> {+DATETIME [-FORMAT=MM/DD hh:mm:ss-]+}
  23. 3. /listrecords/*.*
  24. Demonstrates the use of a template tag with multiple template tag parameters
  25. to list multiple records, tables, lists, etc.
  26. See README.txt
  27. 4. /fileupload/*.*
  28. Demonstrates uploading file(s) to a web server with the help of a CGI/FCGI
  29. program or Apache module by using so called "multipart" HTML forms.
  30. See README.txt
  31. 5. /sessions/*.*
  32. These examples demonstrate three different ways to maintain and use sessions
  33. when building web sites that need to carry over or store information to
  34. following web pages, differentiate between visitors, etc.
  35. 5.a. /sessions/cookiesessions-auto/*.*
  36. See README.txt
  37. 5.b. /sessions/cookiesessions-login/*.*
  38. See README.txt
  39. 5.c. /sessions/urlsessions-login/*.*
  40. See README.txt
  41. 6. /embedtemplates/*.*
  42. An example to show how to implement recursively embedded templates with fpweb.
  43. See README.txt
  44. Note: All of the examples have CGI, FCGI and Apache variations. The web
  45. modules (webmodule.pas, webmodule.lfm) and template html files for the paired
  46. CGI/FCGI/Apache applications are exactly the same, showing that from a
  47. developer standpoint there is not too much difference between writing CGI/FCGI
  48. programs or Apache modules with fcl-web (fpweb). The main differences are in
  49. the main project files (.lpr) and in the web server configurations.