masterkoppa / Mastermind

Mastermind SE362 Project
1 stars 0 forks source link

Input Validation, where? #4

Closed masterkoppa closed 12 years ago

masterkoppa commented 12 years ago

Im going through the GUI now and the issue of input validation popped up. Where should the input be validated? With a command separately or should it be done in an anonymous action listener? Please provide some input for this issue.

ahc2483 commented 12 years ago

I'd think some type of seperate class, whether a command or a helper or something, somewhere to abstract that logic to. Although its really only the view that needs it...

Sent from my iPhone

On Apr 1, 2012, at 4:55 PM, Andres Ruiz reply@reply.github.com wrote:

Im going through the GUI now and the issue of input validation popped up. Where should the input be validated? With a command separately or should it be done in an anonymous action listener? Please provide some input for this issue.


Reply to this email directly or view it on GitHub: https://github.com/masterkoppa/Mastermind/issues/4

akelley0 commented 12 years ago

I think it would be good to have the input validation through an action listener, im still pretty new to gui's so what would be the pros and cons of an action listener as opposed to a command? it may be easier to do it with a command because we already have the interface for commands so it would be pretty simple to add like a validation command, but im not sure

On Sun, Apr 1, 2012 at 4:55 PM, Andres Ruiz < reply@reply.github.com

wrote:

Im going through the GUI now and the issue of input validation popped up. Where should the input be validated? With a command separately or should it be done in an anonymous action listener? Please provide some input for this issue.


Reply to this email directly or view it on GitHub: https://github.com/masterkoppa/Mastermind/issues/4

masterkoppa commented 12 years ago

The only reason why I thought of abstracting this to another class or command was to avoid having a 50+ lines of code in an abstract listener. Right now if incorrect input is submitted the program will crash. So if someone whats to take that task up assign yourself this bug so we can get the ball rolling.

mrk3767 commented 12 years ago

By the command itself maybe? We shouldn't link it to the view or else we will have to copy paste for future views.

On Sun, Apr 1, 2012 at 4:55 PM, Andres Ruiz < reply@reply.github.com

wrote:

Im going through the GUI now and the issue of input validation popped up. Where should the input be validated? With a command separately or should it be done in an anonymous action listener? Please provide some input for this issue.


Reply to this email directly or view it on GitHub: https://github.com/masterkoppa/Mastermind/issues/4

~Michael Kenworthy

Desktop Support Representative and Software Engineering Student at Rochester Institute of Technology (716)400-0742 mrk3767@rit.edu

masterkoppa commented 12 years ago

Ok so something like a command or method that takes a ColorPeg[] as a parameter and we send it in through the view. Im thinking a static method would be a great candidate for this, maybe even in one of the existing classes like code?

mrk3767 commented 12 years ago

I think a static method would be fine. That way it would be unmodifiable and accessible by all views

On Sun, Apr 1, 2012 at 10:17 PM, Andres Ruiz < reply@reply.github.com

wrote:

Ok so something like a command or method that takes a ColorPeg[] as a parameter and we send it in through the view. Im thinking a static method would be a great candidate for this, maybe even in one of the existing classes like code?


Reply to this email directly or view it on GitHub: https://github.com/masterkoppa/Mastermind/issues/4#issuecomment-4871460

~Michael Kenworthy

Desktop Support Representative and Software Engineering Student at Rochester Institute of Technology (716)400-0742 mrk3767@rit.edu

masterkoppa commented 12 years ago

Sounds good. So any takers for this issue?

mrk3767 commented 12 years ago

I think me and you are the only ones that saw these emails... I forgot to hit reply to all.

On Sun, Apr 1, 2012 at 10:42 PM, Andres Ruiz < reply@reply.github.com

wrote:

Sounds good. So any takers for this issue?


Reply to this email directly or view it on GitHub: https://github.com/masterkoppa/Mastermind/issues/4#issuecomment-4871631

~Michael Kenworthy

Desktop Support Representative and Software Engineering Student at Rochester Institute of Technology (716)400-0742 mrk3767@rit.edu

ahc2483 commented 12 years ago

Na I saw these too, I chimed in, not sure why you guys didnt get the note

On Sun, Apr 1, 2012 at 10:46 PM, mrk3767 < reply@reply.github.com

wrote:

I think me and you are the only ones that saw these emails... I forgot to hit reply to all.

On Sun, Apr 1, 2012 at 10:42 PM, Andres Ruiz < reply@reply.github.com

wrote:

Sounds good. So any takers for this issue?


Reply to this email directly or view it on GitHub: https://github.com/masterkoppa/Mastermind/issues/4#issuecomment-4871631

~Michael Kenworthy

Desktop Support Representative and Software Engineering Student at Rochester Institute of Technology (716)400-0742 mrk3767@rit.edu


Reply to this email directly or view it on GitHub: https://github.com/masterkoppa/Mastermind/issues/4#issuecomment-4871651

masterkoppa commented 12 years ago

These emails are through github so everyone will get them and anyone can see these in the issues section. I think it's a good way for me to keep track of them since it email's you guys and they don't get lost in my email.

masterkoppa commented 12 years ago

We're still in need of someone to take on this issue. Any takers, right now I'm burned out and can't do much until tomorrow's meeting.

ahc2483 commented 12 years ago

I'll take on the AI and GUI validation as soon as I get random code generator done

Sent from my iPhone

On Apr 3, 2012, at 12:57 AM, Andres Ruiz reply@reply.github.com wrote:

We're still in need of someone to take on this issue. Any takers, right now I'm burned out and can't do much until tomorrow's meeting.


Reply to this email directly or view it on GitHub: https://github.com/masterkoppa/Mastermind/issues/4#issuecomment-4894542

masterkoppa commented 12 years ago

This still needs work, and will break probably break something eventually. @mrk3767 can you take care of this tomorrow?

masterkoppa commented 12 years ago

Just implemented it, hopefullt everything should be good to go