aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes What If i don't use any Design Patterns? 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 "What If i don Watch "What If i don New topic
Author

What If i don't use any Design Patterns?

Sri Addanki
Ranch Hand

Joined: Apr 27, 2001
Posts: 195
Hi,
What if i don't use any design patterns?
Actually i am all done with my assignment. I've been doing this since past 3 months but now i realised that i need to use patterns.
Can someone please tell me, will i fail if i submit my assignment as it is? And how should i justify this in my design.txt document?
Mark, can u please help me on this.
Sri Addanki
Ranch Hand

Joined: Apr 27, 2001
Posts: 195
Hey Mark, can u please help me...
Thanks,
sri
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Well I am probalby pretty sure that even though you didn't specifically set out and used a "design pattern" you probably did anyway without knowing it.
The best way to answer your questions is to look at your design. Does it work? How did you handle clients uniqueness for locking on the server side. How did you handle the local versus remote mode?
These are where you will find design patterns, and a solution to those problems is a design pattern.
the definition of a design pattern, is basically a common used solution to a problem. Such that what we used before to solve this problem can be used all the time(well almost all the time).
So in a round about way. No you don't need design patterns to pass, but in order to get this app to work you probably already had them in there anyway.
Hope that helps
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
BJ Grau
Ranch Hand

Joined: Jul 10, 2001
Posts: 234
Sri -
Why don't you share your design and if there are any standard patterns in it folks will point them out to you or possibly tell you how to refactor your code.

-BJ
Sri Addanki
Ranch Hand

Joined: Apr 27, 2001
Posts: 195
Hey Mark and BJ,
Thankyou so much!!!
Mark, as usual you answer inspires me!!
Thanks for encouraging....
I am sorry for getting back to you so late. bcos of the long weekend, i couldn't get chance to check the site.
I'll let you know my design choice asap after the weekend, so that you people can help me out with the code and patterns.
Thanks onceagain,
Have a great weekend,
sri.
Sri Addanki
Ranch Hand

Joined: Apr 27, 2001
Posts: 195
Hey Mark and BJ,
Here's the design choices i've implemented.
Please let me know where i can use the design patterns and what patterns to be used.....
Does it work? (the application?)
Yes, my application is working just fine.
How did you handle clients uniqueness for locking on the server side. How did you handle the local versus remote mode?
1.I�ve extended Data Class. ExtendedData Class has criteriaFind, lock and unlock methods. Didn't modify lock/unlock signature.
2.Locking mechamism implemented was in-memory and it uses hashtables to capture the records locked. If the argument is -1, lock the whole database. This method blocks until the lock succeeds. No timeouts are defined for this. I use wait/notify Synchronized(this) for lock/unlock.
3.For Gui used GridBag Layout.
4.Extended AbstractTableModel to feed JTable, getValueAt method tells what data to be used for tabledata. And the fireTableCellUpdated method for setting setValueAt.
5.RMIDataServer extends UnicastRemoteObject implements RemoteDataInterface, which inturn defines the Remote(RMI) interface for the Data server.
6.There�s a class that provides Client-side networking functionality for RMI access to the Data Server. It can be invoked in two modes, Remote and Local. Local invocation involves reading the database file name directly and instantiating the DataServer within the same JVM as the Client code.
7. Used a menubar and toolbar for GUI
and please let me know the patterns i need to use,
Thanks,
Sri
Sri Addanki
Ranch Hand

Joined: Apr 27, 2001
Posts: 195
Please Help Me...
Sri Addanki
Ranch Hand

Joined: Apr 27, 2001
Posts: 195
Hi,
My other question was abt having how many Main() classes in the application...
and unfortunately it was moved to Java(beginner's)forum.
I know an application can have any number of main classes, but thats not what i meant.
Based on my Understanding of programming FOR ANY APPLICATION to be good, there can be only ONE main class, or a SINGLE executable class.
And there should be ONLY ONE class through which you can execute or run the application. Then only that application is said to be designed well. right?!
But i had 2 main classes in my application. So i wanted to find out if i was the only one to do that or is someone else doing like me?
Anyway, thanks for the answer,
sri
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4462
    
    6

Sri,
I reopened your question about main(). See my last reply and continue from there. Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What If i don't use any Design Patterns?