User Management

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
cpetzol2
Forum Newbie
Posts: 11
Joined: Tue Feb 27, 2007 7:31 pm

User Management

Post by cpetzol2 »

Hello,

I am somewhat new to PHP and OOP. I am beginning to frame out a pretty big website that I would like to make, and was just wondering if anybody has some advice they would like to share to help me get off of the ground.

My main question is regarding Bulletin Boards. I want my website to have a user management system. Once logged in, the user will have access to a series of forums, but I also need them to have access to some other applications that I will be making myself. I would like my applications and the BB to be very tightly knit. So, I am looking for a BB that would make this goal possible.

I feel that most BBs I have looked at have their own user management system, and in attempting to extend those user classes to work with my own applications, I am afraid that I may damage the classes that the BB uses, or that I will have difficulty changing the functionality of them. I do not need all of the features of phpBB, but that would be awesome if I could. I am really just looking for a way to get all of my applications under the same user management/authentication classes in the easiest way that still works.

If you have time to respond in detail, that would be great, but even if you can just point me to some good documentation, that would be good too.

I realize my terminology may be off, just let me know if I need to clarify something.

Thanks
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Two things:

1. "I would like my applications and the BB to be very tightly knit." I would say that's a mistake. The more closely integrated your applications are the more difficult it is to change things later.

2. I wouldn't try to integrate an existing forum board application that you have no control over into your code. Things like phpBB are updated, modified, and fixed very frequently. If you change anything in the application and then there's a critical big fix released you may end up having to choose between installing the bug fix and breaking your code, or leaving the bug unfixed. It's easy to say you'll install all the fixes and maintain your site so that it all works, but time pressures down the line usually mean that things like that get left or ignored for a while, which makes it more and more difficult to keep the forum running properly.

If you have to go down that route then you'll need to think about it, and plan it, incredibly carefully.
User avatar
mikeq
Forum Regular
Posts: 512
Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland

Post by mikeq »

as onion2k says, tightly knitting them together is a bad idea.

You should loosely couple as much as possible.

If you want to do something like, if someone creates a user record in one of your applications that user is then created in the BB system then you should try to build some kind of publish/subscribe system.

Your application publishes the fact that a new user has been created, then those apps that need to know about it would subscribe to pick up that data.

look at it like this

application --(publish)--> adapter ------> middleware <----- adapter --(subscribe)----> application

the publish adapters job is to turn the application specific data into a common data format,then the subscribe adapters job is to turn the common data format into application specific data.

So if you need to replace the publishing system, you only need to recode the adapter. Similarly if the subscribing system changes you only need to recode the adapter.

If new apps come along that need to know about some peice of data, you just build an adapter to subscribe to the common data format.

The middleware can be anything that stores data, a database table, a flat file etc.
Post Reply