Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Phil Harron

Greenhorn
+ Follow
since Jun 21, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Phil Harron

Hi guys, I'm just doing my Javadoc now for the UrlyBird 1.3.1 and was wondering should I write javadoc for every private method and field for each class?

The Spec says ...javadoc must be used for each element of the public interface..

Thanks
Phil
I agree with your comments Anthony - much appreciated. One point though - surely this is the way real world applications might work? I know they would have more processing power and bandwidth, but how much bandwidth would it take to send an event object down the wire (only holding the recNo of the booking to refresh) to the client. What about the example in the SCJD book, if it had 200 clients who were all doing an update/refresh constantly . I might just try to do this anyway and see how it copes/what happens in both applications.

Do you think then its enough to leave the Server/Gui as is then and when the Client does something it does a refresh?

Thanks again
Phil
Hi Ranchers,

I have implemented RMI in my UrlyBird project, and when a client connects they get a list of Booking objects and these are displayed in the GUI. (similar to the implementation used in the SCJD Exam book). These booking objects are a COPY of the booking objects on the server (The Booking objects implement Serializable)

What I would like to do though, is when a client updates a record is for the server to send out an Event object (or something similar) to all the clients connected, telling them that Record number nn has been updated - get a fresh copy of this record and redisplay on the GUI. Also when a Booking is locked, for the record on screen to be greyed out (for example)

(The implementation in the SCJD book waits for each client to do something, and then goes to the server to get a list of ALL records).

I've looked through the posts on this forum, but could'nt find anything relating to my query.

Can anyone help me out?

Regards
Phil
[ June 23, 2004: Message edited by: Phil Harron ]
Thanks Omar for your thoughts. I'll have a think about your second option. I think you're correct in saying that I should keep the server side as general as possible.

Best
Phil
Hello,

When doing a search from the GUI my project states

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.



As the find method (from the Sun interface) is implemented in a slightly different way to the requirements outlined in the GUI, do you think it would suffice to ask the user to surround their search text in say, square brackets, (and of coures make sure that this in the user help section)? So, for instance if they wanted all Hotels in Smallville they would have to type [Smallville].

This would fulfill the requirements of the GUI and the implementation of the Sun interface.

Any comments would be appreciated.

Regards
Phil
Of course,

Thanks very much Max

Regards
Phil
Hi Derik,

There are a lot of threads already on this subject. One idea seems to be creating a new interface, with exactly matches the methods in DBMain interface provided by Sun, and changing the method signatures to throw IO/Remote Exception. have a look here -here
Hi,

what is the parameter "recNo"? as you know, in databse file db-1x2.db here have not a field named recNo!



You will have to create this number in the code and store it as part of each record. It could be an incremental number starting from 0, for instance.

2. in Database schema,I can't fully understand the certain intention of below two fields:
First is "Date available", Sun's description is:
"The single night to which this record relates, format is yyyy/mm/dd"
Whether it express the time which the room is occupied by customer? .[\QUOTE]

It does'nt express the time. I think you can assume (make sure you document it) that the CSR's will know that they cannot put in a date more than 48hrs in the future - maybe you can warn them but let them put a date in anyway.

Second is "Customer holding this record",Sun's description is:
" The id value (an 8 digit number) of the customer who has booked this. Note that for this application, you should assume that customers and CSRs know their customer ids. The system you are writing does not interact with these numbers, rather it simply records them. If this field is all blanks, the record is available for sale"

Whether I can fill with a random 8 digit number?
and I feel this field is useless,as it should not be used in application



This is the only way that the CSR's will know that the record is available for booking is it not? If they could'nt identify which customer booked the room then it would ne of no use, and the CSR's would never know if it was available or not. This coupled with the booking date provides enough info for the CSR's to see what's going on.

Why would you want to generate a random number, just let the CSR's put it in. You can validate to make sure its an 8 digit number.

Hope this helps?

[ June 08, 2004: Message edited by: Phil Harron ]
[ June 08, 2004: Message edited by: Phil Harron ]

In Max's book it states "We are assuming that there can be several instances of DVDDatabase class and that they will need a mechanism for coordination" i.e. multiple instances of DVDDatabase, one per Client.

My question is this :

When using RMI am I right in thinking that only one instance of DVDDatabase will be created. I know (well I believe) that RMI will pass out a proxy of this class, but it is still only ever one instance of DVDDatabase Why, then does it say in the book that there could be many instances of DVD Database.

I'm sure the book is correct (great help by the way), but could someone help me clear up this issue of when more than one instance of a DVDDatabase would be created - please?

Thanks very much
Phil
[ June 08, 2004: Message edited by: Phil Harron ]
Thanks Denis, I'll take your advice..
Thanks Denis,

As I understand, you use socket networking? For RMI such object should be bound to registry before any client connects.



I'm going to use RMI - so you mean the Data class would need to be bound?

Sure, there must be only one such object if you use sockets. How do you lock records by the way?



I'm using a private static vector to hold the record Id's of locked bookings.

Thanks
Phil
Hi guys,

I was wondering about a design solution related to reading in the data. I'm working on Urlybird version 1.3.1

What I was thinking of doing was this :

I have a Data class and a DataManager class. The DataManager class reads the data in from the file getting header/schema info etc. It also reads in each record and creates an object called Booking for each, setting the location, name, size, rate etc. The DataManager holds these Bookings in a thread safe List of some sort.

When a new client connects the server doles out the Bookings held in the list. Each GUI will have its own Data class, but I thought of making the DataManager a singleton and let it deal with reading/writing and maintaining the list of Bookings. The DataManager will be created when the first client connects.

Can anyone tell me if they see anything wrong in this approach??

Thanks
Phil
Thanks Jon,

Sorry but can you clear one thing up for me...

You would then need to declare taht the Sun supplied interface is a subinterface of this new interface.



What exactly do you mean by declaring the Sun supplied interface is a subinterface ?

Thanks
Phil
Thanks Jon,

Sorry but can you clear one thing up for me...

You would then need to declare taht the Sun supplied interface is a subinterface of this new interface.



What exactly do you mean by declaring the Sun supplied interface is a subinterface ?

Thanks
Phil
That's something I was concerned about as well. Has anyone any thoughts on this?