incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Incubator Wiki] Update of "MyFacesAlchemyProposal" by JihoonKim
Date Thu, 22 May 2008 01:06:11 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Incubator Wiki" for change notification.

The following page has been changed by JihoonKim:
http://wiki.apache.org/incubator/MyFacesAlchemyProposal

New page:
'''My``Faces Alchemy Proposal'''

Project name     : My``Faces Alchemy
Author           : Jihoon Kim [Jihoon``Kim1004 at gmail dot com]
Draft date       : May 17, 2008

-----
1    Abstract
-----
JSF Alchemy gives capability in creating Adobe Flex components as My``Faces JSF components.
This glue will enable developers to utilize strengths of both technology :
   i. RIA provided by Adobe Flex
   i. Ease of data binding using managed beans through JSF and JEE

[[BR]]
-----
2    Proposal
-----
JSF Alchemy bridges the technology of Adobe Flex [which has been open sourced through MPL]
and JSF of JEE 1.4+ to ease the development of RIA while preserving all the beneficial aspects
of both technologies. So users would create the Adobe Flex components as normal JSF components
and the project will create the necessary preMxml, Mxml, and SWF files and link the values
of the components back to the managed beans on the JSF side by using mainly JSON+Javascript+DOJO
and Action``Script.

This way developers who are unfamiliar with Adobe Flex can be completely abstracted from its
technology and focus in linking the application's data to legacy information. However, in
order to keep to the principle of good programming, debugging is made easy by creation of
preMxml files [prequel to mxml files that get compiled to swf files] and various modes of
application [debugMode, simplySWF, and productionEnv] which are later mentioned to give flexibility
to users who use this project/contribution.


Technical info regarding the project :

The components require Adobe Flex SDK to be extracted to C:\Program Files\flexSDK or /usr/local/bin/flexSDK
[have yet to test on a linux machine]. Optionally users can modify or pass the bin [i.e. C:\Program
Files\flexSDK\bin] to mxmlConstants.xml or JVM parameter mxmlc_bin respectively.

The components have been tested using Fire``Fox 2.0, Opera 9.25, and IE 6.0 browsers with
Tom``Cat 5.5. Also have used Sun's JDK for Adobe Flex SDK [JAVA_HOME]

The basic design is as follows [will implement it better later]

    a. All Flex components must be nested within <s:mxmlApplication /> tag as it is
the top component and this tag must be outside the <h:form /> component [due to IE's
use of objects]. {the previous statement regarding <h:form /> might not apply, as currently
am making changes to avoid it}.

    a. There exists replaceMapping XMLs which will tell how to pick the fields from the components
[i.e. by attributes of the UIComponent or by method call for that object].

    a. There exists templates [users can modify it if they wish to have some default capability
to all similar components] which will be used per component to create preMxml files. In a
nutshell, it is nothing but a simple file that contains tokens which will be replaced by component
values using the replaceMapping XML and ANT's Replace Task.

    a. Necessary source files will be created to their respective directory [i.e. Action``Script
file[s] that is/are needed by the system and XML file[s] that is/are needed by the Action``Script
file[s] and should be defined within mxmlConstants.xml]

    a. After all the component's preMxml within <s:mxmlApplication /> have been created,
MXML file and SWF file will be created using ANT by the MXMLApplication class. <s:mxmlScript
/> will give capability in writing Action``Script contents as the body content of the Tag
by extending UIComponent``Body``Tag``Base. Similar flexibility is given to other Tags by extending
MXMLUIComponent``Body``Tag``Base; however it should be used sparingly and should be used mainly
for components that extend MXMLUISimple``Base component. One additional thing to note is that
mxmlPackageName attribute for <s:mxmlApplication /> tag will be used to name the mxml
file and the swf file.

    a. Also <s:mxmlApplication /> will create JSON objects which will be rendered onto
the page for initial values of the Flex components. The reason for this is because <s:mxmlApplication
/> has various modes :
        i. debugMode : meaning preMxml, Mxml, and SWF files would be created in each run as
well as JSON objects.
        i. simplySWF : meaning Mxml which has been modified by the user exists, so create
only SWF files and JSON objects [users can use this to modify the mxml file and create a swf
file]
        i. productionEnv : meaning SWF file already exists, so nothing to do here but create
JSON objects [this is the default value to ensure that users do not run the components in
either of the two other modes in an environment that is higher than dev]. One thing to note
is that all directories of Web``Content/swf/* should be copied to their corresponding directory
within the Workspace during the move to higher env [since the system uses servContext.getRealPath(new
String()) as the root directory of preMxml, Mxml, and swf directory and Tom``Cat for example
flushes it out to their cache directory under metadata]. For large components such as Data``Grid,
am planning to write it as a service in retrieving and setting the values.

    a. Uses dojo during the onLoad time to connect all the Form's onsubmit event with pageUnload
function. Also each Flex/Flash app will communicate back to the page when it has finished
setting up on its side [such as setting callBack methods and etcetera], JSON will be passed
to the apps to set the initial values with the check interval set to 500 milliseconds. So
the values will be decoded [for example htmlText allows XML tags and etcetera, so on the Java
side there will be encoding and decoding on the Flex/Flash side] and set to the component's
values.

    a. During the form's onsubmit action, pageUnload will return false and make a call to
Flex/Flash app to return the component's values to the page. When returned, nodes will be
appended to the form that was in the process of submission and will submit the page. On the
Flex/Flash side, there will be an Action``Script which will use E4X [love it] to look up within
an XML file the property/attributes that the component must return as JSON objects to the
page, so that the page can create the elements with their attributes as child nodes of the
form element.

One note regarding preMxml files. In order to keep everything simple and debugging easy, a
simple method was chosen to create the preMxml files for each component. Namely the file with
mxmlPackageName_[Major Num][Minor Num].pre_mxml will be created per component within directory
named Web``Content/preMxml/[mxmlPackageName]/. So for instance, Mxml``Application will have
Major Num and Minor Num set to 0 and the first child of Mxml``Application will have [1,0]
set with it's sibling set to [1,1] and etcetera. Due to how it's written, there maybe an issue
such that when depth equals a certain value and the
components within that depth has 3 digits.

For example,
   001121 can mean
       1. major level 1 with minor level 121 {meaning there exists at least 121 component
within the level 1}
       1. major level 2 with minor level 1 {meaning this is a child of [1,1] and the second
sibling with depth two}

Since issues with this kind of scenario will occur when (1) doesn't exist [meaning sibling
120 exists and 121 is placeholder] and (2) exists [meaning [2,1] exists], this will be very
rare. Also if someone has over 100+ components within a single swf file, I think it should
be reconsidered and rewritten.


[[BR]]
-----
3    Background
-----
The writing of this project started approximately three months ago, when enthused realization
of the strong similarity between the two technologies in terms of design and architecture
came about [considering both parties were part of the JSR in JCP, it made sense].

The code which had been written then was submitted as a JIRA to Apache My``Faces Tomahawk
Sandbox and did attract interest of some of the community members. However, because :
    a. the size of the contribution was rather large in comparison to norm
    a. the contribution was specifically targeted to integration of Adobe Flex with JSF
    a. and the community members desired to fully ensure that all legal issues are in compliant
to Apache they directed me to the Incubator. If the incubator does promote the code in the
future, then it is assumed that it will be part of Apache My``Faces as its subproject.


[[BR]]
-----
4    Rationale
-----
With the Web 2.0 technology flourishing within the web world, this would be a great opportunity
in bridging Adobe Flex with JSF.

The project will provide :
    a. Easy creation of Adobe Flex applications while preserving the ease of databinding to
legacy systems through JSF
    a. An alternative to purchasing Flex``Builder when creating simple Flex applications
    a. Possibly may bring forth additional projects that bridge other Web 2.0 technologies
with JSF
    a. Developers can be completely abstracted with Adobe Flex technology and simply create
the components as normal JSF components

[[BR]]
-----
5    Current Status
-----

    i. 5.1 Meritocracy
We plan to do everything possible to encourage and environment that supports a meritocracy
[borrowed from Beehive within the Guide]

    i. 5.2 Community
Although the current community is simply myself, there were several individuals who showed
interest within the My``Faces mailing list. Also, if this proposal is accepted and is spanned
off, there is a plan to request an url to be linked from My``Face's Wiki to this project to
attract additional developers. As for myself, I plan on supporting defects and additional
features during bulk of my free time.

    i. 5.3 Core Developers
As mentioned in the previous section, Jihoon Kim is the sole, core developer within this project.
However, it is expected that number of individuals would grow and along with it efficiency
and productivity of the project [main reason that the code has been submitted as a contribution].

    i. 5.4 Alignment
With Apache My``Faces being one of the boards within the JCP community, it was envisioned
that with these individuals the project will be enhanced greatly into being a truly elegant
system.


[[BR]]
-----
6    Known Risks
-----

    i. 6.1 Orphaned products
This project does have single developer at the current time, but the number of individuals
who are interested in the project is greater than one. Meaning it is hopeful that number of
individuals for the project will grow in the future and I myself will invest my time to ensure
that project remains healthy.

    i. 6.2 Inexperience with Open Source
It is true that my experience with Open Source is limited, but I wish to learn greatly and
wish to use this opportunity to greatly increase my knowledge about Open Source. In my spare
time, I have read about Apache Maven tool through paperback and online book and learned the
usage of SVN by reading the document within the main site.

    i. 6.3 Homogenous Developers
Once again there exists a single user for this project, but hopefully various developers from
diverse background will join the project. Since the world is small through the web, this is
rather quite likely.

    i. 6.4 Reliance on Salaried Developers
I have spoken with my manager regarding my work with open source project and he has approved
the request to invest my free time in it. Also, since I do strongly feel about this project,
I have no intention of allowing the deterioration of the health.

    i. 6.5 Relationships with Other Apache Products
If promoted, it is desired that this project becomes a subproject of Apache My``Faces. Also
it utilizes ANT in various tasks needed to create the SWF files for Adobe Flex.

    i. 6.6 An Excessive Fascination with the Apache Brand
Main desire in contributing the code/project to Apache is through respect of the Apache group.
Like said in previous section 6.1, I truly do wish the project to be elegantly written and
have spent my time in creating the initial code of the project. However, with more minds with
different background looking at the code, I do hope that there will be changes made to improve
efficiency and productivity of the project that I might not have seen.

[[BR]]
-----
7    Documentation
-----
The following JIRA link has bulk of the information regarding the project =>
[https://issues.apache.org/jira/browse/TOMAHAWK-1250]

[[BR]]
-----
8    Initial Source
-----
The code has been in development for the past three months and I am the solve developer who
has signed the CLA.

[[BR]]
-----
9    Source and Intellectual Property Submission Plan
-----
The contribution references Adobe Flex SDK which is requested to be downloaded to developer's
machine upon initial use of these components. So Flex SDK is required for debugging and creation
of SWF files. Once again Flex is open sourced as MPL.

[[BR]]
-----
10    External Dependencies
-----
The dependencies all have Apache compatible licenses. These include BSD, CDDL, CPL, MPL, and
MIT licensed dependencies. [borrowed from Guide]

Dependencies include :
    a. DOJO
    a. Flex [newer addition to My``Faces, which has MPL]
    a. ANT

[[BR]]
-----
11    Initial Committers
-----
Currently I would like myself to be added as a committer to this project/repository
   Jihoon Kim [Jihoon``Kim1004 at gmail dot com /  have submitted a CLA]

Of course I hope that this list will grow rapidly with individuals interested with the project.
However, since I did not wish to assume individuals interested in the project desired to become
committers, will simply wait until their response. Safety first.

[[BR]]
-----
12     Affiliations
-----
Employee of IBM and have acquired permission from management to work on the project during
free time.

[[BR]]
-----
13    Sponsors
-----

    i. 13.1 Champion
Am looking for assistance

    i. 13.2 Nominated Mentors
Am looking for assistance

    i. 13.3 Sponsoring Entity
Apache My``Faces project.

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message