|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Interacting with designers
Hello,
I have a development process question I hope some can shed light on. I am working with a project team as the lead programmer (PHP/MySQL project). I do not do any of the design work. The designers do not understand PHP or dynamic web page design. I am very familiar with HTML (coding), etc, but do not have the creative talent. The designers "know" what they want the site to look like when it is complete. What development process do you use in similar situations? The last project we worked on was a nightmare; the designers developed the pages in HTML and I converted them to PHP (dynamic), but the problem here is when they change a page it requires me to get back involved simply for a design change. I have read the article Modular Web Pages at http://www.devarticles.com/c/a/PHP/...lar_Web_Page/1/ I thought this might be an approach. ***************** Sorry for the long posting, but this a bit of a theoretical question. I have been out PHP development (last project was PHP3) for about a year and want to get this project started off correctly. I am open to any examples, libraries, tools, etc. that would assist in project development. Thank you in advance, Kevin |
|
#2
|
|||
|
|||
|
Well I'm not a professional, but if you and your team have time, you could always use some sort of template system.
Just a suggesting, I've seen a few companies switch over to using smarty. http://smarty.php.net/ |
|
#3
|
|||
|
|||
|
Zigote,
Thank you for the reply. I have considered using a template system; this seems to be a popular solution with some, and not so popular with others. As I continue to research, many feel PHP in and of itself processes the pages similar to a template system. I am now leaning toward a series of pages (base pages) with 'include' statements. I will code the base pages with a simple table structure (document this structure for the designers) to allow each cell to include a PHP snippet as nessesary, with the other cells open for the designers to fill in what they wish. I would like feedback on this design method. Once again, thanks! Kevin |
|
#4
|
|||
|
|||
|
This does seem like an interesting why to do it.
Another thing to keep in mind is that some people say the 'include' statements does bring in site security issues. I'm not sure about the above quote either. It's just what I've heard. I also use this type of statements all the time, Lets hope someone can speak more of this. |
|
#5
|
||||
|
||||
|
The include statement is a security risk when you're determining what files to include based on user input. For example, if your server is set up to allow includes of pages from other servers by simply supplying an http url to the include, and if you accept the include page name from the query string (http://blah.com?page=about.php), then someone could conceivably change the URL to http://blah.com?page=http://malicio...l_user_info.php and prompt users to send their credit card or other personal information through a site that looks like your own. Or they could try to get your server to display files like /etc/passwd, or any number of other devious things like that. So the moral is either to validate possible includes against a server-side array of valid includes or to hard-code the include paths.
As for general principles in working with designers, if you're not up for using a full-blown templating system, you should still be able to do something like have a top.php and a bottom.php that govern the frame wrapped around content and give designers access to these to make their modifications. |
|
#6
|
|||
|
|||
|
Thank you for the information.
I am thinking about a strategy similar to the one below. I will allow the designers to provide top.inc and bottom.inc. I will use PHP in sidebar.inc and main.inc to generate the dynamic content. I will just have to live with change requests on the sidebar and main sections. Does this code comply with everyone's thoughts? (Please remember, I continue to be completely open for suggestions, I am still in the spec documentation phase, and am just trying to pull all of my resources together prior to coding!). This said, I am willing to learn any new stragety that will save me in the long run, or I can reuse on multiple projects. <body> <table cellpadding="5" cellspacing="0" border="1"> <tr> <!--insert column here --> <?php include 'top.inc'; ?> </tr> <tr> <!--insert column here --> <?php include 'sidebar.inc'; ?> <!--insert main content here --> <?php include 'main.inc';?> </tr> <tr> <!--insert columns here --> <? include 'bottom.inc' ?> </tr> </table> </body> Thanks a lot, Kevin |
|
#7
|
||||
|
||||
|
Well, if it were me, I'd have everything except the dynamic content in an editable include, so even the opening HTML and BODY tags would be in top.inc. (Incidentally, includes should be named with a .php extension; else people can guess your include names and read them as text files, possibly getting db login information, etc., out of them. Or you can set your server up to parse .inc files as .php files, but that's not as portable as just giving your include files the .php extension.)
Something else you might consider is giving the designers a template file complete with HTML comments as markers. Any time they wish to modify the template, they operate on this file and send it back to you. Then you have a little make file that splits the template out into its various includes based on the HTML comment markers, resulting in very little effort on your part when they make changes. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Interacting with designers |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|