Service Oriented Application with Yii

Hi,

I need to implement a Service Oriented Application.

I really like Yii as a PHP web development framework, but don’t know if it’s possible to use it in this scenario. What I need is to have a persistence-agnostic model.

How can I get to this with Yii?

Thanks in advance!

Can you explain what you mean with "Service Oriented" and "persistence-agnostic"?

If by Service Oriented you mean the offering of an online product (not downloadable) then I don’t see why yii wouldn’t stand to the job. In fact it does very well, our company’s lead product, which is Service Oriented as I understand it, is in intense development for a few months already and I can tell you that yii has been the best technical choice we’ve made.

Hey mike, thanks for your quickly response! :)

Basically, I need a web service layer between database and web application front-end. All of the business logic needs to reside behind the web service layer. What I have seen is that Yii is closely linked to Active Record for ORM, and then my question is:

I can make an implementation like:

Database <-> Business logic <-> Web services <-> Web application front-end

taking advantage of all features of Yii? :huh:

So your web application has to use (remote) web services as data source (a.k.a. model)? Sure you can build that in Yii. I can’t tell how well this already integrates with “all features of Yii” as i didn’t use such a setup yet. But if you e.g. want to use a CGridView, in the worst case you’d have to write your own data provider that connects to the webservice. Or you implement a generic webservice client as a model that provides e.g. some find/save/delete/… methods. It depends on how your webservices look like.

The nice thing about OO and Yii: You get a box full of nice tools (classes) each for a specific task. If you can’t find the right tool in the box, take one that already comes close and create your custom tool (class) from it.

So i’d say: Just start working to get used a little to the system. Then after some time you’ll find it easy to extend some components if you need to.

I’m currently implementing exactly the same model. Yii has support for webservices but they are not fully supported. There are some things you need to do like SOAP headers support. Also the version of soap is rpc/encoded (not document literal).

We can help each other in developing this kind of architecture. I think thats the proper way of doing “large” apps :)

Mike, I agree with you, is what I initially thought.

But the fact is that I’m in a situation where I can’t afford this kind of customization because I have little time available, and also on second thought, this architecture is not the best choice for the product I am developing.

Prheak, Service Oriented Architecture is a very good thing, but I believe that adding a service layer means lose all the efficiency that you can have using the current Yii model. I think that is not always true that is the proper way of doing “large” apps. It’s a question of application tasks and requirements: if you want your development process is agile and to focus your application on speed, that’s not the best choice.

Anyway I will take advantage of soap to create what will be my API in the future. :)

Thank you very much guys!