PureMVC Architects Lounge

Announcements and General Discussion => Public Demos, Tools and Applications => Topic started by: jhonghee on April 12, 2010, 04:01:09



Title: JavaFX Implementation of EmployeeAdmin
Post by: jhonghee on April 12, 2010, 04:01:09
I started learning JavaFX by porting EmployeeAdmin to JavaFX. You can find it here. http://github.com/jhonghee/PureMVC_JavaFX_EmployeeAdmin (http://github.com/jhonghee/PureMVC_JavaFX_EmployeeAdmin)

Try it out: Web Start (http://puremvc-javafx-employeeadmin.googlecode.com/hg/resources/puremvc-javafx-employeeadmin.jnlp)

(http://content.screencast.com/users/Jhonghee/folders/Jing/media/0288aca2-f850-4fe2-b79e-0f424e2c95fb/PureMVC_JavaFX_Demo_EmployeeAdmin.png)

My impression on JavaFX is still somewhat mixed. I really liked that it was quite easy to learn and its binding and trigger features were awesome to work with. However, I was a bit turned off by the state of its APIs. The bundled UI controls were limited and I had to go find 3rd party implementation (http://jfxtras.org/ (http://jfxtras.org/))

I didn't experience any serious issue in interoperability between Java and JavaFX but it was far from perfection. I had to resort in using Interface for communication. POJO support in JavaFX UI controls should also be polished.

Overall, it was fun and I am looking forward to see how much it will improve on 1.3.

Cheers


Title: Re: JavaFX Implementation of EmployeeAdmin
Post by: Tekool on April 12, 2010, 05:32:58
Good work. I just had a quick look into the sources, but I'm pretty sure it will help a lot in working with PureMVC and JavaFX those whom want to learn it.

It only needs some layout work to exactly be as the standard design and an URL to test the interface for those whom only want to play with the application. ;)


Title: Re: JavaFX Implementation of EmployeeAdmin
Post by: puremvc on April 13, 2010, 08:55:55
Very nice. I'd love to see a live demo! I could host the project here if you're interested in donating it to the project. It would need to be repackaged (org.puremvc.java.demos.javafx.employeeadmin ), and have all the standard attribution headers, etc.

-=Cliff>


Title: Re: JavaFX Implementation of EmployeeAdmin
Post by: jhonghee on April 14, 2010, 09:04:43
Hi,

I refactrored the code to make it more like traditional EmployeeAdmin. All the view components have become passive views and callbacks were moved into corresponding mediators. All proxies, commands, mediators and facade previously implemented in Java have been ported to JavaFX.

The old Java implementation is taged:http://github.com/jhonghee/PureMVC_JavaFX_EmployeeAdmin/tree/stable-java (http://github.com/jhonghee/PureMVC_JavaFX_EmployeeAdmin/tree/stable-java)

In order to do this, I had to provide default constructors to Proxy, Mediator, and Facade for JavaFX class only extends Java class with default constructor. Initially, I was able to extend Mediator and Facade to support default constructors. However proxyName field in Proxy was private so I had to modify the pattern classes. You can find the modified version of PureMVC Java port here: http://github.com/jhonghee/PureMVC_JavaFX_MultiCore (http://github.com/jhonghee/PureMVC_JavaFX_MultiCore).

As for donation, I am fine with it. Give me a couple of days. I'll find a place to put the live demo. I already repackaged it to org.puremvc.java.demos.javafx.employeeadmin.

Cheers.


Title: Re: JavaFX Implementation of EmployeeAdmin
Post by: puremvc on April 14, 2010, 09:48:04
Ouch. Having to mod the framework is a pretty nasty thing to have to do. I admit I haven't looked into JavaFX much, but what in the world are they thinking here?

proxyName should be a protected property, not private. B Looking at the code, I see data should be as well. oth are protected in the AS3 reference implementations.

I've filed a bug: http://forums.puremvc.org/index.php?topic=1697.0

-=Cliff>


Title: Re: JavaFX Implementation of EmployeeAdmin
Post by: jhonghee on April 14, 2010, 11:36:34
That's right. I had to make the data field protected as well.

Great!

As soon as PureMVC Java port fixes the problem, I'll update the demo to use that.


Title: Re: JavaFX Implementation of EmployeeAdmin
Post by: jhonghee on April 14, 2010, 12:07:00
Hi,

I added a live demo here: Web Start (http://puremvc-javafx-employeeadmin.googlecode.com/hg/resources/puremvc-javafx-employeeadmin.jnlp)

You can also access this demo from project wiki: http://wiki.github.com/jhonghee/PureMVC_JavaFX_EmployeeAdmin/ (http://wiki.github.com/jhonghee/PureMVC_JavaFX_EmployeeAdmin/)