I am building a web application which is divided in a frontend website and a backend website both build with Yii of course. I do this separation for making it easier to develop my .NET and Mobile Apps at the same time consuming the same services like the website.
The backend has no "site/index"-controller-action. For getting the data from the backend I have written appropriate controllers on the backend that provide the SOAP services.
Now my questions:
when i consume the backend soap services, should i write an own frontend-model class appropriate for every backend controller class or should i put the consuming directly into the frontend controllers?
Is there an easy way to map the functions of a model of the backend to a model in the frontend?
I already have created a backend (is on one server) and i have a frontend on another server.
[color=#1C2837][size=2]
[/size][/color]
Re: I don’t understand - how can i use a model in Yii that is on another server…?
My problem is that i would like to use the scaffolding features like the CRUD-generator for the data in the backend but available for the frontend. How can i get the Backend-Webservice into the ActiveRecord of the Model that the Gii requires for getting the data in order to build the edit forms?
That is what i was concerned about… more work … Maybe it would be a good feature for the Gii tool. Building frontend and backend controllers for interacting via REST or SOAP… that would make it much easier to build a website and provide a same time the interfaces for mobile apps…