hall_of_famer — 2013-12-04T06:33:37-05:00 — #1
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.
jeff_mott — 2013-12-04T10:07:46-05:00 — #2
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.
hall_of_famer — 2013-12-04T10:13:41-05:00 — #3
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.
kiwiheretic — 2013-12-04T23:50:08-05:00 — #4
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.
hall_of_famer — 2013-12-05T00:36:21-05:00 — #5
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.
system — 2014-10-08T01:15:57-04:00 — #6
This topic is now closed. New replies are no longer allowed.