You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by Mohammad Nour El-Din <no...@gmail.com> on 2011/04/06 04:25:24 UTC

Dan's interview on InfoQ

Way to go Dan ;) - [1].

[1] - http://www.infoq.com/articles/haywood-ddd-no

-- 
Thanks
- Mohammad Nour
  Author of (WebSphere Application Server Community Edition 2.0 User Guide)
  http://www.redbooks.ibm.com/abstracts/sg247585.html
- LinkedIn: http://www.linkedin.com/in/mnour
- Blog: http://tadabborat.blogspot.com
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

"Writing clean code is what you must do in order to call yourself a
professional. There is no reasonable excuse for doing anything less
than your best."
- Clean Code: A Handbook of Agile Software Craftsmanship

"Stay hungry, stay foolish."
- Steve Jobs

Re: Dan's interview on InfoQ

Posted by Dan Haywood <dk...@gmail.com>.
Thanks for your supportive words, dude!




On 06/04/2011 11:46, Alexander Krasnukhin wrote:
> I always think how it's strange to have quote about clean code & 
> signature 18 lines long at the same time.
>
> On Wed, Apr 6, 2011 at 4:25 AM, Mohammad Nour El-Din 
> <nour.mohammad@gmail.com <ma...@gmail.com>> wrote:
>
>     Way to go Dan ;) - [1].
>
>     [1] - http://www.infoq.com/articles/haywood-ddd-no
>
>     --
>     Thanks
>     - Mohammad Nour
>       Author of (WebSphere Application Server Community Edition 2.0
>     User Guide)
>     http://www.redbooks.ibm.com/abstracts/sg247585.html
>     - LinkedIn: http://www.linkedin.com/in/mnour
>     - Blog: http://tadabborat.blogspot.com
>     ----
>     "Life is like riding a bicycle. To keep your balance you must keep
>     moving"
>     - Albert Einstein
>
>     "Writing clean code is what you must do in order to call yourself a
>     professional. There is no reasonable excuse for doing anything less
>     than your best."
>     - Clean Code: A Handbook of Agile Software Craftsmanship
>
>     "Stay hungry, stay foolish."
>     - Steve Jobs
>
>
>
>
> -- 
> Regards,
> Alexander
>

Re: Dan's interview on InfoQ

Posted by Alexander Krasnukhin <th...@gmail.com>.
I always think how it's strange to have quote about clean code & signature
18 lines long at the same time. [?]

On Wed, Apr 6, 2011 at 4:25 AM, Mohammad Nour El-Din <
nour.mohammad@gmail.com> wrote:

> Way to go Dan ;) - [1].
>
> [1] - http://www.infoq.com/articles/haywood-ddd-no
>
> --
> Thanks
> - Mohammad Nour
>   Author of (WebSphere Application Server Community Edition 2.0 User Guide)
>   http://www.redbooks.ibm.com/abstracts/sg247585.html
> - LinkedIn: http://www.linkedin.com/in/mnour
> - Blog: http://tadabborat.blogspot.com
> ----
> "Life is like riding a bicycle. To keep your balance you must keep moving"
> - Albert Einstein
>
> "Writing clean code is what you must do in order to call yourself a
> professional. There is no reasonable excuse for doing anything less
> than your best."
> - Clean Code: A Handbook of Agile Software Craftsmanship
>
> "Stay hungry, stay foolish."
> - Steve Jobs
>



-- 
Regards,
Alexander

Re: Dan's interview on InfoQ

Posted by dan haywood <da...@haywood-associates.co.uk>.
On 26 April 2011 05:35, Christian Schuhegger <Ch...@gmx.de>wrote:

> Hello list,
>

> Hi Christian,
good to see you here.


>
> To make a long story short: could somebody please give me a few pointers
> where I can start to investigate how Isis handles metadata?  How I can query
> the metadata?



IsisContext.getSpecificationLoader().allSpecifications() will return all the
ObjectSpecifications.  This is analagous (and wraps) java.lang.Class.  It
provides three collections: properties (of type OneToOneAssociations),
collections (of type OneToManyAssociation) and actions (ObjectAction).
These are all cf. java.lang.Method.  ObjectAction in turn has a collection
of ObjectActionParameters.

A good way to see the metadata is by running up the Restful viewer.
Alternatively the DnD viewer has a debug view (ctrl-shift-click) which lets
you see what's there.



and how I can "plug-in" another meta data provider?
>
>
I've been working on the documentation for this recently, but haven't yet
uploaded to the site.  So, to answer your question directly...

The key API you need to know about is FacetFactory, the purpose of which is
to identify "facets" of the metamodel.  An example of a Facet is noticing
the @Hidden annotation to declaratievly hide a class member, but they are
not restricted to just annotations; another one would be to notice the
hideXxx() method used to imperatively hide a class member.  In theory they
could get their information from anywhere, not just from the domain
objects.  As you can imagine, there are many, many FacetFactorys.

The main Facet API (Facet, FacetHolder, FacetFactory etc) is defined in
[oai.core:metamodel].  This also includes facets that are "well-known" by
viewers, eg the TitleFacet which is used to identify the title/label of an
object.  The implementations of the FacetFactorys live in
[oai.core:progmodel], which constitutes a library of FacetFactorys.

Not all facets are "well-known"; what makes them interesting is that they
implement HidingInteractionAdvisor, DisablingInteractionAdvisor or
ValidatingInteractionAdvisor.  Any facets that implement these interfaces
can veto any interactions ("can you see it? can you use it? can you do
it?").

There are a number of other variations of FacetFactory, such as
PropertyOrCollectionIdentifyingFacetFactory, which is called early on in
order to establish the "shape" of the domain object.  It's unlikely you
would ever provide a different implementation of these other variants.

FacetFactorys are collected together into the ProgrammingModel API, also
defined in [oai.core:metamodel].  The default implementation is
ProgrammingModelFacetsJava5, which resides in [oai.progmodels:dflt].  To
change the programming model, you can either

a) write your own implementation of this API (probably subclassing the
default) and then register in isis.properties using:
isis.reflector.facets=com.mycompany.isis.MyProgrammingModel

or

b) just register your new facets in isis.properties using:

isis.reflector.facets.include=com.mycompany.isis.MyFirstFacetFactory,com.mycompany.isis.MySecondFacetFactory

It's also possible to exclude facets using isis.reflector.facets.exclude.

~~~~~~~~~~
Here's a couple of ideas for you to get you started:
* NameFileFacetFactory - is in the trunk/examples, picks up names from a
properties file
* TitleAnnotationFacetFactory - pick up @Title as an annotation for facets
rather than the title() method
* StringLengthBetweenFacetFactory - pick up @StringLengthBetween(6,10) to
require strings are within specified length

(I intend to add these to the docs at some point as worked examples)



> Thanks,
> --
> Christian Schuhegger
> http://www.el-chef.de/
>


Cheers
Dan

Re: Dan's interview on InfoQ

Posted by Christian Schuhegger <Ch...@gmx.de>.
Hello list,

I've already put a comment on the InfoQ page of Dan's interview and 
started an initial discussion there. But I think the better place for 
such a discussion is this list.

The things that I would be most interested in about Naked Objects is its 
metadata model and its metadata facilities. As Dan put it at the end of 
his book: "It's Not About the Viewers", the focus is on the metamodel 
and that's in my opinion the right focus! That's by the way a reason why 
I don't think that Apache Isis should be compared to frameworks like 
metawidget, because those frameworks area really about the Viewers. They 
are in the same way too limited as JSR 303 and JPA are too limited. In 
my opinion you need one place (DRY) where you specify all the metadata 
you need on the different layers.

To make a long story short: could somebody please give me a few pointers 
where I can start to investigate how Isis handles metadata? How I can 
query the metadata and how I can "plug-in" another meta data provider?

Thanks,
-- 
Christian Schuhegger
http://www.el-chef.de/

Re: Dan's interview on InfoQ

Posted by Dan Haywood <dk...@gmail.com>.
On 23/04/2011 13:06, Mark Struberg wrote:
> Thing is that successful projects with a big contributor base create a low entry barrier for new committers. It's for example really easy to write a maven plugin - as a direct result, maven has 100++ active committers.
Indeed.  One of the reasons I've been working on the structure of Isis 
and also on its documentation is to make it easier for contributors.  
Mind you, while it'd be lovely to get to 100+ committers, I don't think 
that's ever likely to happen for Isis ... the need for DDD platforms 
just not as ubiquitous as the need for a build system.


> 2nd observation: successful projects most times have a SPI or another mechanism to easily 'extend' their functionality. This makes it easier to adopt new ideas and people have an easy path to becoming a core committer.
I think we're in good shape here ... the FacetFactory API is a great 
design.  And the Wicket viewer has lego pieces that feel about the right 
size.  I suspect the same is true for the Scimpi viewer too.

The larger, more coarse-grained APIs are also starting to come together 
too, at least in my head.  For example, I'm glad I've now factored out 
the concept of a "runtime" API... that gives us a way to move towards 
simpler JEE v6-based or NoSQL-based runtimes in the future.

Cheers
Dan


> LieGrue,
> strub
>

Re: Dan's interview on InfoQ

Posted by Mark Struberg <st...@yahoo.de>.
It's actually good to make some advertisement for Isis. Open Source has no problem with the side effect of shameless self promotion - that's part of it ;)

Most people don't get it that you cannot make huge amounts of money with OSS - but you can _safe_ tons of money by using OSS, because you not only share your idea but you also share your 'problems and challenges'. It's simply better to develop tools together and share the effort.

The original writers get a lot free 'testers' which usually provide feedback. And users which dig into it deeper should try to get involved in those projects because it's a real benefit for them by having the chance to fix their problems in almost no time! 

There is NO software product out in the wild which has no bugs at all. By getting involved a committer can just fix those bugs him/herself and make sure that this will be part of the next official release. The alternative to this approach is to plaster your own code with workarounds (like we have been used to do with M$ tooled projects). But after a few years you will not even know which part of your code is really necessary and which is only a workaround for a bug which is long time gone...


Thing is that successful projects with a big contributor base create a low entry barrier for new committers. It's for example really easy to write a maven plugin - as a direct result, maven has 100++ active committers. 

2nd observation: successful projects most times have a SPI or another mechanism to easily 'extend' their functionality. This makes it easier to adopt new ideas and people have an easy path to becoming a core committer.

LieGrue,
strub

--- On Sat, 4/23/11, Dan Haywood <dk...@gmail.com> wrote:

> From: Dan Haywood <dk...@gmail.com>
> Subject: Re: Dan's interview on InfoQ
> To: isis-dev@incubator.apache.org
> Date: Saturday, April 23, 2011, 10:48 AM
> Apols for the self-promotion, but my
> little interview on InfoQ [1] has 
> attracted a very nice comment by a chap by the name of
> Christian Schuhegger.
> 
> Hopefully we'll see him here!
> 
> Cheers
> Dan
> 
> [1] http://www.infoq.com/articles/haywood-ddd-no
> 
> On 06/04/2011 03:25, Mohammad Nour El-Din wrote:
> > Way to go Dan ;) - [1].
> >
> > [1] - http://www.infoq.com/articles/haywood-ddd-no
> >
> 

Re: Dan's interview on InfoQ

Posted by Dan Haywood <dk...@gmail.com>.
Apols for the self-promotion, but my little interview on InfoQ [1] has 
attracted a very nice comment by a chap by the name of Christian Schuhegger.

Hopefully we'll see him here!

Cheers
Dan

[1] http://www.infoq.com/articles/haywood-ddd-no

On 06/04/2011 03:25, Mohammad Nour El-Din wrote:
> Way to go Dan ;) - [1].
>
> [1] - http://www.infoq.com/articles/haywood-ddd-no
>