Open albaraam opened 9 years ago
If frontend and backend are modules, it's the same application.
Ah, okay! did you mean that this way could be used instead of the advanced template architecture?
Advanced Template Architecture ==> 2 different applications (frontend & backend)
Backend & Frontend via modules ==> 1 application with packages consist of frontend & backend modules
or could they work in conjunction together?
Advanced Template Architecture:
backend => application for statistics and such things
frontend => packages consist of frontend & backend modules
Both are possible. Yii doesn't limit the way you structure your application.
I know that all what I mentioned is possible in Yii, I just want to know what is your point of view? what do you think? which one is a cleaner architecture? how would you approach complex applications?
It depends on the application. Usually I'm following advanced project template i.e. application per tier. It allows you to deploy to multiple servers/domain easily.
Okay, I'll just give the following scenario to discuss. Lets say we have a project that consist of many sections, and one of them is a blog. Then, where would you put "Content Creating" part (Admin)? Blog representation ?
would you put them both in frontend application? then what could backend application used for?
I think just the terminology we are using here is what makes me confused a little bit. Since we are usually refer to frontend to some thing related to endusers (representation) and not administrative tasks like content creating and editing.
I hope you can help me understand this better.
Depends on how the blog is managed. If it's admin-managed one i.e. users are reading it and never writing to it, I'll use admin app for it. If it's multi-user blog users can post to then I'd choose to have management stuff right in the main application.
Great :+1: that was much clearer, specially naming them "admin app" & "main app" I think I got the answer to my question, thanks a lot @samdark
It was great Idea, but I have one issue while applying it. Now with what we have, I can open blogFrontend or blogBackend regardless of the current running application. So it would be great if you can mention some way to automate this routing between backend and frontend. I would like to know what do you think? how can I restrict this? (See the following links).
Note: I'm not talking about pretty urls, I'm talking about current running application.