Ch01"

From Documentation
(Created page with "= The Story of ToDoZK = <blockquote> To do with ZK or not to do with ZK, that's the question. -- Shake Spear </blockquote> This is a story in ''Pond Lion Corporation.'' They rec...")
 
Line 1: Line 1:
= The Story of ToDoZK =
+
= Introduction =
 +
 
 +
When you search Java web development technique, ZK is always a good choice of high-productivity framework. After realize &quot;How to use ZK', we usually have other questions like:
  
 
<blockquote>
 
<blockquote>
To do with ZK or not to do with ZK, that's the question. -- Shake Spear
+
* Should we use ZK in this situation?
 +
* Which ZK component can be used this time?
 
</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).
+
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.
 +
 
 +
=== Who should read this book? ===
 +
 
 +
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.
 +
 
 +
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? ==
  
<blockquote>
+
We will implement an online task management website: &quot;[http://todo-zk.appspot.com/ ToDoZK]&quot;, and answer these question:
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/><br/>
+
* How to analyse your website?
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
+
* 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:
 +
 
 +
* How to prettify your website?<br /> Aesthetic feeling is god giving, not human nature. [[Image:http://upload.wikimedia.org/wikipedia/commons/e/ef/Female_English_Bulldog.jpg|Aesthetic feeling is god giving, not human nature.]]
 +
* Everything about business logic.<br /> No database, no persistence layer, no CRUD...
 +
* 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.
 +
 
 +
== Must recite all of this book? ==
 +
 
 +
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!
 +
 
 +
=== ZK Programmer ===
 +
 
 +
<strike>Poor</strike> programmer must read every chapter, but some sections are more important. You can read these chapter first with this order:
 +
 
 +
# [Ch.4]
 +
# [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>
Shake Spear read the Custom Specification, <iframe src="https://docs.google.com/a/potix.com/presentation/d/1LTrovWp4tH4V-2AILuGxH_OIeyyivQJHEF8ATWiN2pg/embed?start=false&loop=false&delayms=3000" frameborder="0" width="480" height="389" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe><br />then cram up [http://www.zkoss.org/documentation ZK documents].
+
=== Web artist ===
 +
 
 +
If you are web artist, most ZK content and program skills are useless, but you should read these part:
  
<blockquote>
+
# [Ch.1]
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. /
+
# [Ch.2]
</blockquote>
+
# [Ch.3]: You can start at &quot;client side issue&quot; section.
After few days, in progress synchronized meeting:
 
  
<blockquote>
+
And the &quot;To Web Artist&quot; block should be read too:
Mummy Pythian : The progress is delay so much.
 
<br/><br/>
 
Shake Spear : What? What happen?
 
<br/><br/>
 
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/><br/>
 
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/><br/>
 
Conqueror Clipper : Moreover, the DOM structure ZK generate is so complex, override CSS is a trouble routine.
 
<br/><br/>
 
Shake Spear : Wait... wait a second, are you really use ZK? What you say is very opposite of my impression and expectation.
 
<br/><br/>
 
Mummy Pythian:「According to your instructions, '''whole website is written with ZK''', right?
 
<br/><br/>
 
Shake Spear:...... (WTF? Is using ZK wrong? Does this project will collapse? No... I don't want die... No...)
 
</blockquote>
 
Is using ZK wrong? No, ZK is so nice, Shake Spear must have misunderstood!
 
  
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).
+
<blockquote>==== To Web Artist ====
  
So, what's the problem of Shake Spear's thought? Let us start at the beginning.
+
Learn ZK is a happy thing... /
 +
</blockquote>
 +
'''OK! Let's GO!'''

Revision as of 07:36, 11 March 2013

Introduction

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:

  • Should we use ZK in this situation?
  • Which ZK component can be used this time?

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.

Who should read this book?

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.

We believe everybody is a good ZK programmer, but if...

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: "ToDoZK", 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:

  • How to prettify your website?
    Aesthetic feeling is god giving, not human nature. Aesthetic feeling is god giving, not human nature.
  • Everything about business logic.
    No database, no persistence layer, no CRUD...
  • Richlet、Macro、Composite.....
    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.

Must recite all of this book?

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!

ZK Programmer

Poor programmer must read every chapter, but some sections are more important. You can read these chapter first with this order:

  1. [Ch.4]
  2. [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:

  1. [Ch.1]
  2. [Ch.2]
  3. [Ch.3]

And the "To System Architect" block should be read:

==== To System Architect ====

Learn ZK is a happy thing... /

Web artist

If you are web artist, most ZK content and program skills are useless, but you should read these part:

  1. [Ch.1]
  2. [Ch.2]
  3. [Ch.3]: You can start at "client side issue" section.

And the "To Web Artist" block should be read too:

==== To Web Artist ====

Learn ZK is a happy thing... /

OK! Let's GO!