Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What do you think about my design ?

 
Tony Bouer
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- Business Delegate (One for each client (Stand alone client / remote))
- RemoteService / RemoteServiceImpl (Optional for remote clients)
- DatabaseRegister (RMI initialization)
- Facade (Business logic like 48 rule here)
- Data (Singleton)
- DataFileAccess (Access to data file)
- URLyBirdDataAccess (URLyBird specific data file methods)
- LockManager (with a static map of locked recs)
- ApplicationCodedNames (static / static final atributes)
- AcommodationTO (Transfer Object)

Thanks,
Tony

[ August 11, 2006: Message edited by: Tony Bouer ]
[ August 11, 2006: Message edited by: Tony Bouer ]
 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some questions??
What is the 48 design??
Can you please post UML class diagrams for your application
 
Tony Bouer
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
48 rule is the business rule for acommodations are avaiable for booking (in case of URLyBird). I don't think I can put diagrams here. Let me know if you have any questions.

Tks,
Tony
 
Petr Hejl
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand why so many people want to use Singleton for Data class. Is that any reason for that (except programmer mistake)? Isn't it too limiting? When some other/new version of application will have to use two different database files why it shouldn't be possible?

It looks to me like having (for example) RandomAccessFile as Singleton. Yes you can open same file with two instance of RandomAccessFile and if you will use it wrong way, your data will be corrupted. But it is not reason to have it a Singleton, is it?
 
Zhixiong Pan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to share my design and welcome your suggestions.
db package:
Data
LockManager
RecordInfo
FieldInfo
business package:
HotelInterface
HotelBusiness(for local)
HotelRemote(for rmi which will create an instance of HotelBusiness)
HotelBusinessFactory
ServerRun(application to start server)
client package:
RoomModel(extends javax.swing.table.AbstractTableModel)
ClientFrame
MainRun(application to start GUI)

Ask a quetion: how do you guys realize that one server has only one Data object? My way is make a static Data object as a member of HotelBusiness and
in HotelBusiness constructor check if that member variable == null. But one
experienced developer recommended me abandon such bad design. How about yours?

Best regards to all ranchers.
 
Sam Codean
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
using multiple objects could cause the data file to be in an inconsistent state therefore when opening the Random Access File i used the mode "rws"
This one states that it will make it synchronously write it to the storage device. Thus the file corruption should be handled by the File system making it less head ache for the programer
Please let me know if my approach is correct
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic