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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:52:52+00:00 2026-05-15T05:52:52+00:00

This is question about MVC web-app architecture, and how it can be extended to

  • 0

This is question about MVC web-app architecture, and how it can be extended
to handle componentizing moderately complex units of functionality.

I have an MVC style web-app with a customer facing credit card charge page.

I’ve been asked to allow the admins to enter credit card payments as well,
for times when credit cards are taken over the phone.

The customer facing credit card charge section of the website is currently
it’s own controller, with approximately 3 pages and a login. That controller
is responsible for:

  • Customer login credential authentication
  • Credit card data collection
  • Calling a library to do the actual charge.
  • reporting the results to the user.

I would like to extract the card data collection pages into a component of
some kind so that I can easily reuse the code on the admin side of the app.

Right now my components are limited to single “view” pages with PHP style
embedded Perl code.

This is a simple, custom MVC framework written in Perl. Right now, controllers
are called directly from the framework to service web requests. My idea is to
allow controllers to be called from other controllers, so that I can componentize
more complex functionality.

For simplicity I think I prefer composition over inheritance, even though it will
require writing a bunch of pass-through methods (actions). Being Perl, I could in
theory do multiple inheritance.

I’m wondering if anyone with experience in other MVC web frameworks can comment
on how this sort of thing is usually done.

Thank you.

  • 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-15T05:52:53+00:00Added an answer on May 15, 2026 at 5:52 am

    Create a component (class?) which wraps all the cc specific functionality, and expose it through appropriate methods/functions.

    Use composition to provide your controllers, both customer and admin facing, an instance of the cc component, and have both call the appropriate methods to achieve what needs to happen.

    I have dealt with something similar many times, and I absolutely prefer keeping my “controllers” (or any other code that depends directly on third party libraries for that matter) as “stupid” as possible, and do like you said – pass through anything that calls for functionality that’s specific to your app. This keeps my code easy to test, which is what drives most of my design these days.

    I hope we’re talking about the same things, MVC can be applied at so many different levels it sometimes gets confusing.

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

Sidebar

Related Questions

I am working on a MVC web app. I have a question about how
This is a general question about MVC as a pattern, but in this case
I asked a question about different testing frameworks yesterday. This question can be found
This question about Timers for windows services got me thinking: Say I have (and
Followed this question about delayed_job and monit Its working on my development machine. But
I have seen this question about deploying to WebSphere using the WAS ant tasks.
Follow up to this question about GNU make : I've got a directory, flac
This is sort of the Java analogue of this question about C# . Suppose
JD Long helped me with this: question about manual annotation . But is it
A few days ago I asked this question about jquery ajax function invoking action

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.