Tag Info

New answers tagged

0

I to like DDD a lot, but it is tricky to apply it correctly and consistent. The cause of the difficulties you mention with ORM, OData and WCF is that these frameworks are almost considered part of the Domain, they know everything about the domain and have access to every part of it (data and logic). Most of the time this is not correct. Another problem is ...


2

Your architecture should look something like this: Data source <--> Data source driver <--> CRUD interface <--> Application You'll need one data source driver implementation for each type of data source. The CRUD interface will be the same regardless of data source. Note that you can have more than just CRUD methods. You might want to ...


3

ActiveRecord, the Ruby ORM, relies quite heavily on features of Ruby that are not available in Java, particularly the "method_missing" method and ability to create member variables dynamically. Implementations of Active Record, the pattern, on Java are therefore harder to work with than in Ruby. Typically, you have to accept one of the following ...


1

Yes in general when using Table per Class Inheritance, the derived table has the same primary key as the base table. I personally prefer table per-hierarchy when possible because it doesn't require an extra join. It does create unused columns in the table which might be cumbersome with large hierarchies, but many modern databases support this scenario ...


0

This isn't really a direct answer, but you might consider skipping complex object hierarchies altogether and just do straight SQL in the more complex cases. I wrote a simple ORM called Norm because I didn't want to incur all of the overhead of JPA. The theory is that you do the dead minimum necessary to get data in and out of the database. If your ORM can't ...


0

As far as I can tell, what you are describing can be trivially implemented with an Embeddable class and not need of AOP. @Embeddable class Audit { Timestamp created; String createdBy; String updatedBy; } Then you can simply add your embeddable object within your entities. @Entity class Order { @Embedded Audit audit; } Using inheritance, you ...


1

I tested the ORM for the Chicago Boss framework about a year ago. Instead of using unit tests I mostly used QuickCheck Properties, in which I created random data and saved it to the database, then read it back and made sure that I got the same thing back. It turns out that there was a problem (now fixed) in that if you saved a string that had the substring ...


1

Resist the urge to pre-optimize. You say that for most page views only a 3 out of 12 User entity properties are used. Even if 30 properties were used that's still pretty lightweight. I wouldn't spend too much time worrying about performance losses due to unused data being pushed around. It's much more economical in terms of dev effort (read: time and ...



Top 50 recent answers are included