• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding requirement of UrlyBird project.

 
jasn hofy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Experts,
In process of UrlyBird project, in the DB interface class, I see it provides all create, update, delete and so on methods, but in business requirement, it just said user could
It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.
'It must allow the user to book a selected record, updating the database file accordingly.'

And it also said
'Initially, the system will support only the CSRs, although the hope is that this interim step will give them a starting point for migrating the system to the web. '
For CSRs, that means they will only help user book/unbook hotels, so I think we should not provide create and delete functionalities on UI level, but we should implement these on DB layer.

Pl let me know if my understanding is correct or not.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi jasn hofy,

First of all, a warm welcome to CodeRanch!

jasn hofy wrote:For CSRs, that means they will only help user book/unbook hotels, so I think we should not provide create and delete functionalities on UI level, but we should implement these on DB layer.

Pl let me know if my understanding is correct or not.

You are spot-on! My GUI had only two buttons: one to search for hotel rooms and another one to book the selected hotel room.

Hope it helps!
Kind regards,
Roel
 
jasn hofy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:Hi jasn hofy,

First of all, a warm welcome to CodeRanch!

jasn hofy wrote:For CSRs, that means they will only help user book/unbook hotels, so I think we should not provide create and delete functionalities on UI level, but we should implement these on DB layer.

Pl let me know if my understanding is correct or not.

You are spot-on! My GUI had only two buttons: one to search for hotel rooms and another one to book the selected hotel room.

Hope it helps!
Kind regards,
Roel


Thanks a lot for your prompt and useful reply, Roel. really appreciate that.   I have another question about Denny's DVD, in the book, it says
'Since there is only one physical file on disk, it is tempting to consider making the DvdFileAccess class a singleton—coding the class in such a way that only one instance of DvdFileAccess can exist at any given time. However, a lot of work can be performed in
parallel if multiple clients are working on a multiple-CPU system, for example, converting between a DVD value object and the bytes on file, or searching through the data file.'

does that mean different client can't work in parallel on a multiple-CPU system in DvdFileAccess class if it is implemented as singleton? I didn't get that. If only one instance DvdFileAccess exist, different CPU can't call its method at the same time?
 
jasn hofy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any question of Denny's DVD, if we launch the application in alone mode twice, that means two JVMs are running, and in the code , it is using ReentrantLock to solve concurrency issue, I think this only works for server mode. for alone mode,   concurrency issue is still there if we have two users running this application in alone mode on same computer , how to solve this?
 
Paweł Baczyński
Bartender
Posts: 1876
35
Firefox Browser IntelliJ IDE Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jasn hofy wrote:for alone mode,   concurrency issue is still there if we have two users running this application in alone mode on same computer , how to solve this?

I wrote in choices.txt that I don't expect the db file to be opened by multiple instances of the program at the same time and I didn't bother to solve the issue of multiple users opening the file.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jasn hofy wrote:I think this only works for server mode. for alone mode,   concurrency issue is still there if we have two users running this application in alone mode on same computer , how to solve this?

According to my instructions you should not consider this scenario
instructions.html wrote:You may assume that at any moment, at most one program is accessing the database file;
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic