adamzalesak / PV286-Project

Data converter between different formats written in C# (collaborative university project)
0 stars 0 forks source link

Add review code #35

Open filiphajek opened 1 year ago

timotej-hajduk commented 1 year ago

praise: Great use of design patterns (Validators, Convertors, ConvertorFactory). Makes the programmers intend much clearer.

timotej-hajduk commented 1 year ago

suggestion: With so many different convertors it is starting to get a bit crowded and occasionally confusing (e.g. why there is only 1 HexTo convertor while BytesTo has 3/ArrayTo has 5). The design could have been much simpler if you used some sort of "in between" type/format (e.g. byte) and had only 5 functions to convert user input (byte, int, hex ...) into the "in between" format and then another 5 functions to convert "in between" into the user specified "to" format. If there were 10 required formats your factory dictionary in CovertFactory class would have 100 values which is a bit absurd to maintain. With the "in between" format approach you would need just 20 functions to cover all conversions.