Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help.

Google
Reply
 
LinkBack Thread Tools Display Modes
Old 05-20-2007, 5:34 PM   #1
anal_aviator
 
anal_aviator's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default PHP web design patterns

Hi,
I'm looking to develop a web-site with both database and php access.
Personally I'm familiar with the MVC design pattern , are there any quick
pointers on other suitable patterns, that will cover both web & database?




 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Advertisements
Old 05-20-2007, 5:34 PM   #2
kenoli
 
kenoli's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default PHP web design patterns

This doesn't get to your question in an abstract way because I am just
learning the concept of patterns, and may not get to it at all, but it
is my experience with structuring php scripts. I've been coding for
acouple of years, off and on, because of a need to have an interactive
web application for a project I am involved in. I suspect that while
I have used various scripting structures, they all more or less fall
under the the MVC model.

I started out trying to keep pages organized into several categories:
those that are mostly html, includes that provide libraries of
functions and, my goal, one script that handles all the processing.
This latter involved a lot of switches and other control structures to
get the data processed appropriately. This pretty much followed the
MVC pattern, the html pages being the view and the processing script
being the control. I designed my database, I guess you would call
this the M part, based on a conceptual analysis of my project needs
and some guidelines from "Database Design for Mere Mortals," which I
found to be a very useful book.

Over time, I found my processing script growing to a size that it was
hard to manage. I faced more and more challenges regarding how to
send my html data to the right parts of the script. What I finally
resolved to, which serves me pretty well now, is a model where the
script that processes an html page is placed between php tags at the
head of the document. The html on that page, which I try to keep as
pure html as possible, is placed "below" the script tags and any
action it triggers refers back to the same page, activiting a switch
or some control mechanism to process the data appropriately. Once the
data is processed, the user is sent to the same or another html page
as appropriate, sending along any necessary data in post, get or
session variables.

I'm finding myself modfiying my database schema as we use the
application and as I see how it interacts with my scripting needs.
Thus it is being modified to adapt to practical scripting issues and
to the end use requirements. In this way I provide increased
flexibility and efficiency all all levels.

As my scripts develop, I find ways to reuse them and re-organize them
so that they are growing into modules and more readable scripts.

This seems to be a useful development model for me, though it may not
work for an enterprise sized application or a design project involving
a team of developers.

I am not doing OOP, though I am looking into it. I'm not sure there
are advantages for the size of the project I am involved in. I use my
functions and includes in a similar way to which one might use objects
and have thought about experimenting with developing them into
objects.

I'm very interested in other responses to your query.

--Kenoli

On May 17, 2:27 pm, anal_aviator <analavia...@pornolizer.com> wrote:
> Hi,
> I'm looking to develop a web-site with both database and php access.
> Personally I'm familiar with the MVC design pattern , are there any quick
> pointers on other suitable patterns, that will cover both web & database?



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 05-20-2007, 5:34 PM   #3
steve
 
steve's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default PHP web design patterns

On Sat, 19 May 2007 02:33:05 +0800, kenoli wrote
(in article <1179513185.241010.75350@k79g2000hse.googlegroups. com>):

> This doesn't get to your question in an abstract way because I am just
> learning the concept of patterns, and may not get to it at all, but it
> is my experience with structuring php scripts. I've been coding for
> acouple of years, off and on, because of a need to have an interactive
> web application for a project I am involved in. I suspect that while
> I have used various scripting structures, they all more or less fall
> under the the MVC model.
>
> I started out trying to keep pages organized into several categories:
> those that are mostly html, includes that provide libraries of
> functions and, my goal, one script that handles all the processing.
> This latter involved a lot of switches and other control structures to
> get the data processed appropriately. This pretty much followed the
> MVC pattern, the html pages being the view and the processing script
> being the control. I designed my database, I guess you would call
> this the M part, based on a conceptual analysis of my project needs
> and some guidelines from "Database Design for Mere Mortals," which I
> found to be a very useful book.
>
> Over time, I found my processing script growing to a size that it was
> hard to manage. I faced more and more challenges regarding how to
> send my html data to the right parts of the script. What I finally
> resolved to, which serves me pretty well now, is a model where the
> script that processes an html page is placed between php tags at the
> head of the document. The html on that page, which I try to keep as
> pure html as possible, is placed "below" the script tags and any
> action it triggers refers back to the same page, activiting a switch
> or some control mechanism to process the data appropriately. Once the
> data is processed, the user is sent to the same or another html page
> as appropriate, sending along any necessary data in post, get or
> session variables.
>
> I'm finding myself modfiying my database schema as we use the
> application and as I see how it interacts with my scripting needs.
> Thus it is being modified to adapt to practical scripting issues and
> to the end use requirements. In this way I provide increased
> flexibility and efficiency all all levels.
>
> As my scripts develop, I find ways to reuse them and re-organize them
> so that they are growing into modules and more readable scripts.
>
> This seems to be a useful development model for me, though it may not
> work for an enterprise sized application or a design project involving
> a team of developers.
>
> I am not doing OOP, though I am looking into it. I'm not sure there
> are advantages for the size of the project I am involved in. I use my
> functions and includes in a similar way to which one might use objects
> and have thought about experimenting with developing them into
> objects.
>
> I'm very interested in other responses to your query.
>
> --Kenoli
>
> On May 17, 2:27 pm, anal_aviator <analavia...@pornolizer.com> wrote:
>> Hi,
>> I'm looking to develop a web-site with both database and php access.
>> Personally I'm familiar with the MVC design pattern , are there any quick
>> pointers on other suitable patterns, that will cover both web & database?

>
>


Yes thanks for the reply.
As you point out other responses will be interesting. I was looking for
people not using the MVC , basically to get an idea of what they were doing
as regards the web project and any experiences they had.

I was also looking at the Observer Design pattern, however it appears some
patterns Can be applied globally to a site , whereas others specifically
target given areas.




 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Featured Websites
Free Space
Free Space
Free Space Free Space
Reply
Tags: , , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Design/SEO Partnership slwebsolutions Search Engine Optimization 1 09-24-2006 7:46 PM
Dynamic Web Design:: PHP Vs ASP: colin Website Coding 0 07-30-2006 4:52 PM
Game Design Halo Gaming Questions 1 07-05-2006 5:32 PM


Featured Websites




All times are GMT +1. The time now is 7:03 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98