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

  • SEARCH
  • Home
  • 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 4610460
In Process

The Archive Base Latest Questions

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

Just in case it matters, I use ASP.NET 3.5 with VB.NET. I have nested

  • 0

Just in case it matters, I use ASP.NET 3.5 with VB.NET. I have nested MasterPages and UpdatePanels with Partial PostBacks. I include Modernizr 1.7 with YepNopeJs/IE Shim in my head section. Right before the closing body tag, I include my jQuery 1.6, jQuery UI 1.8.12, and this script.js I’m trying to build.

I’m thinking of using something like:

SITE = {

    PAGES     : { ... },
    VARS      : { ... },
    HELPERS   : { ... },
    PLUGINS   : { ... },

    init      : function() { ... }

};

SITE.init();

UPDATE

Ok with Levi’s advice, I came up with this solution:

var SFAIC = {};                                   // Global namespace

SFAIC.common = { ... };                           // Shared properties
SFAIC.common.fn = { ... };                        // Shared functions
SFAIC.plugin = {

    qtip: $.fn.qtip,
    validate: $.fn.validate,
    validator: $.fn.validator

};
SFAIC.init = function() { ... };                  // Global initializer

$(document).ready(function() { SFAIC.init(); });

Then each page would have its own object literal like:

SFAIC.Main = {};                                  // Main.aspx 

SFAIC.Main.someSection = { ... };                 // Some Section's properties
SFAIC.Main.someSection.fn = { ... };              // Some Section's functions
SFAIC.Main.anotherSection = { ... };              // Another Section's properties
SFAIC.Main.anotherSection.fn = { ... };           // Another Section's functions
SFAIC.Main.init = function() { ... };             // Main.aspx's intializer

$(document).ready(function() { SFAIC.Main.init(); });
  • 1 1 Answer
  • 0 Views
  • 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-22T01:08:05+00:00Added an answer on May 22, 2026 at 1:08 am

    I recommend that you make a new object for section and a new function for each page/item.
    However, the more scripts you add in this way, the harder it gets to manage the whole in an editor. Netbeans has a feature that lets you jump to parts of the object and helps manage this.

    Example:

    var lib = {}; // your library
    
    //maybe you like the plural name plugins better. That's fine.
    lib.plugin = {
        //define plugins here
    };
    
    //maybe you like the plural name helpers better. That's fine too.
    lib.helper = {
        //define your helpers here
        cycle: function() {
            //code for the cycle plug-in
        }
    };
    
    lib.account = {
        //you could stick code that is general to all account pages here
    };
    
    lib.account.overview = function() {
        //you could stick code that is specific to the account overview page here
        //maybe you'd use the cycle plug-in to show their latest posts.
        lib.plugin.cycle();
    
    };
    
    lib.account = {
        //you could stick code that is general to all account pages here
    };
    
    lib.account.overview = function() {
        //you could stick code that is specific to the account overview page here
        //maybe you'd use the cycle plug-in to show their latest posts.
    
        lib.plugin.cycle();
    
    };
    

    Then on the Account Overview page you’d call lib.account.overview().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a C#/ASP.NET application, I have a form that renders much like the following
I'm considering rolling my own, but just in case there's a good piece of
Is there a string.Empty in JavaScript, or is it just a case of checking
Is it a simple case of just never using the this.XYZ construct?
Just wondering why people like case sensitivity in a programming language? I'm not trying
I'm just wondering if there can be a case where the hostname can be
Is it just that nvarchar supports multibyte characters? If that is the case, is
I think I know how to handle this case, but I just want to
I'm used to thinking of member functions as just being a special case of
It's pretty difficult to show code for ASP.NET here, so I will try my

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.