I have currently reading Grails and I love it. In order to get hands on experience with Grails I decided to create a web application for some Management System. Ya as you can guess there are plenty of entities that goes into the domain model for my web application. Any how as a novice in Web development, I just thought of creating a homepage first of all.

Now here comes the problem, I sat for an hour and drawn my domain model(for my homepage alone!). After that I had a doubt that whether we have to enter all the entities(i.e my whole web app entities like user, profile, tasks and their relationships etc) in Domain model first and then start coding or draw domain models for each page in our web app and at last connect all the domain models?

Well, what I do is wrong? This is my first project that ever started in my life. Thanks for your advices.

1 Answer 1


A domain model appears in several phases, analysis, design and implementation. From your question, I think that you're talking about including all of your classes (domain model in implementation phase) into your home page.

For example, I think that you want to instantiate all classes, and then use them. Well, then answer is, it depends on your requirements. Consider YouTube for example. In its home page, it needs to deal with tens of entities. Movies, Comments, Users, Subscriptions, Ads, etc. Of course they need to include and instantiate all of these classes while they're building their home page.

However, if your home page is only a welcome page with some news in it, and for it you don't need to do anything with user, authentication, advertisement, etc. then you shouldn't include your whole domain, while you're developing your home page.

  • Not exactly, for example in my home page i want to display the tasks for that particular manager. Now i have two domain class manager and tasks. Now obviously this is enough to create my homepage. But any how at some part of my web development I may need these both or even one. So my question is I have to completely specify all my domain's in the first hand or for each page and later connect them?
    – Ant's
    Aug 30, 2011 at 11:50
  • 1
    Bot works just fine. As long as you work, and things get done one after the other, it's not a problem buddy. I build my domain just when I need them. :) Aug 30, 2011 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.