Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Class Libraries

Class Libraries

Scheduled Pinned Locked Moved C#
questionoophelp
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Poolee
    wrote on last edited by
    #1

    Hi everyone I'm still quite new to Object Oriented Programming, so please forgive me for this newbie question. I'm building an application with a main form and a couple of sub-forms. There is also an assocated service that goes with the application. - Should the class library only code that doesn't deal directly with processing events on the forms, or just methods that are used more than once? - Should each form then have its own class library, or should I create a single class library for the whole application and the service to use? - Or should I be creating separate class libraries based on their usage to enable later reuse of the class library? I've trawled through MSDN and found some best practices but they don't mention what to do in the above scenarios... I gotta say I'm leaning towards the last point here, but I really don't know... :( Any help you gurus can provide would be greatly appreciated! Cheers Paul

    One day I want to be a code monkey. Right now, I'm more like a code amoeba...

    R 1 Reply Last reply
    0
    • P Poolee

      Hi everyone I'm still quite new to Object Oriented Programming, so please forgive me for this newbie question. I'm building an application with a main form and a couple of sub-forms. There is also an assocated service that goes with the application. - Should the class library only code that doesn't deal directly with processing events on the forms, or just methods that are used more than once? - Should each form then have its own class library, or should I create a single class library for the whole application and the service to use? - Or should I be creating separate class libraries based on their usage to enable later reuse of the class library? I've trawled through MSDN and found some best practices but they don't mention what to do in the above scenarios... I gotta say I'm leaning towards the last point here, but I really don't know... :( Any help you gurus can provide would be greatly appreciated! Cheers Paul

      One day I want to be a code monkey. Right now, I'm more like a code amoeba...

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      Poolee wrote:

      Or should I be creating separate class libraries based on their usage to enable later reuse of the class library?

      Bingo! /ravi

      This is your brain on Celcius Home | Music | Articles | Freeware ravib(at)ravib(dot)com

      P 1 Reply Last reply
      0
      • R Ravi Bhavnani

        Poolee wrote:

        Or should I be creating separate class libraries based on their usage to enable later reuse of the class library?

        Bingo! /ravi

        This is your brain on Celcius Home | Music | Articles | Freeware ravib(at)ravib(dot)com

        P Offline
        P Offline
        Poolee
        wrote on last edited by
        #3

        Ok, thanks Ravi. But what about methods purely related to doing something related to the form, but doesn't fall into a particular category? Should I be keeping those with the form class's code? Cheers Paul

        One day I want to be a code monkey. Right now, I'm more like a code amoeba...

        R 1 Reply Last reply
        0
        • P Poolee

          Ok, thanks Ravi. But what about methods purely related to doing something related to the form, but doesn't fall into a particular category? Should I be keeping those with the form class's code? Cheers Paul

          One day I want to be a code monkey. Right now, I'm more like a code amoeba...

          R Offline
          R Offline
          Ravi Bhavnani
          wrote on last edited by
          #4

          Yes. If you think the methods could be used by more than one form, you may want to encapsulate them in a utility class. /ravi

          This is your brain on Celcius Home | Music | Articles | Freeware ravib(at)ravib(dot)com

          P 1 Reply Last reply
          0
          • R Ravi Bhavnani

            Yes. If you think the methods could be used by more than one form, you may want to encapsulate them in a utility class. /ravi

            This is your brain on Celcius Home | Music | Articles | Freeware ravib(at)ravib(dot)com

            P Offline
            P Offline
            Poolee
            wrote on last edited by
            #5

            Awesome, thanks for your help Ravi!! :-D Cheers Paul

            One day I want to be a code monkey. Right now, I'm more like a code amoeba...

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups