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 3955336
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:13:10+00:00 2026-05-20T02:13:10+00:00

We are rewriting the jQuery code of our web service and we are thinking

  • 0

We are rewriting the jQuery code of our web service and we are thinking on a better way to organize it. We’ve been reading several SO questions, articles, etc; and this is a first approach, but we would love to receive feedback.

We are going to have a Class for each object of the page (Place, User, etc). We are planning to use Low Pro (Article) so we have all the code in one place.

However there are some variables that we need to pass from PHP (user.id, user.name, etc). We have thought the best way is to print a json and pass it to a general class.

var array = {
  'key1' => 'value',
  'key2' => 'value',
  'key3' => 'value',
};
var te = new TE(array);

TE.js will assign variables there so the other classes can use them. As we have a multilingual web, we need to have the messages in several languages. We will do something similar to the answers of Multilingual alert messages in JavaScript

What do you think? Is there a better way to load the initial array? Any other suggestion or article?

Thanks!

  • 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-20T02:13:10+00:00Added an answer on May 20, 2026 at 2:13 am

    We are finally using Classy.js for having Classes. We have built our own main Class that loads the params we print as a json on the data-params attribute of the body tag.

    We have the translation string for the js classes on two different fields as Tom and Shan suggested.

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

Sidebar

Related Questions

We're writing a web app that relies on Javascript/jQuery. It involves users filling out
I’m looking at rewriting a portion of our application in C# (currently legacy VB6
We are rewriting our legacy accounting system in VB.NET and SQL Server. We brought
We are rewriting our app to make it Windows Vista/7 compliant. In order to
I'm currently rewriting all my ajax calls to use the jquery method (much cleaner
I'm rewriting a web application to ASP.Net 4.0 and have included a Menu control
I've written several Web MVC apps but never before in PHP, and I'm trying
I'm rewriting an userscript and replacing the use of dojo with jQuery, but then
Can you help me rewriting the following Excel VB code to C#? Range(C9:E11).Select Selection.FormatConditions.Add
I am rewriting some old JavaScript with jQuery and would like to know how

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.