0

I want to write yet another REST service, but this time using ZF tool. I wonder if there are already suitable project profiles for that around?

After creating a project with a default profile zf tool says

Note: This command created a web project, for more information setting up your VHOST, please see docs/README

Obvious to assume there exists a profile mechanism and hopefully other profiles.

Let me know if you came across those non-vanilla profiles (REST, console, etc.). Documentation per say seems to be a bit silent on custom profiling. Note: Alternatively a tutorial on developing your own custom profile is welcomed.

PS In case of REST it is obvious enough that one can reuse vanilla web profile following steps similar to this tutorial. But it would be much nicer to have a profile that takes into consideration better practice of using REST router as in here (hence a proper non-RPC approach).

[EDIT]

Community
  • 1
  • 1
Yauhen Yakimovich
  • 13,635
  • 8
  • 60
  • 67

1 Answers1

0

code & tutorial: https://github.com/codeinchaos/restful-zend-framework

Ahmad Nassri
  • 1,299
  • 1
  • 12
  • 18
  • Looks good. I have found another REST ZF tutorial http://www.techchorus.net/create-restful-applications-using-zend-framework that is also quite nice. So how about creating a project profile for zend tool? – Yauhen Yakimovich Apr 25 '12 at 12:07
  • that other tutorial doesn't cover input/output data conversion (JSON/XML/etc ...) but its a good start! – Ahmad Nassri Apr 25 '12 at 23:25
  • as for zend tool, there is a very similar way, basically using routing to do CLI routing, which I believe is built in as well ... – Ahmad Nassri Apr 25 '12 at 23:25
  • I am not sure you are a following about *zf tool*. To run 'zf project create rest' will require writing a class for REST project layout that will provide project information (profile). See http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Tool/Project/Provider/Project.php – Yauhen Yakimovich Apr 26 '12 at 09:08