Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Peter Zee
Peter Zee
12,417 Points

Why use Twig and Slim in the basic php tutorial?

Thank you for the great lessons; I really enjoy them. I only can not stop wondering why we have to learn the syntax of a 'randomly' picked framework like Slim when I want to learn the basics of PHP. {{ Dutch people alway ask 'why' when they have to do something; that is just in our nature. ;-)
}}

In my opinion it is quite confusing, because I am trying to learn (the basics of) PHP in this track. Would it not be better to have a distinct track for using Twig or Slim, similar like is being offered for Wordpress PHP development?

Have you chosen to implement it into the track just to show that it is a programmers' best-practice to choose a framework?

I hope you could explain the reasoning behind this.

Best Regards,

Peter

3 Answers

I am a student like you, Peter, but my answer to your question would be that the course you are taking uses some of the very latest and most popular open source packages that enable one to build sites quickly and efficiently without 'reinventing the wheel'.

There are other course here that teach the basics and more advanced PHP, namely ;PHP Basics', 'PHP Functions', 'Object-Oriented PHP Basics', 'PHP & Databases with PDO'.

For myself, the course you are questioning, 'Building Websites with PHP', covers precisely what I need - Composer, Slim, Twig, etc.

Best Wishes

Bill

What Bill said! It's a "basic website" course as opposed to a "basic php" course ;) Awarded best answer.

Peter Zee
Peter Zee
12,417 Points

Hi Bill,

Thank you for taking the time to anwer my question. I see now that to get more basic understanding of PHP I should first follow some other tracks. I guess I overlooked these courses; thank you for mentioning these tracks.

Now I agree it is totally logical the way this course is set up.

I will be heads up, following the other courses first!

Greetings from Peter