I was wondering if any one had any kind of success integrating a Zend Framework 2.0 beta in a Zend Framework 1.11 project.
I am currently building a project using ZF 1.11. I don't want to use ZF 2.0 yet since they say on the developpers blog that backward compatibility isn't guaranteed. The project developpement will span over a few months and I don't want to fix a lot of stuff when I update to the newest release (which will resolve bugs and vulnerabilities).
Is there a quick tutorial, or did anybody include a Zend Framework 2.0 module (using PHP namespaces) in a "vintage" Zend Framework release using includes?
An alternative possibility, if what you want is to introduce Dependency Injection in your ZF 1.11 project, is to use the Symfony DI component. I worked fine for me.
There are some web resources about the details, most notably this one: http://losohome.wordpress.com/2010/01/22/integrating-symfony-dependency-injection-service-container-with-zend-framework/
Hope that helps,
My advice at this stage is to develop your project with ZF 1.11. 2 will not be backwards compatible with ZF ZF 1.11, but there is talk of some tools / tutorials that will help to update, but I am very skeptical about it!
Related
I am starting a new project in PHP and wanted to choose the latest ZendFramework. I see that Zend Framework 3 has been released so I wanted to start with Zend Framework 3 itself. But when I go to the INSTALL page of Zend, they have given options as Zend MVC and Zend expressive.
I read about them and have an understanding that Expressive is a microframework while MVC is a full-stack framework. Apart from this I am not very clear about them.
I see that Zend MVC was also there for ZF2 and the documentation says MVC as a layer. I could not find Expressive for zf2 though.
Question:
Are both Zend MVC and Zend Expressive packages? and are part of zf3?
When I see the installed packages in Zend MVC and Zend Expressive, I don't see a package for Zend framework, but I see separate packages for Zend Components such as zend-http, zend-json, etc. So are these (expressive and MVC) just built over different Zend components?
How do I know that I am using ZF3?
Are both Zend MVC and Zend Expressive packages? and are part of zf3?
This depends a bit on your definition of "packages". Zend Expressive is not part of ZF3, it is a microframework alternative to ZF3. Zend MVC and Zend Expressive are both packages, and they also depend on other packages. ZF3 is what is known as a "meta package", which means it doesn't have any code of its own, it is soley a collection of other packages. The ZF3 meta package includes the Zend MVC package.
are these (expressive and MVC) just built over different Zend components?
Yes, and there is quite a bit of overlap.
How do I know that I am using ZF3?
This is more a question of semantics. If you have the Zend Framework meta package installed, that's ZF3. If you were just using the MVC package, you could argue that's still ZF3. If you are using Expressive, that's something else.
The line between ZF3 and Expressive (and when you would use one over the other) is somewhat fuzzy. This discussion may help you.
In an earlier edit you asked which you should use to create a REST API. You could do that with either.
I am going to develop website by using Yii framework. I will use netbeans to do it (and if it will be possible) with build-in Yii plugin. And here is my dilemma:
Should I use newest 2.0 version, which is demo version since yet, or use version 1.1.14, which is suported by my netbeans plugin. On official site of Yii I found quite good documentation for 2.0 version. Could you help me with some advices? Will be 1.1.14 version still suported be Yii community, could I use it without lot of painful searching for documentation or it would be better to stick with newest version?
Directly from their website: "Yii 2.0 is not ready for production use yet. It is currently under heavy development and we may introduce significant changes without prior notices. You may consider using Yii 2.0 if you just start to learn Yii or you do not have a tight project schedule."
They clearly are not encouraging using it in production in any way.
2.0 version is bet yet... because of this I suggest you to use 1.14 stable version ... in real project always better to use stable versions
there is available
Yii 1.1.15 is released (security fix) as well
The answer really depends on what the purpose of your Yii app is.
Are you building a quick demo? A throw away app? A 5 page app with no long-term maintainability needs? Go with Yii 1.1.15, it's very well documented and you will be able to work in a hurry.
Are you building a project with a minimum 3-5 year life? A web app that will see significant investment over the years? A web app that will have multiple developers involved in it? Go with Yii 2.0.
I've built large web apps with Yii 1.1.x and it works nicely. But for any significant new project, Yii 2.0 is a better fit. PHP as a language has progressed significantly since Yii 1.1 was designed and it shows.
In addition, development on Yii 1.1 is slowing down (the core team is more focused on Yii 2.0). I've for bug reports and pull requests for Yii 1.1 that have been outstanding for months. Not a slam on the core team (Yii 2.0 is where the future is), but Yii 1.1 is quickly going into maintenance mode.
Ok i already started out this new project for 2 weeks and so far so good.
Up till today i just realize there is no Acl component in Zend 2.0.Is it true? Or im missing something.
So currently im clueless with my application acl.
Did you guys have any suggestion of any acl component that work well with Zend 2.0 that i did not aware of or should i just download Zend 1.x instead.
Any input greatly appreciated.
The ACL component in Zend Framework 2.0 is now called Zend\Permissions\Acl.
I highly recommend reviewing the reference manual. A simple search for the term on that page brought it up right away.
I've got an existing project using zend 1.10 framework. I'm not fond of zend but I can't sell the idea of converting over to symfony, I'd like to just incorporate symfony 2 into the code base and at least use it for new code (doctrine, forms and twig templates at least, even if I'm stuck with zends' MVC structure).
Not sure how to go about setting this up. I see lots of mention of using Zend classes in Symfony but not the other way around.
You can use Twig and Doctrine with ZF, so that's no problem. However the forms component is not on the list of stand alone components for Symfony 2 so implementing Symfony 2 forms in ZF 1.10 might be tricky.
Good Luck.
I'm trying to get started with Doctrine for Zend. There doesn't seem to be a lot out there to help me with this. I find the website and documentation a bit useless.
I'm currently looking at this webpage.
There are a few options. I can checkout from subversion or github. Install via PEAR. or download a package.
What should I be doing with the lines of code in the black boxes?
What do I do with a package once I've extracted it?
As an aside
Am I a little out of my depth? Is there anything I should be learning before I start tackling Doctrine?
You really should have a look at the Zend Framework webinars, and more specifically the one called Zend Framework v1 + Doctrine v2. It's got detailed instructions and links to GitHub where you can download the source presented in the webinar.
The presentation slides can be found at http://static.zend.com/topics/Zend-Framework-1-+-Doctrine-2.pdf.
Presentation summary :
Zend Framework (version 1) is an
enterprise grade, full stack MVC
framework and component library.
Doctrine (version 2) is an enterprise
grade, ORM (object-relational mapping)
framework for PHP 5.3. In this
webinar, the ZF and Doctrine teams
join forces to demonstrate how best to
integrate these two frameworks and
produce a ZF powered MVC application
where in which the "M" is powered by
Doctrine2. Familiarity of PHP 5.3
features is suggested. Presenter –
Ralph Schindler, Jonathan Wage and
Guilherme Blanco (87min) Dec 15 2010
You will have to register with Zend though (but that's free, so shouldn't pose any problems I guess).
Actually, there are some resources you could use to integrate Zend Framework and Doctrine. In example, you could follow this screencasts:
ZendCasts - Doctrine
I've followed these screencasts, with a few corrections, and I was able to use Doctrine 1.x with Zend Framework applications. You can also view the generated screencasts' code; this option is available in the most of these screen casts.
You will want to use Doctrine 2, not version 1.2. The two are not compatible. Here is a presentation that explains why:
http://www.slideshare.net/ralphschindler/zend-framework-1-doctrine-2-6177485
Here are example sources for Zend Framework + Doctrine 2 integration:
https://github.com/fierycode/ZendFramework1-Doctrine2
https://github.com/marsbomber/zf1-doctrine2/tree/modular_setup (with modules)
I have already pointed someone in the right direction to integrate Doctrine 1.2 into ZF, my post can be found here.
I hope this helps you out.