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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:39:55+00:00 2026-05-13T09:39:55+00:00

I have to implement an Form View, or in other words: A class that

  • 0

I have to implement an Form View, or in other words: A class that is used to put a complex input form on the screen.

The Form is built up of FormComponents. There is an addFormComponent() Method to compose the form with these. And then, the form has an isValid() Method which will go through all the FormComponents and check their associated FormValidators.

For sure this thing has a lot of “intelligence”, but most of this is just a call to some other class. For example the isValid() method does cool stuff, but it really only calls the isValid() methods of the FormComponents which are registered in an array. Nothing too fancy.

Well, that beeing said, must I make a fat FormViewController for this, or is an View just fine?

My understanding of these is, that a ViewController is used when there’s some big logic involved. In this case, the Form View has a template which will simply iterate over the FormComponents and include them. Each FormComponent has it’s own template in turn and does it’s own stuff.

I’ve always been struggling with ViewController and View and I think I’ll keep on doing that until I get a nice R.I.P. brick… but maybe someone can clear this up a little bit 😉

  • 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-13T09:39:55+00:00Added an answer on May 13, 2026 at 9:39 am

    The purist in me is saying that this belongs in a ViewController. I guess maybe it would depend on the framework you are using. For example, this type of setup would be very easily implemented in a Spring Controller object. It sounds like creating a controller in your case would be a lot of extra work.

    Nothing is ever set in stone. You can implement in the View for now and if this turns out to be a huge burdon, move it to a Controller class. Knowing when to refactor is the difficult part.

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

Sidebar

Ask A Question

Stats

  • Questions 315k
  • Answers 315k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Perhaps you might want to elaborate why you do not… May 13, 2026 at 11:12 pm
  • Editorial Team
    Editorial Team added an answer yes, preg_replace('~\?myuser=\d+~', '', $string); May 13, 2026 at 11:12 pm
  • Editorial Team
    Editorial Team added an answer You are running JSON_encode on JSON - this is why… May 13, 2026 at 11:12 pm

Related Questions

I am implementing web services for a PHP application and am trying to understand
This is a two part question. A dumb technical query and a broader query
I am constructing a webcomic site, but the chapter order has changed significantly. I
One-line summary: What is the best practice for unhooking event handlers created in the
Alright, I'm having a hard time explaining this, let me know if I should

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.