Presenting at SpringOne 2GX 2009
Posted: September 19th, 2009 | Author: maudrit | Filed under: Conferences | No Comments »
I’ll be presenting at SpringOne 2GX 2009. Session title is “Speeding Delivery and Boosting Quality with Reusable and Industrialized Architectures”, there I will be providing an overview of the latest updates and additions to the Accenture Delivery Architecture, making emphasis on the Accenture Foundation Platform for JavaTM.
See you in New Orleans!
The fastest, most powerfull iPhone yet
Posted: June 8th, 2009 | Author: maudrit | Filed under: Apple | No Comments »
Apple ended today the wave of speculations and rumors about the next generation of iPhone with the unveiling of the new iPhone 3G (S) at WWDC 09. The new iPhone 3G (S) closed the gap currently present on the iPhone platform with the instruction of long expected features like Faster Overall Performance, Video Recording, better Camera, cut/copy/paste and landscape keyboard (features present in some of iPhone competitors). Unfortunately Tethering, one of the best features added to the new platform, won’t be immediately available to the US market due to registrations imposed by AT&T.
In summary iPhone is still the most advance mobile platform on the market; and the combination of a great product and an aggressive cut in prices should keep it as the dominant platform for the now.
Ready for JavaOne 2009
Posted: May 29th, 2009 | Author: maudrit | Filed under: Conferences, Java | No Comments »It should be an interesting and different JavaOne this year. I’m looking forward to the sessions and interaction with other people, but more than that, I’m looking forward to understand how the Java Community is taking the acquisition of Sun by Oracle.
This year the state economy will play an important role, the Early Bird was pretty much extended until the initial day of conference which is possible indication of low or moderate number of attendance.
I will be blogging, twitting and publishing pictures as the conference progress.

Collaborative Coding and Team Tooling in Eclipse
Posted: March 12th, 2009 | Author: maudrit | Filed under: Tools | No Comments »Eclipse Communication Framework Project is taking Peer Programming to the next level.
Copyright: All rights reserved by creator.
DWR / Spring MVC Quick Start
Posted: March 8th, 2009 | Author: maudrit | Filed under: Java, Quick Start | No Comments »Direct Web Remoting (DWR) is a popular option for enabling Ajax support on Java based applications. This post illustrates the minimum configuration need to use DWR on a Spring MVC based application.
Configuring DWR
Add dependencies to pom.xml:
DWR has a very small foot print from the dependencies point of view. In order to use DWR you need to add the dwr.jar on your classpath. The following code snippet illustrates how this is done using Maven.
... <dependency> <groupId>org.springframework</groupId> <artifactId>spring</artifactId> <version>2.5.6</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>2.5.6</version> </dependency> <dependency> <groupId>org.directwebremoting</groupId> <artifactId>dwr</artifactId> <version>2.0.5</version> </dependency> ...
Configure web.xml:
DWR offers out-of-the-box integration with Spring MVC. The following servlet must be added to the web.xml.
... <!-- DWR Controller, handle all DWR requests --> <servlet> <servlet-name>dwr</servlet-name> <servlet-class> org.directwebremoting.spring.DwrSpringServlet </servlet-class> <init-param> <param-name>debug</param-name> <param-value>true</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>dwr</servlet-name> <url-pattern>/dwr/*</url-pattern> </servlet-mapping> ...
Create and configure dwr-servlet.xml:
As indicated by Spring MVC standards you must create a mapping for each Servlet. The following code provides the configuration for the dwr-servlet.xml.
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.directwebremoting.org/schema/spring-dwr http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd"> <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="alwaysUseFullPath" value="false" /> <property name="mappings"> <props> <prop key="*">dwrController</prop> </props> </property> </bean> <dwr:controller id="dwrController" debug="true" /> </beans>
Create DwrFacede:
For the purpose of this sample we are illustrating how to retrieve an user using DWR. It is recommended to create a Façade to consolidate all the methods exposed using DWR, this will facilitate the management and mapping tasks.
public interface DwrFacade {
User findUser(String login);
}
Create and configure dwrContext.xml:
It is a good practice to keep all DWR definition in a separate context file. On this file two important definitions need to be provided. <dwr:configuration> indicate how DWR will marshal any custom type (i.e. User.java); DWR is pre-configured to handle Java types likes Long, String, etc… so no need to define those here. The other important part of the configuration is the declaration of which methods are going to be available for remote calls, for example: <dwr:include method=”findUser” />.
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.directwebremoting.org/schema/spring-dwr http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd"> <dwr:configuration> <dwr:convert type="bean" class="org.maudrit.quickstart.User"/> </dwr:configuration> <bean name="dwrFacade" class="org.maudrit.quickstart.DwrFacadeImpl"> <dwr:remote javascript="dwrFacade"> <dwr:include method="findUser" /> </dwr:remote> <aop:scoped-proxy proxy-target-class="false" /> </bean> </beans>
Configure applicationContext.xml:
On this sample, applicationContext.xml is the file initially loaded by Spring; since all dwr related definitions are on the dwrContext.xml, this file needs to be imported on the applicationContext.
... <import resource="dwrContext.xml"/> ...
Executing the sample:
Open a web browser and go the following URL http://[server]:[port]/quickstart-dwr-spring-mvc
Download a complete fully functional copy of the source here.
Raising the bar
Posted: March 7th, 2009 | Author: maudrit | Filed under: Random Thoughts | No Comments »Well-crafted software by a community of professionals is the main message of the Manifesto Software Craftsmanship.
As software become a commodity and the number of people writing software significantly increase, the need for ethic and professional values in the software community become more important than ever. Hopefully this great initiative by Robert C. Martin will make people re-think what been a software professional means bringing even higher standards to the industry.
Join us!,… Resistance is futile you will be assimilated.
The side effect of Test-Driven Design
Posted: March 7th, 2009 | Author: maudrit | Filed under: Agile | No Comments »Unit testing is an integral part of modern software development; it is difficult to imagine building reliable software in a cost effective way without the use of this valuable technique.
Most developers produce some kind of unit test script immediately after the creation of a component as a verification mechanism; approach that work pretty well most scenarios. But, working in this fashion don’t allow us to fully take advantage of all the benefits unit testing may bring, due to the fact that the test is only used as a verification and not as a tool to assist the developer in the understanding of the problem to be solved.
Test-driven design (TDD) calls for the creation of tests prior the implementation of the components. TDD considers testing an integral part of the detail technical design. Developing tests first (before producing any significant production code) helps in the understanding of the responsibilities and scenarios related to a component, inevitably improving the overall quality of the design.
“If it’s worth building, it’s worth testing. If it’s not worth testing, why are you wasting your time working on it?” - Scott W. Ambler
A test has multiple purposes, it provides a verification mechanism, it helps to identify refactories opportunities and also serves as an important part of the documentation of the component by illustrating the different conditions and scenarios handle by it.
Automation is a key part of good testing. Performing manual testing is not only unreliable but expensive and time consuming. Adopt tools that allow the automation of unit testing, integration testing and regression testing. Measure progress by introducing test converge tools to the build cycle to ensure the effectiveness of the test effort, but more important learn and understand what the metrics mean and take appropriate actions to achieve expected results.
All tests produced by a development organization should be considered an asset. Automated tests act as a safety net, providing a reliable way to introduce new features and changes to any code base in a cost effective way.
Thoughts?
Scrum with Ken Schwaber
Posted: February 27th, 2009 | Author: maudrit | Filed under: Agile | No Comments »
Copyright: All rights reserved by creator.
How To Design A Good API and Why it Matters
Posted: February 27th, 2009 | Author: maudrit | Filed under: Design Principles | No Comments »Great talk by Joshua Bloch that complements the Good Code topic (see post below).
Copyright: All rights reserved by creator.
