File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Any Client implementation without MVC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Any Client implementation without MVC" Watch "Any Client implementation without MVC" New topic
Author

Any Client implementation without MVC

Chiru babu
Greenhorn

Joined: Jan 02, 2003
Posts: 14
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

Joined: Sep 16, 2002
Posts: 89
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

Joined: Sep 16, 2002
Posts: 89
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

Joined: Jan 02, 2003
Posts: 14
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

Joined: Feb 05, 2003
Posts: 14
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

Joined: Jan 08, 2003
Posts: 61
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.
 
Don't get me started about those stupid light bulbs.
 
subject: Any Client implementation without MVC
 
Similar Threads
Where to begin
Spring 3 Test services
Information in "spring mvc " book required
MVC design pattern in the Client Server Architecture?
What exactly makes struts 2 better than Spring