Opinion Please: Design Options for K2Panel Control

Last post 01-03-2008, 11:16 by AndyBurns. 2 replies.
Sort Posts: Previous Next
  •  12-18-2007, 2:55 PM 20566

    Opinion Please: Design Options for K2Panel Control

    I'm working on a new control to add to the library called K2Panel.  This control will work with K2Submit.  Add a K2Panel to the page, then you can add standard ASP.NET controls to the panel.  If the ID of the control matches a K2 activity or process level variable, the panel will take care of moving data back & forth between the workflow and controls.

     Design question:

    The developer could attach a numeric K2 field, like decimal to a textbox control.  Who should be responsible for validating the user entry?  Should the K2Panel validate the data entered is valid for the datatype?  Or should that be left to the developer?  Remember, the K2Submit control already fires a validate event that allows the developer to do any edit validation.

     Please let me know what you think.


    The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.
    Filed under: , ,
  •  12-28-2007, 3:11 PM 20766 in reply to 20566

    Re: Opinion Please: Design Options for K2Panel Control

    If it where me, at least initially, I'd probably leave it up to the developer to do the validation.  I can see a situation where you put in basic data type validation but more robust validation being required (like valid ranges, min/max values...) at which point you're back to the same question.

     


    The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.
  •  01-03-2008, 11:16 20858 in reply to 20566

    Re: Opinion Please: Design Options for K2Panel Control

    I would agree - leave the developer to validate their own field, especially if there is an event for that anyway.

     Or, I suppose there might be a third option - both. The K2Panel makes sure that the data isn't something really wacky, like text into decimal, but that the developer still has the option to validate that the value is one they'd expect.
     

View as RSS news feed in XML