feedback on OO plan for site

From: Date: Thu, 24 Apr 2003 12:00:29 +0000
Subject: feedback on OO plan for site
Groups: php.general 
Request: Send a blank email to php-general+get-145145@lists.php.net to get a copy of this message
I am building a Web application that will be a clearing house for legal information in all 50 states. I would like to hear your comments on how to go about developing it. I am going to use Php/MySQL with a bit of xml and xslt to do this. I work for a company that provides services to attorneys so we have most of this information at our disposal already. I want to use a MVC approach with as much OO code as I can to make site development/maintainence as easy as possible and start developing some reusable components as well. Also I have the database set up and fairly well normalized. Here are the requirements of the application are: 1. A searchable attorney directory that allows attorney members to login securely to edit their own profile and upload their photo. 2. A series of Legal Resources (links) based on predetermined categories and subcategories 3. A message board type application where the public can leave questions for attorneys to answer (with explicit instruction that this is not considered qualified legal advice) and browse through archived answers. 4. A shopping cart application with products available from multiple vendors and multi-tier price structure based on quantities selected 5. General legal Guides to give site visitors a introduction to areas of law 6. Multiple skins to package all this information under multiple Domain Names (one will have a consumer focus another a business focus) 7. Administrative pages for office workers to update all this stuff All 5 of these items will be based on a set of legal categories (and sub-categories) such as Family Law, Personal Injury, Commercial Law, etc.. In other words site visitors will be able to browse family law attorneys, post questions in Family Law, buy Family Law products, read a Family law guide and view Family Law Legal Resources for a given state. So in the V (Views) of MVC I will use XSLT to accomplish packaging the info in multiple skins maybe even multiple formats (html of course, but maybe wml, pdf and RSS too) That means in the C (Controller) will need a way to convert database content into xml. I have made a class to query a database and return xml. I will also need classes for: 1.form validation 2 secure logins. If you have some suggestions on good libraries for this I would love to here them to avoid reinventing the wheel here. So in the M (Model or business logic) I see the following object with the accompanying methods and properties do see anything I am missing or that is off-track: Member (attorney) Properties: Name Add Phone Email Profile Photo (path - filename based on primary key from table ie. primaryKey.jpg) Methods: Getter and Setter methods for all properties Update (Create built in here) Remove Firms (extends Member) methods getMembers (returns array of members or memberIDs) Client (site visitor who posts questions or uses shopping cart) Properties Name City State email Methods Getter and Setter methods for all properties Update (Create) Remove Shopping Cart Methods: addItem removeItem getAllItems updateQuantity Product Properties: ProductID Name Vendor Description Quantity Price Methods Getter and Setter methods for all properties Update (Create) Remove Vendor Properties: Name Description ContactPerson ContactPhone ContactEmail Methods Getter and Setter methods for all properties Update (Create) Remove Message ( Properties Sender Recipient Subject Body DateTimeStamp Methods Getter and Setter methods for all properties Populate (retrieve from database) Send Guide Properties Title Body Methods Getter and Setter methods for all properties Populate (retrieve from database) Update (Create) So, sorry for such a long-winded message but to review I would like to here your comments on existing classes for user authentication, form checking, and maybe even a message board class (or app). On the methods, do you see anything I am missing? Anything that doesn't belong? Thanks

« previous php.general (#145145) next »