Hi Dave (?),

Unfortunately I can't provide any code samples, I was only consulting for that 
project and not closely involved In the code.

Magnolia provides CMIS (Webservice) interfaces for accessing content, that's 
one way you could get at the content stored in magnolia. However, I think from 
what you describe that you'd want to use magnolia's rendering, to produce 
finished, rendered content, so CMIS probably isn't what you need. Also 
magnolia's CMIS is fairly new, so I would not use that yet.

Accessing rendered content is easy - just fetch from a URL and you'll get the 
rendered HTML (or XML, or whatever your templates produce as output) back. 
Magnolia's URL-Scheme is also flexible enough to allow you to access just parts 
of pages ("direct paragraph access" in magnolia terms).
Magnolia can also support "template variants", so the same content could be 
rendered one way for your editors, and a different way when accessed by the 
web-app.

So depending on your needs you could integrate in different ways:

For example, you could keep your web-app "as-is", and simply use magnolia as a 
rendering back-end. Whenever your web-app needs some "static" content it simply 
fetches it (via HTTP) from magnolia, and then uses it as needed.
In this setup magnolia would not be directly accessible from the web, but 
rather it would be a backend system used by your web-app.

Or, you could perform a tighter integration, and use magnolia to do most or all 
of your rendering. This could work by passing the requests first through your 
web-app layer (for example, by using a Http-Filter), where the processing is 
performed and data is prepared. Then, the request is processed normally by 
magnolia, which could then use any data prepared by the web-app when it does 
it's rendering.
That might be something like: your spring web-app loads a list of Items from 
your Database based on some request parameter. The web-app puts this list in 
the request context. Magnolia then renders the page identified by the request. 
The page could contain a special "displayList" component (or area), which 
retrieves the list of items from the request context, and uses a freemarker 
template to render it.


Many other integration scenarios are possible, I hope that gives you some 
pointers how to start...


Regards from Vienna,

Richard

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] 
Im Auftrag von D W (via Magnolia Forums)
Gesendet: Dienstag, 30. Oktober 2012 20:12
An: Magnolia Dev List
Betreff: [magnolia-dev] Re: Any experiences integrating Magnolia into an 
existing Java based web app?

Hi Richard

   We basically want a CMS to manage the static content of web app (we don't 
want to have to redeploy each time for a text change or something pretty 
trivial).  

Are there any code samples that I could take a look at?  Or any existing 
Magnolia libraries that facilitate the process of rendering content from 
Magnolia?  

We're currently leveraging Spring MVC.  I've been looking at Alfresco and 
Spring Surf and it seems that we can use Alfresco webservices to retrieve 
content and render it.  Does Magnolia provide a similar library?

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=5bd17f58-bf63-444d-86f5-7b728c5f370a


----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------





----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to