Hi Netdude,

There are a number of different ways you can get REST happening in magnolia, 
depending on your project's needs. I will give two examples here:

1) Implement your REST services as a Servlet or HttpFilter

At its core, magnolia uses a "filter-chain" with a number of different filters 
which can process the request.
There is a securityFilter to check the request for security, a cache filter 
which handles cacheing, a cms filter which handles rendering, etc...
So, you could write your own filter (or servlet) which reacts to certain URLs 
(you configure those in the filter chain) and handles the REST calls on those 
URLs.
Depending on where you install your filter in the filter chain you can make use 
of the other filters (like security, cache) or not.
Your implementation will have access to the Magnolia and JCR data by using 
methods like MgnlContext.getWebContext()...

2) Implement your REST services as templates

Magnolia's templates don't have to render to HTML. You can also render to JSON, 
XML or whatever you want.
You can implement your REST services as normal webpages in magnolia.
You can write templates which output REST data (for example JSON), and template 
models which do the input and logic processing when the page is called.
You can look at magnolia's "template variations" to create alternate templates 
for the same content - so the same page could render to HTML when called one 
way, and to JSON when called another way.



Regards from Vienna,

Richard


-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] 
Im Auftrag von NET DUDE (via Magnolia Forums)
Gesendet: Montag, 30. September 2013 22:37
An: Magnolia User List
Betreff: [magnolia-user] Re: RESTful API endpoints...

Hi,
Little disappointed on not seeing any response for my query. Let me ask it 
differently, what is the best interface Magnolia provides for native mobile 
app? Most of mobile app documentation I found on Magnolia site revolves around 
pages etc. Please help, I need to make a quick decision about CMS to use for 
our mobile app, I heard good things about Magnolia.

Thanks,

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=09dc322e-dc76-4b5e-954c-14adeaece191


----------------------------------------------------------------
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