0

ZUL pages VS. JSP pages to improve peformance

asked 2010-12-14 04:40:48 +0800

Neus gravatar image Neus
1415 14

Hi,

I'm trying to improve pages performance.
I have been reading the performance tips in ZK Developer's Reference and I would like to know if it's better using ZUL pages with native namespace or JSP pages with ZK JSP tags.
Or maybe is it the same?

Thanks in advance.

delete flag offensive retag edit

7 Replies

Sort by ยป oldest newest

answered 2010-12-30 09:34:03 +0800

pymsoft gravatar image pymsoft
133 5


mjablonski

So the best advice: use BeanShell for prototyping, but move all code to Java-classes when done.

I discovered at the end of my project... then I move all code to Java-classes ;-)

Regards


Pedro

link publish delete flag offensive edit

answered 2010-12-29 06:01:22 +0800

mjablonski gravatar image mjablonski
1284 3 5
http://www.jease.org/

updated 2010-12-29 06:01:37 +0800

@beemsoft:

ZK-JSP is available for all projects which can be distributed under GPL:

http://www.zkoss.org/license/extension.dsp

Cheers, Maik

link publish delete flag offensive edit

answered 2010-12-29 05:38:13 +0800

beemsoft gravatar image beemsoft
12
www.beemsoft.nl

Also note that the ZK JSP tags are available for ZK EE only:
http://books.zkoss.org/wiki/ZK_Installation_Guide/ZK_Background/The_Content_of_ZK_Binary_Distribution

link publish delete flag offensive edit

answered 2010-12-27 09:44:33 +0800

robertpic71 gravatar image robertpic71
1275 1

JSP is faster. It's a performancetip to replace "static" zul with jsp and use zul-filters only for zul-content.

How JSP works (exclude the zul-stuff)

JSP Source --> replaces variables add filter-content on serverside --> send the complete html-send --> browser shows the "ready" html-content (+ start javascript actions/content)

+ there is no serverside mirror for jsp components/content --> less memory on server
- there is no servside mirror for jsp/conent --> no access from the controller (i.e. make hidden for print, or get events for jsp components)
+ no (or less) screenbuilding by the client
- you have to handle 2 gui-languages (zul, jsp)
- jsp is limited

How ZUL works
ZUL creates a serverside mirror for all components on serverside --> sends a copy of the GUI to the Client-Enngine --> the client-engeine (inside the browser) creates also a GUI-tree (DOM) and render the output

- need more resources on both sides (server + client)
+ full java/zul mirror on serverside
++ full clientfeatures on serverside (events, attributes)

What's the best for you, depends to your needs.

I can only write my point-of-view:
* JSP could be an option, if you have heavily used sites with many static content and/or work page-orientate
* if you migrate an existing jsp-application to zul, it's also a nice option

* because development and maintenance speed is the most important point for us, we don't use jsp to keep it simple
* for some special cases we use client-code to improve the UI-feeling
* new applications looks more like desktop --> less page-orientate
* because my users are limited (intranet or registered customers) i have no headache about performance

to be more clear:
Our greatest applications are installed on modest serverhardware (M dualcore) and limited to 256MB Memory (because it's not alone).
However, it's no problem to handle over 100 concurrents users with this limited resources. We use ZK (3.6 + 5), Spring and Hibernate
via OpenJPA. I've monitored the tomcat with the NewRelic Tools - and response times are stable for this amount of users. Compared
to a Ruby on Rails Applications (also monitored by NewRelic Tools) - ZK needs less resources and have faster response times.

However, jsp is only for special cases. For fast development and easy maintainance i advise a zul-gui (as Maik wrote: without zscript)
and java for the controller and models.

/Robert

link publish delete flag offensive edit

answered 2010-12-25 15:03:54 +0800

arcangelSalazar gravatar image arcangelSalazar
36 2

I want to know too. What is Faster JSP or ZUL?

link publish delete flag offensive edit

answered 2010-12-14 06:27:21 +0800

Neus gravatar image Neus
1415 14

Ok, we are on the way of doing that.
But I thought using HTML will improve performance, too. Isn't it? Or the improvement won't be so important?

link publish delete flag offensive edit

answered 2010-12-14 05:54:34 +0800

mjablonski gravatar image mjablonski
1284 3 5
http://www.jease.org/

Hi,

the biggest problem (regardless of using ZUL or JSP) is Java-Code interpreted by BeanShell... all Java-Code enclosed in <zscript>...</zscript> and all code in event-handlers like onClick="..." is interpreted by BeanShell which is really slow (compared to compiled Java Code).

So the best advice: use BeanShell for prototyping, but move all code to Java-classes when done.

Cheers, Maik

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

RSS

Stats

Asked: 2010-12-14 04:40:48 +0800

Seen: 682 times

Last updated: Dec 30 '10

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