Hi,
I spent a bit of time reviewing this and the immediate feedback I can do is:
1/ I see improvement in Chris work about the ID part and I think the Id<T> is quite
good with the factory method that make them intuitive to create.
However on the stylistic view my opinion is that it would make sense to avoid the
"get" style like getUserId and simply have "userId" because static
import allows to write:
User root = Users.get(userId("root"));
instead of:
Id<User> id = Ids.getUserId("root");
User root = Users.get(id);
2/ There are two parts which are out of scope of the current API that we should remove
which are the portal container and the UI component.
The current API should not mention the portal container and every work should be scoped to
the current portal container. This notion exist for isolating deployments (for instance
one portal container per customer). I think Matt has this right so far but not Chris API
that mentions it.
The UI component part is not part of the scope of the current API and we should leave it
aside and address it later. However we still need the Page notion but as a way to find
pages (not create them because we don't address for now the UI component part). Mostly
pages will be associated with navigations programmatically.
I will do further comments after the point 2/ is addressed (it should unclutter a bit the
API).
On May 25, 2011, at 5:08 AM, Matt Wringe wrote:
There have been some discussion on creating an api package to create
a
simple way for people to interact and manipulate a gatein portal.
Example situations would be things like creating a gadget, adding an
application to a category, creating a page and adding it to a node,
adding applications to a page, managing users, etc...
Two different solutions have been created, both are a bit different in
approach. These are preliminary and are not meant to be complete, it is
more meant to start of a discussion:
https://github.com/metacosm/gatein-api
https://github.com/mwringe/gatein-api
Lets start a discussion on the above apis and what you would expect to
come from an api like this.
_______________________________________________
gatein-dev mailing list
gatein-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/gatein-dev