Clean architecture – where to put input validation logic? [closed]

I think many developers do that in Presentation layer, specifically in ViewModel/Presenter/Controller (not in Activity/Fragment/View!). My approach is to put that logic in Domain layer. Why? Is it presentation logic or domain logic? Presentation logic is something you decide “mapping render model”, “format of render model”, “how to render”, “what color, what size, which text”, … Read more

Where to put business logic in spring mvc framework?

@Controller classes serve as C from MVC. Note that the real controller in Spring MVC is DispatcherServlet that will use the specific @Controller class to handle the URL request. @Service classes should serve for your service layer. Here you should put your business logic. @Repository classes should serve for your data access layer. Here you … Read more

ASP.NET MVC Business Logic in Domain Model vs Service Layer

First off, your Model folder in your Asp.Net MVC project should be used for ViewModels. These are the models that your Controllers send to your Views. They should be highly optimized for the View, meaning only the properties needed for the view, and nothing else. What you are taking about, Domain Models, are the same … Read more

Django Rest Framework Business Logic

It is more about design patterns rather than Django Rest Framework. Here are some tips: Providing interfaces using REST should not involve any specific code related to data manipulation or business logic. Using an MVC approach does not mean that you shouldn’t layer your application. You should be able to test your business logic without … Read more

Business Logic: Database or Application Layer

Maintainability of your code is always a big concern when determining where business logic should go. Integrated debugging tools and more powerful IDEs generally make maintaining middle tier code easier than the same code in a stored procedure. Unless there is a real reason otherwise, you should start with business logic in your middle tier/application … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)