F3 for large project

131 views
Skip to first unread message

v.

unread,
Apr 26, 2018, 11:48:19 AM4/26/18
to Fat-Free Framework
Hi guys,

I have been using F3 for a few years now and I already enjoy using it.
It is very straight forward and simple to use once you get the hang of it!

I have used it in a few small and medium-sized projects with no problems to speak of.

Now I am pondering to start something really big.

Would F3 be suitable for large scale projects? Or is it preferable to go to a full-blown framework like Laravel or something similar?
What are the possible cons you can run into for using F3 in large projects and what are the advantages of something like laravel over F3 in this case?
I assume that the large frameworks have more options by default?

kind regards,

v

Sascha

unread,
Apr 26, 2018, 11:55:48 AM4/26/18
to Fat-Free Framework
Well, since you know F3 for a few years now, you should know its pros and cons.

Laravel does everything F3 does, but a bit more complex here and there. On the other hand, you have several extra features and a ton of plugins / extensions you can use to speed up development. There's at least one thing why I'd prefer Laravel over F3: DB migrations. Especially for big open source project, things like this come in handy.

richgoldmd

unread,
Apr 26, 2018, 12:03:50 PM4/26/18
to Fat-Free Framework
I have used F3 in a large project. 

I agree with Sascha that DB migrations are a good idea - You can easily use Phing in your F3 project (I do) and its a huge timesaver especially when collaborating with others on the same project.

There are a few things that F3 doesn't do out of the box (at least not without some planning) that I have added in my projects. For example, A proper DI container/injector comes in very handy for decoupling the interface from the implementation. When the implementation changes, just plug in a different one in the dependency container And where the interface is required use an actual interface).

I've also found it useful to use a DI container (PHP-DI specifically) to instantiate controllers (I've written a bridge that does this and I use it in conjunction with my F3 route parser to auto generate routes from docblock annotations) and inject dependencies automatically into them. 

One thing I found with F3 (really true for any framework) is that it is very easy to get business logic into your controllers and that becomes a mess later on. Controllers should be thin, IMHO, and delegate business logic work elsewhere. 

HTH,

Rich

Dennis Tobar

unread,
Apr 26, 2018, 12:07:05 PM4/26/18
to f3-framework+APn2wQfsu8MCcWHUosn...@googlegroups.com, Fat-Free Framework on behalf of ethanpil
Hi,

I suggest use Laravel, because it has a lot of plugins and it's well supported by community and many tutorials on Internet. F3 fits well with small and medium size projects, but in large projects, the develop of foundations of all interactions could become a nightmare. (|ikezz, I know your github repo ;)).

"Don't kill flies with a cannon" is a pattern. In this case, "don't kill dragons with a swiss knife" ;)

My two cents

--
-- You've received this message because you are subscribed to the Google Groups group. To post to this group, send an email to f3-fra...@googlegroups.com. To unsubscribe from this group, send an email to f3-framework...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/f3-framework?hl=en
---
You received this message because you are subscribed to the Google Groups "Fat-Free Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to f3-framework...@googlegroups.com.
To post to this group, send email to f3-fra...@googlegroups.com.
Visit this group at https://groups.google.com/group/f3-framework.
To view this discussion on the web visit https://groups.google.com/d/msgid/f3-framework/ac6d8bea-57b6-43eb-a925-2775592ed59f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Dennis Tobar Calderón
Ingeniero en Informática UTEM

ved

unread,
Apr 26, 2018, 7:08:14 PM4/26/18
to Fat-Free Framework
All valid points made by others.

Still, "large scale project" is a relatively ambiguous term. How large? And large in terms of what? A large website? A large app? Large codebase? A lot of pages? Complex forms? Math calculations? etc..

You can have a very large project that has only 2 or 3 http endpoints, and for that case, the framework is probably largely irrelevant since most code will probably be plain php. (or python, or ruby, but that still doesn't mean you have to use django or rails)

Think first about your app's architecture, structure, data, etc. And then consider if you can easily use F3 (since you're already used to it). If there are many features or functionalities that you'd be better served by another framework, then go for it.

In conclusion, the framework you choose should be just salt on your app.

ikkez

unread,
Apr 27, 2018, 4:20:32 AM4/27/18
to Fat-Free Framework
Oh this thread has so good points, really interesting to see all the opinions.
I agree @ved, that it's relative what is meant to be "large scale". Nevertheless, when the codebase grows, regardless of the framework you use, performance is not a feature by default. You should know your tools and how to measure load and render times, add fine-grained caching and optimize your server/s to keep everything nice and smooth. I think F3 gives you a lot of low-level control about most features and does not hide a lot behind magic walls, but you can still mess things up when you are holding it wrong. Some things might not seem to be an issue in small projects, and only be visible when the project or database grows,.. let say like a db query within a loop, which isnt the best idea. I mean the developer should think and prepare the app for large scale while building the architecture in the first place.
Laravel and other frameworks might have more plugins, but at least you're able to include and use other framework parts within your F3 project as well, since many other framework components are standalone usable, like Laravel's Illuminate DB or the PDF lib from popPHP
Also I think that Dennis is kind of right,.. if you have a bigger project in terms of functionality, you'll sooner or later come to the point where you either need a 3rd party plugin/lib, or need to develop something own to build your project foundation.. like a Queue system or Route authentication.. If you have fun writing those, go for it. That's how I came to all the plugins I've made till today :)

v.

unread,
May 7, 2018, 2:11:27 PM5/7/18
to Fat-Free Framework
Thank you all for your interesting and valid input.
To clarify my project a little bit: I want to set up a site with different types of users (and thus access restrictions and management), many different pages, possibility of uploading different file types from different environments, report generation (this is actually quite tricky since the reports can be quite large db dumps with tens of thousands of lines), API's and connections with other solutions,
The solution should be able to accomodate thousands of users. I assume that this is always possible if an application is not written too terribly and if the hardware is suited for it.
I am still undecided, but I am leaning towards F3.
One of my concerns with it however is long term support. Laravel has a huge community and is not just going to go away. I am not sure how many active developers F3 has, but from the activity in the forum, on stackoverflow and github I think not so many.

Nuwanda

unread,
May 7, 2018, 5:19:04 PM5/7/18
to f3-fra...@googlegroups.com
F3 can accommodate those requirements even if you need to add the odd third party library. Keep in mind it's a micro framework designed to give you a handy set of tools from which to get started. Look around and you'll find micro frameworks in general seem to lack a large user base and very active supports systems.

Laravel's something quite else. It's called a framework but it's really an entire ecosystem that just happens to be coded in PHP. In concept it's closer to Wordpress than F3.

You might also like to check out Slim if all you're looking for is a routing/request/response base. You could also go frameworkless and assemble a handful of libraries. Google it. Plenty of ideas and examples out there to get you started.


Reply all
Reply to author
Forward
0 new messages