ZF1 > ZF2 migration guide?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

ZF1 > ZF2 migration guide?

Ralf Eggert
Hi,

I wonder if there are any plans for a migration guide from ZF1 to ZF2.
When ZF2 becomes stable, people will be asking for it.

Best regards,

Ralf
Reply | Threaded
Open this post in threaded view
|

Re: ZF1 > ZF2 migration guide?

Bart McLeod
Hi Ralf,

I'm working on an article on this (since beta 2), maybe I can help
writing such a guide?

Bart McLeod

Op 15-08-12 11:13, Ralf Eggert schreef:
> Hi,
>
> I wonder if there are any plans for a migration guide from ZF1 to ZF2.
> When ZF2 becomes stable, people will be asking for it.
>
> Best regards,
>
> Ralf

--

Reply | Threaded
Open this post in threaded view
|

RE: ZF1 > ZF2 migration guide?

demiankatz
In reply to this post by Ralf Eggert
As someone who's been working on migrating a ZF1 app to ZF2 recently, I have to say that a migration guide is not going to be as simple as I would originally have expected.  You can make a ZF1 app work in ZF2 by brute force (and if the promised compatibility layer is completed, you can probably do it with little or no effort), but the underlying concepts have changed enough that to truly integrate with ZF2 (as opposed to just hacking something on top of it), you're almost inevitably going to have to do some significant refactoring and redesigning of code.

I was initially a bit indignant that no migration guide already existed, since my early expectation was that migrating would simply be a matter of changing some syntax here and there.  Obviously that's not the case, and given the huge differences, I think that somebody coming to the framework completely fresh and someone planning to migrate existing ZF1 code actually have fairly similar learning needs (namespaces, DI, the service manager, the event system, etc., etc.).

I would almost recommend that, rather than worrying about a separate migration guide, the community work on a single tutorial to introduce and explain key framework concepts.  This tutorial should contain references to ZF1 where things have changed dramatically.  This way, migrators will be able to learn about ZF2 in the context of ZF1.  If chosen carefully and written clearly, the ZF1 references could also be helpful to newcomers unfamiliar with ZF1, showing how older PHP practices compare to the newer ideas in ZF2.

Unfortunately, I can't volunteer to write this myself -- I already have far too much documentation that needs to be written for my own application -- but I would be happy to serve as a proofreader and offer feedback if someone else can produce an initial draft.

- Demian

> -----Original Message-----
> From: Ralf Eggert [mailto:[hidden email]]
> Sent: Wednesday, August 15, 2012 5:14 AM
> To: [hidden email]
> Subject: [zf-contributors] ZF1 > ZF2 migration guide?
>
> Hi,
>
> I wonder if there are any plans for a migration guide from ZF1 to ZF2.
> When ZF2 becomes stable, people will be asking for it.
>
> Best regards,
>
> Ralf
Reply | Threaded
Open this post in threaded view
|

Re: ZF1 > ZF2 migration guide?

Andreas Möller

On 15.08.2012, at 14:57, Demian Katz <[hidden email]> wrote:

> I would almost recommend that, rather than worrying about a separate migration guide, the community work on a single tutorial to introduce and explain key framework concepts.  This tutorial should contain references to ZF1 where things have changed dramatically.  This way, migrators will be able to learn about ZF2 in the context of ZF1.  If chosen carefully and written clearly, the ZF1 references could also be helpful to newcomers unfamiliar with ZF1, showing how older PHP practices compare to the newer ideas in ZF2.

+1
Reply | Threaded
Open this post in threaded view
|

Re: ZF1 > ZF2 migration guide?

weierophinney
Administrator
In reply to this post by Ralf Eggert
-- Ralf Eggert <[hidden email]> wrote
(on Wednesday, 15 August 2012, 11:13 AM +0200):
> I wonder if there are any plans for a migration guide from ZF1 to ZF2.
> When ZF2 becomes stable, people will be asking for it.

It's planned, but:

 * Following beta2, it was clear that any efforts made would end up
   requiring as much or more effort on each beta release as things
   changed, time that we decided was better spent improving the ZF2
   release itself.
 * The initial prototyping I did to mimic ZF1 functionality inside ZF2
   requires significant changes to work with current versions, and I'm
   not 100% convinced it's a feasible solution regardless.
 * ZF1 and ZF2 can actually operate in tandem, as they do not share
   namespaces, which opens other possible avenues.
 * We have no spare cycles on either my team or in the community to
   really address this until after the stable release.

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
Reply | Threaded
Open this post in threaded view
|

Re: ZF1 > ZF2 migration guide?

Ralf Eggert
Hi Matthew,

good to know that something is planned for sometime.

The reason I asked was the feedback I get from ZF1 users. Many (but not
all) of them say that ZF2 looks very interesting. But they wont't get
their hands on it, until a migration guide for all there ZF1 projects
exists.

For these people the non-existance of a migration guide is a big show
stopper for switching to ZF2.

Best regards,

Ralf
Reply | Threaded
Open this post in threaded view
|

Re: ZF1 > ZF2 migration guide?

weierophinney
Administrator
-- Ralf Eggert <[hidden email]> wrote
(on Thursday, 16 August 2012, 10:57 AM +0200):
> good to know that something is planned for sometime.
>
> The reason I asked was the feedback I get from ZF1 users. Many (but not
> all) of them say that ZF2 looks very interesting. But they wont't get
> their hands on it, until a migration guide for all there ZF1 projects
> exists.
>
> For these people the non-existance of a migration guide is a big show
> stopper for switching to ZF2.

I'm aware of this -- it's simply a time and resource thing, as I noted.

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
Reply | Threaded
Open this post in threaded view
|

Re: ZF1 > ZF2 migration guide?

cstrosser
This post has NOT been accepted by the mailing list yet.
In reply to this post by Ralf Eggert
We have managed to convert almost all components to ZF2 outside of the MVC/module piece.  We've been able to understand how to fit the service manager, DI, sessions, auth, etc., into the mix with all the articles out there.  We even setup a custom dispatcher so we could use namespaces on all our controllers, and aliased our custom abstract controller action class so each of our classes extend AbstractActionController.  From what I've gathered most of the pieces are in place for a complete migration.

There's just one piece of the puzzle missing.  How to setup ZF1-style modules and controllers in ZF2 is still unclear.  I'd love to see a migration guide on how to accomplish the ZF1 /module/controller/action/ setup in the short term.
Reply | Threaded
Open this post in threaded view
|

Re: ZF1 > ZF2 migration guide?

Simon Walter
In reply to this post by demiankatz

On 08/15/2012 09:57 PM, Demian Katz wrote:
> As someone who's been working on migrating a ZF1 app to ZF2 recently, I have to say that a migration guide is not going to be as simple as I would originally have expected.  You can make a ZF1 app work in ZF2 by brute force (and if the promised compatibility layer is completed, you can probably do it with little or no effort), but the underlying concepts have changed enough that to truly integrate with ZF2 (as opposed to just hacking something on top of it), you're almost inevitably going to have to do some significant refactoring and redesigning of code.

Having used both 1 and 2, I totally agree. Refactoring is necessary if
you want your existing app to take advantage of 2.

> I would almost recommend that, rather than worrying about a separate migration guide, the community work on a single tutorial to introduce and explain key framework concepts.

I don't know if one tute would do. It's more likely that one per
component would be better. AFAICT, Not only the application component
has changed.

--
simonsmicrophone.com
Reply | Threaded
Open this post in threaded view
|

RE: ZF1 > ZF2 migration guide?

demiankatz
> I don't know if one tute would do. It's more likely that one per
> component would be better. AFAICT, Not only the application component
> has changed.

Absolutely -- I didn't really mean "one tutorial to rule them all."  There's an awful lot to cover -- you could easily write a book on this (and somebody should).  My only point was that I don't think we need separate efforts to create an introductory tutorial and a migration guide, since both audiences need much of the same information; there's no reasin to write this twice, especially given the time constraints on the community.  But realistically, the best layout would probably be a very high-level summary document (explaining what all the components are and how they relate to one another) that links into detailed tutorials on each individual component.

- Demian
Reply | Threaded
Open this post in threaded view
|

Re: ZF1 > ZF2 migration guide?

Anton Stöckl
In reply to this post by demiankatz
Am 15.08.2012 14:57, schrieb Demian Katz:
 > I would almost recommend that, rather than worrying about a separate
 > migration guide, the community work on a single tutorial to introduce
 > and explain key framework concepts.  This tutorial should contain
 > references to ZF1 where things have changed dramatically.  This way,
 > migrators will be able to learn about ZF2 in the context of ZF1.  If
 > chosen carefully and written clearly, the ZF1 references could also
 > be helpful to newcomers unfamiliar with ZF1, showing how older PHP
 > practices compare to the newer ideas in ZF2.

+1

I see the "migration" of some project(s) from ZF1 to ZF2 as a chance to:

1) Refactor a project that has grown into trouble for whatever reason.
And I guess most of us have such projects around.

2) Learn ZF2 by re-building such a project from the scratch with some
intelligent copy & paste where it makes sense. I think the mentioned
"references to ZF1" could be very helpful here for
a) a better understanding of the new key concepts
b) the migration speed

Regards, Anton