| Article: |
Migrating to Page Controllers | |
| Subject: | Front controller | |
| Date: | 2004-11-07 05:58:20 | |
| From: | Ethan | |
|
Response to: Front controller
|
||
|
It's true, Java/J2EE webapps have a portable, standard means to limit access to resources (among other useful features); that said, in a non-J2EE webapp you can still prevent people from directly accessing view pages:
|
||
Showing messages 1 through 1 of 1.
-
Front controller
2004-12-13 16:13:36 alexSchmid [View]



I often use a setup like:
+documentRoot
+html //holds you php-scripts
+elements //holds images, css and .js
+templates //holds template files e.g. 'views'
+Language1
+Language2
With a setup like this you can employ a template engine like smarty or sigma to populate the views with content and deliver through the page controler. If necessary also in different languages/screen-layouts or with content created by loops for result-sets with not too much effort.
Due to the physical location of the template-files the webserver will never deliver those files to the user. Only trap is to make sure that the directories can be accessed by php and the path is working (use a global value like: /var/www/myDomain/templates/ and complete by the pagecontroller depending on language/view)
Happy programming,
Alex Schmid
P.S.: Excuse my bad english & typos