Sunday, September 30, 2007

DDD : Beginning

Domain Driven Design is a hot topic nowadays. Over the last month I have been diving into Domain Driven Design. I think DDD is a very good method who have been suffering that he/she cannot do real OO with layered arhitectures.

Ok, what is DDD? In the DDD book, it says :
"Domain-driven design is not a technology or a methodology. It is a way of thinking and a set of priorities, aimed at accelerating software projects that have to deal with complicated domains."

"The premise of domain-driven design is two-fold:

  • For most software projects, the primary focus should be on the domain and domain logic; and

  • Complex domain designs should be based on a model."

  • I am going to write few entries about DDD, which are going to include information about DDD , examples and some exeperinces.

    Tuesday, March 20, 2007

    How to get Spring Context in HttpSessionListener

    You can access Spring application context in the HttpSessionListener :


    public void sessionDestroyed(HttpSessionEvent httpSessionEvent) {
    ServletContext servletContext =
    httpSessionEvent.getSession().getServletContext();

    WebApplicationContext appContext=
    (WebApplicationContext) servletContext.
    getAttribute(WebApplicationContext.
    ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);

    //Now we can get xServis from context
    IXServis servis = (IXServis )
    appContext.getBean("xServis");
    //do whatever you like with servis...
    }

    Sunday, February 11, 2007

    Optimization

    "Premature optimization is the root of all evil."
    Donald Knuth

    No need to say more...

    Saturday, February 10, 2007

    UnderstandingThe Domain

    Sysyem metaphor is a very important practice. Understanding domain and implementing model for this domain is key to success and good software. If the developer does not understand the doiman clearly; only algorithm or steps of the process and does not focus on "why" and "how" the process is going on, he/she builds the domain model incomplete, give irrelevant names to the entities...etc. And it becomes very hard to understand the code targetting the domian

    So, th domain should be understood clearly, and the common vocabulary for the domain should be developed and team should be careful about this.