473,700 Members | 2,523 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 3074
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
1877
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 old features a huge hassle because:
9
1597
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
1563
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 the primary development tool for me. However, when it comes to developing ASP.NET websites, I...
2
1493
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 one and use it?
8
3164
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 server also its own Sql Server, these 2 Sql Servers are kept completely separate (for obvious...
3
1379
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 site forces me to use absolute referers such as "/file.jpg" in a href and img src attributes, which...
3
2452
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 Stretched Flash Templates, ZenCart Templates ,osCommerce Templates and many more
0
1114
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 website and then used VS 2005 to "publish" the site. This seemed to work OK, it precompiled the whole...
0
8728
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9076
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8926
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7813
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4404
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4659
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2392
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2030
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.