Full-fledged example?

Hi Allard,

I started building my own Axon sample application and found the
current example included in the project is too simple. It leaves too
many questions for new framework users. I think the framework will
live or die with having good samples and tutorials explaining how to
build applications with Axon.

What about creating a full-fledged example project?

Goals:
- Easy enough to understand
- Big enough to have a full-flavored domain model (Redesigned "Java
Pet Store 2.0"?)
- Step by step tutorial from the idea to the final application
- Group for discussing the application design
- Subversion repository for the sample project (java.net?)
- Anyone interested can participate
- Website with live demo

What do you think?

Cheers,
Michael

Maybe it's a good idea to adapt the DDD Sample Application?
http://dddsample.sourceforge.net/index.html

Michael,

an excellent idea. I already started work on a more CQRS-worthy sample with Jettro, but the idea of a community driven sample project does sound nice.

I am working on getting a bit more time to work on Axon and related projects, such as a better site that allows more
Community involvement (forum, blogs, how-to, etc).

Did you have any ideas already on how to support/manage this?

Cheers,

Allard

Did you have any ideas already on how to support/manage this?

I can sponsor a virtual linux server (2 GB Memory, 100 GB Harddisk)
and we can put Jira, Confluence, Hudson & Subversion on it (all free
for Open Source). All I need is at least 1-2 co-admins for this
(installation & long term supporting the server together with me). I
also started creating an example Axon project structure (Maven &
Eclipse based) - We may it as as a starting point.

I think using it for running the sample and maybe Hudson it would be nice. For things like jira/confluence/subversion I’d opt for a more public repo like Gitorious, Github or google code.

I could help out with the administration of the server.

regards Jettro

Hi Jettro,

I think using it for running the sample and maybe Hudson it would be nice.
For things like jira/confluence/subversion I'd opt for a more public repo
like Gitorious, Github or google code.

Sounds as if http://code.google.com or http://www.java.net may fit (I
don't know the GIT based stuff) -
But then a complete server seems to be oversized. Anyone knows a cheap
& good Tomcat web hosting provider?
This is enough for running the app and a build server isn't really
necessary to start.

I could help out with the administration of the server.

Great!

Cheers,
Michael

If no one vetoes, I'm going to create a new project at http://code.google.com
with an additional discussion group this weekend.

What type of example application we're going to build?

Something useful? An address book application for example?

Or simply adapt the DDD Sample Applicaton http://dddsample.sourceforge.net/index.html
?

Any ideas?

Hi Michael,

google code is a good place for the project. What were you going to call it? axonsample?

I don’t think an extra discussion group is necessary. Or did you really mean to use that mailinggroup as one purely for the developers of the sample? Questions related to design could very well be posted on the existing axonframework group (this one). That way, all questions are on the same location, making it easier to search.

As of the type of application, I wouldn’t go for the address book. That type of application has shown to be too simple to show the more advanced features (unless you like to go for some far-fetched functional requirements).
Some ideas that came up:

  • the pet store (which is quite known in Java land, but yet-another-order-orderline kind of app)
  • an online auction (which can show how time-based saga’s could work)

You should be aware of the fact that in many applications (like the pet store), most effort goes into front-end development. The back end is usually quite quickly created. I am affraid the pet store will cost a lot of design work. The online auction can probably be kept a lot simpler in the front end.

What do you think?

Cheers,

Allard

Don’t forget that axon already comes with an addressbook sample. That might be confusing

Jettro

OK, then we have:

- online auction as example
- google code with name "axon-auction-example"
- This discussion group (Axon Framework Users)

UI stuff should be no problem as I'm experienced with creating Swing
UIs (if necessary).

What do you think about the "Bid Now Sample"?
http://code.msdn.microsoft.com/BidNowSample

I think that's a pretty good starting point. We can always change some of the features if needed to showcase some aspects not included in Microsoft's version

Cheers,

Allard

Here is a first idea how to structure the project:

http://www.fuin.org/files/axon-auction-example-structure.gif

I think it's vital to keep the different parts of the system separated
to make the responsibilities as clear as possible. Every part is also
separate Maven project. The libraries contain the shared code between
the connected parts. Not shown yet on the diagram is a web application
and/or a richt client that makes use of the client JARs.

The first diagram missed some points so I created a revised one:
http://www.fuin.org/files/axon-auction-example-structure-2.gif

I also tried to install the MS "Bid Now Sample" on my Vista but it
failed with some weird error messages...

Googling around for an alternative I found a nice use case description
for an auction house application from Sun -oops- Oracle :wink:
http://java.sun.com/developer/onlineTraining/Programming/JDCBook/proj2.html

Good thought to start of with an image like this.

I do have some thoughts on your image:- I do not really understand the query server war and command server war what is the need for these?

  • I am missing the api libraries. It turns out that you want your commands and events in a clear api library. That is the way other components interact with your system. Even the query components uses this api to interact.
  • Would be nice to have an idea about the standard axon required components next to the example specific components. Maybe use colors.

regards Jettro

- I do not really understand the query server war and command server war
what is the need for these?

My intention is to divide the query- and the command server into
separate web applications so it's possible to deploy them on separate
server machines. They are only connected through the events that flow
from the command to the query server. The query server is an event
listener in this case (or a message subscriber in terms of JMS).

- I am missing the api libraries. It turns out that you want your commands
and events in a clear api library. That is the way other components interact
with your system. Even the query components uses this api to interact.

The API is placed in the library projects (maybe they're better named
"Query API", "Command API" and "Message API"!?) - They contain things
like commands, messages, data transfer objects and services).

- Would be nice to have an idea about the standard axon required components
next to the example specific components. Maybe use colors.

What axon required components exactly do you mean?

Updates:

1) I created a new project at google code:
http://code.google.com/p/axon-auction-example/

@Allard & Jettro: Should I add you as committers?

Anyone else interested in commiting?

2) A new version of the diagram is available here:
http://www.fuin.org/files/axon-auction-example-structure-3.gif

By the way: How do I upload an image to the wiki at google code?

Hi Michael,

I’m interested to have commit right, although I can only spent a few hours per week.

Regards,
Edward Yakop

Michael,

I am certainly willing to help with the sample. However, given my schedule, I don’t think it is realistic to assume that I can actively help building the sample. I prefer to put my focus on the framework itself. However, if there is anything I can help with, don’t hesitate to ask. I’ll happily mingle in the discussions.

Cheers,

Allard

Hi Edward,

That's fine with me - I work as a fulltime freelance Java developer
and also only can spend some evening or weekend hours working on the
example project.

@Allard: That's OK, I hope we can help to improve the framework when
the sample app evolves!

Cheers,
Michael