zend framework + core php integration - php

I have to convert a site in zend framework. Site is big I can't convert the site at a time in zend It will take abt 6 months. Is it possible that I update it module by module (parts) and keep on uploading in live site so some module of my site will run on zend and some on core php. Can I do any setting for url in zend framework so both on my url can work.

partially migrating onto a/another framework is strongly discouraged. Don't mess with live-sites (especially not big ones) unless you really(!) need to. You should better set up a testing/migration site in your local office and do a full migration, and thorough testing, before you release anything into the wild.
If you really want to do this you should start looking into .htaccess conditional request rewriting to redirect the request either to zend or to your proprietary PHP application.
Cheers,haggi

Related

Is it possible to use Zend Framework on a platform other than ZendServer/Cloud

Title says it all really. The only thing I'd like to add is to say that after initial look at the paid versions of Zend Server, it looks like in terms of cost, I would be losing the advantages of not developing a web/cloud application on Microsoft's expensive Azure platform if I did choose to go with Zend. I like the look of the Zend Framework though and am considering using it on an open source LAMP stack. Or should I go with Symfony / CakePHP on LAMP to keep costs down?
The answer to your (actual, answerable) question is: Yes.
The framework is just a bunch of libraries (just like all frameworks); and you do the following:
Go to the download page.
Register (its free), and then download "Zend Framework Full Package".
Make sure the files are available to your application, by placing them in a directory to which the user that will execute your scripts (it is normally the same user that run the webserver, for example www-data).
Follow the get starting guide.
If you like build tools, you can also use composer to automatically download ZF2 for you, by following the instructions on this page.

How would I use the Joomla Framework vs. creating Joomla extensions?

I have experience with Joomla and have modified and wrote some simple Joomla extensions. I don't have experience using one of the popular PHP frameworks (such as CakePHP), but I was thinking about using the Joomla framework because I'm familiar with Joomla. How would I use the Joomla framework for a software project instead of using regular Joomla and writing the extensions needed for it to extend it's capabilities? Thanks!
The basic idea is that you:
Get a copy of either the whole framework or just the packages you need+dependencies (from github or composer) or use the older copy that is shipped with the CMS,
Bootstrap your application (JApplicationWeb or JApplicationCli).
Write your code using the MVC structure provided.
The big difference with writing a totally independent application is that you are doing just that, you need to build everything in the application whereas in the CMS there are already a lot of things in place. (The good part of that is that you can make new code with no legacy concerns.) For example, if you look at the JIssues project you'll see that they had to think about things like authentication. So as you would expect writing a simple application is simple, writing a complex one is complex.
You can see many examples of framework applications around, ranging from the ones found in the CLI folder of your CMS installation to JIssues, and of course the three web applications in the CMS are all examples of applications on the framework.
The Joomla Framework is intended (among other things) to be the platform upon which you can build a web-application. The framework is like the frame of one of those motorcycles they build on "American Choppers." It provides the backdrop so that you can hit the ground thinking about your app without worrying about User Authentication, database connection, and a thousand other things like those that get in the way of bringing your app to its potential audience.
If you're trying to extend Joomla, the current edition is what you should be using.

deploy zend framework online

I am new to php zend framework, I think I can get zend worked in my local computer but I am not sure how to deploy zend on line. if I have a web sever and filezilla ftp transfer tool, what I need to do to be able to get zend work online like i did locally? any help will be greatly appreciated.
The beauty of Zend Framework is that it is very non-intrusive by nature. It is more a class set than a framework but you can use the MVC framework too to build awesome apps. My knowledge of the Zend Framework is that you simply have to upload your source on the server like it was in your original site on your machine.
If you are using a non-conventionnal way to detect or set the path of the autoloader then you MIGHT have issues to fix. But if you use the define(APPLICATION_PATH, realpath(dirname(FILE)) strategy and set the includepath correctly, there should be no problem at all.

Zend framework installation - need clarification

I've seen lots of videos and instructions on how to install zend framework on wamp and other similiar local host environments. I've also seen lots of references, including here, that mention you don't need to 'install' zend, it just needs to be included in the php files to work.
As I think I understand it, installing zend on localhost environments will allow you to utilize certain tools that for example automate the creation of projects and gets the most out of the framework. I'm assuming that to then use these projects in a web host environment, you simply need to upload a specific project's files and ensure the zend files are in place and included in the directories.
Are my assumptions correct? I'm still trying to grasp the basics of this one and haven't found clarifications in my google searches.
Everything you wrote is correct. It helped me to think of Zend Framework as a library of components rather than as a program you need to install. As long as your application has access to that library of components, Zend Framework is installed. This doesn't address any of the configuration tasks you'll need in Bootstrap and/or application.ini, but should clear up installation.
Regarding the automated creation of projects and project elements (controllers, actions, etc.) this feature is available via Zend_Tool and is typically used only during development, so it shouldn't come into play once you've ported from your localhost.
Automated creation of the projects is far not the main feature of Zend.
The majority of the php frameworks are about providing the best infrastructure for complying to MVC design pattern, about object relational mapping, security enhancements etc.
And yes, the whole project tree is what you'd need to carry around for deployments.

Integrate a Zend application into Drupal 6 / 7

Given a "nacked" Zend application - is it possible to use the Drupal based layout and navigation?
What is the best way to integrate a Zend application into Drupal 6 / Drupal 7?
For Example:
User X visits my Drupal page.
He wants to use the Zend-Application called "Feedback".
This "Feedback" application should be able to use the layout of the Drupal page.
Everything but the outer layout would be written in PHP using Zend.
The module doesn't do Zend Framework app integration, it just allows you to use some of the ZF components (ie. Zend_Mail). I actually integrated a ZF app in Drupal 5, based on the Drake module (CakePHP integration).
It basically defines a Drupal menu with callbacks, these callbacks are passed to the ZF app (by including my zend bootstrap). Output of the ZF app is stored in a var (using the output buffering PHP functions), and I fetch the page title/js/css from the HTML, strip what isn't needed and then pass these back to Drupal (using drupal_set_title, drupal_add_js and drupal_set_html_head respectively). And yes, this is dirty, but it works for me...
Not sure this is quite what you want, but you can take out $application->run() from the Zend app's index.php and then include that file in any other application and have access to all of the resources of the Zend Framework and the Zend app itself.
Probably still quite involved to get it to do what you want though.
Joomla has a "wrapper" layout option which just shove some url into an iframe in the layout. I use this a a lot to glue standalone applications to a corporate intranet at work, we just have to tailor stylesheets to match.
It's a quick and dirty path but get you there fast and users really don't care.
I don't know drupal, but can't you simply include drupal files in your zend layout viewscript?

Categories