DEV Community

Package by feature vs. feature by module

Ricardo Costeira on November 25, 2018

Hi everyone, Lately I've been wanting to start a new personal Android project, and after attending a GDG DevFest event I finally found the inspir...
Collapse
 
johnson_cor profile image
Corey Johnson

I think I heard somewhere that it's recommended to divide features into modules if you're planning on utilizing instant apps, however I'm not sure if that's still relevant.

As far as packaging by feature or feature by module: I've always tried to keep data and business logic in it's own module while housing the rest of it in an app module.

If you do end up packaging by module I'd be eager to see how you approach it!

Collapse
 
rcosteira79 profile image
Ricardo Costeira

Didn't even thought about instant apps. That makes sense!

As for your approach, I've seen it really shine in a company where I used to work, where there are a bunch of products that share parts of the business logic for user management and permission handling. It's was rather complex logic, so having everything in the same place really helped a lot.

Sure, I'll try to write about it if I do go forward with the idea :) Thank you for answering!