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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:23:22+00:00 2026-06-07T13:23:22+00:00

I’m about 11 months into writing a pretty extensive HTML5-ready video deployment library for

  • 0

I’m about 11 months into writing a pretty extensive HTML5-ready video deployment library for PHP. My client is paying me to write this library in exchange for a license to use an implementation of it, which I am also currently writing. I have been basically keeping a huge PHP file (60Kb at this point) that contains all of my object-oriented classes. The system I’ve built requires in this file on every page, which I imagine would be frowned upon. Don’t get me wrong, I’m no newbie when it comes to PHP. I have been writing PHP for about two years now, and used nearly all of its most advanced functions. I would, however, like to improve still, and I believe that my authoring strategies are a weak point for me.

I love jQuery for its authoring simplicity. It makes writing repurposable code so much easier than PHP does, at least for me. I have been using jQuery extensively throughout this After reading this document I felt quite comfortable with the methods that were considered “best practice”. Can anyone recall a similar resource which deals with PHP?

My intent here is to learn a better practice for writing PHP, without losing the low-level abilities and jumping over to another library like CodeIgniter. I simply don’t like the idea of writing a library based upon another library; I would imagine that my system would leave a much larger footprint and use more resources.

  • 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-06-07T13:23:24+00:00Added an answer on June 7, 2026 at 1:23 pm

    First of all, you can’t compare a library to a language. Apples and oranges. Unfortunately there’s no single source of ultimate knowledge when it comes to PHP. I can only suggest some reading material I have found quite useful.

    • PHP-FIG – a set of standards put together by the PHP Framework Interoperability Group (Github link);
    • autoloading – getting rid of all those include constructs;
    • Composer – a package manager tracking local dependencies of your projects and libraries;
    • PHPUnit – a unit testing framework for PHP;
    • phpDocumentor – use the tags in your comments to clearly document each and every aspect of your code. I personally find Fabien Potencier’s Sami for generating automatic documentation more suitable, but that’s just a matter of personal preference;

    Also, if you like to learn by examples, take a look at these open source PHP libraries that I consider rather well written as far as following best practises goes:

    • Symfony2 – a full-stack web framework;
    • Doctrine2 – an object relational mapper for PHP;
    • KnpMenu – a menu building library;

    If you have the resources, I would highly suggest you break down that large file: put every class into its own separate file. Cover the library with unit tests to be sure your code does what it’s meant to do.

    Edit

    @lsmith tweeted about a site called PHP: The Right Way. This is probably the closest you can get to a single document about best practices.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.