Why do I need this product? (No offence)

Posts   
 
    
Joep
User
Posts: 6
Joined: 01-Mar-2006
# Posted on: 09-Mar-2006 23:08:14   

Hi all,

This question is not to offend anybody, so please forgive me...

I am new to .Net and OOP (Oracle developers background). I have been looking at the way VS2005 implements data access through the strongly typed datasets and adapters mechanism.

I also haven been reading the Llblgen docs and I have understood that it is build around entities that map to 1 to 1 to database tables.

I could implement the following architecture:

  • Database including triggers and stored procedures for Business Rules
  • Strongly typed datasets
  • GUI using the strongly typed datasets and cathing possible violations thrown by the Business Rules layer in the database

This way GUI building speed is fast since I can use the design time binding.

Why would this be a bad architecture?

Please convince me why I should the Object entity aproach! Thanks,

Joep

pilotboba
User
Posts: 434
Joined: 05-Aug-2005
# Posted on: 10-Mar-2006 00:32:18   

Joep wrote:

Hi all,

This question is not to offend anybody, so please forgive me...

I am new to .Net and OOP (Oracle developers background). I have been looking at the way VS2005 implements data access through the strongly typed datasets and adapters mechanism.

I also haven been reading the Llblgen docs and I have understood that it is build around entities that map to 1 to 1 to database tables.

I could implement the following architecture:

  • Database including triggers and stored procedures for Business Rules
  • Strongly typed datasets
  • GUI using the strongly typed datasets and cathing possible violations thrown by the Business Rules layer in the database

This way GUI building speed is fast since I can use the design time binding.

Why would this be a bad architecture?

Please convince me why I should the Object entity aproach! Thanks,

Joep

Ah, you want to start the age old datasets Vs custom objects argument. This discussion (fight) has been played out on many battlefields, so I won't bite.

However, I suggest you read Rocky Lhotkas book on Business Objects for some compelling arguments.

BOb

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 10-Mar-2006 08:35:46   
Frans Bouma | Lead developer LLBLGen Pro
Joep
User
Posts: 6
Joined: 01-Mar-2006
# Posted on: 10-Mar-2006 09:54:19   

Thanks Otis for pointing me to the article. It really gives a good overview of the three approaches: 1) dataset approach 2) entity approach 3) business object approach

I consider 3) as the way oo-designers want their UML-design be implemented.

But what about the differences between 1) and 2)? A row is called an entity. There is a 1 to 1 mapping, no intelligence in the entities so why all the hassle?

Forgive for asking dumb questions...

Cheers,

Joep

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 10-Mar-2006 10:52:00   

Joep wrote:

Thanks Otis for pointing me to the article. It really gives a good overview of the three approaches: 1) dataset approach 2) entity approach 3) business object approach

I consider 3) as the way oo-designers want their UML-design be implemented.

But what about the differences between 1) and 2)? A row is called an object. There is a 1 to 1 mapping, no intelligence in the entities so why all the hassle?

There is intelligence in the entities. There are roughly 3 types of BL rules: 1) entity field focussed: ID > 0 2) entity focussed: Order.ShippingDate >= Order.OrderDate 3) cross entity focussed: Customer.IsGoldCustomer is true if the customer has ordered n orders in the last m months

rule 1 and 2 are often implemented in entities. 3 is often implemented outside entities, in repositories or manager classes.

Furthermore, there's a difference between an abstract entity relation model and a physical datamodel. If you check out the inheritance description in the concepts section of the LLBLGen pro manual, you'll see that you can perfectly define entities, relations etc. in a relational model, but they are defined differently in a physical datamodel in your database.

Added to that, you can have hierarchies of objects, and you can't have them with tables. 2) doesn't focus on tables, it focusses on entities. 2) doesn't focus on SQL, it focusses on entities and how to manipulate them.

So 2 and 3 are close, 1 and 2 aren't. The main difference between 2 and 3 is that 2 starts with an abstract entity relation model, which is the result of your data analysis, and 3 starts from a class model. Though that's just a choice of implementation; if you look at it closely, both (2 and 3) focuss on the entity, they just define the 'live habitat' of the entity at different places: 2 defines it in the db where an entity in memory is just a mirror and 3) defines it in memory where the entity in the db is just a copy for the case when the box goes down.

Frans Bouma | Lead developer LLBLGen Pro
Joep
User
Posts: 6
Joined: 01-Mar-2006
# Posted on: 10-Mar-2006 12:13:46   

Thanks Otis for your patience.

I think my problem is that I used to generate (Oracle Designer) all the BR's and even the mentioned super- and subtype scenario's. One table with discraminator fields or multi table solution. (see picture for a Designer ER model from which everything can be generated).

I did not mention this to promote Designer but only to show you how am used to think in entities in stead of tables and now I ended up as a spoiled and lazy programmer!!!

Now Oracle is moving away from Designer/Forms towards Java and I am investigating now the .NET world as well as the Java world. From the productivity (and maintainability) point of view, it feels like going 5 steps back instead of 1 ahead. But that is my problem!

I am convinced that you have a great product and you know what you are talking about. I will definately give the v2 a try.

Joep