Captive Imagination
July 31, 2010, 11:49:22 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Check out the teaser site for the first official game by Captive Imagination: http://www.galaxiesbeyond.com
 
   Home   Help Search Calendar Login Register  
Poll
Question: Should we divert from Java Bean standards for 2.0?  (Voting closed: February 12, 2009, 07:57:03 PM)
Yes, lets use Properties - 2 (100%)
No, Bean Standards MUST be followed - 0 (0%)
Other, defined below... - 0 (0%)
Total Voters: 2

Pages: [1]   Go Down
  Print  
Author Topic: Diversion from Bean Standards for 2.0?  (Read 1058 times)
0 Members and 1 Guest are viewing this topic.
darkfrog
Administrator
Inspired Imagination
*****
Offline Offline

Posts: 2650


View Profile
« on: January 29, 2009, 07:57:03 PM »

I've been giving a lot of design consideration to jSeamless 2.0 and if you've been looking at the repository you'll see there's a ton of code that has already been written for it.  However, I'm determined that this next version be the perfect UI (well...I'm trying) framework, so I'm giving each step in the development a lot of thought.

One of the major issues I've been thinking about has to do with bean properties. If you keep up on my blog you'll see a lot of ranting to do with how much Java sucks at bean-binding, property change events, and delegates. Well, for jSeamless this is a very important issue since the implementation has to be notified in real-time when a property of a jSeamless Component changes.  Up to this point I've been using my handy-dandy MagicBeans framework, but there are a few down-sides to it: 1.) It requires AspectJ to work, 2.) It's magic, and truly freaks people out when they understand what's going on.

Also, I'm investigating my new NumericAdjuster system that will allow you to define how numeric values will "adjust" towards their new value (ex. x = 50 and you set x to 200 instead of just jumping there, if a NumericAdjuster was assigned to x for that Component it would move towards 200 at the rate and easing defined within the adjuster) as a replacement to effects in jSeamless.

This has led me down the path to consider an idea created by another person:
https://bean-properties.dev.java.net/tutorial.html

This would diverge us from having the normal component.getX(), component.setX(double) methods and use a component.x.get() and component.x.set(double) alternative with a public Property<Double> representation of "x" in the middle. For NumericAdjuster I could simply extend Property for anything that should support NumericAdjusters and add a setAdjuster method. This would not only serve to clean up, but better hierarchically define values. Further, it would allow change notification to occur immediately by listening to properties when their setter is invoked. The down-side is that this breaks all standard bean conventions and that is something I don't take lightly. So, as the question says, should we divert from Java Bean standards in 2.0 given the advantages this offers?
Logged
darkfrog
Administrator
Inspired Imagination
*****
Offline Offline

Posts: 2650


View Profile
« Reply #1 on: February 03, 2009, 10:34:57 AM »

For lack of response I am moving forward with bean properties instead of getter/setters.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.168 seconds with 22 queries.