Papers, Articles & Talks:
Unit testing with mock objects in ActionScript 3.0, Paulo Caroli and Jason Peters, Adobe Developer Connection, January 2009, on the web
When you perform unit tests, it is not always possible to verify that an object does what you expect by examining that object directly. Instead, you may need to examine the collaborations between objects. Mock object frameworks simplify behavior verification—the process of verifying the interaction between dependent components.
This article is intended for developers interested in adding behavior verification to their unit tests. It discusses the role of behavior verification in unit testing and introduce the basics of Mock4AS, a lightweight mock object framework for ActionScript 3.0.
Mock Objects in action, Paulo Caroli and Sneha Jha, IndicThreads.com Conference On Java, Pune, India, November 2008. slides
This session provides the participants with understanding of Mock Objects need and concept, as well as with hands-on-experience of JMock, EasyMock and Mockito--java based Mock Objects frameworks. Applying Mock objects effectively is a key factor when following the Unit Testing practice (testing units of work in isolation). This session will introduce the reasoning for Mock Objects as well as the basics of the most popular Java Mock Object frameworks –JMock, EasyMock and Mockito. This session starts with a presentation, followed by a hands-on sample unit test code analysis. At the end of this 90 minutes hands-on session, the participants will get familiarity in using Mock Objects effectively. This session is intended for developers familiar with Java and JUnit and are interested in learning Mock Objects. The samples used in this session have been selected to demonstrate various functionalities and applications of Mock Object frameworks.
XP and Design; where did the design phase go?, Paulo Caroli and Sudhindra Rao, IndicThreads.com Conference On Java, Pune, India, November 2008. slides
Where did the Design phase go? There is a misconception that XP does not promote design. In fact, it is quite the opposite. In this session I will cover XP design, putting it in context with more traditional development approaches. I will also explain how XP promotes continuous design improvement through Simple Design, Continuous Integration, Test Driven Development (TDD) and Refactoring. By following the XP practices developers evolve their code (and design) using incremental proven steps. Moreover this is done without waste (over-design).
While being a TDD--Test Driven
Development--coach, Paulo Caroli always asked about testing private methods. He
finally decided to write about his experience on testing private methods.
It is quite common to make analogies between the IT industry and Civil engineering. Developers often compare software development and design with construction projects; for example, the importance of having a blueprint and following known successful practices. I have some hesitations about using analogies between these industries. I find the resources used by both industries fairly different and for that reason the analogies can create false expectations and reasoning. Nevertheless, I have been successfully using the analogy of building a bridge for explaining Agile development…
Agile Evolutionary Design, Paulo Caroli, Agile China Conference, Beijing, China, June 2008. slides
In this session, I explore Agile Evolutionary Design, which concentrates on the continuous design improvement through Continuous Integration, Test Driven Development (TDD) and Refactoring. Agile Evolutionary Design allows developers to transform simple code (Keep It Simple) into a well-structured design by constantly transforming code smells into better designed solutions. Best practices and real-world examples will be highlighted in this presentation.
Writing and running functional tests for Flash with Selenium RC, Paulo Caroli and Henrik Lindahl, Adobe Developer Connection, June 2008, on the web
Functional tests are intended to help you verify that a system, as a whole, functions as intended. Such tests verify that everything is wired together correctly. Selenium is an open-source testing tool for web applications. Selenium tests run directly in the web browser itself, mimicking what real users do. Furthermore, it supports a large variety of browsers and platforms. It is especially useful for executing tests to verify web application functionality and user acceptance. We used Selenium in our last project to verify that a web application (which contains one or more Flash components) worked the way we wanted.
Flash-AS3 Test Certified development experience report, Paulo Caroli, Henrik Lindahl and Martin Ohman, Google TestaPalooza, March 2008.
In this session we talk about our experience on developing and testing Trendalyser, a flash-AS3 based application. We will cover our experience with flash and AS3 in regards of: Continuous Build, Unit test, Mock Objects and End-to-end Test.
Complementing Unit Test with Dependency Injection and Mock Objects, Paulo Caroli and Peter Epstein, Google TestaPalooza, March 2008.
A briefly introduction to Dependency Injection and Mock Objects concepts, followed by case studies and sample scenario of how those concepts complementing Unit Test and testing development practices.
Evolutionary Design through TDD and Refactoring practices Presenters: Paulo Caroli, Kurman Karabukaev , Google TestaPalooza, March 2008. (Certificate of Excellence)
An exploration on Agile development practices such as Simple and Evolutionary Design and the link to the test practices and the fundamental aspects being the ability to emerge elaborated – and well funded (tested) - applications.
In this session, I explain how Dependency Injection and Mock Objects complement Unit Tests and TDD – Test Driven Development.
Session Agenda: Unit Test and TDD, Testing Dependent Components, Dependency Injection, Mock Objects, Case Study, Conclusion, Q&A.
Traditionally, different modules are developed by different teams/developers and these are integrated at late state of project. Continuous Integration takes a different approach.
"Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible…" by Martin Fowler
In this session, I will introduce Refactoring and TDD (Test Driven Development) as the foundation for Agile Evolutionary Design; I will explain how the practice of Refactoring to Patterns permits code simplicity to turn into well-know design patterns. I will use real world experiences and selected case studies to illustrate this concept.
Session agenda: Refactoring and TDD, Refactoring and Functional Requirements, Refactoring and Agile Techniques, Simple Design and Code Smells, Refactoring to Patterns, Case Studies, Conclusion, Q&A.
“Most of the
“In this article, Paulo Caroli introduces the basics of using JMock, a Mock object framework, in conjunction with Test-Driven Development. To illustrate the technique, he works through a case study, the creation of a cache component by means of test-first development with JMock.” (introduction)
“The TimeZonePatch presented in this article provides a flexible solution for patching the java.util TimeZone against incorrect time zone data. A factory of TimeZone patches, TimeZonePatchListFactory, provides the ability to read correct time zone data from appropriate data sources or even create new time zones. Furthermore the presented solution patches only the time zones created by the factory, although it still works for the remaining SDK timezones.” (conclusion)
applications' multiple environment configurations,
“This article introduces a
mechanism for organizing application configuration parameters despite the
number of runtime environments. This configuration mechanism is designed to
systematize the arrangement and access of Java application configuration
parameters. It is composed of interconnecting parts: configuration folder
schema, configuration parameter reader, and launch command outline. After
detailing each part of the configuration mechanism, author
the Service Locator,
“What can you do in a typical J2EE application in which a server-side, service-initialization error detains the client application, yet it's critical that the client application remain available? Let's look at a service locator-based solution for avoiding this kind of undesirable client application start-up problem. The client application, which does not execute in an Enterprise JavaBeans (EJB) container, is composed of several clients that locate the EJB through the service locator as part of the client application initialization process.” (abstract)
parsing to generate your JavaBeans' XML representation?,
“Empower your JavaBeans to handle data conversion to and from their XML document format without complicating the code. This tip shows you how to write and use a component to convert a JavaBean to its XML document representation and vice versa.” (abstract)
JSP course contents for Omni Pros “e-learning Solutions suite”. Omni Pros copyright, April 2003.
Table of Contents: An Introduction to JSP architecture, JSP Scripting elements, JSP Directives, JSP Action Tags and Custom tags and tag libraries.
Making your J2EE Application Web
“The XML Business Delegate provides a solution to facilitate a mapping from an object-oriented system to a service-oriented one. This article shows you how you can combine J2EE Design Patterns, such as the Business Delegate, the Session Facade, and the DTO, with XML, to make your EJB application ready for Web services.” (abstract)
A Java-JSP Menu Builder for
“When a single static array of menus isn't a viable option, HM implementors often turn to server-side techniques. This case-in-point solution utilizes JSP technology to auto-generate HierMenu arrays on a page by page basis.” (abstract)
Letters to the Editor - discussions about the “Repair invalid cached services in the Service Locator pattern” article, JavaWorld, August 2002. on the web
“How do you handle an invalid service on the client side? Can TRMI (Transparent Remote Method Invocation) help with serializable objects? How does JAR work with third-party libraries? JavaWorld authors answer those questions and more in this month's Letters to the Editor.” (abstract)
Repair invalid cached services in the
Service Locator pattern,
“The Service Locator pattern, commonly used in EJB (Enterprise JavaBean) development, reduces code complexity, gives a single point of control, and improves performance by providing a caching facility. Unfortunately, cached services cause unexpected error situations. This article introduces the Verified Service Locator pattern, which enhances the Service Locator pattern by ensuring the validity of its cached services.” (abstract)
An Architecture for the Evolution of Web Applications, P. Caroli, C. J. Lucena, and M. F. Fontoura, Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'2000), Minneapolis, USA, 2000 (Extended abstract, OOPSLA'2000 Companion, 83-84). Download
“This work presents a software architecture that is especially useful for managing the evolution of web applications. Web-based systems are a range of applications for which there are no technological standards and new concepts and tools are currently under evolution. Examples of this lack of standards include the transition from CGI scripts to Java Servlets and to Java Server Pages (JSP). Therefore, the maintenance and evolution of web applications is an important topic for software developers and the software research community. The proposed architecture combines the n-tier, broker, and blackboard architectural patterns.” (abstract)
A Methodology for developing
“In spite of the increasing utilization of the Object Oriented paradigm, there still exists reluctance on its application in the development of systems as, for example, Web Information Systems. In these type of applications, User Interfaces are in general event oriented and the majority of the Databases are Relational.
This work proposes a Three-Tier Architecture for the development of systems that can be naturally divided in User Interface, Business and Persistence layers. It also proposes a Methodology for the development of the Business layer.
objectives of this work are:
Applying the concepts here put forth in real projects validated the work.” (abstract)
Open Source Projects:
Flash-Selenium – Selenium extension for testing Flash Applications, http://code.google.com/p/flash-selenium/. Paulo Caroli, as project admin and developer, 2008.
The flash-selenium project aims to extend the Selenium RC clients for adding Flash communication capabilities. The Flash/Selenium RC client extension is available for the following Selenium RC client drivers: Java, .Net, Ruby and Phyton.
Mock4AS – Mock Objects for ActionScript, http://code.google.com/p/mock4as/ . Paulo Caroli, as project admin and developer, 2007.
Mock4AS is a simple Mock Object Library for ActionScript3. The current version of Mock4AS provides a minimalistic Mock Objects library fulfilling the basic Unit Tests mocking needs. To get started download the latest version of Mock.as and add it to your project.
Hello Open Source Web Site - www.helloopensource.org. Paulo Caroli, as the owner, creator and collaborator, 2007.
This collaborative Web Site presents “Hello World” tutorials for Open Source technologies. The “Hello World” tutorials are concise and simple. Their main goal is to help you develop a Hello World for the given Open Source technology. Tutorial List: ActionScript, Ant, EasyMock, Flex Builder 2, FlexUnit, JDK, Guice, Hibernate, Java using Eclipse, JMock, JUnit, Maven, MySQL, MySQL GUI Tool, Ruby On Rails using EasyEclipse, Spring, Tomcat, Waffle, WTP.
Mock Objects Samples Web Site - www.mocksamples.org . Paulo Caroli, as the owner, creator and collaborator, 2007.
This site provides a few Mock Objects samples and its implementations in distinct technologies. ActionScript (AS3), Java, FlexUnit, JUnit, Mock4As, Mockasin, EasyMock, JMock.
MapPoint4J, Paulo Caroli, project admin and developer, www.sourceforge.net, May 2006. on the web
MapPoint4J is an open source java library built to facilitate the integration of java client applications to Microsoft MapPoint Web Service.
Tomcat/conf Reader, Paulo Caroli, project admin and developer, www.sourceforge.net, April 2006. on the web
The TomcatConfReader component provides a straightforward approach for reading your web application configuration information from TOMCAT/conf folder.
XML / HTTP Web Service,
This project brings a XML over HTTP implementation of Web Services technology. In few minutes you will be able to deliver static and dynamic XML contents over HTTP.
This project brings implementations of BeanXMLMapping interface based in existing Java/XML parser solutions. The offered BeanXMLMapping components provide straightforward ways to convert a JavaBean to its XML document representation and vice versa.
The TimeZonePatch is a flexible java based OS free solution for patching the java.util TimeZone against incorrect time zone data. A factory of patched TimeZones, provides the ability to read correct time zone data from appropriate data.