Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Function organization strategies

Reply
Thread Tools

Function organization strategies

 
 
Derek Basch
Guest
Posts: n/a
 
      02-25-2005
What is the best method for organizing dozens of functions in a
Javascript file? Alphabetically? According to function purpose? Anyone
have a tried and true method?

Thanks,
Derek Basch

 
Reply With Quote
 
 
 
 
McKirahan
Guest
Posts: n/a
 
      02-25-2005
"Derek Basch" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> What is the best method for organizing dozens of functions in a
> Javascript file? Alphabetically? According to function purpose? Anyone
> have a tried and true method?
>
> Thanks,
> Derek Basch
>


You can do both. For example:

function edit_page1()
function edit_page2()
function form_build()
function form_reset()
function page_search()

I often identify each function with a short description at the top in a
comment block.

/*
* function edit_page1() -- performs data validation for "page1.htm".
* function edit_page2() -- performs data validation for "page2.htm".
*/


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Proper organization of function/procedures requiring global signals Garrick VHDL 0 09-27-2005 09:58 PM
MultiStep form Strategies fragmonster ASP .Net 5 09-23-2004 07:22 AM
Webinar: WAN Optimization Strategies & Testimonials (August 26th) Bridget Willey @ Innovative Cisco 0 08-18-2004 03:32 PM
Marketing strategies Charles Schuler Digital Photography 9 07-18-2004 12:05 AM
Test Harness Strategies fabbl VHDL 1 04-17-2004 03:39 PM



Advertisments