luna-rs / luna

A scalable and efficient Runescape server targeting revision #377
MIT License
153 stars 41 forks source link

Discussion: Cohesive package naming conventions #176

Open notjuanortiz opened 4 years ago

notjuanortiz commented 4 years ago

I would like to discuss moving towards a more cohesive package naming convention for the entire project.

There's typically two schools of thought on this topic. The first being package by layer. Naming your packages according to their function architecturally rather than their identity according to the business domain. Our packages would be horizontal slices rather than vertical. Example(s):

And the second being package by feature. Naming your packages according to their business domain identity. Doing so, we'd be putting every class that has to do with that vertical slice of functionality into that package. Example(s):

The current state of the project is a culmination of both approaches which makes deciding which package to add new features to a bit confusing. Where would I add a persistence implementation for shops when the business logic for shop is in io.luna.game.shop and all persistence implementations are in io.luna.game.mob.persistence? It would be great if we could pick a single approach, making contributions a bit more intuitive.

notjuanortiz commented 4 years ago

This is somewhat related to #56 and #74.