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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:47:38+00:00 2026-05-11T05:47:38+00:00

What are the main components of a PHP application? I’ve come up with these:

  • 0

What are the main components of a PHP application? I’ve come up with these:

  1. Database
  2. HTML templates
  3. Sessions/Cookies/Authentication
  4. User Input ($_GET or $_POST or URL segments)

Are these the main components or are there any others?

The reason I’m asking this is so I can put each ‘Object’ in its own class without having to worry about how it will be technically feasible. For example, I can have a Post class which allows you to add posts to a blog, without having to worry about how it will fit in with the rest of the system / php language, etc.

  • 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. 2026-05-11T05:47:39+00:00Added an answer on May 11, 2026 at 5:47 am

    This sounds a lot like this question.

    I would strongly recommend that you take a look at Patterns of Enterprise Application Architecture by Martin Fowler.

    I would also recommend that you search for questions on this site related to the Model or Domain as well as Object Relational Mapping or Database Abstraction. I happen to know that there is a great deal of excellent content particularly in regard to PHP.

    I see two questions in this question that you’ve posted. First, what are the general architectural components of a site. Generally you’ll have these three in some manifestation:

    1. Database and Database Interaction Layer
    2. Controller – handles $_GET and $_POST (the request) and assigning content to the View and ultimately rendering it.
    3. View – should contain only HTML and very basic code such as loops for iterating over collections and variable output.

    Second question I see is where to place handling of a specific business object in the application. This is where the discussion gets a little more involved because I assume that you need to interact with Posts both as business objects (within the domain) and as rows in a database table. Both of these concerns can be wrapped inside of the same class utilizing a pattern called Active Record which has been popularized by Ruby on Rails. However, depending on the complexity of the application and database involved you may want to consider separating the business logic from the database interaction by creating one Post class that acts as the database interaction layer and another Post class that contains all of the business logic.

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

Sidebar

Related Questions

how can i pass values from my custom components back to the main.mxml? i
The main web application of my company is crying out for a nifty set
The main user-case is: Create the 2D floor plan See the 3D view of
I'm creating a PHP web application framework (MVC). I'd rather not use external libraries
I am writing an application using Symfony. I have some reusable components that I
I have a VGroup in my application that contains several custom components of type
in the main file, I would write: <components:mybutton id=mybutton1 rollOver=point_rollOverHandler(event) /> But if I
I am in need of some resources on how to design the main components
When dealing with image processing and computer vision these two terms come up perennially
Hi everyone in my main html file, I have this div that some img

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.