Groups > Asp .Net > Advanced ASP.NET Architecture > Re: Create maintenable client-side code




Create maintenable client-side code

Create maintenable client-side code
Sun, 30 Mar 2008 12:44:55 +000
Hi. 

I am beginning a new job.

My responsibility is client-side development of big project ~160 js files

The project heavily uses xml/xslt and web services calls from client-side with
no framework  (all code written by team)

Any tip/suggestion of how to handle such task will be welcomed
Post Reply
Re: Create maintenable client-side code
Sun, 30 Mar 2008 23:33:02 +000
AnatolyR:My responsibility is client-side development of big project ~160 js
files. The project heavily uses xml/xslt and web services calls from client-side
with no framework  (all code written by team)

You may wish to consider loading the Javascript code asynchronously "on
demand". You still need to develop some custom framework to help this. 

Basically (from what I've built) this could be: 

- the javascript function which process callbacks should load some
"callback dispatcher" script from .js file on-server; 

- the "callback dispatcher" may have as many entries as your project
has .js files (~169). Use the IE-specific window.execScript() method to executes
"callback dispatcher" script that is passed as string. 

- the "dispatcher" will receive callbacks and will fire Javascript
functions according to commands contained in those callback strings. 

- among other commans there will be commands to load and execute other
scriptblocks from .js on-server files. 

You need to synchronize all these things; that's a bit tricky business but still
is doable. The reward is that you can operate huge js codebase. My personal
opinion is that MS Ajax / Silverlight do not address "custom' apps. Whe you
need a bike they offer a spaceshuttle.
Post Reply
Re: Create maintenable client-side code
Mon, 31 Mar 2008 08:49:46 +000
Thanks, Sergey
Post Reply
about | contact