Multi-Tier Architecture With Yii

Anyone have idea how to implement multi-tier architecture with Yii?

I try to search around, I cannot find any example.

Multi-tier I meant, basically user interface, business logic and database.


Following the MVC paradigm, Yii is already multi-tier by design and pretty much matching your desires. Do you want more tiers? :lol:

Thank you for reply, I know Yii is in MVC.

What I meant, is actually this,

wiki Multitier_architecture

Any idea, how to implement?

Sorry for silly question.

Sorry, I can’t paste link…please replace the wiki link Model–view–controller with Multitier_architecture

Hm, interesting. The definition of n-tier I’ve been tought differs a bit from that. However, you’re still good to go with vanilla Yii.

vanilla Yii? You mean Yii 2?

Nope. I mean unaltered Yii 1.1.

erm…I just wonder how I can develop multi-tier using Yii 1.1?

And I tried to tell you that Yii applications are already multi-tier by design. If you really need more separation, you can try to SiteFusion or this XUL wrapper with Yii.

Sorry, I think I did not mention clearly what I need actually.

Actually, this is request from the customer, they want the UI putting in front of their firewall, and Logic putting after their firewall, and another server after firewall to host the database.

I never develop something like this before, normally I just dump in everything to a server.

I am thinking is it possible, maybe in anyway, I could place the Views folder into their server in front of their firewall as UI, Model folder into their server after firewall as the Logic, and Controller as either UI or Logic. Wondering how should I route between this Views folder and Model.

The design they want is actually very similar to your reply in another thread, call Build 3 Tier Application With Firewall Between Them.

This one? In that case, my answer were pretty much the same as at that time: Go to whoever came up with these requirements and demand clarification.

If there really is no other way, you could go with either the XUL-things I posted earlier or write indeed two apps: One that is keeping the db connection and maintains the business logic while presenting the results through an API and a second one which is polling said APIs and turn the results into presentational form. Either way, the implementation and maintenance costs will be huge, so I wonder if this makes any economical sense.

They said this is their company policy for web deployment, blablabla…

Seems like not as simple as I thought…sigh…

Thanks anyway.