Привет Тимофей First allow me to point you to some documentation pages. - https://documentation.magnolia-cms.com/display/DOCS/Content+app+with+non-JCR+content - https://documentation.magnolia-cms.com/display/DOCS/Creating+a+custom+content+app The former is very short, the latter contains 2 longer examples.
Nevertheless i try to answer your questions. It is true that both Container and ContentConnector have some methods in common. If your subapp is fine with only one container, you can tightly "couple" Container and ContentConnector. In this case fetch external data in container and have an instance of the container within the contentConnector (or have one class inplementing both). Note: A subapp always has only one contentConnector, but depending on your views it may require more than one container. If you use more than one Container on your subapp: You can create kind of a "utility" to fetch data from your data source and then use the "utility" within contentConnector and container. Also keep in mind that you may want to cache and lazy load data. If you want to do that: Make sure to implement the appropriate interfaces on your custom container. (See above linked doc. page.) However ... you may also want cache data on your custom "data fetching layer" ... it depends a little bit on your use case. I hope this helps. Cheers, Christoph -- Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=0b29ee9c-e084-41c4-a7e4-d27f4bc9f391 ---------------------------------------------------------------- Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
