1

is there any way I can use Zend only for server process?. I want to have all my client process in javascript and the server process in php using Zend framework or any other framework. Any ideas are welcome.

2
  • 1
    In general, it is possible, but what exactly are you trying to do? Commented Sep 12, 2011 at 5:41
  • What I am trying to do is to have all my views (forms) in html-css-javascript classic way and all the server process in php using zend as a framework.Also, I want to know if is mandatory to use zend_forms when you use the zend framework. Commented Sep 12, 2011 at 14:44

2 Answers 2

2

Zend is a component library that let you do php on the server side - So yes! you can use it to handle all your clients' process. BTW, it's a good practice to leverage ZendFramework MVC so you will start with great concept/project structure etc'. Good luck!

Sign up to request clarification or add additional context in comments.

1 Comment

Ido Green thanks for your answer. Based on that answer, can I use the combination html-css-javascript in classic way (client side) and zend framework (php server side) in order to build my web application without any problems?
0

The answer is: of course!

ZF is a server-side framework. It's completely agnostic about it's output format. You'll find you have no problem outputting json, or xml, or whatever format you like.

While it's typical to have your application output HTML pages via Zend_View/Zend_Layout, there are other components available to facilitate sending non-HTML output..

If you're doing a fancy javascript-driven client, you might consider going the RESTful route with Zend_Rest_Route, and/or Zend_Rest_Controller.

In your comment, you mention concern about Zend_Form. You're free to ignore Zend_Form -- though you might want to reconsider. It's quite possible to leverage the filtering/validation functionality of Zend_Form (define a form, and just use populate(), isValid(), etc) without ever rendering a form. I did a project not long ago that was a single-page app using ExtJS on the client side, which which talked to a set of RESTful services in JSON provided by ZF. I used Zend_Form extensively just for filtering/validating data.

1 Comment

timdev, thank you very much for your explanation. That information has been very useful and pedagogical to me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.