• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Regarding requirement of UrlyBird project.

 
Greenhorn
Posts: 14
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 14
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 14
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 2236
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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;

 
Ranch Hand
Posts: 531
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Jason,

This means most nearly that you should abstract your datasource-access functionality in such a way as to make it easily extensible whether you access a file on the filesystem or a database. You don't have to implement database access, but you should make it easy to be able to, should one want to.

Why is this forum so inactive?

With best regards,

Anton.
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Anton Golovin wrote:Why is this forum so inactive?


Because of the mandatory (very expensive) course requirement and because this exam will soon be retired.
 
jasn hofy
Greenhorn
Posts: 14
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for all your explanations, those did resolve my questions. I was busy with project, didn't got a chance to work on this certification in the passed several month. Will continue on this.
 
They gave me pumpkin ice cream. It was not pumpkin pie ice cream. Wiping my tongue on this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic