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. Control Use - Good Practice?

Control Use - Good Practice?

Scheduled Pinned Locked Moved Design and Architecture
designquestiondiscussion
2 Posts 2 Posters 2 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.
  • T Offline
    T Offline
    Tristan Rhodes
    wrote on last edited by
    #1

    Hi Guys - I have an application which contains a number of discrete controls. The app is working, but i have a particular control which is quite complex and i have the following options: 1) Implement the control and the model together and simply serialize the controls contents. 2) Implement the control and model seperately and keep them syncrhonised. I realise that 1 works nicely with minimum development, but in order to validate the data (The rules are external to the control), i would have to load it into the control and validate it there. To hide this from the UI, the validation would need to create an instance of the control purely for validation purposes. Would this be considered bad practice? What are other peoples thoughts on this matter? Cheers Tris

    ------------------------------- Carrier Bags - 21st Century Tumbleweed.

    P 1 Reply Last reply
    0
    • T Tristan Rhodes

      Hi Guys - I have an application which contains a number of discrete controls. The app is working, but i have a particular control which is quite complex and i have the following options: 1) Implement the control and the model together and simply serialize the controls contents. 2) Implement the control and model seperately and keep them syncrhonised. I realise that 1 works nicely with minimum development, but in order to validate the data (The rules are external to the control), i would have to load it into the control and validate it there. To hide this from the UI, the validation would need to create an instance of the control purely for validation purposes. Would this be considered bad practice? What are other peoples thoughts on this matter? Cheers Tris

      ------------------------------- Carrier Bags - 21st Century Tumbleweed.

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Tristan Rhodes wrote:

      1. Implement the control and the model together and simply serialize the controls contents. 2) Implement the control and model seperately and keep them syncrhonised.

      I would use the MVC pattern. Use the model and put the validation in there.

      Deja View - the feeling that you've seen this post before.

      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