All4Web 8 may Milano

http://www.all4webday.com/

Free event (in Italian language)

Nine different communities and user groups joined their efforts to organize
a unique event. Twelve sessions, plus two plenary, among three different
tracks:
http://www.all4webday.com/jsp/Wiki?Agenda

The event is totally free, but registration is required:
http://www.all4webday.com/subscribe/event/2

One track is dedicated to “RIA vs RIA”, where different people will
implement the same application using different technologies: Silverlight,
Ajax, Flex and JavaFX. At the end there will be a joined session to compare
all of them.

The Pizze-RIA speeches is “Flex Injection” and “RIA vs RIA”

We hope to see all you in Milan ;)

Screen Ruler with javaFX

Some weeks ago JavaFX version 1.0 was released. After some very busy days and Christmas holidays, I’ve finally found a few hours to spend on it.

My goal was to create a ruler application with guideLine, measuredArea and other things like that. In the same time I’ve been exploring the JavaFX 1.0 API.

Add guideline and mesaured area

Add guideline and mesaured area

Try it

When developing this small project of mine, I discovered some great features and at the same time I’ve found a few issues with javaFX.

That’s what I like:

  • Binding. It’s very powerful. I ‘ve been using binding in flex but with JavaFX the concept is much more stretched to its limits.
  • API. The basic API is quite good being a 1.0 release. They can improve some things but as a first step, it’s definitely a very good one.
  • Skinning. I haven’t used it already. Anyway it looks quite promising.
  • CSS. I hoped I wuold have found more examples and documentation. Anyway it’s useful.

And here are some issues:

  • Transparent objects don’t fire events. At the moment I’m using a workaround (i.e. setting opacity:0.1)
  • TextBoxes don’t have onFocusLost and onFocusGain events. There are also some workarounds here.
  • Code Hint and Debug features (in NetBeans IDE) need more enhancements and fixes

My application works consists of 4 Classes and a Main one as launcher:

  • GuideLine (from rulers you can drag an horizontal and vertical guide)
  • Rulers (draws rulers on vertical and horizontal side)
  • MeasuredArea (a draggable and resizable Colored Rectangle)
  • MeasuredLine (a red line is drawn beetween two Guidelines on rollover)
  • Main (Launcher application and some handler functions)

You can found a NetBeans project here

Two weeks ago I met some friends of mine also involved in RIAs like me and the Flex Ant Tasks were one of the topics of our discussion. Then I decided to blog about it.

I’ve googled many times on this subject. The documentantion from Adobe is very basic. On the web you can find many snippets of code, but then it’s difficult to find a working project.

Now the quest is over! You can find a complete project here ;)

Unzip it. Then start Eclipse and go to File->Import->From FileSystem

The project is based on:

The Flex Ant Task and Ant-Contrib jars must already be present in the ant lib directory or in a .ant/lib directory inside your home dir. If the Ant-Contrib lib jar referenced in build.xml is not loaded, then add it on your eclipse ant classpath following these steps:

  • right click on build.xml
  • select “run as -> Ant build…”
  • select ant “classpath” tab
  • On “additional task” add antcontrib jar

Now, just launch the compile target and the project will be compiled.

The project contains a ”classes” directory where I put all my AS3 classes, a “libs” directory where you can add all your external swc libraries and a mxml directory with all the mxml source. If you need to change the names of these directories, you can do so by editing the included build.properties file.
I like Flex modules because they are easy to understand. With this ant task you can use the “optimize”  module (just add it to the mxml/module directory). What does optimize mean? An optimize module shares classes already loaded from a main swf.

This way you can reduce your application size and manage it with ant! :)



   
































 
 


 


   
   
   








	
	
	
	 
	 

	 
	 
	 
	 

	
	
	
	









 




 








  












The JavaFX team announced an “ask to the expert” session (august 18-22)

Here are some news:

  1. They have plans to support CSS for skinning
  2. The next release of the SDK will have new UI components, media controls and much more is planned for November
  3. The JavaFX runtime will not be included in the JRE. It will be downloaded when needed and then cached for subsequent use from Sun servers
  4. They have a plan for a local persistence storage for 1.0 release. It means that a local database will be used like sqlite in Adobe AIR.

You can found the full transcript here

First post

Today, the blog www.pizze-ria.it is born. A pizza in the RIA world ;) (kudos to Federico Zanetti for the nice idea).

I have 2 goals about this place:

  • Write about RIA technologies, especially on Adobe Flex/ AS3 and Sun JavaFX
  • Enhance my poor english, I am Italian and like a lot of Italians I speak and write poor english. Then if you read something wrong please drop me an email :P

At the moment the blog is very raw. I don’t have the time to fix it. I hope to do it in the future.

I installed wordpress and added just syntaxhighlighter as a plugin. After that, I added javaFx support:

  • downloaded the brush from here (tks coffeejolts.com)
  • put it on your syntaxhighlighter plugin directory (i.e. /wp-content/plugins/google-syntax-highlighter/Scripts)
  • edited google_syntax_highlighter.php and insert this line:

<script class=”javascript” src=”<?php echo $current_path; ?>Scripts/shBrushJavaFX.js”></script>

  • now you’ll have a basic javafx color syntax highlighter in your blog too.
/*
 * Main.fx
 *
 * Created on Aug 8, 2008, 11:33:52 AM
 */

package syntaxhighlighter;

import javafx.ext.swing.Frame;
import javafx.ext.swing.Canvas;
import javafx.scene.text.Text;
import javafx.scene.Font;
import javafx.scene.FontStyle;

Frame {
    title: "Color syntac"
    width: 300
    height: 300
    closeAction: function() { java.lang.System.exit( 0 );
    }
    visible: true

    menus: [  ]

    content: Canvas {
        content: [
            Text {
                font: Font {
                    size: 24
                    style: FontStyle.PLAIN
                }
                x: 10, y: 30
                content: "Syntax high lighter"
            }]
    }
}

Now, wordpress is ready. Stay tuned!