cakoose | 1 Jul 2010 03:26
Favicon

Clearsilver without native code?

 

Hello! I need to implement the same dynamic web page in Python and Java. Though the request-handling and data-retrieval code will need to be written twice, it would be nice to be able to use a shared template. Clearsilver supports both languages, but from what I can tell, it uses native code, which isn't allowed in my case.

Is there a way to use Clearsilver without the native code component?

__._,_.___
Recent Activity:
.

__,_._,___
Chris Trimble | 1 Jul 2010 06:22
Picon

Re: Clearsilver without native code?

 

What about using Jython and building the bulk of your logic/templating with Java?


 C


On Wed, Jun 30, 2010 at 9:19 PM, Kannan Goundan <kannan <at> cakoose.com> wrote:
Yeah... it's a bit unfortunate.  We may or may not find a way around
implementing it twice.  Either way, we also have an issue with native
code being disallowed.

I'm considering adding code generation support to Clearsilver -- just
something that converts the CSTREE to Python/Java code.  The untyped
parse tree a little difficult to work with (just not what I'm used to)
but I figure I could plow through it and get a Python prototype in a
day or two if it comes to that.

Again, not sure if we're gonna go this route or not, I was just
wondering if anybody had already dealt with this sort of thing.

-- Kannan

On Wed, Jun 30, 2010 at 21:01, Chris Trimble <trimbo <at> gmail.com> wrote:
> No, Clearsilver is implemented in C so you'll have to compile the native
> code for both.
> I'm responding mostly because I'm interested in why you have to implement
> the exact same web page in both Python and Java.  What's the requirement
> that necessitates this?  It seems like a maintenance nightmare.
>  - Chris
>
> On Wed, Jun 30, 2010 at 6:26 PM, cakoose <kannan <at> cakoose.com> wrote:
>>
>> Hello!  I need to implement the same dynamic web page in Python and Java.
>>  Though the request-handling and data-retrieval code will need to be written
>> twice, it would be nice to be able to use a shared template.  Clearsilver
>> supports both languages, but from what I can tell, it uses native code,
>> which isn't allowed in my case.
>>
>> Is there a way to use Clearsilver without the native code component?

__._,_.___
Recent Activity:
.

__,_._,___
Brandon Long | 1 Jul 2010 19:38
Favicon

Re: Clearsilver without native code?

 

Currently, both the Python and Java implementations rely on the C
library (native code). We do have a pure-Java version here at Google,
and its our goal to open source it, but there's no ETA on when that
will happen.

Brandon

On Wed, Jun 30, 2010 at 6:26 PM, cakoose <kannan <at> cakoose.com> wrote:
> Hello!  I need to implement the same dynamic web page in Python and Java.  Though the request-handling and data-retrieval code will need to be written twice, it would be nice to be able to use a shared template.  Clearsilver supports both languages, but from what I can tell, it uses native code, which isn't allowed in my case.
>
> Is there a way to use Clearsilver without the native code component?
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>

__._,_.___
Recent Activity:
.

__,_._,___
Kannan Goundan | 1 Jul 2010 06:19
Favicon

Re: Clearsilver without native code?

 

Yeah... it's a bit unfortunate. We may or may not find a way around
implementing it twice. Either way, we also have an issue with native
code being disallowed.

I'm considering adding code generation support to Clearsilver -- just
something that converts the CSTREE to Python/Java code. The untyped
parse tree a little difficult to work with (just not what I'm used to)
but I figure I could plow through it and get a Python prototype in a
day or two if it comes to that.

Again, not sure if we're gonna go this route or not, I was just
wondering if anybody had already dealt with this sort of thing.

-- Kannan

On Wed, Jun 30, 2010 at 21:01, Chris Trimble <trimbo <at> gmail.com> wrote:
> No, Clearsilver is implemented in C so you'll have to compile the native
> code for both.
> I'm responding mostly because I'm interested in why you have to implement
> the exact same web page in both Python and Java.  What's the requirement
> that necessitates this?  It seems like a maintenance nightmare.
>  - Chris
>
> On Wed, Jun 30, 2010 at 6:26 PM, cakoose <kannan <at> cakoose.com> wrote:
>>
>> Hello!  I need to implement the same dynamic web page in Python and Java.
>>  Though the request-handling and data-retrieval code will need to be written
>> twice, it would be nice to be able to use a shared template.  Clearsilver
>> supports both languages, but from what I can tell, it uses native code,
>> which isn't allowed in my case.
>>
>> Is there a way to use Clearsilver without the native code component?

__._,_.___
Recent Activity:
    .

    __,_._,___

    Gmane