==========================
I want to implementation ajax-based application which will be communication
with server only via JSON.
First request builds page (DOM structure) and any change (CRUD actions) is
going to lead to minimal changes in DOM structure of page. In the best case,
there will be changed only showed bussiness data without changing of DOM.
Simply, all application's UI scope is one page.
Request and response will send only change of state, I mean... I would like
to keep "mirror" of UI layer at server side and just monitor "delta" between
UI state and server's UI mirror state and these deltas states provide to
another layers (service, dao) for another applicatio logic.
If I could to implement app this way. I must keep somewhere UI state on
server side... for example,... there are three tables A, B, C which acts
like view (UI html table tag) and data providers (mirror of UI on server)...
Event-driven approach
==============
Selected row are states of application... A is master B, B is master for
C... where any change of selection must be reflected in details tables. If
row in C is updated.... so app knows (server-side UI mirror) parent row B,
and parent A... so ajax updates only these selections in A and B include C.
Why this way? I suppose:
================
- building of DOM is expensive,
- sending fragments of HTML is dirty way (only data are changed not DOM
structure)
- json is small
- monitoring of changes is simply when it uses "delta" approach (deltas ==
compare(HTMLTable Selection, TableProvider selection))
- server just manage result of deltas (last selection has change, update
selections in dataProviders, update refresh only selection in UI etc...)
And there is finally my question:
=====================
IS CONTROLLER THE RIGHT PLACE WHERE TO KEEP INSTANCE OF UI MIRROR AND
MONITOR DELTA?
Uf.... Thanks for your time and answer.
-----
Enviroment
==========
OS:
SUSE Linux Enterprice 10 (i586) - version 2.6.16.60-0.27-smp
Windows XP
Tomcat v6.0.16
Java(TM) SE Runtime Enviroment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode)
Maven v2.0.9
Apache 2.2.11
MySQL 5.1.30
PHP 5.2.8
qooxdoo-0.8.2
Python 2.5
Zend framework 1.9.1
Hudson:
=======
version 1.304
plugins: Maven 1.304, SSH Slaves
running: deployed in Tomcat
front-end developer web-based application
A.S.E.I. [http://www.asei.cz]
--
View this message in context: http://www.nabble.com/MVC---where-is-location-for-implementation-of-%22delta%22-approach-tp25407824p25407824.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论