modeling

Why can't I model my domain using ERD?

Hi, I am fairly new to this discussion but I HAVE to ask this question even at the risk of sounding 'ignorant'. Why is it that we now stress so much on 'DDD'. The more I look into 'DDD' the more complex it seems to make my application. Whereas modeling my domain with the database helps keep my application consistent across layers. Then ...

How to model "products" in an online store application

I'm building an online store to sell products like "Green Extra-large, T-shirts". I.e., the same shirt can have many sizes / colors, different combination can be sold out, different combination might have different prices, etc. My question is how I should model these products in my Rails application (or really how to do it in any applic...

Modeling Classes Based on Table Designs

Is this how one would normally design classes? One class = 1 Table. How about tables that contain a foreign key to another table? Suppose I have the following: PersonTable --------------- person_id name PersonMapTable --------------- map_id type_id (fk) person_id PersonTypeTable ------------------- type_id description parent_type_id ...

How to give an order a shipping address and a billing address in rails

In my online store, each order is associated with a shipping address and a billing address (they can be the same, of course). This is my first attempt to model this: Class Order belongs_to :billing_address, :class => "Address" belongs_to :shipping_address, :class => "Address" This works pretty well, but now the form helpers don't ...

Should I use formal methods on my software project?

Our client wants us to build a web-based, rich internet application for gathering software requirements. Basically it's a web-based case tool that follows a specific process for getting requirements from stakeholders. I'm the project manager and we're still in the early phases of the project. I've been thinking about using formal meth...

Book Store Database Design

Hi, I'm going to build a book store in which we have 3 entities(classes): Seller,Buyer,Book. I've designed the database as the following details: - Both buyer and seller can buy/sell one or more books respectively. - A buyer needs a seller account if he/she wants to sell a book. - Buyers will offer their price and seller would like to se...

Tracing Designs - Screen to Database Traceability

This is vaguely related to: Should I design the application or model (database) first? Design from the database first through to UI or t’other way round? But my question is more about modeling and artifacts and less about the right way to do design. I'm trying to figure out what sort of design artifact would best enunciate the link ...

What's the difference between identifying and non-identifying relationships?

I haven't been able to fully grasp the differences. Can you describe both concepts and use real world examples? ...

Declarative derived properties for mutable models in Java

Is there a framework for synchronizing properties of POJOs? For example, I want to express (in some high-level, declarative form) that foo.text = bar.text + baz.text or foo.y = (max(bars, y)).y without having to register property change, element add and remove listeners on values and (especially) collections, which are repetitive and err...

Should I use log4net directly in my domain model objects?

I'm wondering if it's bad practice to use log4net directly on my domain object... I'll be using ELMAH for my exceptions on the ASP.NET MVC application side, but for some informational purposes I'd like to log some data about the domain model itself. Given the following domain object: public class Buyer { private int _ID; pub...

How do you model a simple composition relationship

Can someone help me understand how best to model a composition relationship? If for instance I have a student whom can have many schedules, I would create roughly: class Student { prop long Pk { get; set; } prop string Name { get; set; } prop List<Schedule> Schedules { get; set; } } class Schedule { prop string Semester { get;...

Domain modeling hints - Products / sales

I'm currently modeling some domain classes for storing information about products, resellers and payments. Some products can be a typical one-time-payment deal like someone buying an hard drive. Other products may include a service deal with different discounts and payment intervals. The model should cope with changing product prices, ...

IOC - Injection of multiple dependancies.

Consider the below: public class DependencyA {} public class DependencyB {} public class DependencyC {} public class DependencyD {} public class Service1 { public Service1(DependencyA a, DependencyB b, DependencyC c, DependencyD d) { ... } } public class Service2 { public Service2(DependencyA a, DependencyB b, DependencyC c, De...

Is there the substitute good tool of visio?

I made UML or a figure of server constitution with Visio so far. However, Visio was not usable by the circumstances of adult. Therefore I want to describe UML or a figure of server constitution by some other methods, but will there be anything, the recommended tool? I ask with a free thing. ...

Modeling question: Lists that depends on each other, but can be specialized entries?

Hi all Trust me, I've put a lot of thought into this problem before asking here, and I think I got a solution, but I'd like to see what you guys can come up with before settling for my own :) SCENARIO: In the domain we got 3 entities: A treatment, a beautyshop and an employee. A beautyshop can hire 0 to many employees. Now, a beautysa...

Does anyone know good Object Constraint Language (OCL) tutorial?

I came across couple of questions about OCL expressions. After reading some university slides and googling it I still cannot properly understand it. I wonder if any of you guys know any good resources that I should read to understand this stuff. Constraints that bother me: Everybody working in the department has the same manager. N...

What is meant by open and closed layered architectures?

I know it probably sounds like very trivial question but I couldn't find any resources on the internet. Could you please tell me what are open and closed layered architectures and why open layered architecture is apparently more difficult to maintin? Are there any disadvantages of using closed/open layered architectures? ...

Good strategies for reusing "entities" in multiple applications?

Let's say you've got two applications for working with "Customers"... one might be an account management application, the other might be a support / helpdesk application. Both applications use the same Customer entities... by that I mean they both hit the same datasource to manage Customers. At a basic level, a Customer is exactly the ...

What is the industry standard database modeling language?

Before anyone votes to close this as a dupe, know that every question I found so far was a question about specific programs that are good for database modeling. My question is what is the industry standard language (if there is one) for modeling a relational database? I know UML is very popular in general, especially for OOP modeling, ...

Usage of Exceptions

In a Spring application, my point of view is that each domain model which in fact is a POJO, should encapsulate all the validation logic in itself. Now whenever there is an update or insertion, they should throw proper exceptions that are modeled after the business process like CustomerNotFound AlreadySold, CannotAllowReturnOfExpiredItem...