You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2009/04/01 10:05:11 UTC

[POLL] getting rid of scripting (almost)

(feel like POLLing and RTing these days - catching up with my Sling stuff ;-)

Hi,

The more I talk to Carsten, the more I realize that he and others are
right - scripting is evil.

Untyped variables, poorly-specified languages, weird "I told you we're
dynamic" bugs...this does not really fit with our Enterprise strategy
for Sling.

With one exception, maybe...due to its inherent type safety, and
available enterprise-level tooling, JSP is probably the only scripting
language that deserves to stay.

As this might be a bit controversial, I'm starting with a [POLL] - the
idea would be to remove (or at least deprecate, as a first step) the
pluggability of script engines, and keep only the JSP engine. Or maybe
just keep a handful of "officially approved" script engines, marked as
such with a cryptographically-safe value (based on a secret key shared
by Sling PMC members only) in their manifest file.

People can then move their code to Java servlets and maybe some JSP,
enjoying the reduced number of bugs along the way. Or request their
favorite scripting language to be validated, but we'd then need to
define a test suite to verify our enterprise-level requirements for
languages besides JSP.

If we disagree on this (I hope we don't), we might envision two
variants of Sling: the Enterprise version with no scripting (except
JSP and validated engines, as indicated), and the
shoot-yourself-in-the-foot version with no restrictions. And
re-evaluate in a year from now.

We might want to make a decision on this *before* our next release, to
avoid having to deprecate stuff right after it. But right now this is
just a [POLL] to gather opinions.

WDYT?

-Bertrand

Re: [POLL] getting rid of scripting (almost)

Posted by J Aaron Farr <fa...@apache.org>.
On Wed 01 Apr 2009 16:05, Bertrand Delacretaz <bd...@apache.org> wrote:

> The more I talk to Carsten, the more I realize that he and others are
> right - scripting is evil.
>
> Untyped variables, poorly-specified languages, weird "I told you we're
> dynamic" bugs...this does not really fit with our Enterprise strategy
> for Sling.

I'm mostly interested in Sling because of the options for scripting.
I've very little interest in actually writing Java any more these days.

I didn't realize Sling was focusing exclusively on enterprise.  IMHO
sling could bring in plenty of non-Java users just like most CouchDB
users doesn't use (or even know) Erlang.

-- 
  J Aaron Farr     jadetower.com        [US] +1 724-964-4515
    馮傑仁         cubiclemuses.com     [HK] +852 8123-7905

Re: [POLL] getting rid of scripting (almost)

Posted by Alexander Klimetschek <ak...@day.com>.
2009/4/1 Juan José Vázquez Delgado <ju...@gmail.com>
>
> > 1) the JVM is interpreting bytecode, which is just scripting in
> > disguise. Do not fall for the  'Write once run everywhere' and the
> > alleged agility you get from a garbage collector.
> > 2) to be ready for Enterprise use, we should use a Common
> > Business-Oriented Language, or COBOL for that matter.
>
> Regarding this, IMHO JVM is a strong requirement for Sling. I see a
> Sling distribution running on my ZX Spectrum 48K [1] (all in my
> dreams) :).

Hmm, you all are too short-sighted: In my opinion, all this software
stuff is way too fragile and dynamic. I want a dedicated Sling
processor for my computer (let's call it CMS-DSP - Content Management
System Digital Signal Processor). A benefit would be the major
performance improvement, especially if we would finally hardwire the
content structure (/content, /apps, /libs etc.) into dedicated flash
memory.

WDYT? Anyone with a degree in modern chip design on the list?

Regards,
Alex

--
Alexander Klimetschek
alexander.klimetschek@day.com

Re: [POLL] getting rid of scripting (almost)

Posted by Andreas Hartmann <an...@apache.org>.
Juan José Vázquez Delgado schrieb:
>> 1) the JVM is interpreting bytecode, which is just scripting in
>> disguise. Do not fall for the  'Write once run everywhere' and the
>> alleged agility you get from a garbage collector.
>> 2) to be ready for Enterprise use, we should use a Common
>> Business-Oriented Language, or COBOL for that matter.
> 
> Regarding this, IMHO JVM is a strong requirement for Sling. I see a
> Sling distribution running on my ZX Spectrum 48K [1] (all in my
> dreams) :).

I had one too – I (kind-of) learned BASIC programming on this box.
I'd volunteer to implement the MagneticTapePersistenceManager for 
Jackrabbit if you're planning to migrate Sling to the ZX platform.

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


Re: [POLL] getting rid of scripting (almost)

Posted by Juan José Vázquez Delgado <ju...@gmail.com>.
> 1) the JVM is interpreting bytecode, which is just scripting in
> disguise. Do not fall for the  'Write once run everywhere' and the
> alleged agility you get from a garbage collector.
> 2) to be ready for Enterprise use, we should use a Common
> Business-Oriented Language, or COBOL for that matter.

Regarding this, IMHO JVM is a strong requirement for Sling. I see a
Sling distribution running on my ZX Spectrum 48K [1] (all in my
dreams) :).

Juanjo.

[1] http://en.wikipedia.org/wiki/Sinclair_ZX_Spectrum

Re: [POLL] getting rid of scripting (almost)

Posted by Carsten Ziegeler <cz...@apache.org>.
Lars Trieloff wrote:
> Hi Bertrand,
> 
> I see you are making progress. It looks like the fresh icelandic air
> is good for you. I totally agree that scripting is evil and that we
> need to make changes in order to make Sling more enterprise ready. But
> we should go all the way:
> 
> 1) the JVM is interpreting bytecode, which is just scripting in
> disguise. Do not fall for the  'Write once run everywhere' and the
> alleged agility you get from a garbage collector.
> 2) to be ready for Enterprise use, we should use a Common
> Business-Oriented Language, or COBOL for that matter.
> 
> I am sure the Sling community will catch up quickly with these changes
> and a re-implementation will take less than a decade or two.
> 
I we really want to go all the way we should rather create a DSL for Sling
or provide the tooling so users can create their own DSL based on Sling.

Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org

Re: [POLL] getting rid of scripting (almost)

Posted by Lars Trieloff <lt...@day.com>.
Hi Bertrand,

I see you are making progress. It looks like the fresh icelandic air
is good for you. I totally agree that scripting is evil and that we
need to make changes in order to make Sling more enterprise ready. But
we should go all the way:

1) the JVM is interpreting bytecode, which is just scripting in
disguise. Do not fall for the  'Write once run everywhere' and the
alleged agility you get from a garbage collector.
2) to be ready for Enterprise use, we should use a Common
Business-Oriented Language, or COBOL for that matter.

I am sure the Sling community will catch up quickly with these changes
and a re-implementation will take less than a decade or two.

regards,

Lars

On Wed, Apr 1, 2009 at 10:05 AM, Bertrand Delacretaz
<bd...@apache.org> wrote:
> (feel like POLLing and RTing these days - catching up with my Sling stuff ;-)
>
> Hi,
>
> The more I talk to Carsten, the more I realize that he and others are
> right - scripting is evil.
>
> Untyped variables, poorly-specified languages, weird "I told you we're
> dynamic" bugs...this does not really fit with our Enterprise strategy
> for Sling.
>
> With one exception, maybe...due to its inherent type safety, and
> available enterprise-level tooling, JSP is probably the only scripting
> language that deserves to stay.
>
> As this might be a bit controversial, I'm starting with a [POLL] - the
> idea would be to remove (or at least deprecate, as a first step) the
> pluggability of script engines, and keep only the JSP engine. Or maybe
> just keep a handful of "officially approved" script engines, marked as
> such with a cryptographically-safe value (based on a secret key shared
> by Sling PMC members only) in their manifest file.
>
> People can then move their code to Java servlets and maybe some JSP,
> enjoying the reduced number of bugs along the way. Or request their
> favorite scripting language to be validated, but we'd then need to
> define a test suite to verify our enterprise-level requirements for
> languages besides JSP.
>
> If we disagree on this (I hope we don't), we might envision two
> variants of Sling: the Enterprise version with no scripting (except
> JSP and validated engines, as indicated), and the
> shoot-yourself-in-the-foot version with no restrictions. And
> re-evaluate in a year from now.
>
> We might want to make a decision on this *before* our next release, to
> avoid having to deprecate stuff right after it. But right now this is
> just a [POLL] to gather opinions.
>
> WDYT?
>
> -Bertrand
>



-- 
Lars Trieloff - http://lars.mp - Day Software - http://www.day.com

Re: [POLL] getting rid of scripting (almost)

Posted by David Nuescheler <un...@day.com>.
Excellent proposal! Very timely!

+1. Scripting is evil.

regards,
david



On Wed, Apr 1, 2009 at 11:11 AM, Torgeir Veimo <to...@pobox.com> wrote:
> Well I think sling should be changed to work with flat file systems instead
> of JCR. Putting data into a typed node tree puts too many constraints on
> what data we can put into it.
>
> 2009/4/1 Felix Meschberger <fm...@gmail.com>
>
>> Hi,
>>
>> Vidar Ramdal schrieb:
>> > On Wed, Apr 1, 2009 at 10:49 AM, Michael Dürig <mi...@day.com>
>> wrote:
>> >
>> >> +1 if we make Whitespace [1] the primary language for Sling.
>> >>
>> >> [1] http://compsoc.dur.ac.uk/whitespace/
>> >
>> > +1
>> >
>> > I took a look at Whitespace, and liked it so much that I decided to
>> > port the entire Sling codebase to it.
>> >
>> > I'm sure you will agree, so as soon as I get my svn account, I'll
>> > start replacing the ugly, old-fashioned Java classes with clean, white
>> > Whitespace files.
>>
>> If you like clean languages you should consider my new Null proposal [1]
>> currently being discussed. It is based on the Null programming language.
>>
>> Regards
>> Felix
>>
>> [1] http://wiki.apache.org/incubator/NullProposal
>>
>>
>



-- 
Visit: http://dev.day.com/

Re: [POLL] getting rid of scripting (almost)

Posted by Torgeir Veimo <to...@pobox.com>.
Well I think sling should be changed to work with flat file systems instead
of JCR. Putting data into a typed node tree puts too many constraints on
what data we can put into it.

2009/4/1 Felix Meschberger <fm...@gmail.com>

> Hi,
>
> Vidar Ramdal schrieb:
> > On Wed, Apr 1, 2009 at 10:49 AM, Michael Dürig <mi...@day.com>
> wrote:
> >
> >> +1 if we make Whitespace [1] the primary language for Sling.
> >>
> >> [1] http://compsoc.dur.ac.uk/whitespace/
> >
> > +1
> >
> > I took a look at Whitespace, and liked it so much that I decided to
> > port the entire Sling codebase to it.
> >
> > I'm sure you will agree, so as soon as I get my svn account, I'll
> > start replacing the ugly, old-fashioned Java classes with clean, white
> > Whitespace files.
>
> If you like clean languages you should consider my new Null proposal [1]
> currently being discussed. It is based on the Null programming language.
>
> Regards
> Felix
>
> [1] http://wiki.apache.org/incubator/NullProposal
>
>

Re: [POLL] getting rid of scripting (almost)

Posted by Alexander Klimetschek <ak...@day.com>.
On Wed, Apr 1, 2009 at 10:56 AM, Felix Meschberger <fm...@gmail.com> wrote:
> If you like clean languages you should consider my new Null proposal [1]
> currently being discussed. It is based on the Null programming language.

> [1] http://wiki.apache.org/incubator/NullProposal

Interesting project proposal... But I am not so sure where the mails
would go if I send them to the dev-null@ mailing list. ;-)

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Re: [POLL] getting rid of scripting (almost)

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

Vidar Ramdal schrieb:
> On Wed, Apr 1, 2009 at 10:49 AM, Michael Dürig <mi...@day.com> wrote:
> 
>> +1 if we make Whitespace [1] the primary language for Sling.
>>
>> [1] http://compsoc.dur.ac.uk/whitespace/
> 
> +1
> 
> I took a look at Whitespace, and liked it so much that I decided to
> port the entire Sling codebase to it.
> 
> I'm sure you will agree, so as soon as I get my svn account, I'll
> start replacing the ugly, old-fashioned Java classes with clean, white
> Whitespace files.

If you like clean languages you should consider my new Null proposal [1]
currently being discussed. It is based on the Null programming language.

Regards
Felix

[1] http://wiki.apache.org/incubator/NullProposal


Re: [POLL] getting rid of scripting (almost)

Posted by Vidar Ramdal <vi...@idium.no>.
On Wed, Apr 1, 2009 at 10:49 AM, Michael Dürig <mi...@day.com> wrote:

> +1 if we make Whitespace [1] the primary language for Sling.
>
> [1] http://compsoc.dur.ac.uk/whitespace/

+1

I took a look at Whitespace, and liked it so much that I decided to
port the entire Sling codebase to it.

I'm sure you will agree, so as soon as I get my svn account, I'll
start replacing the ugly, old-fashioned Java classes with clean, white
Whitespace files.

-- 
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Akersgata 16, N-0158 Oslo, Norway
+47 21 531941, ext 2070

Re: [POLL] getting rid of scripting (almost)

Posted by Michael Dürig <mi...@day.com>.
+1 if we make Whitespace [1] the primary language for Sling.
+0 otherwise

Michael

[1] http://compsoc.dur.ac.uk/whitespace/



Bertrand Delacretaz wrote:
> (feel like POLLing and RTing these days - catching up with my Sling stuff ;-)
> 
> Hi,
> 
> The more I talk to Carsten, the more I realize that he and others are
> right - scripting is evil.
> 
> Untyped variables, poorly-specified languages, weird "I told you we're
> dynamic" bugs...this does not really fit with our Enterprise strategy
> for Sling.
> 
> With one exception, maybe...due to its inherent type safety, and
> available enterprise-level tooling, JSP is probably the only scripting
> language that deserves to stay.
> 
> As this might be a bit controversial, I'm starting with a [POLL] - the
> idea would be to remove (or at least deprecate, as a first step) the
> pluggability of script engines, and keep only the JSP engine. Or maybe
> just keep a handful of "officially approved" script engines, marked as
> such with a cryptographically-safe value (based on a secret key shared
> by Sling PMC members only) in their manifest file.
> 
> People can then move their code to Java servlets and maybe some JSP,
> enjoying the reduced number of bugs along the way. Or request their
> favorite scripting language to be validated, but we'd then need to
> define a test suite to verify our enterprise-level requirements for
> languages besides JSP.
> 
> If we disagree on this (I hope we don't), we might envision two
> variants of Sling: the Enterprise version with no scripting (except
> JSP and validated engines, as indicated), and the
> shoot-yourself-in-the-foot version with no restrictions. And
> re-evaluate in a year from now.
> 
> We might want to make a decision on this *before* our next release, to
> avoid having to deprecate stuff right after it. But right now this is
> just a [POLL] to gather opinions.
> 
> WDYT?
> 
> -Bertrand


Re: [POLL] getting rid of scripting (almost)

Posted by Carsten Ziegeler <cz...@apache.org>.
Bertrand Delacretaz wrote:
> On Wed, Apr 1, 2009 at 10:55 AM, J Aaron Farr <fa...@apache.org> wrote:
>> ...I think I'm going to quit replying to Bertand until April 2nd.  I can't
>> tell which of his emails are serious and which aren't.  I'm still not
>> sure about this one....
> 
> I'm sure Carsten would like it to be serious, but I'm a big fan of
> scripting languages ;-)
> 
Ok, I guess in this case the doors of the ihatescripting club will
always be closed for you..sorry :)

Carsten

-- 
Carsten Ziegeler
cziegeler@apache.org

Re: [POLL] getting rid of scripting (almost)

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Wed, Apr 1, 2009 at 10:55 AM, J Aaron Farr <fa...@apache.org> wrote:
> ...I think I'm going to quit replying to Bertand until April 2nd.  I can't
> tell which of his emails are serious and which aren't.  I'm still not
> sure about this one....

I'm sure Carsten would like it to be serious, but I'm a big fan of
scripting languages ;-)

-Bertrand

Re: [POLL] getting rid of scripting (almost)

Posted by J Aaron Farr <fa...@apache.org>.
On Wed 01 Apr 2009 16:05, Bertrand Delacretaz <bd...@apache.org> wrote:

> WDYT?

I think I'm going to quit replying to Bertand until April 2nd.  I can't
tell which of his emails are serious and which aren't.  I'm still not
sure about this one.

:-)

-- 
  J Aaron Farr     jadetower.com        [US] +1 724-964-4515
    馮傑仁         cubiclemuses.com     [HK] +852 8123-7905

Re: [POLL] getting rid of scripting (almost)

Posted by Jim White <ji...@pagesmiths.com>.
Carsten Ziegeler wrote:

> Bertrand Delacretaz wrote:
> 
>>The more I talk to Carsten, the more I realize that he and others are
>>right - scripting is evil.
>> ...
>>With one exception, maybe...due to its inherent type safety, and
>>available enterprise-level tooling, JSP is probably the only scripting
>>language that deserves to stay.
> 
> Hmm, what about the good old XSP from Cocoon? I think we should replace
> JSP with that.

No, no, no.  Neither of those are fun (although Fan might be).  I'm sure 
the key to making this a huge hit is to use LOLCODE as the singular 
scripting language for Sling!  We'll probably need to make a few 
extensions, but that is to be expected with such a new and innovative 
language.

http://lolcode.com/

I can see it now, whole floors of cubicles with everyone ROFLTAO.  And 
no more stressful code reviews, just constant giggling.  Ahhhh, the best 
code metric ever, the laugh meter level!

Jim


Re: [POLL] getting rid of scripting (almost)

Posted by Carsten Ziegeler <cz...@apache.org>.
Bertrand Delacretaz wrote:
> The more I talk to Carsten, the more I realize that he and others are
> right - scripting is evil.
Hurray - welcome on board the ihatescripting club! It's a very exclusive
club though and we have a very difficult entrance test (write a blog
application without scripting). But I guess you'll manage that easily.
Just send me the code when you're done and you can enjoy the benefits of
never scripting again in your life! That's really awesome - trust me.

> Untyped variables, poorly-specified languages, weird "I told you we're
> dynamic" bugs...this does not really fit with our Enterprise strategy
> for Sling.
> 
> With one exception, maybe...due to its inherent type safety, and
> available enterprise-level tooling, JSP is probably the only scripting
> language that deserves to stay.
Hmm, what about the good old XSP from Cocoon? I think we should replace
JSP with that.

> If we disagree on this (I hope we don't), we might envision two
> variants of Sling: the Enterprise version with no scripting (except
> JSP and validated engines, as indicated), and the
> shoot-yourself-in-the-foot version with no restrictions. And
> re-evaluate in a year from now.
Wow, that's a great idea - I can already imagine the Apache Sling SYITF
 distribution. Yes, big +1

Carsten

-- 
Carsten Ziegeler
cziegeler@apache.org

Re: [POLL] getting rid of scripting (almost)

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

Jukka Zitting schrieb:
> Hi,
> 
> +1 Good proposal! We don't want all those script kiddies ruining the
> good name of Sling 2.0.0 Enterprise Edition, S2EE.
> 
> On Wed, Apr 1, 2009 at 10:05 AM, Bertrand Delacretaz
> <bd...@apache.org> wrote:
>> With one exception, maybe...due to its inherent type safety, and
>> available enterprise-level tooling, JSP is probably the only scripting
>> language that deserves to stay.
> 
> I would suggest that we only allow JSP documents using the XML syntax.
> Those pesky % characters are evil as noted also by Vidar in a
> different thread.
> 
> Also, I propose that we disable the <jsp:scriptlet/> element. All such
> code should be placed in tag libraries as proper Java classes.

While being at it, we should of course also forbid JSTL and EL support.

Regards
Felix

Re: [POLL] getting rid of scripting (almost)

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

+1 Good proposal! We don't want all those script kiddies ruining the
good name of Sling 2.0.0 Enterprise Edition, S2EE.

On Wed, Apr 1, 2009 at 10:05 AM, Bertrand Delacretaz
<bd...@apache.org> wrote:
> With one exception, maybe...due to its inherent type safety, and
> available enterprise-level tooling, JSP is probably the only scripting
> language that deserves to stay.

I would suggest that we only allow JSP documents using the XML syntax.
Those pesky % characters are evil as noted also by Vidar in a
different thread.

Also, I propose that we disable the <jsp:scriptlet/> element. All such
code should be placed in tag libraries as proper Java classes.

BR,

Jukka Zitting