business-logic

Is business logic subjective? [closed]

半世苍凉 提交于 2019-12-08 20:16:14
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I have a team lead who seems to think that business logic is very subjective, to the point that if my stored procedure has a WHERE ID

business logic in database layer

心已入冬 提交于 2019-12-08 04:46:29
问题 I hate to ask the classic question of "business logic in database vs code" again, but I need some concrete reasons to convince an older team of developers that business logic in code is better, because it's more maintainable, above all else. I used to have a lot of business logic in the DB, because I believed it was the single point of access. Maintenance is easy, if I was the only one doing the changing it. In my experience, the problems came when the projects got larger and complicated.

Business rules - where do they go in OOP?

女生的网名这么多〃 提交于 2019-12-07 15:36:01
问题 I have a class : Schedule. public class Schedule { private int locationNum; private int cost; private String costReason; private Date weekOfChange; private Date dayOfChange; private String changeReason; // and all those getters and setters public Schedule(int locationNum, int cost, String costReason, Date weekOfChange, Date dayOfChange, String changeReason) throws ApplicationException { //change is all or nothing - all attributes are present or none if((weekOfChange!=null && dayOfChange!=null

Is it a bad idea to use a database's primary key as business object identifier?

心不动则不痛 提交于 2019-12-07 07:53:12
问题 I wonder, is it bad or good idea to use auto increment primary key as business entity identifier such as Partner Id or Account Number ? Also, what pitfalls I can face if I'll choose that approach? 回答1: I don't think everyone shares the same opinion, but I do think it is bad practice. Passing ID's to the user as the 'key' is bad in my opinion, for a number of reasons: ID's aren't natural to users. They are not talking about project '1474623', they are talking about project 'ABC'. They aren't

What's the best way to localize non Data Annotation Errors with ASP.NET MVC 3?

落花浮王杯 提交于 2019-12-07 06:09:08
问题 With Data Annotations it's now easy to localize error messages using Resource.resx files like this for example: public class Student { . . . [Required(ErrorMessageResourceName ="Required", ErrorMessageResourceType = typeof(StudentResources))] [StringLength(16)] [Display(Name = "FirstName", ResourceType = typeof(StudentResources))] public string FirstName { get; set; } . . . } Now, let's say I want to check if a Student has already made a Payment for a given month and year: public bool

Business Logic in PHP or MySQL?

我只是一个虾纸丫 提交于 2019-12-06 03:44:24
问题 On a site with a reasonable amount of traffic , would it matter if the application/business logic is written as stored procedures ,triggers and views , instead of inside the PHP code itself? What would be the best way to go keeping scalability in mind. 回答1: I can't provide you statistics, but unless you plan to change PHP for another language in the future, i can say keeping the business logic in PHP is more "scalability friendly". Its always easier and cheaper to solve web server load

When does logic belong in the Business Object/Entity, and when does it belong in a Service?

試著忘記壹切 提交于 2019-12-06 02:15:22
问题 In trying to understand Domain Driven Design I keep returning to a question that I can't seem to definitively answer. How do you determine what logic belongs to a Domain entity, and what logic belongs to a Domain Service? Example: We have an Order class for an online store. This class is an entity and an aggregate root (it contains OrderItems). Public Class Order:IOrder { Private List<IOrderItem> OrderItems Public Order(List<IOrderItem>) { OrderItems = List<IOrderItem> } Public Decimal

What's the best way to localize non Data Annotation Errors with ASP.NET MVC 3?

最后都变了- 提交于 2019-12-05 10:03:32
With Data Annotations it's now easy to localize error messages using Resource.resx files like this for example: public class Student { . . . [Required(ErrorMessageResourceName ="Required", ErrorMessageResourceType = typeof(StudentResources))] [StringLength(16)] [Display(Name = "FirstName",

Is it a bad idea to use a database's primary key as business object identifier?

家住魔仙堡 提交于 2019-12-05 08:56:48
I wonder, is it bad or good idea to use auto increment primary key as business entity identifier such as Partner Id or Account Number ? Also, what pitfalls I can face if I'll choose that approach? I don't think everyone shares the same opinion, but I do think it is bad practice. Passing ID's to the

工具导航Map

JSON相关