473,587 Members | 2,263 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP site development

Me
I would like to redesign my existing site into php using classes.
I am not the most experienced developer with PHP, and would like to know
if anyone can give me some input on a starting point for a class library.
Basically, the idea is to have as much of the content served dynamically,
using a mySQL database. My catalog site has grown to over 1,100 pages,
and is continuing to grow. It's getting ridiculous to keep performing
manual updates.

Thanks for any input. I appreciate the feedback.
Jul 17 '05 #1
28 3057
Take a look at http://www.tonymarston.co.uk/php-mys...structure.html
which identifies a development environment based on the 3 tier architecture.

Also look at
http://www.tonymarston.co.uk/php-mys...ontroller.html which
shows how it also incorporates the Model-View-Controller design pattern.

There is a sample application based on these architectures described in
http://www.tonymarston.net/php-mysql...plication.html which you can
run online. You can also download all the source code and see how it ticks.
This uses classes for all entity and database access, so it should give you
an idea of what can be done.

It looks complicated, but using the modules that I have created it is
possible to build and maintain web components with much less effort.

HTH.

--
Tony Marston

http://www.tonymarston.net

"Me" <jd******@atlan tic.net> wrote in message
news:pa******** *************** ****@atlantic.n et...
I would like to redesign my existing site into php using classes.
I am not the most experienced developer with PHP, and would like to know
if anyone can give me some input on a starting point for a class library.
Basically, the idea is to have as much of the content served dynamically,
using a mySQL database. My catalog site has grown to over 1,100 pages,
and is continuing to grow. It's getting ridiculous to keep performing
manual updates.

Thanks for any input. I appreciate the feedback.

Jul 17 '05 #2
Me
Tony~
Having spent lots of time in the database world, I must say that I relate
yo some of your history very well. I have spent the last 6 hours or so
reading through different articles and tutorials which you have authored
on your site, and I am happy to say that I am learning as much as I ever
have in a longer period of time than I care to remember. While PHP
doesn't seem strange to me (especially in the context you put it in
combining object oriented approaches to data manipulation), some of how
it is implemented appears a little 'fuzzy'. But, I have a feeling that
by the time I complete reading the rest of the referenced parts
mentioned on your site, I may well have enough information to poke
through the fog and formulate some ideas on how to properly design an
implementable application for web use. Thank you very much for creating
this site. I consider it a valuable resource on the subject. I hope
that you will remain in the 'universe' for further inquiries by those of
us who appreciate what you have endeavored to teach.

Kind regards...

On Mon, 05 Jul 2004
22:10:39 +0100, Tony Marston wrote:
Take a look at http://www.tonymarston.co.uk/php-mys...structure.html
which identifies a development environment based on the 3 tier architecture.

Also look at
http://www.tonymarston.co.uk/php-mys...ontroller.html which
shows how it also incorporates the Model-View-Controller design pattern.

There is a sample application based on these architectures described in
http://www.tonymarston.net/php-mysql...plication.html which you can
run online. You can also download all the source code and see how it ticks.
This uses classes for all entity and database access, so it should give you
an idea of what can be done.

It looks complicated, but using the modules that I have created it is
possible to build and maintain web components with much less effort.

HTH.


Jul 17 '05 #3

"Me" <jd******@atlan tic.net> wrote in message
news:pa******** *************** *****@atlantic. net...
Tony~
Having spent lots of time in the database world, I must say that I relate
yo some of your history very well. I have spent the last 6 hours or so
reading through different articles and tutorials which you have authored
on your site, and I am happy to say that I am learning as much as I ever
have in a longer period of time than I care to remember. While PHP
doesn't seem strange to me (especially in the context you put it in
combining object oriented approaches to data manipulation), some of how
it is implemented appears a little 'fuzzy'.
New and different implementations always appear fuzzy at first, but as you
become more familiar with them the fog begins to clear.
But, I have a feeling that
by the time I complete reading the rest of the referenced parts
mentioned on your site, I may well have enough information to poke
through the fog and formulate some ideas on how to properly design an
implementable application for web use. Thank you very much for creating
this site. I consider it a valuable resource on the subject. I hope
that you will remain in the 'universe' for further inquiries by those of
us who appreciate what you have endeavored to teach.

Kind regards...
Thank you for those kind words. It is nice to know that my humble efforts
are appreciated.

--
Tony Marston

http://www.tonymarston.net
On Mon, 05 Jul 2004
22:10:39 +0100, Tony Marston wrote:
Take a look at http://www.tonymarston.co.uk/php-mys...structure.html which identifies a development environment based on the 3 tier architecture.
Also look at
http://www.tonymarston.co.uk/php-mys...ontroller.html which
shows how it also incorporates the Model-View-Controller design pattern.

There is a sample application based on these architectures described in
http://www.tonymarston.net/php-mysql...plication.html which you can run online. You can also download all the source code and see how it ticks. This uses classes for all entity and database access, so it should give you an idea of what can be done.

It looks complicated, but using the modules that I have created it is
possible to build and maintain web components with much less effort.

HTH.

Jul 17 '05 #4
Tony~
I'm really enjoying going through this material. I can already see a number
of application implementations for this architecture. Would you consider
this architecture to be 'overkill' for the basic functionality of a catalog
type website? The current site I've inherited has alot of pages (over
1,000) , and really needs this kind of organization, but I have yet to see
anyone produce even the most simplistic sample of one which can be built on.
To date, the site I have inherited is strictly view, with the exception
that, an on-line order form has been added (which needs complete revamping
btw) was added. While I have a 'grand design' in mind for more user
interaction (logins, tracking, etc), I'd like to start with the users view
and work front to back. While I know that, strictly speaking, that backend
is historically the place I've always begun my work, I'd like to try and get
a feel for the front-end design using your architecture. If you have a
moment and would like to see what I am talking about, the site is located at
www.genofit.com . I look forward to, and greatly respect your feedback.

Thank you again for your help. I seem to be learning more from your web
site each time I read through it...

Regards
"Tony Marston" <to**@NOSPAM.de mon.co.uk> wrote in message
news:cc******** ***********@new s.demon.co.uk.. .

"Me" <jd******@atlan tic.net> wrote in message
news:pa******** *************** *****@atlantic. net...
Tony~
Having spent lots of time in the database world, I must say that I relate
yo some of your history very well. I have spent the last 6 hours or so
reading through different articles and tutorials which you have authored
on your site, and I am happy to say that I am learning as much as I ever
have in a longer period of time than I care to remember. While PHP
doesn't seem strange to me (especially in the context you put it in
combining object oriented approaches to data manipulation), some of how
it is implemented appears a little 'fuzzy'.
New and different implementations always appear fuzzy at first, but as you
become more familiar with them the fog begins to clear.
But, I have a feeling that
by the time I complete reading the rest of the referenced parts
mentioned on your site, I may well have enough information to poke
through the fog and formulate some ideas on how to properly design an
implementable application for web use. Thank you very much for creating
this site. I consider it a valuable resource on the subject. I hope
that you will remain in the 'universe' for further inquiries by those of
us who appreciate what you have endeavored to teach.

Kind regards...


Thank you for those kind words. It is nice to know that my humble efforts
are appreciated.

--
Tony Marston

http://www.tonymarston.net
On Mon, 05 Jul 2004
22:10:39 +0100, Tony Marston wrote:
Take a look at

http://www.tonymarston.co.uk/php-mys...structure.html which identifies a development environment based on the 3 tier architecture.
Also look at
http://www.tonymarston.co.uk/php-mys...ontroller.html which shows how it also incorporates the Model-View-Controller design pattern.
There is a sample application based on these architectures described in http://www.tonymarston.net/php-mysql...plication.html which you can run online. You can also download all the source code and see how it ticks. This uses classes for all entity and database access, so it should
give you an idea of what can be done.

It looks complicated, but using the modules that I have created it is
possible to build and maintain web components with much less effort.

HTH.


Jul 17 '05 #5
Hi Tony,

Interesting site. MVC, 3 tier, yes, of course! But XSLT may as yet be
more of a personal preference of yours. For most php developers, php's
own hypertext preprocessing might be easier. And it CAN be used with
presentation logic objects, see
http://www.phppeanuts.org/site/index...principle.html
and example 5:
http://www.phppeanuts.org/site/index...stom+skin.html

Greetings,

Henk Verhoeven,
www.phpPeanuts.org
Tony Marston wrote:
Take a look at http://www.tonymarston.co.uk/php-mys...structure.html
which identifies a development environment based on the 3 tier architecture.

Also look at
http://www.tonymarston.co.uk/php-mys...ontroller.html which
shows how it also incorporates the Model-View-Controller design pattern.

There is a sample application based on these architectures described in
http://www.tonymarston.net/php-mysql...plication.html which you can
run online. You can also download all the source code and see how it ticks.
This uses classes for all entity and database access, so it should give you
an idea of what can be done.

It looks complicated, but using the modules that I have created it is
possible to build and maintain web components with much less effort.

HTH.


Jul 17 '05 #6

"atlantic" <j@no-spam.net> wrote in message
news:w9******** ********@monger .newsread.com.. .
Tony~
I'm really enjoying going through this material. I can already see a number of application implementations for this architecture. Would you consider
this architecture to be 'overkill' for the basic functionality of a catalog type website?
You do not use different architectures for different sizes of application. A
small application may grow into a large application over time, and you don't
want to switch architectures in mid stream.

In order to provide the benefits of a RAD (Rapid Application Development)
environment what you need is a series of components that provide standard
functionality in a reusable form. If you look at Figure 5 in
http://www.tonymarston.co.uk/php-mys...e.html#figure5 you will
see what looks like a very complicated architecture, but the following parts
have already been written and are waiting to be used:
- the abstract table class
- the validation class
- the DML class
- dialog type scripts
- generic XSL files
- a default CSS file

To build a component all you have to do is the following:-
- For each database table construct a subclass which extends the abstract
table class. As a bare minimum this simply describes the structure of that
database table.
- Construct a component script (see
http://www.tonymarston.co.uk/php-mys...mponent-script)
which identifies three things:
a) Which business entity (database table) to use - this is the Model part of
MVC.
b) Which screen structure script to use - this is the View part of MVC.
c) Which dialog type script to use - this is the controller part of MVC.

You should be able to recognise that the complicated part has already been
done so that the construction of new components is made as simple as
possible.
The current site I've inherited has a lot of pages (over
1,000) , and really needs this kind of organization, but I have yet to see
anyone produce even the most simplistic sample of one which can be built on. To date, the site I have inherited is strictly view, with the exception
that, an on-line order form has been added (which needs complete revamping
btw) was added. While I have a 'grand design' in mind for more user
interaction (logins, tracking, etc), I'd like to start with the users view
and work front to back. While I know that, strictly speaking, that backend
is historically the place I've always begun my work, I'd like to try and get a feel for the front-end design using your architecture.
There are two parts to every website - the front-end (which is accessed by
the general public) and the back-end (which is accessed by the site
administrator). The back-end maintains the database which is used by the
front-end. This may appear simple at first but has a habit of growing. For
example, you may have a large database which several people can access for
maintenance purposes but you decide that not all that these people should be
able to update every part of the database. That's where an access control
system is needed. You may then decide that you need an audit trail to keep
track of who changed what and when. That's when you need an audit trail
system. You may then decide that you need a workflow system so that one
action can automatically trigger one or more other actions.

You may be interested to know that I have already extended my software to
include a Role Based Access Control (RBAC) system, an Audit Trail system and
a Workflow system, so that proves how extensible it is.
If you have a
moment and would like to see what I am talking about, the site is located at www.genofit.com . I look forward to, and greatly respect your feedback.
The colours are a bit dark and gloomy, and I personally do not like the use
of client-side scripting (especially ActiveX controls) which is why I have
those options turned off. Consequently parts of your website did not display
as you intended.
Thank you again for your help. I seem to be learning more from your web
site each time I read through it...


It is nice to know that my humble efforts are appreciated.

--
Tony Marston

http://www.tonymarston.net
Jul 17 '05 #7

"Henk Verhoeven" <ne**@phppeanut sREMOVE-THIS.org> wrote in message
news:cc******** **@news3.tilbu1 .nb.home.nl...
Hi Tony,

Interesting site. MVC, 3 tier, yes, of course! But XSLT may as yet be
more of a personal preference of yours. For most php developers, php's
own hypertext preprocessing might be easier.
I know that PHP was designed to output HTML directly, but past experience
with other languages has taught me the benefit of separating presentation
logic from business logic. This meant that I needed to use some sort of
templating system to deal with all HTML output. As I was already familiar
with XML and XSL, and because PHP already had the capabilities to deal with
them both, I decided to go with this approach. The problem with a templating
system like Smarty is that it is tied to PHP whereas XML and XSL exist as
international standards which are maintained by the World Wide Web
Consortium (W3C) and are consequently available to a much wider audience. My
experience with XSL has allowed me to create generic stylesheets with an
amazing amout of reusability, so as far as I am concerned it is was a good
choice.

Other people may be happy with other solutions, but that is their choice.
And it CAN be used with
presentation logic objects, see
http://www.phppeanuts.org/site/index...principle.html
and example 5:
http://www.phppeanuts.org/site/index...stom+skin.html
I don't think I shall abandon my own approach just yet.

--
Tony Marston

http://www.tonymarston.net
Greetings,

Henk Verhoeven,
www.phpPeanuts.org
Tony Marston wrote:
Take a look at http://www.tonymarston.co.uk/php-mys...structure.html which identifies a development environment based on the 3 tier architecture.
Also look at
http://www.tonymarston.co.uk/php-mys...ontroller.html which
shows how it also incorporates the Model-View-Controller design pattern.

There is a sample application based on these architectures described in
http://www.tonymarston.net/php-mysql...plication.html which you can run online. You can also download all the source code and see how it ticks. This uses classes for all entity and database access, so it should give you an idea of what can be done.

It looks complicated, but using the modules that I have created it is
possible to build and maintain web components with much less effort.

HTH.

Jul 17 '05 #8
On Wed, 7 Jul 2004 11:45:33 +0100, "Tony Marston"
<to**@NOSPAM.de mon.co.uk> wrote:

"atlantic" <j@no-spam.net> wrote in message
news:w9******* *********@monge r.newsread.com. ..
Tony~
I'm really enjoying going through this material. I can already see anumber
of application implementations for this architecture. Would you consider
this architecture to be 'overkill' for the basic functionality of a

catalog
type website?


You do not use different architectures for different sizes of application.


You might not. Many do.
A small application may grow into a large application over time, and you don't
want to switch architectures in mid stream.
Yeah and pigs may fly so you should always carry an umbrella. Some
systems, by design, are small and will remain small and require a
different architecture.
[snip very good stuff that's not applicible to every situation]

There are two parts to every website - the front-end (which is accessed by
the general public) and the back-end (which is accessed by the site
administrator) .


Perhaps you meant 'you can devide a website into two parts if you want
to'?

Overkill, when not required, costs more money, wastes time on the
upstart and causes headaches later. It's not _ALWAYS_ a good thing to
over do it at the start.
--
gburnore@databa six dot com
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
| ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
DataBasix | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
| ÝÛ³ 3 4 1 4 2 ݳ޳ 6 9 0 6 9 ÝÛ³
Black Helicopter Repair Svcs Division | Official Proof of Purchase
=============== =============== =============== =============== ===============
Want one? GET one! http://www.databasix.com
=============== =============== =============== =============== ===============
Jul 17 '05 #9

"Gary L. Burnore" <gb******@datab asix.com> wrote in message
news:cc******** **@blackhelicop ter.databasix.c om...
On Wed, 7 Jul 2004 11:45:33 +0100, "Tony Marston"
<to**@NOSPAM.de mon.co.uk> wrote:

"atlantic" <j@no-spam.net> wrote in message
news:w9******* *********@monge r.newsread.com. ..
Tony~
I'm really enjoying going through this material. I can already see anumber
of application implementations for this architecture. Would you consider this architecture to be 'overkill' for the basic functionality of a

catalog
type website?


You do not use different architectures for different sizes of application.
You might not. Many do.
Then that is their choice. IMHO it is a poor choice.
A small application may grow into a large application over time, and you don'twant to switch architectures in mid stream.


Yeah and pigs may fly so you should always carry an umbrella. Some
systems, by design, are small and will remain small and require a
different architecture.


I have seen a lot of systems which start small yet grow and grow over time.
A single architecture which can handle both small and large systems would be
more useful than separate architectures that can only handle one or the
other. If you write a small system which cannot be extended as new
requirements materialise I am sure that your customers will be greatly
impressed - NOT!
[snip very good stuff that's not applicible to every situation]

There are two parts to every website - the front-end (which is accessed bythe general public) and the back-end (which is accessed by the site
administrator) .
Perhaps you meant 'you can devide a website into two parts if you want
to'?


Having spent some time working in a team which maintained the back-end
transactions while another team dealt with the front-end I am not the only
one who considers the front and back ends to be separate entities. The only
common ground between them is the database in the middle.
Overkill, when not required, costs more money, wastes time on the
upstart and causes headaches later. It's not _ALWAYS_ a good thing to
over do it at the start.


It depends on your definition of "over doing". Experience has taught me that
there are two ways of doing a job - properly or not at all. Doing a "proper
job" means having an architecture that will deal with any size of web
application, small or large.

--
Tony Marston

http://www.tonymarston.net

Jul 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1870
by: developerqs | last post by:
I have developed an engine that I use for all of my clients web sites. They are all the same type of site, some use features A, B, & C. Some web sites just use features A & B. My issue is that in order for me to make a new site, I am copying the files and then adding in the design/unique look. This makes developing new features and fixing...
9
1595
by: Scott Townsend | last post by:
I have the following code in a file called test.asp and when I run it I get 'Test'... Is there something about running .ASP Pages on a Web that is running Windows Sharepoint Services? Thanks, Scott<- ------------ <html>
17
1556
by: Don Wash | last post by:
Hi All! First of all I would like to say that VS.NET is one of the finest IDE I've used in years. It really helps me code quickly. Workspace management using auto hide windows, minimizing and maximizing of code segments, TO-DO list management and automatic documentation (to name a few) are all superb. So I really want to make the VS.NET IDE...
2
1487
by: mike kim | last post by:
I am in the middle of developing a web application using asp.net. I have used IIS default web site for the development, creating a virtual directory and so. My laptop is also my webserver. Instead of using Default web site and virtural directory, can I create a new web site on my web server for the development? What do I have to do create...
8
3156
by: Graham | last post by:
I noticed a similar post awhile ago and in terms of my problem it wasnt a suitable answer so I will ask again. I have VS2005 running a on development machine in my office where I do all my development on existing and new applications. This environment also has its own Sql Server with dev versions of all our live Databases. Our live production...
3
1369
by: Erik ETS | last post by:
I need some symmetry between my development environment and my running web site. The root of my web site is http://www.mysite.com/ while the root of the project in my local development environment is http://localhost/myproject/, differing from the local server root http://localhost/. This means a lot of trouble since some url rewriting on my...
3
2443
by: vijaykokate | last post by:
Our company http://www.softnmation.com/ offers its customers a great variety of products. Everything you need can be found in this site. Web Template, CSS Template, Logo Template, Corporate Identity Package, Logo Set,Icon Set, Flash Animated Template, Flash Intro Header, Flash Site, PHP-Nuke Theme, Full Site, Stretched Web Templates and...
0
1111
by: clickon | last post by:
I am working on a portal web application that is largely modular. I have been working on it on a "development" website. Some sections have been tested and are complete. I decided to set up a Live website on the same server so i could work on the development web site without affecting people using the completed sections. I set up the...
0
7915
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8205
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.