Training Trainers in Shanghai

Shanghai, Dec.22, 3 days before Christmas, I'm training some Sun Microsystems Java trainers, and Partner trainers from Beijing and Shanghai. The class of 5 people is half good at English so I use lots of diagrams and write point form on a white board to help clarify my points. My hope is they can now work through the labs and be able to teach the one day seminar about Java EE web site Frameworks.

One of the students, 周羽 (2 from the right in class photo below), modified my struts examples to use spring. I am now analyzing his NetBeans projects for use in future teachings. His notes are below, I have added his samples to the Framework download zip file.

During lunch, a few of us went for Japanese food which was good. After the class, Lily (right most in class photo below) and I went for excellent wong tong at a tourist area. It was fun eating, shopping, and walking around. The difficult part was finding taxis because it was lightly raining and we were in busy areas which meant competition for taxis.

Click here to view all my China Trip photos.

Class photo


The First Way.
The addGameAction must be extended ActionSupport(ActionSupport is a class from Spring). And use ApplicationContext.getBean() to get LeagueService. I don't like this way because it's too close-coupled.

The Second Way.
The addGameAction still extend Action(Class of Struts).But add 1 attribute in addGameAction.The attribute is LeagueService. Change the default RequestProcessor to org.springframework.web.struts.DelegatingRequestProcessor. Then can Dependency Injection via Spring. This way is better than first way.But it isn't the best way because it's changed default RequestProcessor in Struts.

The Third Way.
Still Inject the LeagueService via Spring.But it's no need to change the default RequestProcessor. It's AOP.Use the Spring interceptor to intercept Action class. In struts-config.xml,change the "Writen by 周羽.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Tech event, training, business, in east and south Asia.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today