Hi Fabian,

On Wed, Mar 6, 2013 at 3:12 PM, Fabian Christ
<[email protected]> wrote:
> ...I
> really like the design and the idea behind Sling ;)...

good, thanks!

> ...I see the following options:
> - Use REST API and develop directly on the content repo...

Using client-side javascript code to read and write content?

That would work - you could use Sling as an intelligent JSON data
store as is, but putting some code in server-side servlets or scripts
(which can also be ecmascript if you like) usually provides more
flexibility and might be easier to test.

That's in addition to client-side code - you basically use server-side
code to supply additional app-specific RESTful endpoints in Sling, and
your client code uses that. In the end you have 3 levels: client code,
server-side scripts and server-side OSGi services.

> ...- Configure somehow a file resource provider and organize the sources
> and scripts in a local file system...

That's a good setup for server-side scripts development - your Sling
dev instance can tap directly into this to avoid having to copy your
scripts to the JCR repository every time you change them (even though
that's quite easy if you mount the JCR repo via webdav).

Then, you can package those scripts into bundles at build time, as
initial content that Sling will deploy when the bundle is installed on
a production system, reproducing what you had on disk during
development.

> ...Implement own OSGI servlets and integrate them with Sling...

I would do that for services that require more stability, robustness
and testability. As scripts and servlets and interchangeable, you
could prototype with scripts and move to java servlets if and when
needed. Note that with "mvn install sling:install" you can update a
bundle quickly on your running dev instance for testing and debugging,
that's how I often work.

At $work we have some additional tools that help synchronize between
the filesystem and the JCR repository, we did discuss contributing
them but I don't know if and when that will happen. In the meantime,
the above setup should be usable, and if you see gaps feel free to
discuss!

-Bertrand

Reply via email to