Archive for March, 2008

More them a Hello World….

Saturday, March 29th, 2008

On Adobe site we have a lot of good samples.

So, I will guide you in how to patch one to work with maven.

I select this sample:


Let’s start.

  1. Download the sources from here;
  2. Extract it somewhere;
  3. Put this pom.xml at root (not inside src). The structure will like this:
  4. Install datavisualization.swc on maven repository (Read how here);
  5. run mvn clean install on console;
  6. All done, your swf file will be available on target directory and on maven repository.

The suggested pom is fully commented. I suggest a review on it.

VELO

PS: Today flex-mojos (alpha4) has a bug on l10n support.
datavisualization resouce-bundle need to be install by hand, doing this:

mvn install:install-file -DgroupId=com.adobe.flex.sdk     -DartifactId=datavisualization -Dversion=3.0.0.3.0.0.477 -Dpackaging=rb     -Dclassifier=en_US     -Dfile=”${Flex Builder 3}\sdks\3.0.0\frameworks\locale\en_US\datavisualization_rb.swc”

*** CHECKSUM FAILED

Saturday, March 29th, 2008

Well,

Who is using my repository will see a lot off
*** CHECKSUM FAILED

Some binaries (.jar, .swc, …) are not mine (example Adobe’s flex-compiler-oem.jar)

So, I don’t put .md5 or .sha1 files. Two reasons:

  1. Files are not mine;
  2. I still hopping for one Adobe Maven Repository

On my repository you will find files found on Adobe’s SVN or found on Open Source SDK. By this reason I didn’t put the .swc file for datavisualization. Only put .pom.

So, to use charts and other stuff found on datavisualization.swc you will need to it install by hand:

mvn install:install-file -DgroupId=com.adobe.flex.sdk -DartifactId=datavisualization \   -Dversion=3.0.0.3.0.0.477 -Dpackaging=swc -Dfile=/path/to/file

That’s it.

VELO

Alpha-4 out, with news…

Saturday, March 29th, 2008

Hi folks….

Another Saturday and another release.

Few updates on compiler mojo, nothing critical.

Add new mojo, for ASDOCS

Just need to run mvn asdoc:asdoc and they will be generated on target/asdoc (default, but configurable).

I couldn’t test it much, just 2 samples. So far so good.

Another news are the super poms. On Java, maven uses a super pom in order to add defaults plugins, sources directories and some other stuffs.
Following the same line, I created 2 super poms.
One for flex:

  <groupId>info.rvin.mojo</groupId> <artifactId>flex-super-pom</artifactId> <version>1.0-beta1</version>

Another for air:

  <groupId>info.rvin.mojo</groupId> <artifactId>air-super-pom</artifactId> <version>1.0-beta1</version>

This helps a lot. Using they is very easy to start any flex project with maven.

Soon I will post a simple sample in how to use it.

Well, this is alpha4.

Now working on alpha5:

  • Source generation support (like java source plugin)
  • mvn flexbuilder:flexbuilder (like eclipse:eclipse)

Still plans to add GAS3 to Flex Mojos and FlexUnit/FUnit support.

VELO

Flex Developer impressions

Friday, March 28th, 2008

Finally I got it:

Some people ask me about Adobe Flex Developer Certification.

Some impressions:

  • Not is hard, same level of SCJP;
  • Need a big score 73%;
  • Low time 1h30m for 67 questions;

Need to be smart. Every one minute need to go to another question. Read, think 30s, know the answer? Answer it and go on. Not 100%, answer, mark and next. Don’t know NEXT.

In the end review the unanswered and if you have time the marked (I did have time to review marked questions).

The questions are very sorted. Got UML, design patterns, Cursor, HttpService, MXML, ActionScript, Styles, well, almost every thing.

I recommend a second view on two topic:

  • HttpService;
  • Flex architecture;

About study materials. Well, no mocks, no specific book, no nothing.

I have read one book before test:
http://www.theriabook.com/

Helps me a lot. And I hope helps you.

Unfortunately this blog didn’t go on.

I never had studied for the certification, I study Flex to work with Flex. But this knowledge is enough.

In the end, I recommend the shot. Try it. You will pass.

VELO

Alpha-3 is out

Sunday, March 23rd, 2008

So guys, after some tests compiling libraries I release alpha-2.

This sunday I test some Flex 3 samples:
http://www.adobe.com/devnet/flex/?tab:samples=1

I found some problems compiling this samples with alpha-2.

After some tests, I need to correct some points on flex-mojos, add some null checks and add some file.exists() check.

Got good results. Compiling all samples at once got this times:
ServeBox Plugin: 3m32s
Flex Mojos: 1m52s

Well, after that I add support to transient dependency.

So, this is alpha3. Any suggestion?

VELO

My first case of success… or something like that!

Saturday, March 22nd, 2008

This weekend I work on my first case of success to flex-mojos…

But, what can I compile?

I decide as first challenger compile this little project:
http://opensource.adobe.com/svn/opensource/flex/sdk/

Was a great experience. First, I did a normal user compilation. Download cygwin, ant and did what Adobe’s site saw me to do. In the end I got this:

BUILD SUCCESSFULTotal time: 1 minute 44 seconds

So I start to work.

First I create a main mojo and try to compile framework.swc….
One shot, two shots, ten shots, some plugin refactor, some java.lang.OutOfMemoryError: Java heap space and gotcha, I did, got my first framework-3.0-SNAPSHOT.swc and release second alpha on plugin repository.

Them, main mojo starts to get modules, framework + locales, rpc, airframework…
All done. Time to run a full flex SDK’s compilation, now with maven.

[INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESSFUL[INFO] ————————————————————————[INFO] Total time: 46 seconds[INFO] Finished at: Sat Mar 22 13:40:35 BRT 2008[INFO] Final Memory: 29M/381M[INFO] ————————————————————————

Same machine.
Same conditions.
Half time.
And no cygwin is required.

I like those results =D

Moved by this, I open this issue on adobe bugs database, suggesting the flex-mojos as an option to windows users.

But, I found something disturbing. The digest codes generate by maven are not equals to digest codes generate by ant. I don’t like this.

I try those SWCs and works fine. Why this difference?

Wanna see with your own eyes? Apply this patch.

VELO

Why?

Saturday, March 22nd, 2008

Hi folks…

Some days ago I star a new maven plugin to compile flex.
http://code.google.com/p/flex-mojos/

But why?

Well, hard to say… lot of reasons. I believe 3 are the most valuable:

  1. The current plugins didn’t allow me do something (example: compile flex 3 from source with maven);
  2. The available plugins use always a new JVM to each module on my application, resulting on a bad performance result;
  3. Don’t are full compliant with MXMLC and COMPC.

So, here I fit in.

I start commit something at google code and start alphas.

For now, COMPC support is great. I’m able to compile the entire flex SDK with great results. I will start MXMLC tests this weekend.

If someone wanna test too, add this repository to pom.xml:

 <pluginRepositories>  <pluginRepository>   <id>flex-mojos-repository</id>

   <url>http://flex-mojos.googlecode.com/svn/trunk/repository/</url>  </pluginRepository> </pluginRepositories>

Them, just add the plugin:

  <build>  <sourceDirectory>src</sourceDirectory>  <plugins>   <plugin>

    <groupId>info.rvin.mojo</groupId>    <artifactId>flex-compiler-mojo</artifactId>    <version>1.0-alpha2</version>    <extensions>true</extensions>

    <configuration>    </configuration>   </plugin>  </plugins> </build>
  • Easy to use;
  • Low foot print;
  • CoC, no required parameters;

Soon I will write a hello world.

Thanks for this first post, and plz, comment =D

VELO