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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:38:49+00:00 2026-05-18T02:38:49+00:00

I have been asked to build a PHP application that inserts data into a

  • 0

I have been asked to build a PHP application that inserts data into a database and then allows users to run reports on the database.

I have a couple of years of experience of developing in PHP a couple of years ago, but am stuck.

I have read articles about MVC, frameworks, etc… and it all seems to have changed ๐Ÿ™‚

What is the best method to use? I feel like iv been stuck in a time warp and have now come to back to PHP and it has totally changed. Im questioning everything I knew ๐Ÿ™‚ I dont even know what directory structure to use to lay the applicaion out ๐Ÿ™‚

I hope someone can help and offer some advice on how to lay applications out what Design principle to use etc…

Please help im totally lost ๐Ÿ™‚

Edit: I would prefer not to have to learn a framework, but rather learn how to build an application. ๐Ÿ™‚

  • 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-18T02:38:50+00:00Added an answer on May 18, 2026 at 2:38 am

    I like your thinking. I had a look at CodeIgniter, Cake and the other frameworks and whilst they were good I decided to write my own. I learnt a ton. The first revision of my framework wasn’t that great but I have two sites running on that without issues. The second edition of it might not be as mature as Cake etc but it makes building PHP apps a breeze and the key thing for me is: I know what every line of code does and it’s super-quick to change and debug.

    I think the first thing to do is to think about how you are going to break the app into layers, obvious candidates are:

    • Front Controller: A class that parses URLs and decides what to do with them. Most frameworks these days use an Apache mod-rewrite rule to forward all URLs to one class – so it’s a single entry point into your app.
    • Database abstraction layer: Put all of your code that read/writes to a DB in one place and have everything call that. Also known as ORM.
    • Models: Classes that represent one or more tables from your DB.
    • Controllers: Classes that update/read models, apply logic and populate and show views.
    • Views: HTML files that import data from your controllers. I use Smarty.

    So taking those elements, you have a basic directory structure:

    /models
    /controllers
    /includes
    /views
    /css
    /js
    index.php
    

    index.php is my Front Controller. And I put ORM stuff and other helper classes for doing generic work like processing forms and stuff into the /includes directory. Obviously /css and /js houses your static javascript and CSS files.

    The Front Controller works in that you have URLs that specify which controller to create – something like: http://www.domain.com/product/1/hello-world. Where product is the name of a class (I call my controllers Controller) – so here my front controller would read the product part of the URL and create an instance of ProductController.

    The controllers act upon the rest of the URL that they are given. So ProductController gets params of 1 and hello-world. 1 could be the index of a product to load and display. hello-world is just SEO text to ignore. You could also specify functions to call, so http://www.domain.com/product/list – this time you create a ProductController and call the list function.

    There’s different ways to structure a MVC app and forums are full of arguments about it – what I’ve put above my or may not be true MVC but the main goal is to get good abstraction into your app.

    I’d recommend checking out Smarty for your View layer. It’s a stable library and provides HTML caching as well.

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

Sidebar

Related Questions

I have been asked to build a web application that will be used to
I have been asked to build a POS Application for a Restaurant. I have
I have been asked to build an application where I can drag and drop
I have been asked to lend a hand on a hobby project that a
I have been asked to develop some usercontrols in ASP.NET that will at a
We have been asked to look into a fully open source solution for a
i have been asked the php mail() function, is it send from linux ?or
I have been asked to standardize the screen saver and desktop background used by
I have been asked to audit any/all changes in a MySQL table. Does anyone
I have been asked to provide information on available techniques for assessing our current,

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.