Ch01"

From Documentation
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Introduction =
+
= The Story of ToDoZK =
  
When you search Java web development technique, ZK is always a good choice of high-productivity framework. After realize "How to use ZK', we usually have other questions like:
+
<blockquote>To do with ZK or not to do with ZK, that's the question. -- Shake Spear</blockquote>
  
<blockquote>
+
This is a story in ''Pond Lion Corporation.'' They recently got a web develop case, customer want an online task management site and must use ZK framework ''(sensible choice!)''. So ''Dough Nut'' (Boss) call his right hand man: ''Shake Spear'' (System Architect).
* Should we use ZK in this situation?
+
 
* Which ZK component can be used this time?
+
<blockquote>Dough Nut : I'm handing this case over to you now. The customer has already gave us a rough specification, site map and a very conceptual layout. Well, you know, can't expect too much from customers these days... I'm also giving you ''Mummy Pythian'', who is already learning ZK, and web artist ''Conqueror Clipper'' to support you. Better not mess up with this, or you'll be dead meat...
 +
<br/>
 +
Shake Spear: (Why not use JSF? I like JSF, and we never use ZK before! WTF!!!) ...... I am most obliged to your majesty for your kindness... Orz
 
</blockquote>
 
</blockquote>
The goal of this book is attempt to answer these questions. You will be more comfortable in the planning, implementation web site after read this book.
+
Shake Spear read the Custom Specification, (https://docs.google.com/a/potix.com/presentation/d/1LTrovWp4tH4V-2AILuGxH_OIeyyivQJHEF8ATWiN2pg) <br />then cram up [http://www.zkoss.org/documentation ZK documents].
  
=== Who should read this book? ===
+
<blockquote>Shake Spear : Wow... I can create RIA(Rich Internet Application) website without write any JavaScript. Server-side Java code and client-side JavaScript code work together seamlessly. ZK built-in components is complete and powerful. Perfect! This project can run happily. /
 
+
</blockquote>
What a dummy question is it? Everyone should read it again and again :P But we still locked the reader's identity in ZK programmers, system architects and web artists. In real world, layout issues can't be solved with programmer alone, it also need system architects' and web artists' support.
+
After few days, in progress synchronized meeting:
 
 
We believe everybody is a good ZK programmer, but if...
 
 
 
* Have no idea about ZK? Quick review &quot;[http://books.zkoss.org/wiki/ZK_Getting_Started/Learn_ZK_in_10_Minutes Learn ZK in 10 Minutes]&quot; or read &quot;[http://books.zkoss.org/wiki/ZK_Essentials ZK Essentials]&quot; carefully.
 
* Is not familiar with ZK? Placed &quot;[http://books.zkoss.org/wiki/ZK_Developer%27s_Reference ZK Developer's Reference]&quot; and &quot;[http://books.zkoss.org/wiki/ZK_Component_Reference ZK Component Reference]&quot; in hand to be used to access at any time.
 
* If you ever use ZK MVVM, it's a good time to start! Please read this article: &quot;[http://books.zkoss.org/wiki/ZK_Getting_Started/Get_ZK_Up_and_Running_with_MVVM Get ZK Up and Running with MVVM]&quot;.
 
 
 
In other words, we suppose you are already familiar with ZK. We will ignore some implement details which is not related to layout issue directly. Please don't worry, the information we skip is not important (in this book :P) and will not hinder reading.
 
 
 
== What content is covered in this book? ==
 
 
 
We will implement an online task management website: &quot;[http://todo-zk.appspot.com/ ToDoZK]&quot;, and answer these question:
 
 
 
* How to analyse your website?
 
* When and where to do with ZK?
 
* How to layout?
 
* Which ZK component should I use?
 
 
 
== What content isn't covered in this book? ==
 
  
Due to space limitations in this book (totally wrong :P) and we also won't you to be distracted, these feature will be skipped:
+
<blockquote>Mummy Pythian : The progress is delay so much.
 
+
<br/>
* How to prettify your website?<br /> Aesthetic feeling is god giving, not human nature.  
+
Shake Spear : What? What happen?
* Everything about business logic.<br /> No database, no persistence layer, no CRUD...
+
<br/>
* Richlet、Macro、Composite.....<br /> In order to make this article simple and easy, we had to make some trade off. We use only ZUL and MVVM in example code, you can convert to other ZK techniques with your own needs.
+
Conqueror Clipper : I can't coding and build ZK environment, don't know how to use ZK component when design layout. The only way is beg Mummy's help, waste much time.
 
+
<br/>
== Must recite all of this book? ==
+
Mummy Pythian : That's ok, not a big problem. Conqueror can just provide the layout design then I implement in ZK. My point is that make a pure static page with ZK make me feel stupid, the initial waiting time and response time is slow. I bet a case of beer, it will be more serious when system online.
 
+
<br/>
Of course, we hope you can read this book step by step, chapter by chapter. However if your project is urgent and have enough time to read this book, we really know how miserable you are :'( . Therefore we tell you how to loaf on the job, don't let your boss know this section!
+
Conqueror Clipper : Moreover, the DOM structure ZK generate is so complex, override CSS is a trouble routine.
 
+
<br/>
=== ZK Programmer ===
+
Shake Spear : Wait... wait a second, are you really use ZK? What you say is very opposite of my impression and expectation.
 
+
<br/>
<strike>Poor</strike> programmer must read every chapter, but some sections are more important. You can read these chapter first with this order:
+
Mummy Pythian:「According to your instructions, '''whole website is written with ZK''', right?
 
+
<br/>
# [Ch.4]
+
Shake Spear:...... (WTF? Is using ZK wrong? Does this project will collapse? No... I don't want die... No...)
# [Ch.3]
 
 
 
=== System Architect ===
 
 
 
If you are architect, you can ignore the implement detail and skill (The more you learn, the better you are :) ), so read these chapter:
 
 
 
# [Ch.1]
 
# [Ch.2]
 
# [Ch.3]
 
 
 
And the &quot;To System Architect&quot; block should be read:
 
 
 
<blockquote>
 
==== To System Architect ====
 
 
 
Learn ZK is a happy thing...  
 
 
</blockquote>
 
</blockquote>
 +
Is using ZK wrong? No, ZK is so nice, Shake Spear must have misunderstood!
  
=== Web artist ===
+
Like Confucius say: &quot;Don't use a sledgehammer on a nut.&quot; Yes, we can use a sledgehammer on a nut, but is necessary? After all, what we want is flesh (quick develop, close case successfully), not the master title of sledgehammer (do everything with ZK).
 
 
If you are web artist, most ZK content and program skills are useless, but you should read these part:
 
 
 
# [Ch.1]
 
# [Ch.2]
 
# [Ch.3]: You can start at &quot;client side issue&quot; section.
 
 
 
And the &quot;To Web Artist&quot; block should be read too:
 
  
<blockquote>
+
So, what's the problem of Shake Spear's thought? Let us start at the beginning.
==== To Web Artist ====
 
 
 
Learn ZK is a happy thing... /
 
</blockquote>
 
'''OK! Let's GO!'''
 

Latest revision as of 07:52, 11 March 2013

The Story of ToDoZK

To do with ZK or not to do with ZK, that's the question. -- Shake Spear

This is a story in Pond Lion Corporation. They recently got a web develop case, customer want an online task management site and must use ZK framework (sensible choice!). So Dough Nut (Boss) call his right hand man: Shake Spear (System Architect).

Dough Nut : I'm handing this case over to you now. The customer has already gave us a rough specification, site map and a very conceptual layout. Well, you know, can't expect too much from customers these days... I'm also giving you Mummy Pythian, who is already learning ZK, and web artist Conqueror Clipper to support you. Better not mess up with this, or you'll be dead meat...


Shake Spear: (Why not use JSF? I like JSF, and we never use ZK before! WTF!!!) ...... I am most obliged to your majesty for your kindness... Orz

Shake Spear read the Custom Specification, (https://docs.google.com/a/potix.com/presentation/d/1LTrovWp4tH4V-2AILuGxH_OIeyyivQJHEF8ATWiN2pg)
then cram up ZK documents.

Shake Spear : Wow... I can create RIA(Rich Internet Application) website without write any JavaScript. Server-side Java code and client-side JavaScript code work together seamlessly. ZK built-in components is complete and powerful. Perfect! This project can run happily. /

After few days, in progress synchronized meeting:

Mummy Pythian : The progress is delay so much.


Shake Spear : What? What happen?
Conqueror Clipper : I can't coding and build ZK environment, don't know how to use ZK component when design layout. The only way is beg Mummy's help, waste much time.
Mummy Pythian : That's ok, not a big problem. Conqueror can just provide the layout design then I implement in ZK. My point is that make a pure static page with ZK make me feel stupid, the initial waiting time and response time is slow. I bet a case of beer, it will be more serious when system online.
Conqueror Clipper : Moreover, the DOM structure ZK generate is so complex, override CSS is a trouble routine.
Shake Spear : Wait... wait a second, are you really use ZK? What you say is very opposite of my impression and expectation.
Mummy Pythian:「According to your instructions, whole website is written with ZK, right?
Shake Spear:...... (WTF? Is using ZK wrong? Does this project will collapse? No... I don't want die... No...)

Is using ZK wrong? No, ZK is so nice, Shake Spear must have misunderstood!

Like Confucius say: "Don't use a sledgehammer on a nut." Yes, we can use a sledgehammer on a nut, but is necessary? After all, what we want is flesh (quick develop, close case successfully), not the master title of sledgehammer (do everything with ZK).

So, what's the problem of Shake Spear's thought? Let us start at the beginning.