Return-Path: X-Original-To: apmail-sling-users-archive@minotaur.apache.org Delivered-To: apmail-sling-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C9DEE8995 for ; Mon, 8 Aug 2011 19:13:23 +0000 (UTC) Received: (qmail 4772 invoked by uid 500); 8 Aug 2011 19:13:23 -0000 Delivered-To: apmail-sling-users-archive@sling.apache.org Received: (qmail 4685 invoked by uid 500); 8 Aug 2011 19:13:22 -0000 Mailing-List: contact users-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@sling.apache.org Delivered-To: mailing list users@sling.apache.org Received: (qmail 4677 invoked by uid 99); 8 Aug 2011 19:13:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2011 19:13:22 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of justinedelson@gmail.com designates 209.85.213.50 as permitted sender) Received: from [209.85.213.50] (HELO mail-yw0-f50.google.com) (209.85.213.50) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2011 19:13:16 +0000 Received: by ywa12 with SMTP id 12so3322528ywa.9 for ; Mon, 08 Aug 2011 12:12:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=6vcCGuzI+ukjVdMNSCLldJZ/vCb4cEQFeWKs0lMnC1Y=; b=Kk5RlkW1Da67LjqT6DbeAJL9QtI+KOmvrQI+4ItZsAzYMRSvXDrNM/uNbXVv7kUgHw O7IXq3jZo5HM/XrWTJvHv0nXz1rSPvKj8do4WSNbmhIhk1zGHOJ33tUoJmkKj9hyMvDZ jLGduUMbSQRjLPN0ZeKp5gC3EgIhBskhp1jl4= MIME-Version: 1.0 Received: by 10.236.176.101 with SMTP id a65mr3720480yhm.242.1312830775472; Mon, 08 Aug 2011 12:12:55 -0700 (PDT) Sender: justinedelson@gmail.com Received: by 10.236.95.139 with HTTP; Mon, 8 Aug 2011 12:12:55 -0700 (PDT) In-Reply-To: References: Date: Mon, 8 Aug 2011 15:12:55 -0400 X-Google-Sender-Auth: iQ9P0gRbPaZlNthn_5_wJohWtnM Message-ID: Subject: Re: scripting with proper module system? From: Justin Edelson To: users@sling.apache.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On Mon, Aug 8, 2011 at 2:45 PM, sam =94 wrote: > Hey, > > Is there a scripting support with proper module system (import modules fr= om > repository somewhere)? > > I know JSP can <%@page import=3D"some.java.package"%> . > > But, the "module" for JSP should be written in Java.. and deployed to fel= ix > as an OSGi bundle =A0(or the jar could be added to CLASSPATH somewhere). This is not true. It's certainly possible to write OSGi bundles which contain non-Java code. Not sure about Clojure or Jython, but you can definitely do this with Scala, Groovy, and JRuby without much drama. > > What I want is to develop entire application NOT using Java, in the > repository. > For example, =A0in Python, I want to: > =A0 =A0 =A0import some.module.foo > > and it'll import =A0/var/pymodules/some/module/foo/__init__.py =A0 =A0 = =A0or > something.. I don't follow Jython, so I can't say how feasible it is to get the runtime to load files from the repository rather than the file system. I tried to get the JRuby team to add better support for loading RubyGems from other bundles, but they weren't interested. > > Looking at: http://svn.apache.org/repos/asf/sling/trunk/contrib/scripting= / > none of scripting support seems to have that capability. > > Has anyone used/developed proper scripting support sling =A0(for any > language.. groovy, python, clojure.. etc), where you entirely ditched Jav= a > development? > If so, what is your experience? =A0What is your development envirionment > like? =A0(step debugging, IDE..etc). =A0Is your scripting support open so= urced? > > Or, if I want to develop web application using scripting languages > (non-Java), =A0should I just use some other framework than Sling, and tal= k to > JCR through HTTP or something? >