/    Sign up×
Community /Pin to ProfileBookmark

PHP OOP like Java

Hi there. I am programming a helpdesk application in PHP and they way I was going about it was to make all my class files, and then treat the index file as the Main class (in java terms). The reason for this is to keep people out of the class files. and then the actions are passed to the index file through GET variables as so…
index.php?object=user&action=new

Can anyone tell me the problems I might face doing things this way? is there a better way I should be doing things? Although there are tons of tutorials on OOP usuing PHP, none give you the “proper” way to structure he code, or even suggest ways to do it. (none that I have seen anyway).

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogJul 07.2008 — Sounds like what you are working toward is the [url=http://www.google.com/search?q=php+front+controller+pattern]Front Controller Pattern[/url].
Copy linkTweet thisAlerts:
@DoppleauthorJul 07.2008 — Ahh. It has a name. Thanks for that NogDog. As long as it is a valid coding method, so to speak.

That's great.

?
×

Success!

Help @Dopple spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...