background preloader

SLF4J

SLF4J

Java Web Development with Stripes by Mark Eagle 01/24/2007 Stripes is an open source, action-based Java web framework designed around the principles that web development should be simple and productive for developers. Traditional Java web development focused on versatility through decoupling, which resulted in multiple configuration files, additional objects, and other fragmented resources. These difficulties subjected many developers to a higher learning curve and reduced productivity. Figure 1 shows the normal flow of events and components that are typical for applications that are written with Stripes. Figure 1. As you can see, this is pretty much what you would expect from an MVC framework. Building Your First Stripe Action Let's jump right into the Stripes framework by creating a "Hello World" example to understand how things fit together. The controller class resembles a POJO (Plain Old Java Object) that implements a Stripes-specific interface called ActionBean. Person First Name is a required field.

JUNG - Java Universal Network/Graph Framework Mockito (Mockito API) java.lang.Object org.mockito.Matchers org.mockito.Mockito Direct Known Subclasses: BDDMockito public class Mockitoextends Matchers Mockito library enables mocks creation, verification and stubbing. This javadoc content is also available on the web page. 1. Following examples mock a List, because everyone knows its interface (methods like add(), get(), clear() will be used). 1. //Let's import Mockito statically so that the code looks clearer import static org.mockito.Mockito.*; //mock creation List mockedList = mock(List.class); //using mock object mockedList.add("one"); mockedList.clear(); //verification verify(mockedList).add("one"); verify(mockedList).clear(); Once created, mock will remember all interactions. 2. By default, for all methods that return value, mock returns null, an empty collection or appropriate primitive/primitive wrapper value (e.g: 0, false, ... for int/Integer, boolean/Boolean, ...). 3. Argument matchers allow flexible verification or stubbing. 4.

Logging facade that allows various implementations to be used like log4j, java logging, commons logging. The chap that made this library has his own logging framework that is supported( by superunknown Apr 10

Related: