The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

simbo1905 (30) [Avatar] Offline
#1
zkoss.org does not yet have a "PetStore" sample application for their Java rich ui front-end technology. I thought that it would be fun to write a FoodToGo front-end with their technology. This would be hosted at zkforge.sourceforge.net which is just starting up.

Looking for some low hanging fruit to bootstrap the mini-project I though that I could write screens to Add/Edit/Delete Restaurants. To this end I have started a RestaurantFacade. The thing is that the Restaurant Repository only has read-only methods. It is easy for me to add all of this logic and fork off the code - but I thought that it might be fun not to fork but to commit back to your code. Once there is enough logic to support one front-end than anyone could write another Grails, SpringMVC, Struts or whatever alternative.

What do you think?
simbo1905 (30) [Avatar] Offline
#2
Re: Adding some write methods for my FoodToGo Sample Frontend
In net.chrisrichardson.foodToGo.domain.hibernate.HibernateRestaurantRepositoryImpl we have:

public Collection findAllRestaurants() throws HibernateException {
return getHibernateTemplate().find("from " + Order.class.getName());
}

should it not use Restaurants.class.getName()? I have made the change to my local copy to support a RestaurantFacade for my sample frontend.

Your thoughts?

thanks!
simbo1905 (30) [Avatar] Offline
#3
Re: Adding some write methods for my FoodToGo Sample Frontend
ceracm (113) [Avatar] Offline
#4
Re: Adding some write methods for my FoodToGo Sample Frontend
This is pretty cool. Keep up the good work!
ceracm (113) [Avatar] Offline
#5
Re: Adding some write methods for my FoodToGo Sample Frontend
Looks like you have found a silly bug in untested code...smilie
simbo1905 (30) [Avatar] Offline
#6
Re: Adding some write methods for my FoodToGo Sample Frontend
Chris,

I am writing new Facade methods to your classes to support a real set of screens for editing Restaurants and their MenuItems. I am going to start a separate project for the screens and web tier business delegates that call out to your Session Facade. I am going to host the front-end app at http://sourceforge.net/projects/zkforge/.

As ZK is a duel licence technology my demo application will be GPL. Your code is Apache. So it is a bit of a question where to put my extensions to your code. I could fork your code and keep it apache license - but then don't think that I should put that code into zkforge.

What I would really like to do is commit my code back to you. Perhaps for your next edition of your book you could have an Appendix that mentions the ZKForge Food-To-Go front-end app? There would be nothing to stop someone writing the same screens in Grails, Tapestry, Struts et al based on the new code. Could Fast Food replace the Pet Store as the standard reference implementation app?

smilie

Simon Massey
simbo1905 (30) [Avatar] Offline
#7
Re: Adding some write methods for my FoodToGo Sample Frontend
I have a first working version. I am hosting the front-end code at Zk.Forge. A link where you can download the war file is at:
http://www.simonmassey.org/ZkFoodToGo.war.html
rgds
Simon
simbo1905 (30) [Avatar] Offline
#8
Re: Adding some write methods for my FoodToGo Sample Frontend
darn it - missing a jar or two when i ran it on a clean tomcat install. put some red text at that page to say that it is broken. please hold off from downloading until the red text has gone. sorry