*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Client side design? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Client side design?" Watch "Client side design?" New topic
Author

Client side design?

Horst Dehmer
Greenhorn

Joined: Mar 29, 2002
Posts: 10
Hi there, I'am a new kid on the block :-)
I got some problems in designing my client app. I know something about MVC, JFC and even business logic. But I just can't get it together :-(
My thoughts so far:
  • have something that handels the business logic (like you know searching flights, booking seats, etc.)
  • send some events (button/menu hits) to a central contoller instance (maybe a Singleton)
  • let the table model get its data from somewhere
  • keep coupling low and
  • keep it (nice and) simple


  • But how to get all of this to work together smoothly. I mean which part has to know/create the other parts? Do I have to have one Controller which knows everything? How am I gonna direct the data to the data aware components?
    I'd appreciate any hint or suggestion. I hate this UI stuff.
    Cheers, Horst!
    Bal Sharma
    Ranch Hand

    Joined: Sep 19, 2001
    Posts: 273
    Hello:
    The best appoarch I think to follow baby step. First I had nonfuctional interface. Like, button, labels, textfields, combobox, menus etc. Then I added some event using annoymous class. When I saw mouse clicks are listening events, then I dumpout information from database into a table. After table became functional I combined table on interface. Of course TABLE model was MVC. I rewrote separate class for some the events and left some as it is.
    Do not look as a whole everything, I know it is scary? Try to factor out whole system into small sub parts. Start from one point (small area) of any sub parts. Keep adding on top of it, later on you goanna tell us how to do it. I bet you goanna love UI stuff at the end.
    Good luck. -Bal
    Burk Hufnagel
    Ranch Hand

    Joined: Oct 01, 2001
    Posts: 814
        
        3
    Hmmm.
    I have a suggestion that pretty much flies in the face of most of the posts here. Why not try sketching out your design on a notepad or whiteboard first.
    It seems that many people start by implementing one of the requirements. Then, after getting that piece to work they implement another requirement.
    This works pretty well until, at some point, they look at the next thing to do and they say "Argh! How am I going to do this?"
    Many times they wind up having to refactor their code (if they're lucky), or toss out parts and reimplement things they'd already had working (if they're not).
    I think I read one post by a fellow (not me) who said that he designed it first (took a week or so) then wrote the code (took about another week) and it worked.
    I don't know why this method isn't more popular, but after I download the project from Sun, that's the path I intend to take.
    Burk


    SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
    Horst Dehmer
    Greenhorn

    Joined: Mar 29, 2002
    Posts: 10
    Hi Bal, hi Burk!
    Many thanx for your replies! I like something from each of your inputs: I like to take baby steps persuing a goal and I like to model before coding.
    Think the questions which bother me most are
    1. Should I have some global accessible controller instance on which upon depend (too) many classes or
    2. should I rather register my table/table model with a controller
    Maybe you could give me a more concret insight in your designs
    Thanx again, Horst.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Client side design?
     
    Similar Threads
    BODM / class diagram questions
    Finding formula?
    Webservices and Request/Response
    RMI, business logic
    2-tier architecture ?