Enhancements that must be done to JSF-Flex

5 views
Skip to first unread message

Hazem Saleh

unread,
Sep 18, 2008, 9:55:28 PM9/18/08
to jsf-flex
Hello Team.

I just want to share with you the challenges we should over come to make JSF-Flex a usable nice framework.

After checking the code, I found the following major problems that we should solve:

1. All the JSF-Flex components are outside the <h:form> tag. This is not correct and will give a bad impression about the library quality. (I will work on solving this issue).

2. The plugins in the project are many. I do not mind to see plugins, but I will mind if this will complicate the project.
I suggest that we should have one plugin for components generation. i.e) for components classes, tag handlers classes, and a set of renderers that generates MXML and actionScript code. (Ji could do start refactoring this part, if we agree on this).

3. Tomahawk Dojo bridge is used, and it could be replaced by simple JS utilities instead. We should remove Tomahawk and Dojo dependencies.
We should have two Maven profiles one for Mojarra and the other for MyFaces.
We should also depend on JSF APIs only. (Ji started working on this issue)

4. The actionScripts are placed inside the JSF code, and this is not acceptable to the JSF developer. we should make the developer abstracted as much as we can from the Flex coding.

5. We need to have standard converters and validators to be complaint with JSF current and further releases.

6. The components' library should not work alone. It should work with other JSF components in a smooth way.

This is my vision regarding what is done so far.

I will tell you if I discovered other major issues.

Your replies are appreciated!

Thanks all!
--
Hazem Ahmed Saleh Ahmed

Web blog: http://www.jroller.com/page/HazemBlog

[Web 2.0] GMaps Integration with JSF + Apache Tomahawk + JBoss a4j:
http://code.google.com/p/gmaps4jsf/

Jihoon Kim

unread,
Sep 18, 2008, 10:34:26 PM9/18/08
to JSF-Flex
Great post Hazem regarding some of the tasks that must be
accomplished. I have taken care of some of the tasks mentioned in the
initial post, so I will reply with some comments.

1. All the JSF-Flex components are outside the <h:form> tag. This is
not correct and will give a bad impression about the library quality.
Yes this is one the tasks that has a high priority in the TODO list. I
have tabled it for a while, but the gist is that I initially faced an
issue communicating with the SWF file object within IE 6 browser.
Other browsers were okay since they embedded the SWF file, but I did
encounter an issue with IE 6.0. Thanks for your willingness to take on
the responsibility of this task.

2. The plugins in the project are many. I do not mind to see plugins,
but I will mind if this will complicate the project. I suggest that we
should have one plugin for components generation. i.e) for components
classes, tag handlers classes, and a set of renderers that generates
MXML and actionScript code.
Currently there exists two plug-ins for JSF Flex project :
a. One to generate componentValueMapper.xml by inspecting the
JavaDocs or annotations for renderKit14 and renderKi15 projects
respectively.
b. An another to create the replaceMappingXMLs for renderKit14
project, since renderKit15 project reads the annotations during run
time.
c. MyFaces plug-in for generating tld, facesconfig.xml, and
etcetera.
However, there does exist a HACK where it will always use renderKit14
project, since Qdox open source project has issues inspecting Java
files with annotations. I will work on this to resolve the matter, so
that renderKi15 will be default the project build. The reason that (a)
and (b) weren't combined into a single plug-in is to modularize it and
I thought it would consume too much of the builder resource which I
wanted to avoid.

3. Tomahawk Dojo bridge is used, and it could be replaced by simple JS
utilities instead. We should remove Tomahawk and Dojo dependencies. We
should have two Maven profiles one for Mojarra and the other for
MyFaces. We should also depend on JSF APIs only.
I have checked in the changes last night to break the dependency with
Tomahawk + Tomahawk-sandbox projects. So our resources [js
specifically, possibly others] will be created by
JsfFlexResourceFilter, JsfFlexDojoResource, and JsfFlexResource java
files. I will write a Wiki page over the weekend of how to set the
script html elements at the head of the page. Also in last night's
check in I have modified the pom.xml to have dependency on currently
the Dojo 1.1.1 version which will be packaged with our library. Future
upgrades should be easy since we will simply have to modify the
version of Dojo [of course this is assuming that Dojo doesn't have a
huge change in design like they did from 0.4 to 0.9 {or is it earlier,
I forget}]. However there does exist dependency of myfaces-impl of
ResponseStateManager and HtmlResponseWriter that I hope to resolve
over the weekend.

4. The actionScripts are placed inside the JSF code, and this is not
acceptable to the JSF developer. we should make the developer
abstracted as much as we can from the Flex coding.
I have given the ActionScript writing as a convenience to users, but I
have been working on dataBinding so to avoid the need of writing
ActionScript content within the jsp page. A simple example [which will
have to be improved] can be viewed of dataProviderCollection attribute
which allows binding of information for dataProvider attribute.

One additional issue to be resolved is the creation of DataGrid Flex
component. This one I think should be implemented as a service for
retrieving and setting the data, so have kept it for last.

All in all, thanks for the post.
Reply all
Reply to author
Forward
0 new messages