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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:27:15+00:00 2026-05-28T00:27:15+00:00

I was working on a GWT application and was told that a for loop

  • 0

I was working on a GWT application and was told that a for loop constituted “business logic” and shouldn’t be in the implementation class of the view for MVP. So as a habit I never use a for loop in my viewImplementation class, but put the loop in the Presenter (Activity) and call a method in the viewImplementation class to do each single iteration task of the loop.

I understand that the Presenters don’t contain widgets and have the business logic. Conversely the viewImplementation class is where you have the widgets and keep the rendering logic, but is that too strict a guideline to classify a for loop as business logic?

Are there some guidelines for what classifies as rendering logic versus business logic for MVP using GWT?

  • 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-28T00:27:16+00:00Added an answer on May 28, 2026 at 12:27 am

    I disagree with the statement “for loops constitute business logic”. It is a syntactical construct not business logic. If he is making that statement then it follows (IMO) that you should avoid “If statements” as well. How practical and/or viable would that be!?

    The business logic is what you place inside the looping construct, not the construct itself. It all really depends on what you are logic you are placing within the loop that would be the determining factor here.

    EDIT

    One Example I could think of demonstrates how you would find a for loop in the View whereas according to the “for loop” rule it should only be placed in the Model.

    Imagine you want to make a Toolbar with the letters A-Z on it that a user could click to filter search results.

    A view is responsible for how things should be displayed to the user. For this reason I would argue using the following for loop to generate the toolbar in the View is the most appropriate approach.

    Pseudo Code

    Let TB <- Toolbar control
    for letter = 65 - 90 (A - Z)
    begin
          let item <- Toolbar Item
          set item's text to letter
          add item to TB
    end
    

    This seems to debunk the statement that for loops always constitute business logic and therefore, must be placed within a Model.

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

Sidebar

Related Questions

I have a view that I created in my GWT application and I would
I am working on a GWT application which uses GWT-RPC. I just made a
i am working on a GWT web application and i was wondering if there
I have an issue with the Spring and GWT application I am working on.
I am working on a project for college that uses GWT, Hibernate and Gilead.
I am working with GWT and have 4 Service Implementations that need a PersistenceManagerFactory.
I'm working on a GWT application, which should behave in a slightly different manner
I have a running Java GWT application, that I can compile using Eclipse. Now
Currently I am working on a Large Scale Application which uses GWT with Hibenate.
I have a strange issue in my GWT app. My application is working fine

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.