BlazeDS, AMF and read only properties
Posted by cornel | Filed under Java, LCDS/Blaze DS
A common scenario when building domain objects is to have read only objects properties. The serialization algorithm from BlazeDS/LCDS does not know how to serialize the read only properties – it needs both get and set methods (with one exception – the java.lang.Throwable class). So you have two options in this scenario if you do not want to build adapters over your domain object:
a)Build your own serialization/deserialization mechanism
In order to do that you need to implement the java.lang.Externalizable interface for the Java classes and flash.utils.IExternalizable for the ActionScript ones. The Java example is here and the AS here.
When using this approach you have the following advantages/disadvantages:
Advantages: the serialization/deserialization is much faster
Disadvantages: greater development time, and you lose some optimizations related to data compression (like string references and writing numbers in fewer bytes). Of course, you can build your own optimizations but again this means more development time
b)Patch the code from BlazeDS. You either add the includeReadOnly = true line in the BeanProxy constructor (this flag is used for Throwable serialization), or, better yet, take the modifications from the current BlazeDS branch where this feature was implemented.
Flex and Java next week in Italy
Posted by cornel | Filed under Events
Next week I’ll visit several Java User Groups in Italy speaking about Flex and Java:
22 Genova
24 Milano
Looking forward to meet you.
Adobe to acquire Omniture
Posted by cornel | Filed under Events
Adobe announced today that it will acquire Omniture (the largest web analytic software company) for about $1.8 billion. It’s the second largest acquisition for Adobe after Macromedia (3.4 billion).
Job openings on Livecycle Data Services team
Posted by cornel | Filed under Events, LCDS/Blaze DS
The Livecycle Data Services team has three openings: computer scientist, senior computer scientist and principal computer scientist. If you want to work on a really cuttting edge product for a world class company and you have the required knowledge/passion I encourage you to apply. You will have the chance to work with sharp people, and you can’t find that everywhere.
Logging everything in BlazeDS
Posted by cornel | Filed under Uncategorized
When you create a Flex/Java project in Flex Builder the logging tag in the services-config.xml file looks like that:
<logging> <target class="flex.messaging.log.ConsoleTarget" level="Error"> <properties> <prefix>[BlazeDS] </prefix> <includeDate>false</includeDate> <includeTime>false</includeTime> <includeLevel>false</includeLevel> <includeCategory>false</includeCategory> </properties> <filters> <pattern>Endpoint.*</pattern> <pattern>Service.*</pattern> <pattern>Configuration</pattern> </filters> </target> </logging>
Unfortunately you can lose some important error messages with this <filters> configuration. That’s why its better to edit the file after creating the project and change the filters section to *
<filters> <pattern>*</pattern> </filters>
Logging in BlazeDS and LCDS with Java Util
Posted by cornel | Filed under Java, LCDS/Blaze DS, Uncategorized
I created a small class to allow integration between the logging mechanism from BlazeDS and java.util.logging. As an example it’s useful if you plan to use BlazeDS or Livecycle Data Services inside Google App Engine – the former one uses java.util.logging.
In order to use it you should modify services-config.xml to use the newly created class (I created my class in the package flex.messaging.log):
<target class=”flex.messaging.log.JavaUtilLogTarget” level=”Debug”>
The source code is below:
import java.util.logging.Level; public class JavaUtilLogTarget extends AbstractTarget{ public void logEvent(LogEvent event) { java.util.logging.Logger log = java.util.logging.Logger.getLogger(event.logger.getCategory()); Level level; if (event.level >= LogEvent.ERROR) level = Level.SEVERE; else if (event.level >= LogEvent.WARN) level = Level.WARNING; else if (event.level >= LogEvent.INFO) level = Level.INFO; else if (event.level >= LogEvent.DEBUG) level = Level.FINE; else level = Level.FINEST; log.log(level,event.message,event.throwable); } }
FlexPMD
Posted by cornel | Filed under Events, Flex
Yesterday Adobe Technical Services launched FlexPMD – a tool to audit ActionScript source code and detect common problems (anti patterns, unused code, badly written Flex components ). The tool started as an internal project in Adobe and now it has been made open source.
I can say that using this tool is a must for any complex Flex projects, because it enables you to detect common problems at an early phase. For the moment it can be invoked from Maven/Ant and Mac OS X automator, in the future it will probaby also be available as a Flash Builder plugin.
BlazeDS and LiveCycle Data Services in the Cloud – MAX Laboratory
Posted by cornel | Filed under Events
My colleagues, Mihai Pricope and Mihai Corlan, and I we’ll have a laboratory at Adobe MAX about deploying BlazeDS and LiveCycle Data Services in the Cloud. We plan to show how to create your first project and deploy it on the cloud. We’ll also discuss the challenges that are involved and best practices. We will cover Google App Engine and Amazon ES2.
We cannot cover anything in 90 minutes, but we hope to clarify the basic aspects – and of course to answer all of your questions.
If you are interested in Flex and Java I encourage you to attend – and also to check the other labs and sessions at MAX. And remember, when you attend MAX not only do you learn new things, you also meet new people and find new opportunities.
Managing humans – Michael Lopp book
Posted by cornel | Filed under Uncategorized
I discovered this book several nights ago and I was amazed. Funny and in the same time valuable it is also a “no-crap” book about working in the software world, dealing with difficult people, the value of information, building the version number 1.0 and many more things. The author offers practical solutions for a lot of scenarios, in a very humorous way.
Its not a book for just managers or for wanna be managers, any individual can benefit from it. However I think that for some individuals it can be harder to accept several of the author’s conclusion (I told you, it’s a “no crap” book). Especially for younger people.
The book can be bought here; also the author has a blog.
Flex, Java and Fiber next week in Germany
Posted by cornel | Filed under Uncategorized
Next week I’ll visit several Java User Groups in Germany speaking about Flex and Java
27 August Dusseldorf
1 September Stuttgart
2 September Karslruhe
In Stuttgart I will also present Fiber – building RIAs using an Model Driven Architecture
Looking forward to meeting you. If you know for a company from any of these towns interested in learning more about RIA let me know.