This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Any Client implementation without MVC

 
Chiru babu
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my client implmentation i'm not using MVC.
I just wonder if i'm the only one who went in this way.
if some had followed this approach, plse let us know about your grade & marking.
 
Bernhard Woditschka
Ranch Hand
Posts: 89
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
after reading tons of posts and refactoring my GUI over and over again I think MVC is a must - and after I did it the design and the code 'feels' a lot cleaner.
The hadest thing to understand for me was that MVC exists on the Swing Component level as well as on the application level which is the one i've finally implemented:
Gui - Parses the commandline parameters and starts the GUI.

View (is a JFrame) - Defines the layout and look of the Reservation Application.
add toolbar
add JCombobox
...
Controller Defines the behaviour of the Reservation Application
view.button1.addActionlistener(this);
...
selectConnection()
handleError()
I hope this helps,
Bern
 
Bernhard Woditschka
Ranch Hand
Posts: 89
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Off course not to forget the Model it contains all busines models like get airportsan book flight. All it needs is a reference to a Data class (i.e. a table).
So it can be used by another View-Controller combination like HTML.
Bern
 
Chiru babu
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bernhard Woditschka:
Off course not to forget the Model it contains all busines models like get airportsan book flight. All it needs is a reference to a Data class (i.e. a table).
So it can be used by another View-Controller combination like HTML.
Bern

Thanks Bern,
its been a very good explanitation from you,
i got a good picture of MVC with Swing components.
Thanks,
babu
 
Mike Skinner
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have just uploaded the assignment and will take the test this afternoon. I didn't use MVC for my client either. Can say i kind of added the controller and model to one class taking care of listeners/book/search etc. Ofcourse i had a separate GUI class. Only place MVC is used is for the JTable...
Don't know if this is the way to do it(will se in a week...) but it works fine and it felt unnessesary to breake down my desing just do fit in in to the MVC pattern.
Would get very supprised if i fail just because I didn't use the MVC pattern!!
Has someone passed withour implementing MVC???
 
Brian Blignaut
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have implemented it in the following way
JFrame - Displays data, and is the listener for all actions.
DataFacade - Provides methods bookSeats, connect and seach.
Connection - Provides methods of the data class.
Not sure if this is MVC (don't it strictly is) but I think that this is by far clean enough.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic