good gatein stuff

21
Good GateIn stuff Disclaimer : this will not be about visual things

Upload: jviet

Post on 06-Dec-2014

3.829 views

Category:

Technology


3 download

DESCRIPTION

Some slides I presented to eXo folks about GateIn stuff to give an overview

TRANSCRIPT

Page 1: Good GateIn Stuff

Good GateIn stuff

Disclaimer : this will not be about visual things

Page 2: Good GateIn Stuff

Model Object for Portal

• Workspace: the global object– Site: three kind of sites portal, group, user• Navigations: a tree of links

– Link : page link, URL link– Each navigation points to a layout reduced to using the

navigation of the root

• Pages: a tree of pages– The tree structure provides inheritance for page state reduced

to a flat set of named pages– Each page points to a root UI container

Page 3: Good GateIn Stuff

Object structure

Workpace

Site Navigation

Page

UI Container

Link

Page Link

URL Link

… Link

<<layout>>

<<shows>>

Page 4: Good GateIn Stuff

Content customization

Customization

Clone Specialization

CustomizationContextState

<<inheritance>>

Content

Page 5: Good GateIn Stuff

Portal customization context

• Several levels are potentially available– Shared by workspace objects• Workspace: used by application registry• Site: declared in portlet-preferences.xml• Page: usedfor page deep cloning

– Non shared: window

Page 6: Good GateIn Stuff

Customization inheritance

• Basic use case supported in 3.0– Application dropped from composer in page– The window customization references a

workspace customization

Page 7: Good GateIn Stuff

Additional customization context

Customization

Window context

Identity Context Navigation Context

Julien Tug Nav 1 Nav 2

MOP Framework Only

Page 8: Good GateIn Stuff

Content plugability

• Native support for content– Statefull • Portlet: Map<String, String[]>• Gadget: Map<String, Object>• WSRP: byte[]

– Stateless• Current status– Persistence : supported by adding new node type– GateIn level : partially supported

Page 9: Good GateIn Stuff

Layouting

• Three nested layouts– Shared layout

• Shared by all sites and not editable/persisted at the moment

– Site layout• Portal: the classic portal layout• Group layout: useful for adding group logo• User layout: shows the dashboard tab• Todo: per navigation node layout to provide different layout

of a navigation subtree

– Page layout• Layouts are pages in an hidden space

Page 10: Good GateIn Stuff

Model extension

• Each entity has a set of generic properties– Useful for driving the behavior

• Possiblity to add mixin to mop node types– Need to make mixin available at the object level

(Chromattic and MOP support)– Use case : add mixin to Site to add contain

additional resources

Page 11: Good GateIn Stuff

Content extension

• Content type plugin– MOP plugin• manages the content customization• manages import / export of the content• manages versionning of the content

– UI plugin• Show the content visually in the UI composer• Manage content in the application content registry

Page 12: Good GateIn Stuff

Chromattic and GateIn

• An object / JCR mapping engine– Not perfect yet– But heavily tested

• Enable development rich models• Efficient lazy loading• Controls the flow of your code (get rid of

hasNode/hasProperty/RepotoryException)

Page 13: Good GateIn Stuff

Type safe and simple access to datapublic Integer getFooOfBar(Bar bar /* type safe */){ return bar.getFoo(); // simple and typed}

public Integer getFooOfBar(Node bar) throws RepositoryException /* WTF? */ {

// Is it the right node? Should check its type… Integer size = null; if (node.hasProperty(“foo”)) // Is it here ? return (int)node.getProperty(“foo”).getLong(); return null;}

Page 14: Good GateIn Stuff

List support for ordering

List<Foo> foos= bar.getFoos();foos.add(0, foos.get(2));

throw new UnsupportedOperationException(“need to find someone to implement element order change as the nobody understands the API to do it”);

Page 15: Good GateIn Stuff

Find references by UUID (or Path)// Find the bar node pointing to fooBar bar = foo.getBar();

// With@OneToMany(type = RelationshipType.REFERENCE)@MappedBy(“foo”);public abstract Foo getFoo();

PropertyIterator i = foo.getReferences();while (i.hasNext()) { Property p = i.nextProperty(); Node referent = p.getParent(); if (isTypeOfNode(reference, “foo”)) { return referent; }}return null;

Page 16: Good GateIn Stuff

Chromattic work to do

• Detach / attach entity graph• Embeddable object support• Nodetypes.xml generation• Finalize 1.0 public API

Page 17: Good GateIn Stuff

Web Container Integration

• Deployment is based on Web Container Integration framework (aka WCI)– GateIn component that focus on integrating the

web container deployment and runtime– Easily be aware of web application life cycle

• Removes the need of ServletContextListener intrusion in web.xml– One listener to rule them all

Page 18: Good GateIn Stuff

GateIn descriptors

• Based on WCI events

– /WEB-INF/gatein-resources.xml• Declares CSS, skins and javascript

– /WEB-INF/gadgets.xml• Was already existing but now with a XSD

Page 19: Good GateIn Stuff

Groovy template

• Groovy template engine was rewritten– Increased performances– Provides contextual exceptions with template

name, line of code and even an excerpt of the failing code

Page 20: Good GateIn Stuff

Gadget unification

• Dashboard container is now stored in the containing MOP page instead of having a portlet that pointed to another container

• Use native gadget support• Avoid data federation• Simplify data life cycle (i.e page deletion

transitively deletes the dashboard)

Page 21: Good GateIn Stuff

Other stuff

• Identity integration via JBoss Picket Link• Open source SSO support (CAS, Josso,

OpenSSO)