The best way to learn Slim 3 as a Beginner


#1

Hello everyone,I have been learning to code on treehouse and loving the experience, now one of the courses in a PHP course introduced me to Slim, the only problem was it was with the 2.6 version First.

I have to say I am using Mamp as a local server and I have installed Composer, Slim, and Twig through the terminal. As a beginner, i have been trying to follow the First Application walkthrough and it has been a challenge introducing me to things I knew nothing about, which I am enjoying.

I got the first app to work with the hello joebloggs, which is awesome now because I do not know a huge amount of PHP the next steps are hard to understand, do you use all the commands in the walk through or just pick and choose the things you need. tried looking for courses online but since Slim 3 is only recent everyone is still teaching in the older version for beginners. Can anyone point me in the right direction to get a grass roots grasp of Slim?

Looking forward to any help you can give.


#2

Hi there, @Kiwisox!

I think the way you should look at approaching it is that you are not learning Slim, but learning PHP. Once you learn enough about PHP you will find picking up Slim is easy with the available tutorials.

As you have seen, many of these tutorials assume a decent knowledge of PHP and teach what is unique to Slim. Instead, what it seems like you might need is more basics on PHP so that you can understand the specifics of Slim.

As a microframework, Slim provides little structure. You are free to build your app in a variety of different ways. That loose structure can make it more challenging to learn than other frameworks.

Here are resources I’ve found helpful.

Start simple, get some basic things working, and build upon your success. Ask questions when you have them. Don’t hesitate to play with other frameworks too. Seeing the similarities and differences between the frameworks can also be a good way to learn. :grinning:


#3

Thanks for the Help Tim, in Treehouse they were going to cover in greater detail later on but because they were using an outdated version I did not want to start off on the back foot I will defiantly go through those links.

This problem has been catching a lot of students out in this particular course. because it is at a beginners level. anyway, i will keep grinding away at it the hours seem to disappear while having fun learning all this code.


#4

There are some really good video tutorials on https://www.codecourse.com/library?subject=slim I have watched a few and they are nicely explained. There are quite a few Slim 3 related ones on there also.

I would be keen in finding out what you think we could improve in the area of learning material for beginners for Slim 3.


#5

Thanks for the Reply Slient the main thing for me from the basic rundown in the first $app walkthrough would be to see the complete piece of code even if i don’t understand what everything does, it helps to so see it in one piece.

And with practice, you learn where certain pieces of code should be and as you use it more you can gain the understanding of what it does through repetition.


#6

You can have a look at the repo to see the full application https://github.com/slimphp/Tutorial-First-Application I hope this will help.


#7

Hi Again Silent, thanks for your help I have been working my way through the information for the last four days now, I have been learning heaps, the information on Code coarse was very helpfull as he was explaining I was putting together the information I had read all of a sudden its starting to click,

is one of the reasons I am enjoying the learning to code because people in the community’s are so willing help.
thanks again ill keep working at it.


#8

I’m looking for a sample slim 3 project so I can learn through reading code …

Thanks !


#9

Hi, as this may sound self advertisement(I am sorry for that), but @Kiwisox I have done a few tutorials on slim 3 which includes a sample project, you could check it out if it helps.
Thanks


#10

You sir, you won the internet and deserve all the cookies. I’ve been trying to understand SLIM framework for almost a year. I’ve tried several tutorial that pointed me in the right direction but suddenly everything worked on 2.x but with a lot of fresh information it was real hard to re-match the new knowledge with the neccesary adaptations for slim3. Now with your tutorials I’ve advanced a lot in understanding the slim3 way.
Thank you.