2

new Zksample2 app. Spring, -AOP, -Security, Hibernate, Hibernate-Generic-DAO, Jasper

asked 2010-01-17 08:29:28 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2013-03-27 08:56:18 +0800

jimyeh gravatar image jimyeh
2047 1 4
ZK Team

Hi all,

today we have checked in the new Zksample2 application as maven2 projects on sourceforge.net. You can reach the project homepage under the link http://zksample2.sourceforge.net/ here.

You will find there 3 eclipse maven subprojects and the folder for the documentation.

  1. KeyGenZkoss = one-time-password generator
  2. spring-hibernate-backend = backend
  3. zkoss = frontend
  4. zksample2_doc = documentation

The Documentation you can download seperately as a pdf-file from here.

The documentation is a work in progress so be sure to check sometimes for the newest file.

For checkout and evaluate or work with the application please download and read first the documentation.

Mainly changes to the first sample app are: - change project structure as maven2 projects - spring managed frontend - @Secured() for securing methods with own implementation - login statistic - several integration options of ipToCountry - one-time-password sources are opend - Refactoring all Domain/DAO/Service Classes to english names - many many code changes - documentation

We whish all fun with it and hope that it can be usefull for others.

best Stephan and Björn

delete flag offensive retag edit

213 Replies

Sort by » oldest newest

answered 2010-08-26 03:37:07 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Hi Andyx,

1. yes, you are right. I have a modified createDB_MySQL.sql file in the same folder in /trunk. Nice if you can send us your file because we struggle with the syntax for the functions. You can send me your file to sge(at)forsthaus(de).
2. I use the Sybase Power Designer for the Table structure and relations.
3. Yepp, forgotten. At time we coding all in the /trunk folder. Please checkout from there.

best
Stephan

link publish delete flag offensive edit

answered 2010-08-27 13:26:06 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2010-08-27 13:27:52 +0800

We have implemented a simple messaging system, where you can send application wide messages to all users. You see incoming messages if the red mail icon in the left bottom corner changed in a blinking mode.
If you let open the overlapped Message Window, incoming messages are actualized in the textbox inside.
Next step is a selection who from the userlist is becoming the message.

best
Stephan

PS: Does anybody knows where we can scroll up automatically the textboxes content?

link publish delete flag offensive edit

answered 2010-09-17 09:44:25 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Hi all,

today we have integrated our first try with a database driven calendar. For the codes you must synchronize frontend and backend projects.

have fun with it
best Stephan

link publish delete flag offensive edit

answered 2010-12-15 16:14:59 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2010-12-15 16:23:43 +0800

Hi all,

today we have checked in our first interactive Dashboard module. pic1 pic2 . It's a module for selecting and showing youtube music vids from a db list.
We have a few ready modules from an other application that we will adopt for Zksample2. In the next times the welcome ('welcome.zul' changed to 'dashboard.zul') page will be changed completely with single Dashboard modules.

have fun with it

best
Stephan

link publish delete flag offensive edit

answered 2010-12-17 07:37:25 +0800

Lesstra gravatar image Lesstra
193 1

Hi there!

I must say, this is exellent! Very, very useful example project, great work indeed...
Although it requires more than basic knowledge of these two frameworks (Spring and Hibernate) to understand it right :)

I have one question , though.
In zk-sample2 documentation, in the "Spring" chapter, it is said that ALL beans are scoped as prototype for multi-user purposes.
I see scope "prototype" only for front-end GUI Controllers, and I assume that when you sad "all" , you meant all for front-end?
As far as I know , by default, all beans are scoped as "singleton". And all beans (DAO, service) defined in the back-end have no scope, which means that they are all singletons by default, right?
I guess then that it is Spring's duty to preserve consistency of these objects, for example, in a multi-user CRUD scenario...?

Best regards!

link publish delete flag offensive edit

answered 2010-12-18 14:16:31 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2010-12-18 15:29:19 +0800

Hi Lesstra,

you are absolute right. Seems we have lost some scope definitions by testing. I have fixed this. Please try a new checkout of all sub projects.
By the way we will simplify the logic for getting the PrimaryKey. This is very old stuff from times where we tested several frontend frameworks with different databases.
We will redesign this until christmas days.

best
Stephan

Edit: I find a differenz on running the app local or on our web server. I will inform here if we finish the corrections.

link publish delete flag offensive edit

answered 2010-12-19 03:36:01 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

OK. The scopes are fixed.

I have forgotten a file on our web server. On it we build the demo application with maven. After building we modifiy the customize-applicationContext.xml per script. With this modifications the app is working against the PostgreSQL database instead the H2 db that is used in the eclipse-projects and in it there are the NextViewID bean too.

As i mentioned before, we will simplify the PrimaryKey stuff in the next two weeks.

have a nice christmas.
best Stephan

link publish delete flag offensive edit

answered 2010-12-23 03:12:41 +0800

Lesstra gravatar image Lesstra
193 1

Hi again, Stephan

Cool, just got new version with fixed scopes. I do have some more questions regarding Maven. I've never really utilized Maven before, but it's needless to say that it is more than useful.
1) I'm interested in what Maven archetypes did you and Bjorn use when setting up projects for back-end and front-end?
2) How to integrate ZK with Maven? Is there some straightforward way to setup ZK project "inside" Maven via Eclipse? Is there some useful link you could point me to?
I found something on ZK site, but it couldn't quite help me understand what's going on here.

happy holidays,
stay well

link publish delete flag offensive edit

answered 2010-12-23 09:24:09 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Hi Lesstra,

happy holidays too.

1. As i remember we use the archetype 'maven-archetype-webapp' and add the missing sources folders manually in eclipse.
2. Integrate ZK with maven is exact the same as you do with other libs. Look for conflicts and look how to avoid them.
In fact i have a 15 min try to do this with zk 5.0.5 and stop as i see that this is a heavy challenge.
So i wait patiently that the 5.0.6 version is mavenized. ( http://www.zkoss.org/forum/listComment/14746 )
3. I don't know how Eclipse magical let some maven projects run with maven errors. So we have at first a look that maven can build the project correctly in the shell (console).
4. There's no secret. We copy/paste most running depenency stuff in the build.pom for a new zk project where we know what frameworks we need there and after that we make special modifications.

best
Stephan

link publish delete flag offensive edit

answered 2011-01-06 12:00:09 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2011-01-07 07:51:35 +0800

Hi all,

over the quietly days we have refactored the backend from old stuff with the PrimaryKey Generation and added much comments to it.
Additionally we have added an 'open' tag for our menu tagLib. Now we can declare an menuItem in the src/main/resources/mainmenu.xml as open="true" or "false" for the treeMenu generating.
We fix a false getter/setter in all annotate databinded working modules.
Thanks for AndyX for made the modifications in the table and demo data scripts for mySQL 5.1.

best
Stephan

PS: so we have a new bigger and faster vServer ( 3GB RAM and 16 cores )we must changed the IP address. So please bookmark the new address: http://www.zk-web.de/zksample2/
PSII: The latest version is additionally checked in in sourceForge as a war-file.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
4 followers

RSS

Stats

Asked: 2010-01-17 08:29:28 +0800

Seen: 29,065 times

Last updated: May 27 '16

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More