Re: Enquiry

Thanks Markus
Decoupled CMS <http://decoupledcms.org> was interesting, but I didn't see
how I could actually apply it. It seems to propose an approach, not to
offer me tools.
I could probably expose content with views and some xml/json but all CRUD
operations are needed.
Drupal's services module exposes entities and fields with Drupal's own
structure which is wierd for 3rdparty app developers. e.g.
$entity->field_name[language_code][delta] = array(value => whatever, format
=> whatever)
where the keys of the array are specific to the field type. I think this is
the same in Drupal 8 because drupal has no notion of a 'flattened' entity
or standard way of representing data in different fields before rendering.
So I want to output flat arrays assuming the language is given and the
field has a cardinality of 1.

Your response didn't mention Hydra as a possible solution at all.

I'm ready to write my own REST interface - its not that hard but I'm still
hoping for some tools or at least standards I can work to. I wouldn't
implement what I've seen of Hydra because it was too complex for me to
understand. However if tools already exist, that wouldn't matter.

Matthew

On 21 October 2014 11:08, Markus Lanthaler <markus.lanthaler@gmx.net> wrote:

> Hi Matthew,
>
> And welcome to the list.
>
>
> On Friday, October 17, 2014 11:45 PM, Matthew Slater wrote:
> > I expect its not too difficult to build a db and expose lots of content
> > types and fields with some kind of security wrapper. But at the moment
> > all the data is defined and managed in Drupal.
> > The Drupal Services module exposes content using Drupal's complex
> > internal data structures which are not intuitive to external
> > applications.
> > So we need to define and publish and implement a rest API just for this
> > data set. I was wondering if there was an easier way.
>
> I'm not too familiar with the current state of Drupal but wouldn't it be
> possible to create a "View" and add a "REST export"? Alternatively,
> implementing a specialized serializer might work as well I guess.
>
>
> > What I would ideally like is a standard way for 3rd party application
> > to query my data structure, to find out what content types and fields
> > are available, and from that information to generate its own content
> > displays, its own content editing form, so that the data held on a
> > central server can be managed by many apps, not just Drupal.
>
> This goes a bit in the direction of decoupledcms.org Maybe you can
> leverage some of their work!?
>
>
> > I don't want to have to change the code every time somebody changes the
> > data structure.
> > Seems such a generic requirement. Is it possible the code exists to
> > this, server-side and even app side?
>
> Btw. are you talking about the upcoming Drupal 8 or an older version? I
> think Drupal 8 provides much more than older versions in this regard and it
> is also much simpler to extend/tweak it as you need. Have a look at the Web
> Services and Context Core Initiative (WSCCI) [1] to get started.
>
>
> HTH,
> Markus
>
>
> [1] https://groups.drupal.org/wscci
>
>
> --
> Markus Lanthaler
> @markuslanthaler
>
>


-- 
Find out more about my work in local money systems
Twitter: @matslats
My personal web site <http://matslats.net> including my blog, Adventures in
mutual credit <http://matslats.net/complementary_currencies>
Lecture about cryptocurrencies
<http://networkcultures.org/wpmu/moneylab/2014/03/27/cryptocurrencies-designing-alternatives>
(18 min)
Brief bio and articles on shareable.net
<http://shareable.net/users/matthew-slater>
I co-founded Community Forge <http://communityforge.net>
Bitcoin donations accepted: 1QLPWcQpp1x2Qzqocjm2CfnpoiCLUd4JXt

Received on Tuesday, 21 October 2014 11:56:31 UTC