0

ZK vs REST

asked 2008-10-24 15:46:54 +0800

Makhsud gravatar image Makhsud
6

Hi guys,

What are you think - Is it possible to develop with ZK with REST like approuch? I think it's especialy impotant when we are trying get information from datasource.
---
Just look at this codes to understand what I mean:
Get ALL Accounts: Accounts = RestObj('http://data.location.com/accounts');
Set Accounts pagination size: Accounts = RestObj('http://data.location.com/accounts/setPageSize/20');
Get 2nd page of Accounts list: Accounts = RestObj('http://data.location.com/accounts/page/2');
Get pages count of Accounts list: page_count = RestObj('http://data.location.com/accounts/pages');
Get columns_names list for Account: columns_names = RestObj('http://data.location.com/accounts/columns_names');
Get columns_types list for Account: columns_types = RestObj('http://data.location.com/accounts/columns_types');
---
Now we can bind grid with datasourse like this:
<some_grid>
<headers names="@{RestObj('http://data.location.com/accounts/columns_names')}"
types="@{RestObj('http://data.location.com/accounts/columns_types'}"/>
<data sourse="@{RestObj('http://data.location.com/accounts'}">
<paginator value="@{RestObj('http://data.location.com/accounts/pages')}"
</some_grid>

So, what are you think about it?

Max

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2008-10-24 17:48:59 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

Yes. It is doable.

Write a "RestManager" that will read such @{...} ZK annotations. Then the RestManager shall parse and interpret the given URL to read the data back (via web service or message queue) and then populate the components.

link publish delete flag offensive edit

answered 2011-04-28 04:51:14 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

See Restful of ZK - ZEST , ZEST Project Page

link publish delete flag offensive edit

answered 2011-04-28 05:12:45 +0800

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

Why not name it to ZKRest ??? So you have more hits on the zk website by googeling after 'Rest'

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: 2008-10-24 15:46:54 +0800

Seen: 767 times

Last updated: Apr 28 '11

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