Jump to content
Peter Falkenberg Brown

ProcessWire v. Laravel, Symfony, etc

Recommended Posts

Howdy PW Gurus Who Also Know Laravel or Symfony,

I built a few web applications with PW, and was very happy with the result. For example:

- an email to web help ticket system, with a front-end login

- a Linux account management and multi-server account creation app, with a front-end login and PW server scripts run from the command line

- a complex business app to test the viability of business ideas against a variety of metrics and algorithms, with a front-end login.

The front-end logins displayed pages specific to the app needs, entirely bypassing the normal PW admin backend.

=> My question is: since PW can build the types of apps above, what can Laravel and Symfony do that PW cannot?

Thanks for any insights!

Peter

 

  • Like 4

Share this post


Link to post
Share on other sites

Laravel or Symfony are first and foremost general purpose frameworks, while ProcessWire is first and foremost a CMS with the benefit of having a small general purpose framework beneath. The difference lies mostly in what you get out of the box and less so in what you can build with it. E.g. laravel/symfony have components for using queues, processwire doesn't, laravel/symfony have a templating system, ProcessWire doesn't (it's php), …. On the other hand ProcessWire comes with a flexible backend to hook into, laravel/symfony don't have that (laravel nova would be similar, but costs money). 

  • Like 7

Share this post


Link to post
Share on other sites

What @LostKobrakai said. The short answer to "what can Laravel and Symfony do that PW cannot" is "nothing", but in my opinion that's not really the question you should be asking – rather you should ask what it is that they are better suited for than ProcessWire 🙂

In my experience (based on other web application frameworks, not Laravel or Symfony specifically) the biggest day-to-day difference is exactly the general purpose nature of web application frameworks: ProcessWire is specialised to content management, hence it's a "content management framework" (CMF) rather than a "web application framework" (WAF).

In some regards ProcessWire has more built-in stuff than WAF's, and in some regards it has less – just like LostKobrakai pointed out above 🙂

Some examples of the differences include routing and project structure / application architecture:

  • Although this might be changing, not too long ago it seemed that every PHP framework enforced MVC pattern, or at least recommended it. ProcessWire, on the other hand, doesn't (natively) include anything like that. The default, out-of-the-box approach ("output strategy") is a straightforward solution where single template file contains (or rather can contain – of course you can also split it into multiple include files) all the code required by said template.
  • Similarly in ProcessWire URLs are by default routed to pages, and although custom routing is technically possible using URL segments, there's no real, robust routing library included, other than what Pages / PagesFiles / Process modules require to function properly.

While it's true that you can build pretty much anything on top of ProcessWire (or WordPress, or Drupal, or any remotely flexible CMS/CMF for that matter), whether that's a good idea depends on a number of factors. For an example, if there's no content to manage – or the content you have requires a very specific type of structure or storage mechanism or something – a general purpose WAF may provide you with more suitable tools than most CMS/CMF platforms 🙂

Just for the record, https://madewithlaravel.com/ has quite a few examples of stuff built with Laravel. Some could've made at least as much sense as ProcessWire projects, while others are clearly better suited for a WAF.

  • Like 10

Share this post


Link to post
Share on other sites
22 hours ago, teppo said:

while others are clearly better suited for a WAF

Would be interested in some examples 🙂 Thx for the elaborate answer!

  • Like 1

Share this post


Link to post
Share on other sites

In my opinion you can build amazing backend web applications with ProcessWire, as I already built some with it. A big difference is, that most frameworks like Laravel do not come with a backend. So you have to use Laravel Nova or Voyager to create a nice looking backend.

ProcessWire on the other hand comes with a nice customizable backend. Depending of the type of backend/application you build, you have to "bend" the PW backend to your likings, this includes removing features, or writing modules to get the behaviour you would like (for example restricting users to a branch).

In other frameworks you start with "nothing" or a boilerplate and develop the features you like, which might be more work, but you get a very tailored application. You could do this with ProcessWire also, if you like, because you don't have to use the included backend.

What I was missing for example in Laravel Voyager were field dependencies, which hides or shows fields depending on the state of another field. 

One big drawback of ProcessWire is the sync between a live server and your dev server. Because ProcessWire does not distinguish between structural and content pages (or I am not aware of it), updating a live server with changes you made on dev is very cumbersome. There is some discussion about this going on here on the forums:

or here 

  • Like 4

Share this post


Link to post
Share on other sites
1 hour ago, bernhard said:

Would be interested in some examples 🙂 Thx for the elaborate answer!

Browse to madewithlaravel.com and check out pretty much anything that doesn't manage data, and/or doesn't produce output. From the front page: Clockwork, Fractal, Vessel, etc. Also anything that is more "component", intended to be used within other applications, rather than a "full-blown application" itself 🙂

Perhaps a more familiar example would be https://wireshell.pw/. While it's not built using a WAF, it does make use of Symfony components. Could it be built using ProcessWire? In theory yes. Would it benefit from being powered by ProcessWire? Not really.

  • Like 3

Share this post


Link to post
Share on other sites

@teppo <aside>Dude, you threw me off with that new avatar 😀. I was like who's this replying to Teppo's post; I haven't 'seen' them before...</aside>

  • Like 2
  • Haha 3

Share this post


Link to post
Share on other sites

Thank you all, for these comprehensive replies!

I'll check out the links, etc.

The right tool for the right job is indeed the point.

So far, at least, I'm VERY happy with ProcessWire. Who knows: I may never need Laravel at all. Time will tell.

Thanks again!

Peter

  • Like 1

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By hettiger
      Hello there,
      ProcessWire has been the perfect CMS for me so far but I always missed the Laravel way of doing things when working with PW.
      Therefore I've built a package that will integrate Laravel into ProcessWire.
      It's already working out really well and I can imagine a lot of stuff to come in future.
      Anyways I'm hoping for some peoples support / pull requests / ideas / opinions ...
      Here's the link: https://github.com/hettiger/larawire
      Enjoy!
    • By MECU
      I'm incorporating PW into a Laravel site layout. For the Login/Logout links, I have:
      <?php if ( !wire('user')->isGuest() && wire('user')->id && wire("user")->isLoggedin() ) { echo '<li><a href="/pages/control/">Admin</li> <li><a href="/pages/control/login/logout/">Logout</li>'; } else echo '<li><a href="/pages/control/login/">Login</li>'; ?> I started with just wire('user')->isLoggedin(), and that didn't seem to work, so searching around the forums added in the other items.
      Basically, whether I'm logged in or not, I always see a Login link.
      If I dd/datadump (a Laravel function) the wire('user') I get what looks like the PW user class. So I've included the PW index.php correctly into my Laravel bootstrap/start.php. 
      As an aside, $wire->user->isLoggedIn() doesn't work. It's probably some conflict with Laravel. Switching to use wire('user')->isLoggedIn() let me work, though it gives the wrong result.
      EDIT 1:
      It works fine on the pages that are pure PW, just not any that are Laravel driven.
    • By joe_g
      Hello there,
      Just getting started with processwire for a project. Pretty smooth so far!
      There is one thing I'm missing is "inline" many-to-many. The ability to add pages 'joined' together similar to symphonys subsection manager http://symphony-cms.com/download/extensions/view/41121/
      As if the repeater field would actually adds new instances somewhere else in the hiearchy as well as edit inline. This so that the client wouldn't have to edit bits and pieces of data in different places in the page hierarchy.
      It seems to me this isn't possible, but perhaps I'm missing something. So I thought I'd check
      thanks!
      J
×
×
  • Create New...