Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seeking Code Examples #1

Open
beryllium opened this issue Jan 26, 2016 · 2 comments
Open

Seeking Code Examples #1

beryllium opened this issue Jan 26, 2016 · 2 comments

Comments

@beryllium
Copy link
Owner

I am seeking a handful of code examples - things (horrors!) that people have encountered in the wild - preferably with matching examples of how they were modernized, so BeautifulPHP.com can become a handy open-source guide to PHP modernization with side-by-side views of "pre-historic PHP" and "modern PHP".

It would be best if each example would highlight one or two (at most) things that have been improved in PHP either from changes to the language itself, cooperation of the community, improvements in the engineering process, or even a result of PHP-FIG standardization.

My ultimate goal is for people who are in "crunch mode" or just don't know about modern PHP will see the site and it will help them understand that there are new and easy ways to build maintainable, tested, and secure projects with PHP. We can always use more sites touting a modern PHP approach, to try and further combat outdated information that is crusted around the pilings of the Internet like barnacles on a pier.

If you can provide some examples, that would be great! Thanks!

@beryllium
Copy link
Owner Author

So far I've got these stubs/writing prompts:

  • General discussions:
    • The PHP lifecycle and its pros/cons
    • The truly open-source nature of PHP
    • The pros and cons of PHP-FIG
    • Composer/Packagist
  • Specific examples and implementations:
    • Templating systems (Blade and Twig)
    • Prepared statements with Doctrine DBAL
    • Collections (from Laravel - https://github.com/tightenco/collect)
    • API consumption via Guzzle
    • Simple API via Silex or SlimPHP
    • Symfony Request/Response (and JsonRepsonse/RedirectResponse/BinaryFileResponse)
      • Maybe a PSR-7 discussion as well

Please comment if you can think of additional ones or refinements of the ones above. I think in the interests of moving forward, not backwards, the side-by-side idea should largely be discarded - so the site will be more like a blog with guest posts.

@azdanov
Copy link

azdanov commented Feb 20, 2018

PHP Delusions website has some examples that I've found insightful.

Apart from that as a beginner I'm looking forward to learning proper PHP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants