General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 27th, 2003, 10:36 AM
krose krose is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 5 krose User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old December 28th, 2003, 09:58 PM
zigote zigote is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Atlanta GA
Posts: 73 zigote User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 11 sec
Reputation Power: 7
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/

Reply With Quote
  #3  
Old December 28th, 2003, 10:42 PM
krose krose is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 5 krose User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old December 29th, 2003, 01:07 AM
zigote zigote is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Atlanta GA
Posts: 73 zigote User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 11 sec
Reputation Power: 7
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.

Reply With Quote
  #5  
Old December 29th, 2003, 08:01 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
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.

Reply With Quote
  #6  
Old December 29th, 2003, 09:10 AM
krose krose is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 5 krose User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #7  
Old December 29th, 2003, 09:56 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
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.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Interacting with designers


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT