3
I have three views
that show the same table with a sequence of leds and information, I have a class service
that makes the business logic to know which led and which color to show, in my bean
responsible for the view I receive this method with the information ready and step to the components of the view
that show the led.
My question is, is it worth (or, is it correct) creating a bean
specific to this table of leds and use it to reference it in the three views
? Taking into account that I will have a code reduction and duplicity.
I believe that the form of implementation and what is done on these screens should be taken into account, but this specific led table always shows the same information resulting from reading external data, it is not changed unless the whole process starts again, with the collection of new data.
I don’t know if there’s a relationship that says view
is for only one bean
.
Exactly, I put this part of the view inside a include already not to be recreating. Idea was really not duplicate code, thanks for the answer.
– Paulo H. Hartmann