[thelist] JavaScript: How much is too much?

Sreedhar Chintalapaty sreesarma at yahoo.com
Sun Jan 18 17:31:45 CST 2004


For example:
- Let's say I specify the UI in some XML format: for
each widget on the UI, I specify a source (optional)
and what other widgets on the screen it depends on;
Also, I specify that the UI is to use the Tab
metaphor; let's call this a.xml.
- The User loads page a.html, whereupon some JS kicks
in, reads in the a.xml and does some processing to set
up the dependencies among the widgets (essentially by
using the observer-observable pattern). Some basic JS
+ CSS is then used to layout the UI.
- When a particular widget's value is changed (e.g.
Countries dropdown list), it notifies its observers
(e.g. States dropdown list), which reload from server
individually (so that there is no 'blink'). The source
could be a JSP page to do a database read/write, or an
XML file, etc.

Considering an intranet type environment, if I end up
with 200-300 KB of JS for the entire application (a
one time download being no more than 100K), would you
consider that to be too big to justify this solution?


Sreedhar


--- Hassan Schroeder <hassan at webtuitive.com> wrote:
> Sreedhar Chintalapaty wrote:
> >>... you should have as much JS as neccessary 
> >>to robustly accomplish the app's purpose.
> > 
> > Actually, this statement rather proves that the
> > question is not without merit. :)
> 
> Not if you believe that there's no "typical" app :-)
> 
> My preference is to do as much as possible on the
> server, because
> the client environment is essentially unknown --
> subject to far
> more variables, even in a relatively homogeneous
> intranet setting.
> 
> That said, what are the app's requirements? What is
> the client
> intended to do, how much data is involved, is that
> data read-only
> or read-write, etc.? I think the architecture of
> each app must be
> evaluated individually.
> 
> > However, as a programming language, JS provides
> the
> > constructs to do fairly intricate things and in a
> > fairly limitless fashion; on a philosophical
> level,
> > one can make the argument that any and all
> UI-related
> > processing should be done on the client (browser,
> in
> > this case) if possible. 
> 
> I'm not sure how you're defining "UI-related
> processing" -- can
> you give us an example of your view of what that
> is/isn't?
> 
> -- 
> Hassan Schroeder -----------------------------
> hassan at webtuitive.com
> Webtuitive Design ===  (+1) 408-938-0567   ===
> http://webtuitive.com
> 
>                            dream.  code.
> 
> 
> 
> -- 
> * * Please support the community that supports you. 
> * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip
> Harvester 
> and archives of thelist go to:
> http://lists.evolt.org 
> Workers of the Web, evolt ! 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


More information about the thelist mailing list