Win a copy of Rust Web Development this week in the Other Languages forum!

Alex Belisle Turcot

Ranch Hand
+ Follow
since Apr 26, 2005
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Alex Belisle Turcot

Hi ranchers,

I've been a silent reader on this board for this certification.. I've been working on Part2 for a few weeks now and I'm almost done.
At this point, the only thing I'm struggling with is the idea of duplicating identical flows in 3 sequence diagrams.
I keep going over this and can't get my mind straight.
My goal here is to have some of your input, opinions, comments...

Imagine you have the 2 following use cases :
  • View oranges and pick the nicest
  • View apples, pick the nicest and make juice

  • [SOLUTION 1]
    I could create 2 supports Sequence diagram:
  • (A) View "fruit"
  • (B) Pick nicest "fruit"

  • Then the 2 Sequence Diagrams would be as follow
  • View oranges and pick the nicest (entirely referring to A and B)
  • View apples, pick the nicest and make juice (referring to A, B and adding the juice flow)

  • [SOLUTION 2]
  • Create both Sequence Diagrams from scratch and duplicate the flows in both.

  • --------------------------------------------------------
    By duplicating, it gives me the opportunity to use "getApples()" and "getOranges()" instead of "getFruits(String: fruitName)".
    When reusing sequence diagram, I'm not sure I like the fact that I would have to use generic words (such as fruit)..

    Do you think SUN would mind that I duplicate flows ?
    Or do you think they would mind that they have to look for referenced diagrams ?

    Thanks for your input,
    Is it possible to buy the Part 2 assignment at the moment ?

    I went to Oracle's site: Oracle - SCEA Step 2/3
    It says that "this item is currently unavailable while we update the process." and the price is marked as "TBD".

    I'm in Canada but I also looked at the United-States version and it was the same.

    thanks in advance,
    I think SCEA would be nice..

    For me, when I get to be PM, I would still want to be SCEA, even if I don't display all my knowledge ;)

    However, I also think the best PMs I've work with/for were the less knowledgeable on the technical aspect. In fact, they were probably somewhat knowledgeable, but never EVER interfered with it.
    As far as being a good PM, I think you might be mistaking if you are taking the SCEA route. The PM I worked with having these kind of skills are were not the one I remember being the best. In fact, it seems they ended up going back to technical leading roles rather than management...

    IF you would have said, you want to do SCEA because it's seems fun, that would be different. Or even, just because it would look good on your resume.. But I don't think this would make you a better PM.

    Think about that...

    Yucca Nel wrote:An example of what I am asking...

    * Locates a Contractor based on a user defined search query.

    Could also be....

    * Locates a record based on a user search query.

    You should say what it does...
    A low level class named "DatabaseHelper" could be "locating records based on arguments provided".
    An higher level class named "ContratorServices" could be "locating contractors based on user defined search query.

    Hope this helps.

    Yucca Nel wrote:I am very confused. I am told to only use JFC classes. AWT does not fall under JFC. Am I allowed to use AWT:Dimension and AWT.Tookit? About the Jcomponent thing I was not sure if it fell under the same category as J2EE which is just my speculation. Are we allowed to use JUnit?

    My advice would be not to over complicate the GUI anyway, so you shouldn't anything too fancy.. I'm not sure about Dimension and Toolkit..
    I'll let another rancher give his opinion on this..

    You are of course allowed to use JUnit.. I simply did not deliver my junit test classes to SUN..

    Yucca Nel wrote:But for future reference to others there are the new layoutStyle
    which are part of the JFC. We are allowed to JComponents?


    What's wrong with JComponent ? It is a swing class alright and the same thing for LayoutStyle..
    Care to explain why this could be forbidden ? (I'm willing to accept I might be wrong ;)


    Yucca Nel wrote:Heres what I am told to do.

    It must be composed exclusively with components from the Java Foundation Classes (Swing components). But for future reference to others there are the new layoutStyle
    which are part of the JFC. We are allowed to JComponents?

    link ..... webpage

    You're still allowed to use classes which have no equivalent under swing... For example, ActionListener is under java.awt.event... There are no equivalent with swing package and thus you are allowed to use it.
    What would be wrong is to use something like Button under awt while JButton is available. Pretty much all GUI "visual component" (button, dropdown, menu...) must be SWING.. on the other hand, Event objects are in awt.


    Zlatan Hajric wrote:
    server where I have a server frame and start RMI
    alone Client side (GUI) started and searches for a server , comunicates with the db via RMI

    no args both server and client should start and no network connection. In my case I have no need to start the server. I can just start the client in local mode meaning it will use DataControlLocal.
    No Am I way off here or is this ok. Note that my project is some 80%-90% finished

    It's been a couple years I did the certification, so please read carefully your own requirements.. There was no such things as an argument/or lack of that starts both server and client.

    - server: start the server
    - alone: start the client in STANDALONE MODE (LOCAL MODE)
    - no args: start the client in NETWORK MODE

    So, if you want to test the network mode you need to :
    - start your application with argument "server" which will bind your remote object to RMI Registry;
    - start your application a 2nd time with no argument so that it runs in network mode;
    - use your client to interact with your server.

    When your client is running in standalone mode, it should not use any code related to networking..

    Hope this helps,

    Raf Szczypiorski wrote:Thank you for your reply.
    I know the link you sent me to, but I noticed one thing:

    The Code Conventions for the Java Programming Language document was revised and updated on April 20, 1999.

    Is anyone strictly following these? For example, in the time when 19 inches widescreen displays are pretty common, do developers still limit their code to 80 lines?

    My understanding of this "recommandation" is to make sure it is nicely displayed on any OS with any tools.. By the way, I just edited a java source file in vi on Solaris ten minutes ago... it does happen..

    If Java is to be executed anywhere, we should be able to read it everywhere ;) What happens If you print the code ?
    Don't get me wrong, I don't personnaly care too much for the 80 characters, I just want to give you some perspective..

    Anyway, you should follow it for the SCJD.. And I agree with you, I don't live and die by this rule at work..


    jesal dosa wrote:Thanks Anne,

    If you guys think its fine to leave the locking in during the standalone mode, then that seems acceptable to me as well. Thanks for you advice.

    Ok then i will implement my locking in the data class. and will keep record locking even in standalone mode and as per per my previous reply i will use synchronized when implementing the DBmain interface in the data class

    I agree with other ranchers..

    You should view your DBMain implementation as a persistence library that your application will be using.. Similar to any other product in the java world, SUN provides an interface, a 3rd party company provide the implementation and the developers use the implementation.

    In other words, the "3rd party company" (you) must provide a correct implementation so that the "developer" (you) can use it as expected.


    jesal dosa wrote:I seem to have found the answer to question 1
    can sync data methods

    So its fine to synchronize the read method. I hope so one can give me ideas about question 2

    Question 2 I have lock and unlock methods in my DBMain interface but I want to use a locking class for the record locking.
    a) can i ignore the locking methods in the interface i.e leave them empty
    b) l have followed the classic example of a service interface containing a search and book method. Can i get way with just having locking implemented in the book method. I have two concrete classes implementing the service interface. The remoteServiceImp class and a ServiceImp class. The serivceImp contains the actual code for the search and book methods and the remoteSerivceImp just make a call to the serviceImp. ie

    My understanding is that SUN can take your implementation of DBMain, use a single method and see if it reacts according to the contract. If your lock method does nothing, it does not do what it should be doing according to the contract.

    Why don't you use your locking class from your lock/unlock method ?



    Ethem Yuksel wrote:Hi to all,
    I've completed my assignment by picking sockets for the network layer. But i need a good reason for sockets against RMI. I am thinking because it was easier and easy for a junior to understand. But i am not sure if it is a good reason.

    Any advices?

    I think it is valid! No new *stuff* to learn, plain old java object with sockets. I actually wrote that as a downside for my RMI solution, even though it is quite easy, it would be easier to "read the code" (and understand) with sockets than with RMI (for a super junior programmer).


    Fernando Franzini wrote:Hi Alex....Let me asked somenthing about RMI....there will we only one instance object bind inside RMI control and many remote proxy references ? servlet inside servlet container ?

    That's exactly my understanding, the server instantiate an object and makes it available through the RMI Registry. Sor sure, any client requesting a reference will get the same one.

    I know what you mean with the servlet example, but in my opinion the concept is not the same. With Servlet, the clients don't really hold a reference to it and there *could* be different servlet handling requests from different clients based on the webapp configuration.. Anyway, I don't want to argue on semantic, I think you get it..

    A similar concept (as RMI) would be EJB Stateful Session bean..


    K. Tsang wrote:thanks Alex, from your description and the look of things, RMI is multithreaded already.

    The thing I hope to do for my RMI server is to display messages as clients connect.

    I'm not sure if your server can tell if a client gets a reference to your object..
    I guess you should add a method on your remote class and have each client calling it..

    something like:


    K. Tsang wrote:Hi all, I'm just curious is it true that the Swing API uses MVC pattern internally? I read books and articles that MVC this that in Swing blablabla. Similarly, for RMI, is it using the (Remote) Proxy pattern internally by saying "accessing remote objects as if they are local"?

    If this is true, so if we use RMI, does it mean we automatically using Proxy pattern? Same for Swing using MVC pattern?

    The whole point of MVC is to separate the Model (M), the View (V) and the Controller (C). Because SWING has listener on which you register to listen for actions performed on your View component, it is very MVC.. But, one can easily organize it up incorrectly and deviate from MVC.

    The main point of MVC is to dissociate your model from your View. Your model should not know "how" they are displayed. Your model should not directly modify properties in your view. Instead, your view should "observe" the model, be notify of any change and modify itself accordingly.

    I don't know if RMI does "exactly" follow the Proxy pattern, I would guess so.. Beside having to handle the extra exception (RemoteException), you do "pretty much" handle local and remote object the same way. I remember being asked this question back in University and I do believe the professor was giving the points for both answers depending on your explanation.

    Best of luck