Grary Stimon

Ranch Hand
+ Follow
since Sep 30, 2008
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 Grary Stimon

Hi Wouter,

Thanks so much for your thoughtful reply.

When I re-attempt my challenge with your proposed implementation, it fails with the message:
"Bound mismatch. The type T is not a valid substitute for the bounded parameter <T extends Stemmed> of the type Tomato<T>"

Please note that the abstract class would be more like the following, where Type<T> is a nested static class



Any further thoughts would be greatly appreciated.

Best,

Grar
9 years ago
Hi,

I'm not very comfortable with generics and I can't seem to reason myself through the following challenge. Can anyone help?

Say abstract class Tomato<H extends Stemmed> has two protected abstract methods: Type<H> getType() and void dispatch(H someArg). How do I subclass Tomato so that I can implement the two abstract methods to become parameterized with some subtype of Stemmed? I want to subclass Tomato in a variety of ways, such that the two abstract methods involve parameters that subtype Stemmed. As it stands now, the compiler insists that only H can be used in my method implementations, not subtypes of H.

Thanks for any help,

Grary
9 years ago
Paul,

Let me mull your suggestion and see if I can help.

Grar
9 years ago
Hi Javaranch,

The users of Google's GWT discussion boards are presumably all rather advanced pros and often don't respond to naive questions about GWT. Would you consider adding GWT to your GUI forum, so newbie GWT users can enjoy the same helpful, gentle aid with GWT they receive with everything else on Javaranch?

Thanks,

Grar
9 years ago
Thanks Ranchers.

So, following the "window" example in the Decorator link helpfully provided above, if I wanted to change a VerticalScrollBarDecorator object to a HorizontalScrollBarDecorator object, I would use the former as the type Window parameter in the constructor of the latter, and I now have a HorizontalScrollBarDecorator object. Crucially, though, this changed object is still a Window implementation with all associated state.

Only problem I see here is that if I make a ton of changes, I'll have a string of past identities -- VerticalScrollBarDecorator, HorizontalScrollBarDecorator, etc. -- that can't be GC'd.

(Essentially, I'm looking to model a 'becomes-a' relationship.)

Thanks,

Grary
9 years ago
Hi Ranchers,

Let's say I have a superclass, Bug, of which type my Caterpillar object is one. Great! What happens when my Caterpillar becomes a Butterfly or some other type of Bug that I haven't even thought of yet (assume I'm a geneticist)? How do I retain the benefit of polymorphism while redefining type? Use generics? If so, please describe a simple class signature?

Thanks,

Grary
9 years ago
Hi Ranchers,

I'm looking for some good discussion sites devoted to all manner of issues concerned in the creation and maintenance of ecommerce sites (mine would be with Java.)

My interest is in figuring out things like:

+ availability of open source EJB beans, e.g., 'shopping cart', that I can just plug into my app
+ recommended approaches to integrating shipping, e.g., UPS business services
+ recommended approaches to integrating payment, e.g., credit cards and PayPal

It doesn't see to me that JavaRanch is concerned with things like the forgoing, as they are basically domain-oriented.

Thanks for any recommendations you would offer.

Best,

Grary
9 years ago
Cameron,

Thanks for your reply.

So, I could get started implementing business logic EJBs and expect to 'wire' them to JSF pages, later? Or must I study up on JSF backing beans first to make sure I can expose my EJBs properly?

Thanks,

Grary,
9 years ago
JSF
Dear Ranchers,

I've got enough under my belt to begin development of Java web apps (I hope, anyway.) I have been confused about the following involved issues, however:

- Is JSF a 'framework' like Struts? So, in other words, with suitable time invested in learning JSF, will I need to learn other frameworks, too?
- Is there a tension between Struts backing beans and EJB? So, in other words, if I want to develop my app with as much flexibility as possible for future enhancements, do I think EJB first or JSF first?

Thanks. I've just been kind of confused that there's no one bulletproof way to do Java web apps if one has the time to learn it.

Grary
9 years ago
JSF
Ulf,

Thanks, that gives me something to chew on.

Grary
9 years ago
Ulf,

Maybe 'embed' is over-technical.

I want rectangular areas that contain 3d renderings that either i) I've animated or ii) the user can interact with. The choice between i) and ii) would depend on a) coding time b) difficulty of viewing. As regards b), my understanding is that applets involve some fuss on the browser-side -- my default should be to the most hassle-free approach.

I think my question might suggest real lack of familiarity with contemporary web design technologies, e.g., Flash. I'm trying to build out from my core J2EE knowledge using open source.

Thanks for your comment.

Grary
9 years ago
Hi,

I'm new to Java web development, but I have a good handle on J2EE.

I'd like to 'embed' 3d images (of my own creation) into a Java-based website. Is Java 3d the way to go or are there other, easier technologies more commonly used in web development these days?

Thanks for any comment,

Grary
9 years ago
Thanks Roel. Yeah, that's consistent with best practices a la Joshua Bloch. As you may or may not recall, Andrew left a lot of the classes in his example code public, so I just wanted to wave my hand.

Grary