Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Rudolph Jen

Ranch Hand
+ Follow
since Nov 17, 2006
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 Rudolph Jen

Sorry, I don't understand what you mean exactly. Dependency Injection only means, that you don't have to find your dependencies at your own. The dependencies are giving to you. Usually best practice is to add such dependencies to your constructor.

Example:

public class MyClass {
public MyClass(final Object dependencies1) {
...
}
}

And if you have an constructor like this, the default constructor is disabled. Therefor everybody that would like to use MyClass has to use this constructor and has to provide "Object dependencies1".

In my assignment is nothing about how I have to design my architecture or even my classes so that sun can use any unknown automatic tests.

Therefor I am not having any thoughts about that. Otherwise it would be a mess implementing such an application.

Best regards,
R
Multi-Threading is a not simple thing to implement. Therefor I would recommend, that you design a test suite that you can use to test your implementation of the DB-Interface. I would never only trust my feeling 100% just by looking at the code.

Best Regards,
R
>sorry - might be wrong. The method create throws DuplicateKeyException....

I agree here! I admit that the javadoc for the provided interface is a little bit unspecified about that Exception, but the name is clear.

Actually it isn't that hard:
1. Search for a record matching the fields of the record you would like to add
2. If you get some => throw new DuplicateKeyException()

Regards,
R
I also check the db-File and I check not only the magic cookie. Column-count/Field-length/.. are checked also.

Of course I limit the possible db-Files to only that one with the expected schema, BUT that is exactly what I want! IMHO is everything else a risky little game, what you only can lose.
Hi everybody. It seems to be that everybody is already gone for the weekend

Has anybody used any GUI-Testing-Tool/Framework that he/she could recommend???

There are some of them out there, but I have never done something like this before (shame on me) and I assume that you all automatically test your GUI as good as your 'normal' java code.

Any experiences would be nice!

Best Regards,
R
You are right! I should not do this more complicated than expected. KISS is a very fine pattern

CSR is going to see everything. There are no specification for this area, so I am not going to interpret to much details in that by my own.

Best Regards,
R
Hi everybody.

At the moment I am implementing the GUI and I am a little bit confused about the customerId ( the id of the customer who has already booked that record):

I would say, that a Customer Service Representative (CSR) gets only records display, that are actually bookable. All the other already booked records would only distract the CSR.

1. Is anyone agreeing with me, that the Search Criteria in DB.find(String[] criteria) should not include the customerId-Field? That means, that this array only have the length of 5 (name, location, specialties, size, rate)??
OR
2. That the serachCriteria for customerId is always "", so that only not booked records are shown.

You see, I am confused. Would be nice if someone could let me know his/her opinion. Thanks.

Best regards,
R
> But does "Data Access Class" also mean that all aspects of the data access - including locking, file access, etc. must also be contained within the suncertify.db.Data class?

IMHO it doesn't. The class "Data.java" must implement the provided interface, thats it. I did not put all following needed logic in that one class, or even in one big method. My Data.class delegates some issues to other classes, because I would like to get the cohesion on a good healthy level.

> Template Method pattern.

I am a fan of the Template Method myself, but I don't see the reason to use it here. Sorry Perhaps I am to dump to see it.

Best Regards,
R
Okay, thanks for the wakeup ;-)
To be sure I am going to follow you advice. No Adapter in that way.

>It is up to higher layers to apply the application specific data validation.

That a good idea. So I can use my design almost as wanted, but still have a validation tier. I like it.

Tanks.

Best Regards,
R
Hi there.

I am a little bit unsettled: In the B&S assignment I got that not so nice interface with a lot of String[] arrays in it. Naturally I don't like untyped information, so I am going to eliminate them as soon as I get them.

Solution:
My (dirty) interface --> Adapter(Design Pattern) --> nice Interface (without String[] arrays) --> DB

Now the reason for my unsettled feelings: Sun defines in my assignment "Your data access class must called "Data.java", must be in a package called "suncertify.db", and must implementt following interface:"

In my clean design (I guess) my Implementation of the specified interface would be my adapter (I could call the Adapter Data.java). Normally I wouldn't even think about that, but I don't want to fail in any automatic tests, Sun is going to run after my uploading.

Has anyone had similar thoughts before me and had no problem during validation?? I would like to keep my design clean, but I am not sure how strict sun is going to evaluate all the 'MUSTs' in the assignment.

Any tips?

Best Regrads,
R

PS: I am not talking about an adapter, so that the client don't see the lock/unlock methods. I am talking about the upper tier to the used DB.
Thanks for all of your information.

I was so happy to use netbeans gui builder, because it is so damm easy

But I understand and will not follow this path any more. I am going to "use the power in myself", like my old yoda buddy used to say

Best regards,
R
Hi there.

What does ..

"Use of Standard Elements
Use of functionality provided by the core Java classes will be preferred to your own implementation of that functionality, unless there is a specific advantage to providing your own implementation."

.. mean exactly?

My Case:
I started to use netbeans gui builder and he is using jdesktop.org. Fine by me, but is it allowed to have an import like this??? I would have to submit this needed jar-File with my app at the end of course!?

What are YOU doing? I avoid using jars from commons project because of this. But know the gui builder would like to use these and I don't know how to change it (netbeans newbie)

Any idea??

Best Regards,
R
>Do you know of any open source tools like junit which might catch things like this or did we just come up with a patent?

Tools like groboutils or junit are only frameworks to support you building your own tests. These frameworks are no brain-machine that can look at your code and generate all needed test by themselves (would be nice). It always the same in software development.

Therefor you always have to design your test suite to get all covered up, where design patterns can be helpful. There are some commercial tools out there that should be handy, but there I have no experience. Until today I do handworking.

Best Regrads,
R
I didn't like the SCJP exam, because a lot the question were IMHO very theoretically and not that practical oriented. Here with the SCJD exam on the other hand, it is a (almost) real app you have to develop, with a couple of knowledge involved. I like it and looking forward to hopefully pass it.
>exit the app

I like this. I have to check, but I can't remember to have any wished behavior in case of an error in may assignment. Therefor I try to keep it as simple as possible. I like ASAP

Best regards,
R