P
P
postgree2016-07-13 17:30:11
PHP
postgree, 2016-07-13 17:30:11

Changing the behavior of models (returning nullobject) depending on the context. Is it allowed?

The project is big. Nesting of models easily reaches 5-8 levels. About 3,500 views, written randomly. Now it is necessary to revise and refactor about 800 views. There was an idea to stick a crutch on the model getter so that at the start of the renderer of the view, switch to the nullobject return mode (with a link to the metadata inside) instead of empty relations, so as not to check all levels. Tons of written shit code in business logic can be shoveled angrily, but it is necessary to work with views. There is still a problem in the absence of dedicated layout designers (nonsense and whim of the leadership). Accordingly, an agreement is needed in the team (now it’s easy to agree), but then you don’t want to leave the customer to be torn apart by other teams and spoil your karma with memories.
Accordingly, a mini-survey. Yes, no, and some arguments. If you agree with the existing arguments in the answer, just comment on the answer.
Z.Y. Or still create a topic?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question