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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:56:37+00:00 2026-05-15T09:56:37+00:00

I am creating an MVC application framework, using only libararies and components that I

  • 0

I am creating an MVC application framework, using only libararies and components that I create myself (mainly a learning experience), but I’m not quite sure how to separate each kind of library from one another.

We’ll call my application Cat.

Lets say I’m creating a library called Dog, which would sort of be like Zend and is full of different components that do different tasks (Database classes, DALs, Routers for figuring out what Controllers to choose from a given URL, etc), and will be located in the root/library/ dir.

I’ll also be creating an app library that would be application specific, (Might contain a class like FrontController or Application to help with initiating and configuring the app). This will be located in root/app/library/

I want to use the Dog library on both this application and other applications, and for it to be hopefully independant of the Cat, so it can be used on a number of other applications.

In my Cat application, lets say I create a new database object. Should I be writing:

$database = new Dog_Database();

or would it be better to have a Cat_Database class that purely extends the Dog_Database class? That would mean I can later tell the Cat_Database to extend a Ferret_Database instead if needed…

I guess the main question is, should my application be calling things straight from a shared library, or should it be calling app-specific library classes, which in turn extend from the shared library if needed?

  • 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-15T09:56:38+00:00Added an answer on May 15, 2026 at 9:56 am

    I think you answered your own question somewhat. You say that you want dog to be independent of cat. That means, to me, using a lot of dependency injection between the two and not a lot of inheritance or direct calling. You can’t make your app library extend classes from the framework if you want to reuse the app library elsewhere sans the framework.

    Its tough to give detailed advice to a broad question like this. Perhaps a few of these concepts will help you though.

    Dependency Injection

    Programming to an interface

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

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer As it stands, you are indeed querying the value of… May 15, 2026 at 12:51 pm
  • Editorial Team
    Editorial Team added an answer There is a separate API for retrieving a user's profile… May 15, 2026 at 12:51 pm
  • Editorial Team
    Editorial Team added an answer The only way source is revealed is if you change… May 15, 2026 at 12:51 pm

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.