What architecture with Zk ?

asked 2012-06-06 13:59:42 +0800

mkommer gravatar image mkommer

Hello, I'm still a beginner developper Java/J2E, and I would like to know what are the "best practices" in terms of architecture (or architectures most common) with Zk.

I tested a project Zk 5.0.9 with Spring 2.5 in Netbeans 6.1 with a Tomcat 5.5.

And here I would try to do a Maven project, an architecture with Hibernate JPA + Spring 3 + Zk 6 in Netbeans 6.9 with Tomcat 5.5: '(

Do you think this is viable? if not, what architecture do you recommend to me ?


delete flag offensive retag edit

4 Replies

Sort by » oldest newest

answered 2012-06-07 01:38:45 +0800

iantsai gravatar image iantsai
2755 1

I think it's a very common stack though Tomcat 5.5 is a bit old.
to ZK, JPA is transparent, so the only thing you have to think about is the interface between Spring and ZK.

link publish delete flag offensive edit

answered 2012-06-07 09:34:13 +0800

mkommer gravatar image mkommer

Yeah this version is old, but the client is under Solaris 10 and they are boring because they don't want to upgrade any tools or environment.

We develop remotely via citrix, without scroll, with Netbeans because they didn't succeed to install Eclipse :p

Precisely on Spring + Zk, I'm wondering because I had made ​​an attempt (2.5 + Spring 5.0.9 Zk).
I implemented the spring DispatcherServlet, mapping url to redirect (*. Html) to the controllers.
These controllers were often Spring beans (ParameterizableViewController gold RedirectView) automatically redirecting to a jsp with zul files included. And there, we finally came to a controller application Zk inheriting GenericForwardComposer.

The question is: is not it too heavy? There would be no way to simplify it at the servlet to call directly zul files? I opened another topic for what is generally recommended between jsp / zul because I need to have a header and footer repetitive on my pages.
How to organize that ?

Thank you.

link publish delete flag offensive edit

answered 2012-06-08 07:36:17 +0800

iantsai gravatar image iantsai
2755 1

updated 2012-06-08 07:37:12 +0800

Starting a zul inside a JSP for each redirection is okay, JSP is static and consumes almost nothing in both CPU and Memory.

To me, I'd say JSP is good if you don't have to deal with those "interaction stuff".

So I usually recommended my customer that the base layout page could be JSP and ZK can be used in each fragment if that partial part is served as a Software Interface of application.
Don't use ZK every where as a golden hammer, Ajax stuff is always heavier than old good dynamic web page technology no matter it's JSF, ZK or GWT.

link publish delete flag offensive edit

answered 2012-06-08 09:35:07 +0800

mkommer gravatar image mkommer

updated 2012-06-08 09:36:22 +0800

I confess that I came across an article with Hibernate 3.6 + Spring 3 + Zk 5/6, without using jsp and I found it very well.

I was looking for ways to reduce these multitudes of calls, and I think I'll apply it. CPU / memory management is not critical to my project, it's a small application. I think it is better than doing a spring DispatcherServlet that calls a controller managed by a spring bean that redirect to a jsp including Zk files themselves with their own application controllers.

Thank you iantsai !!

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




Asked: 2012-06-06 13:59:42 +0800

Seen: 302 times

Last updated: Jun 08 '12

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