r/PHPhelp • u/mvdp59 • Jul 21 '17
First PHP project - looking for advice
Hey,
This subject has been discussed over and over and I read a lot about it but still can't decide for my specific need. I've started my first PHP project - a "wine cellar inventory" webapp which will probably just be opened to a limited amount of users for personal use. If it's stable and polished enough it will be opened to the public. I've started this project "from scratch", with no framework. I am beginning to feel the need for structure, hence I will definitely refactor to MVC pattern which I'm just starting to understand. I found a nice course based on Silex and I've been wondering : do I need a framework ?
I've already got user registration, login/logout, password recovery done and I understood if I go with a framework I will probably need to rewrite all of this with the framework, which is a bit painful to accept given the hours spent on this, but anyway this is not important. I now have enough functionalities to release a v1, just need to finish css work and it will be ready. I'm concerned about cleanness of the code, even though I will be the only person working on this project. Is going the "MVC with raw php" way enough ? Should I use a framework and why ? Finally if the answer is yes, I can't decide between Silex and Slim, do you have any recommandation regarding the type of webapp I am working on ?
4
u/damndaewoo Jul 21 '17
To answer the " do I need a framework" question, no, you don't need one. I built ExpressTurtle.co.nz with raw PHP and Mvc design patterns. However a framework will make writing boilerplate code easier as most of the heavy lifting is already done.
1
u/mvdp59 Jul 21 '17
Yeah, problem is I already wrote some of the code frameworks provide (but I'm sure the code provided by those frameworks is way better than mine).
2
u/_odan Jul 21 '17
Silex is dead (… or not). I would recommend slim as a stable basis. Take a look a the slim skeleton apps like this, this and prisma.
1
0
Jul 21 '17
[deleted]
1
u/mvdp59 Jul 21 '17
I'm surprised no one recommended Symfony but Laravel was, twice. Why is that ?
0
Jul 22 '17
[deleted]
1
u/mvdp59 Jul 22 '17 edited Jul 22 '17
Ok thanks I thought Laravel was as complex as Symfony but after reading some articles on the subject it seems to be easier.
6
u/MattBlumTheNuProject Jul 21 '17
Use Laravel. It will save you from having to write a bunch of "glue" code that has already been written.
Still learn how to write good code and how PHP works, but just use Laravel.