Archive for June, 2008

Sorting Algorithm Animations

June 22nd, 2008 No comments
Categories: Algorithms Tags:

Interesting feedback from someone who compares the recruitment processes of Microsoft and Google

June 22nd, 2008 No comments

I was interviewed by Google a year ago or so, I kind of concurr with his point of view regarding Google’s recruitment process.

” It was like Olympiad in Informatics.” 😀

Categories: General Tags:

MappingDispatchAction: a single Action class but several action tags

June 21st, 2008 No comments

The MappingDispatchAction class extends org.apache.struts.actions.DispatchAction.
It is similar to DispatchAction, except that a different action form, identified by the name attribute,
can be specified for each action mapping.

MappingDispatchAction: Use this when you want to define multiple form handlers for the same Action.

DispatchAction: Use this if for any reason you don’t want to define multiple form handlers (e.g., to make struts-config.xml more manageable).

So, instead of having a single action declaration, we will have one action declaration per method defined in the action class.
Very useful, if for instance, you need to handle different form beans for each method of the action class.

Categories: Struts 1.X Tags:

The difference between MVC 1 and MVC 2

June 15th, 2008 No comments

The MVC architecture :
Model : Responsible for the business domain state knowledge
View : Responsible for a presentation view of the business domain
Controller : Responsible for controlling the flow and state of the user input

There are 2 models of the MVC architecture :
Model 1 (MVC 1) and Model 2 (MVC 2).

  • In MVC 1, the application control is decentralized, because the current page being displayed determines the next page to display.
  • In MVC 2, a controller servlet is the target of a request submission rather than the JSP pages themselves.
    A Model 2 architecture introduces a controller servlet between the browser and the JSP pages or servlet content being delivered.
    Struts is a good example of a framework based on MVC 2 because the ActionServlet servlet will select the proper view to respond to the user.

    Struts : MVC 2

    Categories: Design Patterns Tags: