Ok. They are related only to 1main UI. So I will create 5 classes inside 
the same module. My doubt was if I had to do 5 modules.
So I guess that if they were usable in other different UIs it would make 
sinc eto do different modules, but If they are all relate only to 1 UI, 
multiple classes if the better choice,

El sábado, 14 de octubre de 2017, 23:48:06 (UTC+2), Justin Israel escribió:
>
>
>
> On Sun, Oct 15, 2017 at 10:23 AM Rudi Hammad <[email protected] 
> <javascript:>> wrote:
>
>> Hello,
>>
>> I am writing a tool in maya with pyside and I was wondering if I should 
>> do multiple classes inside a module. After reading different opinions , I 
>> didn´t get a clear answer.
>> To simply my question, imagine that you have a UI with 5 buttons that, 
>> when clicked, open different sub-UIs more or less complex..
>>
>> For instance, one of the buttons opens a simple color picker ui, antoher 
>> one opens a dialog with a table widgets, another one opens a more complex 
>> UI with its own layout and widgets etc...etc...
>>
>> Should I create 5 classes inside the same module for this secondary UIs, 
>> only 1 class doing all (which will make it less clean because it would have 
>> to many methods)
>> or should I create five modules. The color picker ui is very simple and 
>> can be done in less than 20 lines, but other uis could be around 200 lines.
>> So If I am consistent and decide to write modules, I will have one module 
>> with 20 lines, and another with 200.
>>
>
> My opinion is that if the other widgets are anything more than trivial 
> dumb widgets (a dialog with some initial settings), that it is beneficial 
> to separate them into individual classes. This will help keep your 
> separation of concerns clear and help keep the code maintainable. If your 
> color picker is generic, then making it a discreet class would mean you can 
> reuse it in other code.
>
>  
>
>>
>> Thanks,
>> R
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/python_inside_maya/76fd4881-de81-462c-955e-a23f75c3eed2%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/python_inside_maya/76fd4881-de81-462c-955e-a23f75c3eed2%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/eb945a4b-210f-4fa7-aa94-f3ebf43b7151%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to