Questions tagged [design-decisions]

general tips and guidelines for designing better applications, regarding APIs, Architecture and internal structures.

93 questions
0
votes
2 answers

MVC - Datasource container in the view

In clean MVC, I would gather the data from the database and pass it over to the view to be rendered. Even if the view logic chooses not to render some elements. Which raises the following question: Is is clean to prepare a container with all the…
Flavius
  • 13,566
  • 13
  • 80
  • 126
-1
votes
1 answer

How to implement numerous conditions in java other than switch case and if/else?

Need to implement a requirement where the flow of code will be decided based on a lot of cases if implemented using switch case, OR a lot of if/else ! Sample code to be implemented: if(flag='1') Invoke a new route else If(flag='2') Invoke…
Myra
  • 25
  • 1
  • 1
  • 6
-1
votes
7 answers

In Java, why are class members accessible to members of the same package by default?

I understand that unlike in C++, if I don't specify "public" or "private" when declaring a data member, it can be accessed from anywhere in the same package. The designers of the Java language could have chosen the opposite, but instead they…
an00b
  • 11,338
  • 13
  • 64
  • 101
1 2 3 4 5 6
7