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. Design and Architecture
  4. Help: Which design method should I use for this particular case?

Help: Which design method should I use for this particular case?

Scheduled Pinned Locked Moved Design and Architecture
designregexarchitecturehelptutorial
3 Posts 3 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.
  • X Offline
    X Offline
    xyzsnl
    wrote on last edited by
    #1

    I am going to develop a new class. But I do not have the full list of functionalities to be included in this class right now. But I would like to add new features at different times in the future. i.e I want to add new features to an existing class from time to time in the future as the new requirement arise. How should I start and which design pattern fits my requirement. I do not have prior experience in using or applying patterns. I am starting out. If this is not the right place please guide me which codeguru forum I should resort to, to have more knowledge on applying design patterns. Thanks, ManojE

    L R 2 Replies Last reply
    0
    • X xyzsnl

      I am going to develop a new class. But I do not have the full list of functionalities to be included in this class right now. But I would like to add new features at different times in the future. i.e I want to add new features to an existing class from time to time in the future as the new requirement arise. How should I start and which design pattern fits my requirement. I do not have prior experience in using or applying patterns. I am starting out. If this is not the right place please guide me which codeguru forum I should resort to, to have more knowledge on applying design patterns. Thanks, ManojE

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      xyzsnl wrote:

      But I do not have the full list of functionalities to be included in this class right now. But I would like to add new features at different times in the future

      Classes are small constructs, and ideally they'd only have a single responsibility. Implementing a lot of functionality in a single class, and modifying that, would be rather inefficient and error-prone. There's a multitude of ways to extend classes, the most obvious being inheritance. In essence, you create a new class and "inherit" all the things from some other class you wrote. There's also the option of creating abstract classes; that would only contain a definition, similar to an interface. You could provide different implementations as required.

      xyzsnl wrote:

      How should I start and which design pattern fits my requirement.

      Most design-patterns consist out of more than one single class. I liked the Strategy[^]-pattern as an introduction to design patterns. As you learn more, you'll recognize them in the .NET Framework itself. Happy Programming :)

      My last article[^] - It's been a while :suss:

      1 Reply Last reply
      0
      • X xyzsnl

        I am going to develop a new class. But I do not have the full list of functionalities to be included in this class right now. But I would like to add new features at different times in the future. i.e I want to add new features to an existing class from time to time in the future as the new requirement arise. How should I start and which design pattern fits my requirement. I do not have prior experience in using or applying patterns. I am starting out. If this is not the right place please guide me which codeguru forum I should resort to, to have more knowledge on applying design patterns. Thanks, ManojE

        R Offline
        R Offline
        RobCroll
        wrote on last edited by
        #3

        Classes are extensible by nature. So you can extended them as required. Apply patterns to your class as required. Don't apply patterns that are not required, otherwise in the future, you will assume that the class behaves in a way it doesn't.

        Architecture is extensible, code is minimal.

        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