business-objects

Most effective way to reflect inheritance relationship in DAOs?

a 夏天 提交于 2019-12-09 13:51:21
问题 Working on a business application using MVC structure and a Business Object / DAO architecture. For any normal business object, the CRUD functions are fairly straightforward. But what's the best way to handle a parent-child relationship like "Customer is a User"? I know that the following classes are involved: User, UserDAO, Customer, CustomerDAO The Customer class can inherit from the User just fine, but how do you best reflect this in the DAO CRUD functions? 回答1: Martin Fowler has

How to deal with large objects?

≯℡__Kan透↙ 提交于 2019-12-08 05:23:16
问题 I have 5 types of objects: place info (14 properties),owner company info (5 properties), picture, ratings (stores multiple vote results), comments. All those 5 objects will gather to make one object (Place) which will have all the properties and information about all the Place's info, pictures, comments, etc What I'm trying to achieve is to have a page that displays the place object and all it's properties. another issue, if I want to display the Owner Companies' profiles I'll have object for

Business Object DAL design [closed]

早过忘川 提交于 2019-12-05 00:49:05
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 12 months ago . When designing business objects I have tried several different methods of writing the data access layer. Some have worked out better than others but I have always felt there must be a "better" way. I would really just like to see the different ways people have handled the

What is a DTO and BO? What is the difference?

匆匆过客 提交于 2019-12-05 00:36:59
I know DTO is a data transfer object and a BO is a business object. But, what does it actually mean? When should I choose one over the other? From, what I understand DTO is just used to transfer data and doesn't have business logic. Does this mean that a DTO doesn't have any method only properties(getter and setter)? But, it still has properties of a BO. Can someone please explain? Thanks. DTO is used to transfer data between layers/tiers. For such purpose it doesn't need any methos and sometimes it even should not have any methods - for example when DTO is exposed over web service. Business

c# combobox binding to list of objects

筅森魡賤 提交于 2019-12-04 02:53:52
问题 Quick question, is it possible to bind a combobox to a list of objects, but have the selectedvalue property point to the object, not a property of the object. I only ask because we have some Business Objects which have references to other objects - such as a 'Year' object. That year object may need to be switched out for another year object. Only solution I can come up with is to have another class with a single property, in this case pointing to a year object. then bind the combobox to a

Business Object DAL design [closed]

北城余情 提交于 2019-12-03 15:21:29
Closed . This question is opinion-based. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it can be answered with facts and citations by editing this post . Closed 11 months ago . When designing business objects I have tried several different methods of writing the data access layer. Some have worked out better than others but I have always felt there must be a "better" way. I would really just like to see the different ways people have handled the DAL in different situations and their opinon of how the technique worked or didn't work

How to track changes to business objects?

心已入冬 提交于 2019-12-03 09:59:07
问题 I get the concept of creating a business object or entity to represent something like a Person. I can then serialize the Person using a DTO and send it down to the client. If the client changes the object, it can have an IsDirty flag on there so when it gets sent back to the server I know to update it. But what if I have an Order object? This has the main header informaton, customer, supplier, required date, etc. Then it has OrderItems which is a List< OrderItem>, being the items to be

How to Design a generic business entity and still be OO?

假装没事ソ 提交于 2019-12-03 05:51:29
问题 I am working on a packaged product that is supposed to cater to multiple clients with varying requirements (to a certain degree) and as such should be built in a manner to be flexible enough to be customizable by each specific client. The kind of customization we are talking about here is that different client's may have differing attributes for some of the key business objects. Also, they could have differing business logic tied in with their additional attributes as well As an very

How to Design a generic business entity and still be OO?

我的未来我决定 提交于 2019-12-02 20:31:10
I am working on a packaged product that is supposed to cater to multiple clients with varying requirements (to a certain degree) and as such should be built in a manner to be flexible enough to be customizable by each specific client. The kind of customization we are talking about here is that different client's may have differing attributes for some of the key business objects. Also, they could have differing business logic tied in with their additional attributes as well As an very simplistic example: Consider "Automobile" to be a business entity in the system and as such has 4 key

Escaping SQL Strings in Java

十年热恋 提交于 2019-12-01 17:21:27
Background: I am currently developing a Java front end for an Enterprise CMS database (Business Objects). At the moment, I am building a feature to allow the user to build a custom database query. I have already implemented measures to ensure the user is only able to select using a subset of the available columns and operators that have been approved for user access (eg. SI_EMAIL_ADDRESS can be selected while more powerful fields like SI_CUID cannot be). So far things have been going on swimmingly, but it is now time to secure this feature against potential SQL injection attacks. The Question: