Code Sharing Between Desktop and LAMW Project lazarus / 43-Android ---------------------------------------------------------------------- MisterTea · 2023-10-16 03:23 Hello, What is the best practice for sharing code between a desktop and LAMW project? I know the UI would need to be done twice, but I'm OK with that. Is it to create a package for the non-UI code and use that package in separate LAMW and desktop application projects? Are ProjectGroups helpful? What is a good directory structure? LAMW putting the units in a JNI directory messes with my normal directory structure. Thank you! ---------------------------------------------------------------------- Leledumbo · 2023-10-17 06:31 Quote from: MisterTea on October 16, 2023, 05:23:11 amHello, What is the best practice for sharing code between a desktop and LAMW project? I know the UI would need to be done twice, but I'm OK with that. Is it to create a package for the non-UI code and use that package in separate LAMW and desktop application projects? Are ProjectGroups helpful? What is a good directory structure? LAMW putting the units in a JNI directory messes with my normal directory structure. Thank you! Just use the battle proven business logic-UI separation technique. Packages and project groups can be used but is not a necessity. There's no single good directory structure, figure out what you think is more maintainable for you. LAMW by default has its own directory structure with the .lpi NOT on top, so you will have to consider that when designing yours. In my project I just put the whole LAMW created hierarchy in its own directory. ---------------------------------------------------------------------- MisterTea · 2023-10-18 13:49 Quote from: Leledumbo on October 17, 2023, 08:31:39 am... Just use the battle proven business logic-UI separation technique. Packages and project groups can be used but is not a necessity. There's no single good directory structure, figure out what you think is more maintainable for you. LAMW by default has its own directory structure with the .lpi NOT on top, so you will have to consider that when designing yours. In my project I just put the whole LAMW created hierarchy in its own directory. Thank you, Leledumbo! I like the idea of putting the whole LAMW structure into an "android" directory at the base of my project.