|
Comments for: mathieson20040309
| Message # 1023290: |
|
Date: 12/08/04 18:49
By: crivera Profile Subject: good basic design? I am trying to figure out if the way i wrote my code is recommended or not. My class had a Get/Set/Clear function for each of the class' properties. Well, the code got out of hand when the class had 22 properties. I tried to simplify the code by just creating combine all the Get/Set/Clear funtions into 3 functions and using the property's name as a function parameter. These 3 function now had a big switch statement for each property but is much easier to maintain. I eventually realized that by adding new properties or adding new code reference the accessor/modifier functions to my class would produce a run time error instead of a compile error. I think that this sacrifice is justified. What do you think? |
Previous Message | Next Message |
| Comments: | ||
| PHP ORM for Shared Servers | Dan Blaisdell | 03/03/09 11:09 |
| Php Object Generator | Jake | 09/13/05 20:37 |
| EZPDO: an easy ORM framework for PHP5 | xman101 | 07/21/05 16:25 |
| More to it - article is incomplete | Milos Radenovic | 05/27/05 10:20 |
| Database Tables | olivier | 02/25/05 20:06 |
| RE: good basic design? | jojo reyes | 01/25/05 01:45 |
| Abstracting the database layer | jojo reyes | 01/24/05 22:48 |
| RE: agreed | Shankar | 01/17/05 13:21 |
| good basic design? | crivera | 12/08/04 18:49 |
| RE: Breaks fundamental design principles | mmorales | 05/28/04 10:08 |
| RE: Breaks fundamental design principles | Benjamin Smith | 04/24/04 03:29 |
| RE: Breaks fundamental design principles | Art Hundiak | 04/06/04 13:48 |
| RE: Breaks fundamental design principles | Ferdinand Beyer | 04/03/04 06:41 |
| Breaks fundamental design principles | Jack Slocum | 03/27/04 02:32 |
| Good basic design principles | Jared White | 03/20/04 22:56 |
| RE: agreed - maturity needed | Kieran Mathieson | 03/15/04 14:11 |
| RE: agreed | les | 03/13/04 09:13 |
| Performance | Lars | 03/12/04 07:42 |
| agreed | Cyril Doussin | 03/11/04 02:52 |
| Code Reuse? Existing Alternatives | kellan | 03/10/04 12:46 |
| Well written | Surjit Madiwalar | 03/10/04 05:40 |
|
If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly. | ||


