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