A (Somewhat) Framework Agnostic Approach
Just Some Thoughts
This post is going to be a bit subjective based on my personal experiences. That being said, I just wanted to write down my thoughts about my personal experiences in web development lately.
I’ve been using Laravel for about two years now an I must say; I’ve been quite addicted to the web framework. I love it’s simplicity and beautiful syntax. It made me fall in love with PHP again and gave me the confidence to bring my ideas to life. When I first started using the framework, I felt like I was on the top of a mountain; I felt like I could build anything. I think that Laravel sparked my interest in learning how the “backend” worked and I began to be ever more curious about how everything worked.
What I’ve Learned and My Own Pitfalls
I’ve been told a few times by other developers to “pick the tool for the right job.” I’ve been trying the follow that philosophy. Let’s say you need to build a real-time chat application. Node.js/Socket.io might be the right tool for the job (you can even still use Ratchet). What I’m trying get at is I might have been using Laravel the wrong way. I use Laravel for everything! Apps that are at the idea stage, simple APIs, etc. There’s nothing wrong with using Laravel for this, however I do have a mental block when I’m starting/building something trivial and small. For example:
I do get overwhelmed when I start a fresh Laravel project, then I get bombarded with a bunch of directories and files. I immediately have a mental block and sometimes don’t know where to start. I feel like Laravel (and even Lumen) can be a bit big and overwhelming, especially for smaller projects. I never really thought this way with Laravel 4, only when version 5 came out.
Don’t get me wrong though, there are amazing tools that Laravel has and I know why they are there. It makes development painless and you don’t have to worry about the painful tasks so much. However, do I really need all of those tools for my own project? Oven for simple idea projects?
Solution to my Mental Block Issue. The Micro-Framework Approach
I don’t want to make it seem like I’m complaining about Laravel. I love it and I’m still going to continue to use it (where appropriate). I’m all for starting out simple, so I might start out with a small tool (such as a micro-framework) and only bring in tools that I need. ‘Cause Composer is awesome isn’t it? Then, if the project grows, I could always switch to Laravel if the situation calls for it.
Here’s a list of default tools I could use:
- Slim/Silex — both are awesome micro web frameworks. Could use these to build out and API.
- Illuminate\Database — Oh hai! I can still use Laravel components. Can use this as my ORM.
- Phinx — Can use this PHP package for database migrations.
The list goes on! Since I’m also Python dude I can use:
- Flask — A Python micro-framework.
- Alembic — Python library for DB migrations.
- PyMongo — For MongoDB stuff.
and so on…
My point for this rant is for me to start out simple, don’t over complicate something that isn’t complicated. Use right tools for the job and where they fit appropriately.