Well I do know what the definitions are for the two different logic, and each applies to a different software layer(domain/business and application layer). Nonetheless, real life is not as simple as in theory, its sometimes quite difficult to figure out what methods/behaviors should belong to which layer, at least the difference is not as evident as between business logic and presentation logic, which you can easily identify.
Considering a User Authentification system? Lets say I have a domain model called User for the domain/business layer(it may come with a mapper or DAO, but do not worry about this for now), and a controller object called UserController or RegistrationController/LoginController. What behaviors are domain-specific, and what are application-specific? Anyone mind elaborating with this example? Id appreciate this very much, as it will help me better identify what are domain responsibilities and what are application logic for more complex system.
What helps me sometimes is to pretend that I'm writing code for more than just a web app, that I'm also building a CLI app. I ask myself if the code I'm writing would be just as applicable to the CLI as to the web. If yes, then it's part of the domain logic. If no, then it's specific to the web application.
Wow this is kinda tough for me, I know what CLI is but never developed any application for CLI so I dont know how to judge whether the logic is applicable for CLI at all... sigh Thanks for your answer though.
What are you finding tough? Have you used a linux shell before? On linux you can accomplish pretty much anything in the shell you can accomplish on the graphical desktop. If you've only used windows I understand it might be confusing.
If the same task can be accomplished in a linux shell as on a graphical desktop then the task is most likely domain logic.
Nope, I have essentially zero knowledge about Linux Shell(have to say for my web application development its not quite useful to me anyway), although I did use shell at rare occasions on my webhost to execute some commands I mostly got through them with the aid of the support staff of my webhost. I mostly use Windows, while I do have a Mac for developing ios applications at times.
This topic is now closed. New replies are no longer allowed.