A Techno Blog, mainly about Java

What Is Pectin

Built for GWT,  Pectin makes use of the Presentation Model perspective .  By this, Andrew Pietsch,  has implemented a library that handles a customized domain or state logic. Here is the demo.

Pectin Basics :

“data up” – frameworks that  map the form data  from domain bean definition(i.e struts) . The data is collected in regard to the bean definition. There is no business logic based on the User Interface in this model. Moreover, the UI is passive, and the logic is on the server side.

“bottom down” – the “data up” does not work well for GWT, since most of the logic moves to the client, and the server side is just a thin DAO wrapper. Pectin works with the domain bean without being constrained by it.

  1. View : may implement view or delegate to presenter model
  2. Bindings : binding widgets to model
  3. Presentation Model (with plugins) : data and handlers required by view, whereas plugins add additional state to data
  4. Adapters : creating ValueModel‘s from your domain data (dirty data or not)
  5. Domain – the data

Value model in Presentation model:  provides access and mutation methods (get/set) and notifications when the value is modified using  a (gin/juice like) declarative style api. (ValueModelMutableValueModel)

FieldModels are a ValueModel that hold a reference back to the form that created it.

Related [MVP]

July 12, 2010 Posted by | Web Design | Leave a comment

Rest Explained

link :

That is the Best description of Rest Ive read! Now I get it – I used to think it was just another competing way of getting information like RPC, SOAP, etc. But I understand from your article that it is a universal way of mapping information

  • Roy Fielding’s name is on the HTTP specification.
  • The HTTP protocol capabilities are not always utilized.
  • http address tells you the location of something anywhere in the world
  • REST is an architectural style. It defines a resource which the web address points to.  Each resource are simply concepts
  • A web page is a representation of a resource. There are many other formats for resources. Therefore, browser can prompt for a certain representation of a concept. Thus, the URL or web address to “the something” can be thought of as a noun.
  • Rest allows you to assign verbs to the nouns in away that makes sense (get,put,delete).

July 12, 2010 Posted by | Web Design | Leave a comment

HTML5 Fever

HTML 5 is in the headlines, and up until now, I haven’t been following as closely as I should have (i.e.

To get up to speed on the technology, this is a nice overview of html5 .

There is a html5 showcase running on Google’s  AppEngine via

GWT+ html5 : video:

July 11, 2010 Posted by | Web Design | Leave a comment

Google App Engine learnings

The Google App Engine framework

On project click properties -> Google -> App Engine -> Configure SDK

For me, C:\eclipse\plugins\\appengine-java-sdk-1.3.0\

Trying a Demo Application” : the SDK is located in your Eclipse installation directory, under plugins/, where VERSION is a version identifier for the SDK.

> appengine-java-sdk-1.3.0\bin\dev_appserver.cmd appengine-java-sdk-1.3.0\dem
my applicatiion id is dmbgwt

July 8, 2010 Posted by | Web Design | Leave a comment

JMS Intro

JMS ~ high load where you can add queue’s in front of it to handle weight

Asysnchronous , Message Oriented Middleware

JMS Message Type

Text Message,ObjectMessage,MapMessage..

Queue point to point messaging

Topic – publish /subscribe messaging

A Session is created from the Connection. Unit of work, transactional capability.  Responsible for creation of various JMS message types.

Producer (put message on), Consumer (pull message off)

Apache MQ

Destination – point to point or topic are examples

Spring has a JmsTemplate : delegates to collaborators to handle some of work

Message Converter – conver from objects to messages (SimpleMessageConverter)

DestinationResolver – resolve destination names (DynamicDestinationResolver or JNDIDestinationResolver)

Sending messages – one line methods or callback methods

producer call back or session callbacks

MessageDrivenBeans wait for the message. MessageConverters can be used on recption side.

JMS MessageListener aysnchronous reception

Spring has light light weight mechanism for listen for messages, as compared to EJB

SimpleMessageListenerContainer or DefaultMessageListenerContainer

Spring supports 2 phase commit

July 1, 2010 Posted by | Spring | Leave a comment


Testing in Spring 3.0 much better. Use @Setup or @Test , @RunWith  @ContextConfiguration annotations.

Mocks or Stubs ?

What is AOP

  • Capture functionality used throughout app in a single, reusable way, e.g. transaction, logging, security.
  • Transaction management, logging, security are cross cutting concerns cutting across multiple objects.
  • AOP is the implementation of these cross cutting concern.

Join point: a point in the execution of a program such as a method call or a field assignment. e.g., method1 in Class A and method2 in Class B are the join points that require transaction related advice.

Pointcut: An expression that selects one or  more join points. Advice can be associated with a pointcut expression and runs at any join point method.

Advice: Code that is executed at a particular join point that has been selected by a Poincut. Different types of advices are “around,” “before” and “after” advice.

Aspect:  A module that encapsulates pointcuts and advice. e.g., transaction, security, logging in this case.

Spring AOP uses aspectJ expression language:

designator (* package.Class.method*(..))

@Before @AfterReturning @AfterThrowing @After @Around


ACID: Atomic, Consistent, Isolated, Durable

ACEGI – former name for spring security ~ every other letter (missing B,D,F,H)

July 1, 2010 Posted by | Spring | Leave a comment