Posts Tagged ‘Flex’

WorkSmart 2.0 released, with integrated time tracking and task management

Monday, October 4th, 2010

We are happy to announce that WorkSmart 2.0 has been released by Web Responsive.

We have added some great features to improve your productivity while staying healthy.

The following features have been added:

  • Management of tasks (which belongs to projects)
  • Tracking of spent Pomodoros on each task
  • Overview of finished tasks with filtering
  • Graph of tasks showing estimated and actual spent Pomodoros

These new features will help you measure your productivity and improve your project time estimation.

Get WorkSmart 2.0 here

Suggestions and feedback are always welcome.

Post to Twitter

Joomla and Flex

Tuesday, July 27th, 2010

At Web Responsive we take great pride in being masters of integration. Basically we love to join different technologies and let them play together.

Our latest experiment involved joining two rather different technologies: Joomla and Flex.

Using these two technologies we created a rich desktop (AIR) application, that facilitates the management of your media library on a Joomla site. One big advantage is that you can directly drag pictures from the desktop into the application and they will be automatically uploaded. Furthermore you don’t have to write the login information, every time you want to upload pictures to your Joomla site, since the login information for various sites, is stored directly in your AIR application.

To handle the communication between Flex and Joomla we used the open source library: J-AMFPHP

This library hasn’t been touched for a couple of years, so it needs a few changes to run smoothly.

Lastly, since the AIR application is dependent on a Joomla extension, to be able to communicate with a Joomla site, we build an FTP connection into the AIR application. This FTP connection made it possible to install the needed Joomla extension effortlessly on the Joomla site, from the application itself. The only thing needed is to configure the FTP connection for the site in the application.

The Flex FTP connection was made with the great open source library: FlexFTP which had to be a bit extended for this particular application.

All in all, 4 different open source solutions: Flex, Joomla, J-AMFPHP and FlexFTP were combined to make the application run.

You can get a free limited version of the application here: JEPUM Limited

The possibilities for other types of applications joining these technologies are endless. Let us know of your ideas.

Post to Twitter

Free Facebook Manager application launched

Friday, July 9th, 2010

Web Responsive launches yet another small application that we provide for free.

This is an updated/extended version of the simple Facebook Picture Uploader and is the limited version of the yet to come pro Facebook Manager application.

It provides the following core functionality:

  • Easy drag-n-drop of pictures from your desktop to the application
  • View all images present on your facebook
  • Multi picture uploading to specific albums on your Facebook profile
  • Multi picture deletion
  • View of pages which is administered by logged in user and their albums
  • Inserting comments on each picture
  • Creation of new Facebook picture albums

Here is a screenshot of the application running:

Facebook Manager Limited

You can get the application here: Facebook Manager Limited

Any critics/comments are very welcome.

Post to Twitter

Free Joomla Picture Uploader application launched

Friday, July 2nd, 2010

Web Responsive is proud to announce a free version of our Joomla Picture Uploader.

Here is a screenshot of the application running:

This little application makes it really easy to upload pictures to your Joomla Media Manager. Once configured, the application will automatically log you in to your Joomla site, without the need to go to the backoffice and log in. You can immediately drag pictures from your desktop to upload them into your media manager.

Go get the JEPUM Limited here.

Post to Twitter

JEPUM – Joomla Easy Picture Uploader and Manager Flex/AIR application launched.

Thursday, July 1st, 2010

Web Responsive proudly announces the release of JEPUM – Joomla Easy Picture Uploader and Manager.

This handy little application can help you increase your productivity in maintaining your pictures on your Joomla site.

We offer a promotional price of only 12 USD for the first 10 copies sold.

You can buy the application here: JEPUM – Joomla Easy Picture Uploader and Manager

Post to Twitter

Free Facebook Picture Upload RIA

Friday, May 7th, 2010

At Web Responsive we have created a small free RIA application implemented with Adobe Flex and Adobe AIR that connects to Facebook.

This application started out as a small experiment, but we ended up creating a finished useful product.

It provides the following core functionality:

  • Easy drag-n-drop of pictures from your desktop to the application
  • Multi picture uploading to specific albums on your Facebook profile
  • Inserting comments on each picture
  • Creation of new Facebook picture albums

You can get it here: Facebook Picture Upload

We are working on releasing the source code, if anyone is interested. So¬†please don’t hesitate in giving us constructive feedback.

Post to Twitter

Rich Internet Applications – HTML or plugins

Sunday, May 2nd, 2010

At present timer there is pretty much two ways to create Rich Internet Applications on the Internet. Either you use HTML (and CSS, JavaScript, AJAX, etc.) or you use a plugin (Flash, Silverlight, etc.). HTML5 is not supported well enough cross the browsers to be a viable solution for now and Silverlight doesn’t have the same browser penetration as the Flash player, so it is pretty much down to the battle between Flash (Flex) or AJAX.

On a daily basis I mainly use Flex to develop our Rich Internet Applications (RIAs), but the tools for building RIAs with AJAX have become much more stable and cross browser supported. And with big companies behind things like GWT from Google and YUI from Yahoo, it is now perfectly possible to build stable RIA solutions with AJAX. As Google (among others) have proven for years of course.

Lately I have been attracted to the Vaadin framework. With Vaadin it is possible to build RIAs without writing a single line of Javascript (or ActionScript) code. All code is written in Java and all HTML, Javascript and AJAX is generated automatically. Vaadin uses the GWT for the frontend and thus relies on AJAX as the RIA solution. Furthermore Vaadin comes with a lot of useful common widgets, that can be easily integrated into your project and it is pretty straightforward to build your own reusable widgets.

Coming from a Java background I find Vaadin interesting and have started to build a small application to try the technology. But instead of building a little example application, I want to build a real working application and do it “the right way”, using the familiar technologies: Spring, Hibernate, etc. and using a proper MVC structure to make a proper separation of concerns in the frontend.

Post to Twitter

Flex, BlazeDS, ActiveMQ, Spring application context gotchas.

Thursday, April 15th, 2010

In one of my current projects I have been fighting a lot getting BlazeDS, ActiveMQ and Spring to dance together.

We are using the Spring BlazeDS integration project to connect our Flex frontend with our Java backend.

The project uses remoting AMF and messaging in the communication and the backend consists of three independent Java applications.

One of the toughest things is configuring ActiveMQ to work with BlazeDS.

Lately I had to build a session listener, that detects when users are logging in and logging out. This proved extra hard, as the the session listener is configured in the web.xml and doesn’t have access to the beans in the application context directly.

Inside the session listener I need to get the application context, to get the beans from the Spring context.

Unfortunately with ActiveMQ and BlazeDS, we need a separate context file, than the default applicationContext.xml, else there will be problems with the Flex message broker and ActiveMQ.

I solved this by getting the messaging context, instead of the application context inside the session listener. Here is an example:

public void attributeAdded(HttpSessionBindingEvent e)
{
  logger.info("Attribute added to session: " + e.getSession().getId());
e.getSession();
ServletContext servletContext = session.getServletContext();
WebApplicationContext appContext = (WebApplicationContext) servletContext.getAttribute(WEB_APPLICATION_CONTEXT_MESSAGING);
UserBrokerAccountManager userBrokerAccountManager = (UserBrokerAccountManager) appContext.getBean(USER_BROKER_ACCOUNT_MANAGER_BEAN_ID);
userBrokerAccountManager.doSomething();
}

Basically this shows how to get access to specific beans inside a specific application context.

Another useful method is getting all contexts from the servlet context. Here is a method to do exactly that:

/**
* Show servlet attributes.
*
* @param servletContext the servlet context
*/
@SuppressWarnings({ "unused", "unchecked" })
private void showServletAttributes(ServletContext servletContext)
{
  Enumeration<String> en = servletContext.getAttributeNames();
while (en.hasMoreElements())
  {
    logger.info("Servlet attribute - Enum: " + en.nextElement());
  }
}

Post to Twitter

Maven compilation of Flex project with Mate

Tuesday, April 6th, 2010

One year ago I was trying to use Maven to compile Flex applications. At the time the various flex-mojos (Maven plugins to compile Flex) were still a bit unstable and hard to use. Since then things have evolved and Flex compilation with Maven is now a reality.

In one of our latest projects I decided to create the POM for Flex compilation with Maven using the latest version of the flex-mojos. The reason is that compiling with Maven makes it possible to use Continuous Integration programs like Hudson. Of course compilation with Ant is also a possibility, but if possible I think Maven compilation is much cleaner than Ant, which always feels like hacky code. I run Hudson on our online server that will continuously get the latest version of each of our projects, compile them and send emails to the people breaking the code. This saves a lot time and frustration in the daily work and guarantees that the latest version in our repository is always compiling and the unit tests running. Soon, my goal is to integrate Flex Monkey in the continuos integration setup, so we can easier catch broken code and bugs, since very little of our Flex code is actually unit tested.

Nevertheless I have included an example of a POM for Flex compilation with Maven. I have erased some sensitive names and I have added some comments for clarity.

This particular project uses the Mate framework and integrates another project. Furthermore it uses source code (not included as dependencies). And last but not least, we have created our own repository online, where we can share project dependencies. This repository can be maintained by using Maven to install the dependencies (e.g. mvn install:install-file..) or by installing in the local repository and transferring the files online with FTP.

In this way, I can set up the project dependencies and everyone else involved with the project only needs to compile with Maven and the dependencies will automatically be loaded from the repository.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <!--
    ***********************************************
        Project specification
    ***********************************************
    -->
    <groupId>com.projectname</groupId>
    <artifactId>projectname</artifactId>
    <version>0.1.0-SNAPSHOT</version>
    <packaging>swf</packaging>

    <name>Project Name</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <flex.sdk.version>4.0.0.14159</flex.sdk.version>
        <flex-mojos.version>3.6</flex-mojos.version>
        <mate.version>0.8.9</mate.version>
    </properties>

    <!--
    ***********************************************
        Local configuration
    ***********************************************
    -->
    <build>
        <sourceDirectory>src</sourceDirectory>
        <finalName>ProjectName</finalName>
        <plugins>
            <plugin>
                <groupId>org.sonatype.flexmojos</groupId>
                <artifactId>flexmojos-maven-plugin</artifactId>
                <extensions>true</extensions>

				<configuration>
					<sourceFile>Main.mxml</sourceFile>

                    <!-- set the runtime locale and include the resources frome each project with locales -->
					<runtimeLocales>
					    <locale>en_US</locale>
					</runtimeLocales>
                    <resourceBundlePath>${basedir}/src/locale/{locale}</resourceBundlePath>
                    <resourceBundlePath>/FairgoCRMplugin/src/locale/{locale}</resourceBundlePath>
				</configuration>

                <dependencies>
                    <dependency>
                        <groupId>com.adobe.flex</groupId>
                        <artifactId>compiler</artifactId>
                        <version>${flex.sdk.version}</version>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </plugin>

            <!-- Plugin to include source paths from other projects when compiling -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
                                <source>/webresponsivelibrary/trunk/Webresponsive/src</source>
                                <source>/webresponsivelibrary/trunk/XIFF/src</source>
                                <source>/webresponsivelibrary/trunk/MateExtensions/src</source>
                                <source>/FairgoCRMplugin/src</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>

        </plugins>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.4</version>
				</plugin>
			</plugins>
		</pluginManagement>
    </build>

    <dependencies>
        <!--
        ***********************************************
            Flex Framework
        ***********************************************
        -->
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>flex-framework</artifactId>
            <version>${flex.sdk.version}</version>
            <type>pom</type>
        </dependency>

        <!--
        ***********************************************
            Mate Framework
        ***********************************************
        -->
        <dependency>
            <groupId>com.asfusion</groupId>
            <artifactId>mate</artifactId>
            <version>${mate.version}</version>
            <type>swc</type>
        </dependency>

        <!--
        ***********************************************
            JPEGEncoder
        ***********************************************
        -->
        <dependency>
            <groupId>extra</groupId>
            <artifactId>jpegencoder</artifactId>
            <version>1.0</version>
            <type>swc</type>
        </dependency>
	</dependencies>

    <repositories>
        <!--
        ***********************************************
            Sonatype flex-mojos repository
        ***********************************************
        -->
        <repository>
            <id>flex-mojos-repository</id>
            <url>http://repository.sonatype.org/content/groups/flexgroup</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

        <!--
        ***********************************************
            Own repository
        ***********************************************
        -->
        <repository>
            <id>Web Responsive repository</id>
            <name>Online Web Responsive Repository</name>
            <url>http://web-responsive/repository</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>flex-mojos-repository</id>
            <url>http://repository.sonatype.org/content/groups/flexgroup</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

</project>

Post to Twitter

BlazeDS and Weborb

Thursday, April 1st, 2010

In the last few projects we have been working on, I had the chance to work on two competing Flex messaging technologies: BlazeDS and Weborb.

Here are a few of my observations and comparisons:

Weborb returns Array, while BlazeDS returns ArrayCollection, when returning a List (from Java).

Weborb seems to need less configuration than BlazeDS, while BlazeDS is more strict. For example, in Weborb we can use the GenericDestination and it will catch all requests for services, while BlazeDS needs a configuration for each service in the remoting-config.xml like this:

    <destination id="applicationService">
        <channels>
            <channel ref="normal-amf"/>
        </channels>
        <properties>
            <source>*</source>
        </properties>
    </destination>

BlazeDS has infinite more online documentation, while Weborb relies on paid support from Midnight Coders.

BlazeDS has better (easier to control) logging:

Place the following inside: WEB-INF/flex/services-config.xml

    <logging>
        <target class="flex.messaging.log.ConsoleTarget" level="Debug">
            <properties>
                <prefix>[TradeNovaFX]</prefix>
                <includeDate>true</includeDate>
                <includeTime>true</includeTime>
                <includeLevel>true</includeLevel>
                <includeCategory>true</includeCategory>
            </properties>
            <filters>
                <pattern>Endpoint.*</pattern>
                <pattern>Service.*</pattern>
                <pattern>Configuration</pattern>
            </filters>
        </target>
    </logging>

A little hint with BlazeDS: DON’T add remoting-config.xml and messaging-config.xml on the backend. It will only give problems!

BlazeDS has what I consider a huge bug when serializing/converting a Number with the value NaN to a Java value. Basically NaN is converted to 0, instead of null. This can break code that relies on null values, which is very commonplace in backend programming.

Luckily the guys at Farata has a couple of solutions for this.

Post to Twitter