[flexcoders] Runtime MXML compiler

2007-12-02 Thread bouiaw
Hi,

I try to find some information about MXML compilation at runtime on a
Java based server.

My goal is to create a CMS/eCommerce solution based on a Java core and
a Flex front-end. You can find more informations on the wiki of the
Igenko project :
http://code.google.com/p/igenko/

The architecture of this project will be :
- A Java server core based on Tomcat, Spring, Hibernate, GraniteDS
  - Natively designed to store content in a JSR 170 Java Content
Repository (Jackrabbit)
  - Workflow management (JBoss JBPM) 
- A Flex Backoffice, with a WYSIWYG site designer
- One or more Flex public websites, dynamically generated from content
and layout stored in the repository. 

I know that Flex Data Services provide runtime compilation of MXML
(http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=compiledeploy_142_11.html),
but I want to build and Open Source solution ready for production
without having to pay.

The guy behind GraniteDS (an open source implementation of Flex Data
Service) did a first attempt to have runtime compiler for MXML, as you
can read on this post :
http://tech.groups.yahoo.com/group/graniteds/message/192

Another solution is also to dynamically create UI with AS3 from a
custom xml (not mxml) like it was proposed on this post
(http://tech.groups.yahoo.com/group/flexcoders/message/93086), but I
think runtime compilation of MXML should be a better solution in my case.

I would appreciate any ideas or feedbacks on this subject 

Regards,
Sébastien Deleuze



RE: [flexcoders] Runtime MXML compiler

2007-12-02 Thread Gordon Smith
The MXML compiler will be open-source soon, and I assume that means you'll be 
able to run it on your server.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bouiaw
Sent: Sunday, December 02, 2007 6:06 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Runtime MXML compiler



Hi,

I try to find some information about MXML compilation at runtime on a
Java based server.

My goal is to create a CMS/eCommerce solution based on a Java core and
a Flex front-end. You can find more informations on the wiki of the
Igenko project :
http://code.google.com/p/igenko/ http://code.google.com/p/igenko/ 

The architecture of this project will be :
- A Java server core based on Tomcat, Spring, Hibernate, GraniteDS
- Natively designed to store content in a JSR 170 Java Content
Repository (Jackrabbit)
- Workflow management (JBoss JBPM) 
- A Flex Backoffice, with a WYSIWYG site designer
- One or more Flex public websites, dynamically generated from content
and layout stored in the repository. 

I know that Flex Data Services provide runtime compilation of MXML
(http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=compiledeploy_142_11.html
 
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=compiledeploy_142_11.html
 ),
but I want to build and Open Source solution ready for production
without having to pay.

The guy behind GraniteDS (an open source implementation of Flex Data
Service) did a first attempt to have runtime compiler for MXML, as you
can read on this post :
http://tech.groups.yahoo.com/group/graniteds/message/192 
http://tech.groups.yahoo.com/group/graniteds/message/192 

Another solution is also to dynamically create UI with AS3 from a
custom xml (not mxml) like it was proposed on this post
(http://tech.groups.yahoo.com/group/flexcoders/message/93086 
http://tech.groups.yahoo.com/group/flexcoders/message/93086 ), but I
think runtime compilation of MXML should be a better solution in my case.

I would appreciate any ideas or feedbacks on this subject 

Regards,
Sébastien Deleuze



 


Re: [flexcoders] Runtime MXML compiler

2007-12-02 Thread DreamCode
Hey Sebastien/Gordon



I'm not sure I understand what you're asking… mxml compilation at runtime?
Are you going to compile a page when a request comes in?



As for the dynamic creation of content based on custom xml, that is quite
nice. It's a big part of my current spare time project.



The only real issue so far I have had,  is that in order for me to generate
the UI, all custom components needed to be referenced once inside my code.
So even though I have this:



import dc.digr.ui.comp.*;



I still need this:



*var* a:digrButton = *new* digrButton ();

*var* b:digrButtonLarge = *new* digrButtonLarge();

*var* c:digrButtonIconOnly = *new* digrButtonIconOnly();

*var* d:digrButtonMini = *new* digrButtonMini();



for all the custom ui components in the beginning of my code to avoid a
runtime error….



Gordon, if you have some wisdom on this…. Spread the joy! J


RE: [flexcoders] Runtime MXML compiler

2007-12-02 Thread Gordon Smith
 Are you going to compile a page when a request comes in?
 
That's the impression I got of what Sébastien wants to do.
 
 all custom components needed to be referenced once inside my code 
 
If you're creating components via their class name, with code like
 
var someClass:Class = Class(getDefinitionByName(someClassName));
var instanceOfSomeClass:Object = new someClass();
 
there is no way that the MXML compiler/linker can be smart enough to figure out 
what class names might be encountered at runtime. Therefore it can't include 
these classes in the SWF unless you give it some help.
 
One way is to use vars like you show to create dependencies.
 
Another way is to use the -include-classes compilation option. For some reason 
that I don't understand, this is only an option for compc when you make a SWC, 
not for mxml when you make a SWF. But you can make a SWC with all your custom 
classes and then link that SWC in with -include-libraries.
 
Another possibility is to put all your custom classes into a module and load it.
 
Gordon Smith
Adobe Flex SDK Team



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
DreamCode
Sent: Sunday, December 02, 2007 2:38 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Runtime MXML compiler



Hey Sebastien/Gordon

 

I'm not sure I understand what you're asking... mxml compilation at runtime? 
Are you going to compile a page when a request comes in? 

 

As for the dynamic creation of content based on custom xml, that is quite nice. 
It's a big part of my current spare time project. 

 

The only real issue so far I have had,  is that in order for me to generate the 
UI, all custom components needed to be referenced once inside my code. So even 
though I have this: 

 

import dc.digr.ui.comp.*;

 

I still need this:

 

var a:digrButton = new digrButton (); 

var b:digrButtonLarge = new digrButtonLarge(); 

var c:digrButtonIconOnly = new digrButtonIconOnly(); 

var d:digrButtonMini = new digrButtonMini(); 

 

for all the custom ui components in the beginning of my code to avoid a runtime 
error

 

Gordon, if you have some wisdom on this Spread the joy! J 

 

 


Re: [flexcoders] Runtime MXML compiler

2007-12-02 Thread DreamCode
I don't think the result of that is inside the acceptable levels for a
content management system.  but hey... what do I know

I would. and I did for my project choose creating it in AS3 based on
database/xml content.

--Allan
On Dec 2, 2007 7:26 PM, Gordon Smith [EMAIL PROTECTED] wrote:

 Are you going to compile a page when a request comes in?

 That's the impression I got of what Sébastien wants to do.

  all custom components needed to be referenced once inside my code
 If you're creating components via their class name, with code like

 var someClass:Class = Class(getDefinitionByName(someClassName));
 var instanceOfSomeClass:Object = new someClass();

 there is no way that the MXML compiler/linker can be smart enough to
 figure out what class names might be encountered at runtime. Therefore it
 can't include these classes in the SWF unless you give it some help.

 One way is to use vars like you show to create dependencies.

 Another way is to use the -include-classes compilation option. For some
 reason that I don't understand, this is only an option for compc when you
 make a SWC, not for mxml when you make a SWF. But you can make a SWC with
 all your custom classes and then link that SWC in with -include-libraries.

 Another possibility is to put all your custom classes into a module and
 load it.

 Gordon Smith
 Adobe Flex SDK Team

  --
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *DreamCode
 *Sent:* Sunday, December 02, 2007 2:38 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Runtime MXML compiler

Hey Sebastien/Gordon



 I'm not sure I understand what you're asking… mxml compilation at runtime?
 Are you going to compile a page when a request comes in?



 As for the dynamic creation of content based on custom xml, that is quite
 nice. It's a big part of my current spare time project.



 The only real issue so far I have had,  is that in order for me to
 generate the UI, all custom components needed to be referenced once inside
 my code. So even though I have this:



 import dc.digr.ui.comp.*;



 I still need this:



 *var *a:digrButton = *new* digrButton ();

 *var *b:digrButtonLarge = *new* digrButtonLarge();

 *var *c:digrButtonIconOnly = *new* digrButtonIconOnly();

 *var* d:digrButtonMini = *new* digrButtonMini();



 for all the custom ui components in the beginning of my code to avoid a
 runtime error….



 Gordon, if you have some wisdom on this…. Spread the joy! J