Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Nicolas Hampton](https://uploads.teamtreehouse.com/production/profile-photos/2932942/micro_Screen_Shot_2019-02-01_at_3.19.46_PM.jpg)
Nicolas Hampton
44,638 Points@BenJakuben: Separation of concerns and the Model View Controller model
While I was following along, I suddenly realized that we are including a lot of private methods in the ui classes that have nothing to do with ui, but with information retrieval. Following the model view controller model, shouldn't we be including these methods into their own separate class so that both the interface and the backend can be updated separately?
3 Answers
![ian sobo](https://secure.gravatar.com/avatar/f89d8b7597b77d3145134bc8be71bf26?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
ian sobo
3,851 PointsWhere exactly are you talking about? In the MainActivity? Are you talking about the JSON data retrieval parts?
![Sam Wilskey](https://secure.gravatar.com/avatar/fc7721844e208194bafcf06eab3e63ce?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Sam Wilskey
3,420 PointsIt would be completely possible to move such as the parseForecastDetails, getHourlyForecast, getDailyForecast, getCurrentDetails, isNetworkAvailable and getForecast to other classes or create their own class to use them. And for some projects that might make sense if you are using these in many different locations so that we don't break DRY principles. But in this case I do not see any harm with leaving them where they are because they are only ever used in MainActivity. If you wanted to add an update button/action to the HourlyForecastActivity and or the DailyForecastActivity then moving those functions to their own class/classes would make more sense because then you would be calling and using them in more then one location.
This is just my opinion and I am not a MVC expert especially in regards to android development.
Hope this helps.
![Mustafa Ogün Öztürk](https://secure.gravatar.com/avatar/7d3709b9acc101435e6d9f18c8c02b61?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Mustafa Ogün Öztürk
3,468 PointsLeaving them where they are is not a big deal since the project is not that big but following solid principles might be a good to teach some more stuff to students.