Arsenalist

The Toronto Raptors Blog with an Arsenal touch

Archive for July 2nd, 2007

Arsenal sign Eduardo da Silva to replace Henry

Posted by arsenalist on July 2, 2007

Owen, Tevez, Babel, Anelka, Pederson, Eto’o, Silva. Who? Silva, Eduardo da Silva. Probably the last person expected to sign with Arsenal did so on Monday. The 24 year old Brazilian born Croatian of the Dinamo Zagreb fame might have cost us £16 million pounds (but that’s unlikely), that number does sound eerily familiar, doesn’t it? No newspaper or internet site had a damn clue this was going to happen, Arsene Wenger is one sneaky, sneaky Frenchman for keeping this a secret until it actually happened. It’s a four year deal which will keep him at The Emirates Stadium until the end of the 2010-11 campaign.

The left-footed Silva has been the leading scorer in the Croatian domestic league for two straight seasons (34 in the last) and looks like he’s become too good to play in Croatia. He’s a Croatian hero of sorts and fans will miss him. He’s already holds an Arsenal first, the first competitive goal to be scored at the Emirates stadium which happened in the Champions League qualifier last season. The fee is a record for a player leaving Dinamo Zagreb, their coach, Branko Ivankovic, doesn’t confirm or deny the record deal but obviously values the player:

I cannot confirm that the transfer cost £16.25 million because that is a business secret and, in the end, I am a coach and I am not interested in the finance. I can only say that this is the biggest transfer in Dinamo’s history because, if it were smaller, we would not be doing the deal.

Raise your hand if you’ve seen him play more than one game? Nobody? That about sums up the knowledge supporters have about the youngster but one thing is for certain, he’s too good for the Croatian league and is highly thought of by his ex-manager and Wenger. Many will be like WTF on hearing his name but Arsene Wenger’s been obviously keeping close tabs on him over the years and monitoring his progress, otherwise the huge fee wouldn’t make any sense.

According to Soccernet this looks to be the only striker signing for us this summer and AW will now look to strengthen a defense that allowed its fair share of bad goals and was below average in defending set pieces (memory just recalled the Alex goal).

I highly doubt we actually paid £16 million for him, somewhere around half that is the rumour. So much for the Anelka return and Tevez interest. The one thing you can’t accuse of Arsene Wenger of being is cheap, for that fee and a little more we could’ve got any of the players that were being talked about but Wenger knew what he wanted from the start and got his man.

Here’s some video of our new signing, remind you of anyone? Thanks for reading.

Da Silva videos 

Da Silva Goal vs Arsenal in Champions League

Posted in arsenal, eduardo da silva, transfers | 9 Comments »

Toronto FC steal point in Kansas City

Posted by arsenalist on July 2, 2007

sam reynoldsThe best game to watch all season. Going into this one we’d been whipped by Kansas City twice already and were looking to avoid a hatrick. Four changes to the team that got smoked by New England: Dunivant and Samuels make their TFC debut while Pozniak returns to the starting eleven. Sam Reynolds makes his MLS debut with Greg Sutton injured and Srdjan Djekanovic riding the pine. The break we catch is Eddie Johnson being on Copa America duty so there’s nobody to mutilate and abuse our back four, at least not until the second half when Yura Movsisyan entered the game armed with a BFG 9000.

I didn’t even flinch when in the 18th minute we succumbed to a counter-attack born of lazy pedestrian defending after a corner. It’s inexcusable how bad that defensive sequence was, newly arrived Dunivant and the rest of his mates were surprised that KC dared to counter-attack after a cleared corner. Michael Harrington had enough space and time to measure his shot and snuck one past an outstretched Sam Reynolds. The goalie was in a good position, the shot was just too accurate. Now down a goal on the road to a team that’s kicked your ass twice already is quite demoralizing but Toronto FC didn’t show any signs of relapsing and continued what they do on offense. Go through Robinson -> O’Brien -> Dichio -> Cunningham and see where things lead. Despite conceding it was us who were getting the more value out of their possession.

Kansas City was not dominating the game and we were getting our chances. Jeff Cunningham should’ve scored in the 27th, Kevin Hartman was in no mans land after two KC defenders had fallen when Cunningham hit it too high after a good effort in getting to the goal. Cunningham should’ve scored in the 37th again, Dichio found Cunningham wide open after a give ‘n go and Cunningham struck it to the only place where the goalie could save it, bad bad miss. Hartman did well but Cunningham knows he should’ve scored. There’s only so many chances you get in a game and if you waste them it becomes pretty easy to assign blame. It’s frustrating how good he is in creating the shot opportunity and how inaccurate he has been when applying the finish. Every time he misses you start to curse him but then you realize that he’s almost singlehandedly created that chance, and that’s when he gets the reprieve.

In the 46th minute we tie it up after a Classic Toronto FC Goal and by that I mean something created by O’Brien and finished off by Dichio. Kansas City came out a little sluggish and paid the price, just like we did earlier. Yura Movsisyan was introduced in the second half and he proceeded to terrorize us with shots from every possible position on the pitch, it was thanks to Sam Reynolds who denied Movsisyan numerous times, sometimes at close range that we owe this point. His save on the close-range header by Ryan Pore was the finishing touch of a fine TFC debut.   Our defense leaves a lot to be desired, KC was going East-West at will and Movsisyan was blistering shots left and right.  We get beat too easily and are in recovery-mode too often, mostly because we are vulnerable to pace.  MoJo needs to fix this.

Ronnie O’Brien is the man responsible for holding us together on offense, it all starts with him and his midfield runs which are usually followed by a cross that has a chance of being controlled. I can’t say enough about him and how much he means to this team. Another solid game by ROB where he had a chance to score on a sinking shot from far out but it was always going to be tough. When Andy Boyens (excellent, mostly mistake-free game) was shown his second yellow card with 15 minutes left, KC switched to a 4-3-3 and were looking to score, Mo subbed off Dichio and Samuels for Reda and Welsh. The fresh legs paid off as KC’s onslaught in the final minute was held off. Despite being down to ten men TFC attacked the goal knowing that KC was committing enough men forward to open up a counter-attack possibility.

Let’s talk about the new players:

Todd Dunivant: Early on he was brutal, KC was singling him out in their attacks and he was responding by getting caught out of position or with this back to the ball. As the game went on, especially in the second half, he had more of an offensive impact and came forward a number of times to provide the midfield with some cushion. The man is the best throw-taker on the team, most humans can’t kick that far. It’ll take some time before he learns how to play with this squad, you can’t really evaluate him based on one game but I see what Mo Johnston saw in him - a physical defender with a knack for going forward.

Collin Samuels: This man loves to slide-tackle even when not necessary, we saw flashes of his strength on offense but mostly he was in a defensive position where he found himself constantly in the middle of tackles. A couple mistimed tackles, a few nice turns in the second half but mostly a workman like performance that showed he was trying 100%. He’ll come around and this team will benefit from his pit-bull tenacity. He did an excellent job of containing Carlos Marinelli who killed us in the previous meetings.

Arrowhead stadium looked empty, the announced attendance was 9,485 which isn’t that bad but the stadium is so big that even if there were 20,000 people there it still would’ve looked empty. Thank God for BMO field. We were getting the Kansas City feed where they have a habit of not showing the offside player on the replay, just the pass. North American soccer production, it’s getting better but not there yet.

Man of The Match: Sam Reynolds for making huge saves down the stretch and for being in excellent positions on freekicks and hard shot attempts.  Give some credit to Movsisyan for his attack on the TFC defense which was as lucky as it was good in conceding only one goal.

Chicago is next on Wednesday, July 4th.

Posted in tfc, torontofc | No Comments »

Spring’s AOP support can’t be ignored

Posted by arsenalist on July 2, 2007

You see I’ve never actually written many (any?) AOP classes but there’s enough talk about it splashed all over the internet that even though it might be a worthless concept that you’ve never used or cared about, you’re bound to encounter it at some point. A fellow GO Train rider once told me it was the thing to know if you want to have a Java job in five years. That made me read the AspectJ in Action book which makes you feel guilty about not using AOP. I don’t talk to that guy anymore. Then there’s Adrian Colyer who will have you believe that AOP is the glue that ties every enterprise application together and without it you might be writing code that is hanging on by threads.

Now I realize for some of you this might bring flashbacks to 2004 but bear with me. A few days ago I had to catch an Exception in the DAO layer and translate it to something else, now normally this very simple problem is solved by 95% of the monkeys by using a try/catch on the Exception and throwing something more worthy of being bubbled up. But if the same DAO method is being executed in different places in your application you might have to do separate try/catch blocks for each, something which is totally acceptable, clear, concise and happening for ages. There’s nothing wrong with it.

But there is an AOP way of doing this outlined pretty clearly in the docs where you write a pointcut and provide advice on the execution of the event. No try/catch blocks, the client code is devoid of any knowledge about exceptions. Spring’s AOP support makes doing this the AOP way very easy, but is it overkill? I don’t know, I guess it depends on your style of development.

So to replace the generic try/catch mechanism with the AOP way, first declare a pointcut:


package com.arsenalist.aop;   

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;   

@Aspect
public class SystemArchitecture {   

    @Pointcut("execution(* com.arsenalist.dao.*.*(..))")
    public void daoOperation() {}
}

Once we’ve specified what methods to monitor using pointcuts, give advice on what should happen when the pointcut is executed.


package com.arsenalist.aop;   

import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;   

@Aspect
public class DaoExceptionTranslator {   

    @AfterThrowing(
      pointcut="com.arsenalist.aop.SystemArchitecture.daoOperation()",
      throwing="ex")
    public void translateException(Exception ex) {
        throw new RuntimeException("Generic message");
    }
}

With the above setup any method executed in the com.arsenalist.dao.*.* packages will be translated into a RuntimeException. I’m assuming that the interfaces reside in com.arsenalist.dao package and the implementations in a package underneath that. Here’s the Spring configuration needed:

<bean id="daoExceptionTranslator" class="com.arsenalist.aop.DaoExceptionTranslator"/>
<bean class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator" />

Most importanly the Maven POM should look something like this:

<dependency>
    <groupId>aspectj</groupId>
    <artifactId>aspectjweaver</artifactId>
    <version>1.5.3</version>
</dependency>
<dependency>
    <groupId>aspectj</groupId>
    <artifactId>aspectjrt</artifactId>
    <version>1.5.3</version>
</dependency>
<dependency>
    <groupId>cglib</groupId>
    <artifactId>cglib-nodep</artifactId>
    <version>2.1_3</version>
</dependency>
<dependency>
    <groupId>asm</groupId>
    <artifactId>asm-all</artifactId>
    <version>2.2</version>
</dependency>

Although there is a newer version of ASM available, it doesn’t seem to be compatible with Spring AOP.

There can be many arguments against this setup, the main one being that you’re unable to handle the same Exception differently depending on where it’s being called from. To do that you’d have to specify another pointcut and another advice on how to handle it. You also lose all call-context information because you’re assuming that everthing you need to handle the exception is in the Exception object.

But in the general sense it does seem to be an improved method of executing baseline operations when a particular event occurs. The docs get you thinking about other places where you can use AOP proxies instead of the “normal” way of doing things and it’s pretty easy to get sucked into “convert everything to AOP mode”.

If you’re afraid of proxies, this is not for you. Every call to the DAO layer happens via a proxy which is necessary to achieve the intended effect. I’m not sure what the performance penalites of using proxys on every single call to the DAO layer are but if you go this route, CGLIB proxies are apparently much faster than their JDK counterparts. Either way, if you haven’t tried out AOP but are sick of hearing the sound of it, give Spring AOP a shot. It’s probably worth it.

Posted in aop, java, maven, spring, tech | 3 Comments »