Results 1 to 7 of 7

Thread: [RESOLVED] [2005] Need an Opinion

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2003
    Posts
    758

    Resolved [RESOLVED] [2005] Need an Opinion

    Right now I have 14 maintenance forms. All of these forms have the exact functionality, they just display and deal with different tables of data. They are currently in separate forms and inherit visual style from a parent form. The client has asked, for a second time now, to have changes made to the way all of the forms behave. (This app is not live yet, so more changes may be coming.)

    Should I recreate all of these forms and make them into one form with an enum parameter in the constructor to tell which table I am maintaining or just leave them separate and deal with making changes in multiple places and having to test them in multiple places? I am using 2005, so I was thinking about using Partial Classes to hold the event handlers for the various controls based upon the table being maintained.

    I guess I could have a Maintenance class that does the processing that is similiar on all of the forms...

    Thoughts or recommendations?

    PS - There is probably room to squeak this out in the budget.

    Thanks in advance.

  2. #2
    Frenzied Member vbdotnetboy's Avatar
    Join Date
    Jun 2004
    Location
    Lewisburg, PA "Next year Raiders in the Super Bowl"
    Posts
    1,310

    Re: [2005] Need an Opinion

    well this is my opinion but it's usually better to only have to deal with making changes in one place rather then having to change code in multiple place. again just my own opinion since i don't like having to remember things i've changed in multiple places that would basically do the same thing.

    Derek - Using VS 2008 99% of the time and VS 2003 1% of the time

    Please Help Us To Save Ana

    ● Helpful Links: DNR TV | Awesome site for tips | Using ADO.NET to work with Excel | Xml Namespace 2.0 Framework Changes|Ultra High Security Password Generator | Mendhak's ADO.NET Tutorial
    ● Code Bank: Random Password Generator | Generic DbProviderFactory Access
    ● Site Work: Bottle Run Xtreme | Spaids Racing.com

    Company I work for - CSSI

    WHEN POSTING PLEASE INDICATE VERSION

    Please use vbcode tags or code tags when posting code
    [highlight=vb]ALL your code goes here[/highlight] or [code]ALL your code goes here[/code]

    If my post helped you in anyway... please be kind and give me some ratings

  3. #3
    Frenzied Member maged's Avatar
    Join Date
    Nov 2002
    Location
    Egypt
    Posts
    1,040

    Re: [2005] Need an Opinion

    Right now I have 14 maintenance forms. All of these forms have the exact functionality, they just display and deal with different tables of data.
    why did you create 14 forms in the first place ?????


    i think you have to fix this mistake right away or next time your client asks for modifications you project will get out of control.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    May 2003
    Posts
    758

    Re: [2005] Need an Opinion

    Any recommendations on the best approach to combining them?

    I am thinking that the maintenance class to handle the similiar operations will be with way to go. I will still have my 14 forms with minimal processing done in each. This way, I will have my databinding living in the form and the controls visible at design-time. I will use AddHandler statements to point to the handlers in the maintenance class for the necessary controls.

    Any "better" approach that you can recommend?

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    May 2003
    Posts
    758

    Re: [2005] Need an Opinion

    I could create it all in one form and then use Partial Classes to split my functionality, but I think the run-time creation of controls and sizing of the form and the adding of the handlers would be more difficult to maintain in the long run.

  6. #6
    Frenzied Member maged's Avatar
    Join Date
    Nov 2002
    Location
    Egypt
    Posts
    1,040

    Re: [2005] Need an Opinion

    i would myself create a base form with all the common functionality and inherits from it as many forms as i need , adjsut each with only the needed moficiations (i think you mentioned only changing table name , right ??).

    this case i can modify them centrally from one location (base form), also i can create as more forms as i might need in the future for more tables. and at last i can control each form to have additional unique capabilites depending on what i might need from each one

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    May 2003
    Posts
    758

    Re: [2005] Need an Opinion

    That is what I ended up doing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width