Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Meaning of the word hook

 
Tony Smith
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"The reset( ) method is a hook that Struts calls before the Form Bean is populated from an application request (e.g., HTML form submission). The validate( ) method is a hook that Struts calls"

Is there any difference between hook and methods? Why is it called hook?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In general a "hook" is usually some way that a piece of software provides to let you customize it. Here, it's referring to methods that you write which the Struts framework will call to do certain tasks. You're therefore "customizing" what Struts does.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic