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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:32:04+00:00 2026-05-24T20:32:04+00:00

I want to create web application using Grails. The main layout consists of few

  • 0

I want to create web application using Grails.

The main layout consists of few parts, like top, left, content, etc.
and I want each part to be partially refreshable. I’m planning to use jQuery to perform ajax request and refresh.

Let’s focus on the content layout. I have two options in mind for rendering the view:

  1. As we know, Grails by default using Sitemesh for its view. So basically, I will use the jQuery to get the gsp page using ajax.
    And put that page into the content layout.
  2. I will use jQuery to get JSON object (instead of GSP) from Grails controller, and use render view using any jquery templating plugin.
    I might need to use backbone.js/spine.js to manage the OO structure.

Which one of the two options is better?

I mostly consider the following parameters: easy to develop, performance, mantainability, etc.
But if you think there are other importants parameters to consider, pls let me know. I’m not an experience web developer.

Or perhaps you know other better options?

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-24T20:32:06+00:00Added an answer on May 24, 2026 at 8:32 pm

    First of all, there might be situations, where you are forced to use a combination of both (for the same structures). Obviously this leaks of maintainability and should be avoided.

    From a maintainability, flexibility or speed of development of view, you should consider the first option. This is what grails is done for. There are great advantages for this: You can render your template into the GSP, when the GSP is called first time. When an AJAX action is called you just re-render only this template. It’s short, simple and works. The most grails tags can handle those actions. Additionally it is easily testable.

    However you lose little reusability with this approach, when you want to update your content based on other events (like WebSockets/comet) and you do not want/cannot to call the server again. In these case you should implement the template logic using jQuery-Template and filling it with JSON data received from your server-push message.

    Performance: There are also use-cases, in which you should consider the second option as well: If you have a chat, you only want to display the new messages incrementally (or you need to reduce the used bandwith of server) and don’t want to send the complete chat-progress to the user just because there is one small new message. Here you cannot use templates without some hacks or limitations. Additionally if you want to provide realtime feeling to the user, you cannot let him wait for the answer of the server and you need to update the view directly using JQuery, where you cannot reuse your template. Therefore you should have your template data in one place and use jQuery-Template or similar exclusively – at least from my point of view.

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

Sidebar

Related Questions

I want to create a website which will serve more like a web-application. There
I'm using snap framework and haskell to create simple web application.I want to know
Using mysql, c#.net, Java Script I have the web application, i want to create
I want to create a web application that allows users to sign up, register
I want to create site thumbnails through my web application, so I thought I
i am using gwt to create a web application. when a user presses the
I am using Jboss and Netbeans to create Spring MVC web application on windows.
I want to display font dialog box in my web application(asp.net). Im using the
I am using Websphere Application Server to create a typical web application where UI
Hi I want to create a simple jquery carousel for my php web application.

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.