Skip to main content
John Go-Soco's user avatar
John Go-Soco's user avatar
John Go-Soco's user avatar
John Go-Soco
  • Member for 11 years, 5 months
  • Last seen this week
comment
How to deal with public vs private version of same resource in a RESTFul API?
This would be the approach I would use as I think it's just cleaner if endpoint return values are always consistent, regardless of who the user is (EDIT - and of course, the user's permissions affect what endpoint they can access).
awarded
Loading…
awarded
Loading…
awarded
comment
How to do MVC in C++
Indeed. In Pragmatic Programmer, Hunt and Thomas describe a Controller as: A way to control the view and provide the model with new data. It publishes events to both the model and the view.
comment
How to do MVC in C++
Reinforcing your point about there not being a consensus on what exactly is MVC, the Wikipedia link you posted states that the Controller is one-way only (Accepts input and converts it to commands for the model or view), and not bidirectional like you state in your answer - that sounds more like an Adapter or ViewModel.
comment
What is the optimal algorithm for estimating number of lines of text in a file?
I would make an additional point: the type of average (mean, median or mode) you would use depends very much on the file you have.
comment
Clean Code: long names instead of comments
I think you'll be hard-pressed to find a programmer who would think Gfx stands for "global effects".
awarded
answered
Loading…
awarded
comment
Need Good OOP Design For World and Countries Problem
You could make it so that a Country owns a set of CountryRelations, so you don't a FirstCountry/SecondCountry property - you just need one for the TargetCountry. (EDIT - though if it were a database table, then yes that makes sense)
comment
Suggestions for documenting namespaces with Doxygen
@BobDalgleish True. I meant "purposeless" purely in terms of code compilation and not for anyone reading it. Its presence, though beneficial in terms of documentation, does also contribute to the number of relevant header files and therefore to the "noise" which the developer needs to get their head around.
Loading…
Loading…
awarded
answered
Loading…