You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by "Chohan, Dharmesh" <dh...@atos.net> on 2014/01/02 17:54:12 UTC
RE: ISIS Newbie
Hi
I have 2 domain objects objectA and object. I can persist objectA and from objectA screen the control is returned to objectB domain screen.
On objectB form, the screen displays the domain properties. However the screen also displays the title/header as "General" and a "Edit" button.
I have 2 issues. One is after editing the form of objectB, the form is not persisted. The other thing is I want to replace the title of "General" and the "Ok" button on the screen to some defined values.
Please can anyone provide guidance on these issues.
Thanks in advance.
Dharmesh
From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
Sent: Saturday, December 28, 2013 11:02 PM
To: Chohan, Dharmesh
Cc: users
Subject: Re: ISIS Newbie
Hi Dharmesh,
... just to say again, I've replied to your questions below, but also have cc'ed the users@isis.apache.org<ma...@isis.apache.org> mailing list. However, in the future could you please subscribe to the users mailing list (send blank email to users-subscribe@isis.apache.org<ma...@isis.apache.org>) and ask questions that way rather than mailing me directly.
Thanks
Dan
On 24 December 2013 10:23, Chohan, Dharmesh <dh...@atos.net>> wrote:
Hi Dan
Thanks for your email. I have gone through the relevant links you provided and am still struggling to start prototyping a project. Here are my specific questions.
1. Starting a clean project what is the Maven command to create a template. I have run the quick start and the simple app.
mvn archetype:generate -D archetypeGroupId=org.apache.isis.archetype -D archetypeArtifactId=??? -D archetypeVersion=1.3.1 -D groupId=my.company -D artifactId=TopUp -D version=1.0-SNAPSHOT -B
2. What is the minimum implementation requirement to create a domain object.
The dom.simple.SimpleObject class *is* an example of a domain class. Try renaming this class (eg to Customer), renaming its properties, and then adding in new properties as you require.
To instantiate and persist and instance of this class, you can use dom.simple.SimpleObjects, which is the registered domain service that acts as a factory and repository for the SimpleObject entity. Try renaming this class to match the entity name (eg to Customers). (If you do rename, then also change isis.properties config file in WEB-INF).
3. This is what I am trying to achieve,
Show a text label
Show a fixed value field non editable
Show a text input field
Example
Enter your card number* (the last 12 digits only)
[cid:image001.png@01CF07D9.ED055100]
[cid:image002.png@01CF07D9.ED055100]
Fixed
Isis' viewers provide a default representation of every property, and at the moment this renders the label to the left of the field.
I suggest you focus on the domain entity's properties, and worry less about how it represented. Later on, we can get into how to customize the viewer if required.
I am also trying to disable the integration tests but they seem to be running when I do the "mvn clean install". I have closed the integration project and renamed the myapp-dom > src/test/java to /src/test/javaMOVED
What you've done will disable the unit tests. To disable/ignore the integration tests, you need to exclude the myapp-integtests module. You can do this by opening up the parent pom.xml (myapp/pom.xml), locate the <modules> section, and remove/comment out the <module>integtests</module> line.
Cheers
Dan
Thanks
Dharmesh
From: Dan Haywood [mailto:dan@haywood-associates.co.uk<ma...@haywood-associates.co.uk>]
Sent: Monday, December 23, 2013 12:49 PM
To: users; Chohan, Dharmesh
Subject: Re: ISIS Newbie
Hi Dharmesh,
Thanks for trying out Isis. Before you go any further, could you subscribe to the users ML (send blank email to users-subscribe@isis.apache.org<ma...@isis.apache.org>)? I'm replying here directly to you as well, but otherwise you'll miss any other replies.
To answer your questions...
On 23 December 2013 12:02, Chohan, Dharmesh <dh...@atos.net>> wrote:
Is there a documentation or
The documentation is all on [1], which - if you've gone through the quickstart - you've probably gone discovered already.
step by step guide for ISIS?
Lots of places you can look. (These are all linked from the documentation page [1]):
* the screenshots tutorial [2]
* the tutorial app I presented at a conference [3] (this is in github, has 22 separate tags for each of the steps, so is possibly closest to what you are after)
* the applib programmers guide [4]
* the Estatio app [5,6] ... this is an open source app that Jeroen (one of the other Isis committers) and I are working on; shows you what an Isis app looks like "in real life".
HTH
Dan
[1] http://isis.apache.org/documentation.html
[2] http://isis.apache.org/getting-started/screenshots.html
[3] https://github.com/danhaywood/rrraddd-isis-131
[4] http://isis.apache.org/applib-guide/about.html
[5] http://isis.apache.org/getting-started/powered-by.html
[6] https://github.com/estatio/estatio
Thanks
Dharmesh
Re: ISIS Newbie
Posted by Dan Haywood <da...@haywood-associates.co.uk>.
On 3 January 2014 12:14, Ged Byrne <ge...@gmail.com> wrote:
> Hi All,
>
> I'm working with Dharmesh and I thought I'd take a step back and ask a more
> general question.
>
Thanks, Ged... what follows is helpful.
> [snip]
>
> The problem is our requirements are all in screen flows that are using an
> inductive user interface style:
> http://msdn.microsoft.com/en-us/library/ms997506.aspx
>
> That is to say, it has a process based object that fills in the details for
> domain objects through a set of wizard like screens.
>
> For example, imagine you have a car insurance app. The domain object is a
> customer who has a vehicle, a bank account and an address history. There
> may also be a second driver.
>
> The UI screens first captures the customer detail and asks if there is a
> second driver. If there is, the next screen is the second driver details,
> otherwise it's the vehicle details. Then the address history one address
> at a time and finally the bank account.
>
> In the documentation it talks about creating "wizard-like process objects"
> that aggregate some state with respect to a certain process:
>
> http://isis.apache.org/applib-guide/how-tos/how-to-07-040-How-to-specify-that-an-object-should-not-be-persisted.html
> .
> I believe that is what we are trying to create.
>
>
That's a good guess, but there is now (as of v1.3.0+) a better way to do
this. I must get around to updating the docs :-(
Specifically, you can make your domain object implement
org.apache.isis.applib.ViewModel interface [1]. The example todo app
demonstrates this in the ToDoItemsByCategoryViewModel class [2], by
inheriting from AbstractViewModel [3].
Basically the interface requires that the object returns a string (which
can be arbitrarily long) in its viewModelMemento() method, and this is then
passed back into the view model on each subsequent interaction, through the
viewModelInit(String) method.
Typically the contents of the string is the identifier of one or several
underlying domain objects. Then, the view model looks up the domain
objects in each interaction. For a wizard-like process object, the string
would also need to encode the state of the wizard so it knows where it's up
to (eg which "screen" its on).
If you're happy to build from trunk, then you'll find there's a new service
ViewModelSupport [4] - with implementation ViewModelSupportDefault [5] -
that you can use to help build these strings. The BookmarkService [6] -
with implementation BookmarkServiceDefault [7] - can help generate a string
identifier for each domain object.
> Now we are using Isis to prototype the system. We want to rapidly
> prototype the screens and then factor out the domain model. In the final
> application there will be a separate presentation layer with JSF forms that
> then call the Restful Objects services, but we want to avoid that work in
> the prototype.
>
> Has anybody prototyped this style of interface before? Do you have any
> advice to offer?
>
>
The typical way to work with Isis is from the domain object model out, so
what you are doing is somewhat against the grain. But I think it is a
viable way to go about it.
It's probably worth identifying as many of the domain objects - even at a
high level - as you can, eg Customer, Vehicle etc. That way your process
object/view models will have something to talk to.
> As you can see from Dharmesh's post, our current approach is one object per
> form. Is that the right way to go about it?
>
I'd suggest one object per conversation, ie for the entire wizard. The
"Objects for State" pattern is probably a good way of implementing the
wizard. The different fields can be hidden/disabled (using hideXxx() and
disableXxx()) according to the state.
>
> Anything you can share with us would be greatly appreciated.
>
>
HTH, let us know how you get on.
Cheers
Dan
> Regards,
>
>
> Ged
>
>
>
[1]
https://github.com/apache/isis/blob/isis-viewer-wicket-1.3.1-RC1/core/applib/src/main/java/org/apache/isis/applib/ViewModel.java
[2]
https://github.com/apache/isis/blob/isis-viewer-wicket-1.3.1-RC1/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemsByCategoryViewModel.java
[3]
https://github.com/apache/isis/blob/isis-viewer-wicket-1.3.1-RC1/core/applib/src/main/java/org/apache/isis/applib/AbstractViewModel.java
[4]
https://github.com/apache/isis/tree/master/core/applib/src/main/java/org/apache/isis/applib/services/viewmodelsupport
[5]
https://github.com/apache/isis/blob/master/core/runtime/src/main/java/org/apache/isis/core/runtime/services/viewmodelsupport/ViewModelSupportDefault.java
[6]
https://github.com/apache/isis/blob/master/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkService.java
[7]
https://github.com/apache/isis/blob/master/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/bookmarks/BookmarkServiceDefault.java
>
> On 2 January 2014 16:54, Chohan, Dharmesh <dh...@atos.net>
> wrote:
>
> > Hi
> >
> >
> >
> > I have 2 domain objects objectA and object. I can persist objectA and
> > from objectA screen the control is returned to objectB domain screen.
> >
> >
> >
> > On objectB form, the screen displays the domain properties. However the
> > screen also displays the title/header as “General” and a “Edit” button.
> >
> >
> >
> > I have 2 issues. One is after editing the form of objectB, the form is
> not
> > persisted. The other thing is I want to replace the title of “General”
> and
> > the “Ok” button on the screen to some defined values.
> >
> >
> >
> > Please can anyone provide guidance on these issues.
> >
> >
> >
> > Thanks in advance.
> >
> > Dharmesh
> >
> >
> >
>
Re: ISIS Newbie
Posted by Ged Byrne <ge...@gmail.com>.
Hi All,
I'm working with Dharmesh and I thought I'd take a step back and ask a more
general question.
First some background: we want to use domain driven design to create a set
of entities and services that can be used by multiple applicaitons through
the Restful Object interface.
The problem is our requirements are all in screen flows that are using an
inductive user interface style:
http://msdn.microsoft.com/en-us/library/ms997506.aspx
That is to say, it has a process based object that fills in the details for
domain objects through a set of wizard like screens.
For example, imagine you have a car insurance app. The domain object is a
customer who has a vehicle, a bank account and an address history. There
may also be a second driver.
The UI screens first captures the customer detail and asks if there is a
second driver. If there is, the next screen is the second driver details,
otherwise it's the vehicle details. Then the address history one address
at a time and finally the bank account.
In the documentation it talks about creating "wizard-like process objects"
that aggregate some state with respect to a certain process:
http://isis.apache.org/applib-guide/how-tos/how-to-07-040-How-to-specify-that-an-object-should-not-be-persisted.html.
I believe that is what we are trying to create.
Now we are using Isis to prototype the system. We want to rapidly
prototype the screens and then factor out the domain model. In the final
application there will be a separate presentation layer with JSF forms that
then call the Restful Objects services, but we want to avoid that work in
the prototype.
Has anybody prototyped this style of interface before? Do you have any
advice to offer?
As you can see from Dharmesh's post, our current approach is one object per
form. Is that the right way to go about it?
Anything you can share with us would be greatly appreciated.
Regards,
Ged
On 2 January 2014 16:54, Chohan, Dharmesh <dh...@atos.net> wrote:
> Hi
>
>
>
> I have 2 domain objects objectA and object. I can persist objectA and
> from objectA screen the control is returned to objectB domain screen.
>
>
>
> On objectB form, the screen displays the domain properties. However the
> screen also displays the title/header as “General” and a “Edit” button.
>
>
>
> I have 2 issues. One is after editing the form of objectB, the form is not
> persisted. The other thing is I want to replace the title of “General” and
> the “Ok” button on the screen to some defined values.
>
>
>
> Please can anyone provide guidance on these issues.
>
>
>
> Thanks in advance.
>
> Dharmesh
>
>
>