RalfEggert / zend-expressive-tutorial

Album tutorial for Zend\Expressive
BSD 3-Clause "New" or "Revised" License
26 stars 15 forks source link

Default router selection #15

Closed weierophinney closed 8 years ago

weierophinney commented 8 years ago

I'm reading through part 1, and I have a couple of differences of opinion immediately — this is not a reflection on the work you've done, but more a question of philosophy.

In the tutorial, you're suggesting using the zend-mvc router, and the zend-view renderer. Interestingly, our default suggestions are not either of these, but rather FastRoute and Plates, respectively.

The reasons for our current defaults are several:

Additionally, one goal of Expressive has been to showcase that choosing it does not tie developers to Zend Framework components. Developers can choose the technologies that fit their project and/or team expertise. In some cases, that might be a Zend component (for example, I can definitely see a case for using zend-inputfilter or zend-form!); in other cases, we might want to choose something outside the ZF ecosystem.

As such, as I review, I would like to submit pull requests that update the code and content to use the defaults we recommend. Are you okay with that?

The one area I see this being more difficult would be around forms, and I'm assuming you likely are using forms in this tutorial. zend-inputfilter was designed in part to provide a way to process form data without having ties to zend-view, however, so we have a potential way to handle that. If de-coupling proves too difficult, I'll reverse course and revert back to your original choices. However, I'd really like to see if we can accomplish this.

sandrokeil commented 8 years ago

@weierophinney Interesting points. Are they also in the zend-expressive docs?

geerteltink commented 8 years ago

The one area I see this being more difficult would be around forms, and I'm assuming you likely are using forms in this tutorial. zend-inputfilter was designed in part to provide a way to process form data without having ties to zend-view, however, so we have a potential way to handle that. If de-coupling proves too difficult, I'll reverse course and revert back to your original choices. However, I'd really like to see if we can accomplish this.

You can easily use zend-inputfilter. I've been playing with an idea from @ocramius to build a html form validator. It's based on zend-inputfilter, however some parts I had to hack to get it working with servicemanager 3.

Besides that, you have used a stand alone zend-inputfilter yourself on mwop.net :) If you go this route and create a custom InputFilter, it's even working with servicemanager 3.

RalfEggert commented 8 years ago

@weierophinney

Just a quick note since I need to leave my office now for the whole day.

The idea was to show the flexibility of Zend\Expressive by providing two flavours for the tutorial. One which basically uses all the Zend components, and one which uses all the other great tools like Plates, FastRoute and Doctrine.

My tutorial so far is the Zend components based one.

I'll come back here later.

weierophinney commented 8 years ago

@RalfEggert Aha! I wasn't clear on that at all!

Here's my idea, then:

Sound good?

RalfEggert commented 8 years ago

Sounds good. Though I am not quite sure how to handle the PRs for the second tutorial flavor.

RalfEggert commented 8 years ago

@weierophinney

I merged your PRs except the #17 since I am not sure how to handle that. I also added the short tags in the templates in all the parts.

RalfEggert commented 8 years ago

Oh, and I added the docs for part2 in part1 branch as well.

RalfEggert commented 8 years ago

Regarding the Doctrine stuff, maybe @codeliner or @xtreamwayz might be able to help?

geerteltink commented 8 years ago

@RalfEggert What do you need, all zend-db related stuff converted to doctrine?

RalfEggert commented 8 years ago

@xtreamwayz

Well, yes. @weierophinney is working on the second flavour for the tutorial which will work with Plates, FastRoute and Doctrine. See his comment https://github.com/RalfEggert/zend-expressive-tutorial/issues/15#issuecomment-178599582

Maybe it makes sense, that Matthew finishes the work on the Plates and FastRoute stuff and then someone takes over for Doctrine?

geerteltink commented 8 years ago

Yeah that makes sense.

codeliner commented 8 years ago

@xtreamwayz Would be great if you can take over the Doctrine part. Unfortunately, my time is very limited these days. However, if it is not possible for you let me know and I'll find a way to take over Doctrine.

RalfEggert commented 8 years ago

I will close this now. I think we should finish up this tutorial first before we add a second flavor of it.