2

I'm trying to completely overhaul an app I wrote a while back that plays audio, and I'm learning how the MVP pattern of organization works, but I'm not sure how/where an audio playback service would fit in this design pattern, or how I could break out of this pattern without disrupting the benefits that come with it.

I'm working off of these tutorials/examples to get my head around the topic: first example|second example

I realize that the MVP pattern is not a complete system architecture, but I'm struggling to figure out how I can continue with the good practices set out in this patter with things like an audio play service. Or a download service, sense neither of those fall strictly under what I would think of data or presentation. If someone could point me in the right direction on this I would be very grateful.

asked May 16, 2015 at 0:25
4
  • Why wouldn't they be data? I mean, that's what they really are, right? Commented May 16, 2015 at 2:11
  • @RubberDuck I'm not really sure that it would fall under data. It has a UI component in it that it manages. But it's hard to say. At this point the whole MVP design pattern is still formulating in my head in terms of android. Commented May 18, 2015 at 15:44
  • Oh. I didn't realize the audio service had a UI component. Commented May 18, 2015 at 15:46
  • @RubberDuck it's just one of those notification controllers, so a user can play when the phone is locked. Commented May 18, 2015 at 16:01

1 Answer 1

1

The purpose of the MV* patterns is primarily to provide separation of concerns between the UI and the rest of the system. Your Audio Player Service, if it also includes the player, uses the entire pattern. If it's just streaming data, it's the model.

answered May 16, 2015 at 3:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.