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

Design choices

 
Jiri Kusa
Greenhorn
Posts: 6
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
First off all, I have been reading this forum for a while and I would like to thank for great information source I've found here.
A year ago I sucessfully passed OCPJP certification, with significant help I found in topics here.

Now I am working at OCMJD assignment and I would like to ask you some questions about design choices I am going to make.

1) When thinking about overall architecture, in my opinion the best solution is to use thin client design. It fulfills the requirement for Oracle instructions, that
Your user interface should be designed with the expectation of future functionality enhancements, and it should establish a framework that will support this with minimal disruption to the users when this occurs.
,
so I guess when most of the logic will be contained in server application, GUI change will be much more easier.
I've read long discussions about which approach (thick / thin client) should / should't be used according to another request, that server must provide implementation of interface provided by Oracle.
I'd like to create a service, that will provide all necessary methods, but not in "low level" form of data, such as array of strings, but e.g. Contractor POJO objects. These methods will "wrap" calls of implementation of provided interface, while applying necessary data conversions. This service will be exposed via RMI to the client.
I found many pros and cons, but I didn't find confirmation, that anyone who used this approach, had successfully passed certification. So my question is ... is this approach valid to be used in successfull assignment?

2) I've decided to use approach with direct access to the database file (no cached records in memory). I've created a prototype with locking mechanism. I ran DataClassTest found here (many thanks to John McParland for providing it). I guess my locking mechanism is working well, test successfully ends. But I didn't find any measurements of tests using direct file access (of course, using cached records will be almost instant), I would like to ask if someone did such a measurement? I ran John's test with 500 iterations and it took about one minute to complete. Is this "common" behavior or is there some problem hidden in my code?

Any response to my post and any information will be appreciated.

Thanks in advance.

Jiri

P.S. Please note I am not a native speaker and I found a bit difficult to express my thoughts in English written form. If there is something unclear, please let me know. I will try to explain it better.

 
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 Jiri,

First of all, a warm welcome to the CodeRanch!

Jiri Kusa wrote:I found many pros and cons, but I didn't find confirmation, that anyone who used this approach, had successfully passed certification. So my question is ... is this approach valid to be used in successfull assignment?

One important rule for this certification: every decision is valid, if it doesn't violate a must requirement!

So if you create a thin client with a business service containing a few methods using some value objects and each business method invokes 1 (or more) methods from Oracle's must-implement interface, then this approach is valid. I used exactly the same approach and passed (with full marks).

Jiri Kusa wrote:I would like to ask if someone did such a measurement? I ran John's test with 500 iterations and it took about one minute to complete. Is this "common" behavior or is there some problem hidden in my code?

I think the content of your data file after the test is way more important than the time needed to complete the test. So if the data file isn't corrupted and contractors are booked correctly (as expected), your locking mechanism seems to work correctly. You won't get better grades for having the most performant code. It's even better to have simple code which executes a bit slower than some complex code which is lightning fast. A program xhich doesn't finish, could be an indication of a deadlock. But even if all tests on this forum (see ScjdFaq) succeed, you still can have code which results in a deadlock.

Jiri Kusa wrote:P.S. Please note I am not a native speaker and I found a bit difficult to express my thoughts in English written form. If there is something unclear, please let me know. I will try to explain it better.

No worries! Plenty of ranchers aren't English native speakers. I'm also one of them. So even if it's unclear, we might possibly understand what you are trying to explain, just because we make the same slipup

Hope it helps!
Kind regards,
Roel
 
Jiri Kusa
Greenhorn
Posts: 6
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roel,
thanks for your response. Now I am a little less worried about impact of my choices after reading your post and seeing link you provided (400/400 - great result btw.). I've already written some client-server applications (among others) and exposing methods with "raw" data types such as int values or array of strings is somehow against everything I've been taught (on top of that only some of them are used from client). So it is good to know that approach I see as best is good enough for this certification

After reading Oracle instructions again, you are probably right about the speed of application vs simplicity and clarity of the code - it is said there in another words too.

So thanks again for clarifying and simplifying things for me.

Jiri

Btw. do you have some red light alert at your table? Frankly I did not expect such a quick response ;)
 
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
Jiri Kusa wrote:So thanks again for clarifying and simplifying things for me.

Glad to hear I could help and clear your doubts.

Jiri Kusa wrote:Btw. do you have some red light alert at your table? Frankly I did not expect such a quick response ;)

It took me almost 1.5 hour to respond, that's a slow response time. This one is already a bit faster Back in the days when I was in college, friends thought I slept behind my computer and the incoming email sound was my alarm clock, because I answered their emails very quickly on almost every moment of the day (and night) Expect all questions to be answered, just don't expect them to be answered this quickly
 
Dennis Grimbergen
Ranch Hand
Posts: 159
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jiri,

How is the assignment going? Did you already finish it or are you still busy with it?

Dennis
 
Jiri Kusa
Greenhorn
Posts: 6
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dennis,
still working on it, but I think 95 % is already finished. Now I am cleaning and polishing my code, updating documentation and remembering, what I forget to do
I am going to submit assignment in about 2 weeks, all must be done before 1.4. 2015.
Sorry for late response, I'm quite busy these days (and not only with OCMJD).

Jiri
 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Jiri your choices.txt file practically is your assignment documenting why you did what you did in the first place.

Good luck with the essay
 
Jiri Kusa
Greenhorn
Posts: 6
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi K. Tsang,
Good luck with the essay

thanks for wishing me luck. I hope, my knowledge will be enough and I will not need much of luck anyway
I tried to write choices.txt file it at the time I made decisions to implement. By "updating documentation" I meant updating javadoc in my code everywhere I found it not so clear as at time, when I was writing it.
Jiri
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic