Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Re: Re: accessing EJB from perl

by ignatz (Vicar)
on Oct 21, 2002 at 14:48 UTC ( #206854=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: accessing EJB from perl
in thread accessing EJB from perl

You'll have to excuse me if I don't buy it. Using a weak typed language to test a strong typed one? Combine that with Enterprise Java's lock the door and throw away the key vs. Perl's Dude, come on in and Party! method of security sounds to me like a recipe for some very weak tests.

()-()
 \"/
  `


Comment on Re: Re: Re: Re: accessing EJB from perl
Re: Re: Re: Re: Re: accessing EJB from perl
by SarahM (Monk) on Oct 21, 2002 at 15:18 UTC
    How the language it typed doesn't matter! You are testing the object. That means you check that the proper values are returned when a sequence of interfaces are called. Or you make sure that the objects writes to the database, or whatever else you have your object doing. What you aren't doing is mixing random bits of Java and perl. As long as you use object, and access the objects through the interfaces, it doesn't matter what language the object or testing program is in.

    Look at how well OLE works with perl. A COM/DCOM object is strong typed, but perl is able to call it without problems. There are many production perl scripts that use OLE because it works well. After showing other developers who write COM/DCOM objects how to test them with perl, most of them choose to use perl for their testing (it save a lot of time). Most of these people had fears about testing their COM/DCOM object with perl, but after see how it works and playing with it, those fears have subsided.

    I know some people don't like the idea of using several languages at the same time, but there are huge time and maintainability savings to be had when using the right language for the job. I'm personally looking forward to Parrot for it's ability to run Java, .Net, and perl on the same VM, and make it much easier to use objects from other languages.

      Objects are made up of fields and methods and in Java these things are typed. Sure, tests that don't deal with this will work just fine 99% of the time, but it's the 1% that worries me. In my book that's where bugs are born.

      Yes, I can write methods within my tests that confirm the types for the fields for each class with Perl, but why would I go through all of these contortions when the language I've written the application in does this for me automatically? Why add to your uncertainty when the whole purpose of testing it to reduce it?

      ()-()
       \"/
        `
      
      I was thinking about this in a drive to and from an interview. If something works for you, that's kewl. It's not the way I would do it, and I would worry if my system relied on it, but to each his/her own. Hey, no matter what, writing tests is a good thing™.

      My main objection to the original post is with using Perl to test Enterprise Java Beans. A part of the EJB 2 standard includes interfaces that are only visible from within the bean itself. That means that no Perl, Resin, XML, HTTP or carrier pidgeon thingamabob is going to be able to test what is going on within those parts of that bean. Bottom line, to me not being able to test your internals is bad, thus relying on Perl to test your EJBs is a bad thing™.

      ()-()
       \"/
        `
      

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://206854]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2014-10-22 23:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (122 votes), past polls