Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1102641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:13:04+00:00 2026-05-17T01:13:04+00:00

Calling the javascript gurus out there. Basically my question is regarding how you structure

  • 0

Calling the javascript gurus out there.
Basically my question is regarding how you structure your code, both visually and for functionality for example do you wrap everything in objects using this structure:

var myapp={
  binds:function(){
    //put some event listeners for jquery etc...
  },
  otherfunc:function(){
   //do some other thing
  },
  init:function(){
   //call myapp.binds and other functions and other stuff to intialize your app.
  }
};

Then finally

$(document).ready(myapp.init);

The thing is with a structure like this I think JSLint complains doesn’t it? Whats the pros and cons using a structure like this or is there a generally better way to structure your code? Do you follow a certain pattern from $(document).ready(call) to putting all your event listeners and “initializing” your app, do you use separate objects for methods and variables?

I also think “visually” if you have a very large webapp this structure eventually looks very messy, but maybe it’s just me I don’t know, any input is appreciated thanks.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:13:04+00:00Added an answer on May 17, 2026 at 1:13 am
    Using Inheritance Patterns to Organize Large jQuery Applications
    

    explain in detail and with better practice by Alex

    http://alexsexton.com/?p=51

    its very very well explain, must see

    other links

    • How To Manage Large jQuery Apps 5 months ago
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is related to a question I've asked previously: Calling Javascript function after loading
I'm calling some JavaScript from within my PHP code, but I want the second
Possible Duplicate: calling ASP function from javascript okay running this code : <script type=text/javascript>
My header is calling a javascript file which sends out an email: <script type=text/javascript
On load I'm both calling a JavaScript setTimeout() function that will hide a .NET
Are there any benefits to using the 'window' prefix when calling javascript variables or
As long as I am calling my javascript code from within the jquery $().ready();
so im using the etsy api with javascript calling this ajax code $.ajax({ url:
I use a WebBrowser object from WPF and I'm calling some Javascript code in
in my project i've faced a problem with calling javascript code from class wich

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.