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

HFEJB - sample app ???

 
M Streit
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the 3rd attempt at getting an answer to the following (not sure why I can't get a response)...I have tried 2 posts and a direct message to author Kathy Sierra? Is there something wrong with my question? Does it need to go to a different forum? Since 1/23/04.
-----------------------------------------------------------------------
I found this post (below) from October...was the example EJB application ever put up on the web site?
Also, do you know when "Head First SCWCD" (aka - "Head First Servlets and JSP" according to O'reilly Books) will be available and will it cover Struts? )
Thanks in advance,
Mark

quote:
--------------------------------------------------------------------------------
Originally posted by Kathy Sierra:
Howdy -- yes, it's a great suggestion, and we don't really do a full application putting all the pieces together, as you're suggesting. We *are* planning on putting something like that on the web site, because we agree that it's really important, and we couldn't fit it in.
So, your suggestion is really important, I think, and it will be VERY helpful to a lot of folks. It isn't in the printed book, but we are planning to put that on the web site. We need another week or two to get everything up there, though... so be patient... hopefully what's already in the book will keep you busy for a couple weeks
cheers,
Kathy
and thanks for your comments on Head First!!
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Mark!
My apologies on not responding to you on this -- I'm having very serious email/computer issues the last few weeks, and I was travelling a lot so I missed a lot of javaranch messages as well.
The bad news is that no, we haven't had a chance to put up an application example. I still think it's a great idea, and we do intend to do it, but we haven't. I can say that if we *did*, it would be something integrated like, say, a combination of the Advice service and the Movie database (and possibly Customer). And heck, we might as well throw a little rule-based thing in there to give you customized advice (Maybe some Jess?)
Of course, you *could* always do this yourself and it would be so much more meaningful... (OK, I'm stretching it here, I know). But just for example, you could do something like:
1) Have the Advice bean give movie advice based on the movies in the database.
2) The Advice bean would be a stateful remote session bean (actually, in version one it could be stateless.)
3) The Movie and Director beans would both be local, accessed on behalf of the client via the Advice bean.
4) Another session bean would be a MovieAdmin bean, that you'd use to make changes to the database.
5) You'd need some interesting fields in the Movie bean for things like a rating, so that you could give good advice
6) The Advice bean could have more sophisticated advice for allowing the client to search for things like, "Which movie should I see if I like Action?".
7) And then... once just the fundamentals are there, you go back and modify the Advice bean to make it stateful and rule-based. Something like:
* The advice bean carries on a 'conversation' with the client to help figure out what the best advice would be for that client.
So, that means the AdviceBean sends back a String, but each time, the String is either another question from the bean, or the actual final *advice*. You'd really have to do a little modification of the client so that perhaps it has two methods:
* startAdvice(String typeOfAdvice)
* getAdvice(String answerToPreviousQuestion)
(startAdvice() returns a String, while getAdvice returns a simple object of type AdviceInfo, that includes a question String to be displayed to the user, and an ArrayList of Strings to display as a list the user selects from.)
Here's a sample dialog:
client: startAdvice("movies");
bean: responds with "What kind of movies do you like?" followed by an ArrayList of Strings which the client displays in a simple list.
client: getAdvice("action"); // actually, "action" is chosen from the list
bean: responds with "Which directors do you like?" followed by an ArrayList of Strings which the client displays again in a list.
client: getAdvice(somethingChosenFromList)
bean: responds with "Here are my choices for you." followed by an ArrayList of Strings.
At that point, the session is over unless the client asks for more advice (thus starting a new dialogue, although not a new session.)
Now, that's really *dumb* advice -- no intelligence there. But of course the bean could become more sophisticated to, say, use the movie ratings to order the movies returned, or eventually store customer conversations so that it can *learn* more about what the client wants, and then tailor it's advice-giving based on what the client preferences are over time. Think of a teeny-tiny wimpy version of the way in which Amazon makes recommendations for you...
OK, so I'm dreaming. But if somebody decides to get ambitious and build this... we'll have a special place for you on the web site
In the mean time, Bert and I are working our butts off right now just trying to survive, so we are not able to spare the time to build the application. Blame Sun for the new SCWCD and SCMAD exams! Those have us completely tied up, along with two other books in progress.
The SCWCD book is in the early stages, but it will be out at the end of May. However, we are still looking for folks who want to be on the review list -- you'll get a password and a URL to download early draft chapters of the book as they're completed. Same thing for the SCMAD. Please write to us directly, but at this address:
reviewTeam@wickedlysmart.com and in the body, specify the book(s) you want to review.
The way it works is, we keep you on the list unless you don't give any feedback at all. If we don't hear anything from you, eventually we'll take you off the list. But you have no obligation at all to give feedback. (and if you give a *lot* of feedback, your picture goes in the book )
So, back to Mark's question -- I'm really sorry that we can't do this app right now Mark; we were hoping to have a little breathing time after the book, but Sun moved up the schedule on the Mobile exam (and we are still contemplating the possibility of some kind of Web Services exam), so we were recruited back into service immediately.
Oh yes, the Head First Servlets&JSP book (that's a new title for it -- it used to be named "Head First SCWCD", but it's still the same study guide book for the exam) WILL cover Struts. The entire book is framed within a Struts application. And in fact, this book *does* include a rather substantial web application with a real domain database, etc., and it starts being built in chapter 2 and then evolves throughout the book. It's a very important part of this book. It is built from the beginning as a Struts web application, and Struts is explained from the very beginning (we assume that you don't know Struts or Servlets or JSP, but that you DO, of course, know Java quite well.)
Hope that helps -- sorry I don't have better news on the EJB app. And again, my apologies that it took so long for you to get a response. This is still the best place to pose questions. But you can always assume that we're going to miss some, so you did the right thing by bringing it up again.
cheers,
Kathy
 
M Streit
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kathy,
Thank you so much for the kind (and detailed) response. I am really looking forward to the Head First Servlets JSP book. You have a great formula when it comes to book writing on such technical topics. The writing and content is so creative, thorough, and effective. In my opinion, they are among the best learning resources I have seen. At the rate you are all going, I suppose "Head First Web Services" (covering WSDL, SOAP, XML-RPC, UDDI, etc) will be another possible venture. Thanks again for all of the info. I appreciate it.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic