Best Way to Store States and Abbreviations

Hello,

Just started my first app and I created a module for my Person and Company entities for "Contact Management"  

I want to create a static entity for a list of states and their abbreviations.  As I could see this being reused in other places I created a Service module for LIB_CoreServices and placed the static entity in there.

It works fine and from my business logic model I have added the library as a dependency and put StateID in both my Person and Company entities.  So far so good.

Now I am working on the UI side and I created UI_ContactManagement with a tablerecords displaying all of the people in my database and a PersonDetail form to enter or edit a new person.  To be able to select the state I have to reference not only the business logic module but also my Library module.


I would think that is no good as I am depending on the library module from both the UI and business logic (thinking 4 layer canvas from my tutorials) so that feels like a double dependency unless I am misunderstanding something.


Thoughts on the best way to do this?  Appreciate the help for a newbie!

Hi Ivan,

What you're doing is perfectly fine. Library modules can be used anywhere. It's not a "double dependency", it's a single dependency for each module.

Kilian Hekhuis wrote:

Hi Ivan,

What you're doing is perfectly fine. Library modules can be used anywhere. It's not a "double dependency", it's a single dependency for each module.


Awesome, thanks. Just trying to get started with good habits :)

Glad to hear that :). Happy coding!