Archive for the ‘Flex’ Category

Custom Skins for Flex in Flash

November 10, 2008

I am currently developing an AIR application which will be high on graphics and will call games to play from inside it. After a lot of thought I made a decission to go about Flex framework for developing this and with FlexBuilder IDE. So the frist thing came to me is how custom graphics fit into the flex applications. All my previsous Flex development were having the default components with some minor modification as to put an icon in a button or stuffs like that. But currently it has to be a very custom components. Well, each button should have a different look and feel. I know this is quite easy with Flash movieclips, but in flex!! The process is made easy with “FlexComponentKit for FlashCS3″ and “Flex Skin Design Extension for Flash”. The process is quite straight forward as one has to create a flash button compoent using a default template from “Flex Skin Design Extension for Flash” and publish the SWC. Just import the SWC in FlexBuilder as “Art Work” and thats it. For a global level of change in all the buttons no other step is required. Well, if each button is having different look(as in mycase),one has to make differnt SWCs from Flash.Import as artwork to Flex. Now create a Custom component with the same name as the Flash symbol name. And use that component instead of the standard component.
The article at Seando-flex is a nice read and covers everything one needs for custom component creation in Flash for Flex.

This is another nice read .

Happy Flashing ;)

Joined a new Job

November 3, 2008

I have joined waterford(http://www.waterford.org/) as a flash programmer. It was a good first day. While the office is small here in India, compared to other companies, the work environment is looking good. The most important thing for me is the travel time, it has been reduced tremendously. Now the workplace is at a walkable distance. Uff traffics are gone for the timebeing. The flash development team is small enough but doing quality stuff. The current project is games for kids(from KG to 2). So there are a lot of challenges. I mean it. Its on the technical side as well as UI side and designing graphics side too. I have to go through a lot of docs, answer a lot of queries. We will be working on a software where kids learn as well as play and the school/guardians control the lessons/children. There will be sequencing and multi-player games too. These are new to me as I never worked on multiplayer applications. So feeling great to be working on new technologies and on the decision making side.
The first set of questions thrown to me currently is as follows, though several of them seem obvious, I need proper explanation and reference to convince my manager and client. So, if anybody has got any feedback or suggestion, please let me know.

1. Whether to Flash-Remoting or XMLSockets (in terms of speed and multiuser and speed)
2. If remoting, which would be the serverside technology,  JAVA or PHP ? (Which one is faster?)
3. How RED5 solves our purpose?(my suggestion was to use RED5, so looking forward to resons)
4. At initial screen(registration/login), whether a simple dynamic page or a flash page (speed ?, my suggestion is flash)
5. wheter to use AIR or simple serverside pages on browser in the initial screens (my suggestion is AIR)
6. MySql or PostGRE Sql ? (i suggest : mysql but everybody else is at POSTGREs)

The list goes on. But I think these were the most crucial ones.Currently I am reading things to get a doc ready for the purpose.

Note on Fullscreen mode in Flash player 9

October 17, 2008

I was experimenting with fullscreen mode of flash player 9 with actionscript3.0.Well it seems everything works fine but there are 2 key factors to it, which can not be done
1. Entering fullscreen mode is only possible by mouse click event or key press event. (yes, only these 2)
2. Can not input text in text input fields,while in fullscreen mode. With exception to the shortcut in keypad to exit fullscreen mode, all the other Key related actionscript is disabled.

This is a good read on fullscreen mode of Flash player 9.

happy flashing ;)

amfphp and value-object

October 5, 2008

The Value-Object mapping of AMF-PHP has got some strict ahearance, with the folder, the PHP VO classes are put in. It was a good experience for me as I was porting my weborbPHP into AMFPHP and just over look the folder restriction issue in AMFPHP. Ok, the buttom line is all the PHP VO classes must be put inside “service/vo/” folder on the AMFPHP installation.This will result in sending VO objects from PHP to Flash or else on the Flash side one will get only Object not a value object. So the basics are 4 steps are,

1. Add a “RemoteClass” meta tag on Flash VO object
package com.saumya.openmanage.model.vo
{
[RemoteClass(alias="Profile")]
public class UserProfileVO
{
}
}
2. Add “$_explicitType” property on PHP side VO
class Profile{
var $_explicitType=”com.saumya.openmanage.model.vo.UserProfileVO”;
public function __construct(){}
}
3. Register the VO class on the main application class or the program entry point class before you use any value objects

flash.net.registerClassAlias(“com.saumya.openmanage.model.vo.UserProfileVO”, UserProfileVO);
4. Put all the PHP value object classes in a subfolder of “services” folder named “vo” in an AMFPHP installation(“service/vo/”).

happy flashing :)

Adobe Creative Suite 4 is here

September 24, 2008

Hi,

This is again an updation time for all of us. Adobe has released CS4 line of products. For all of us in India, there is a webcast of the CS4 launch event at 11.30 AM our time today.

How ever I feel the same as Aral about the icons and packaging of the products.

critical for deployment of remoting (PHP) projects

September 19, 2008

Well, I was developing one remoting aplication.First I have tried webORBPHP as per client dragged me into it. Everything went on fine. We are in the middle of the development and our deployement server got ready. So we put everything on deployment and suddenly my remoting does not work.It was working on the webORBPHP console but my program doesn ot get the data. Tried everything, posted on forums put it on webORB mailing list. But then could not get any answer to fix the issue. Then tried porting things on AMFPHP, everything did well on local environment. While porting this time also the application did not get any data from server.Everything worked well on AMFPHP console. With the help of Flash-DB board, I tried debugging in Charles.And found the remoting does not return anything.Actually it was not able to change the Header of the returned data.So the culprit?
Its “services-config.xml”. I have modified the “services-config.xml” according to remote server and recompiled my flex application.It run smoothly on remote server.
NOTE to self : Re-compile your applications with the server specific “services-config.xml” for deployment.

AMFPHP and webORBPHP

September 8, 2008

When I begun with remoting for Flex, I found an array of options as opposed to AS2.Where in AS2 I only found AMFPHP to be effective as per my project requirements(since I am a PHP guy), in AS3 I found AMFPHP and webORBPHP both good enough. To be true, I am an AMFPHP fellow. But upon client’s terms started with webORB.To my surprise, thats also as good. Well, if we consider the remoting to happen in a variety of backends like dotNET, PHP or JAVA, webORB is the best option as it ports everything and all the interfaces look and feel the same.So thats a big plus. If you want your project backend to move from PHP to dotNET or the reverse, as in my case happened, the only headache is the back-end program. But then its quite a lot in terms of its waight. I mean it takes a lot of space, agreed that it has got a lot of features,but still !!
If we consider only PHP, I still will go with AMFPHP. It has got all the same kind of funtionality as webORBPHP but very light weight. Only thing webORBPHP has now is code generation. Which AMFPHP says ‘TO be done’. For me code generation actually does not help me as I am writing down my own classes except in the beginning while learning the webORB the generated codes help me understanding the framework. Again there is no code generation of “MATE”, only PureMVC and Cairngorm.
As per me, if you donot want to port your remoting into a lot of different things other than PHP, AMFPHP is the way to go. For all other things webORB is good.
I still have to have a look at JAVA remoting some day with Flex Data Service, granite data services etc.Tehre are a lot of things going on JAVA side. Need some more time per day, ohh GOD !!

MATE with experience :)

September 5, 2008

As promised, I am penning down my experince till now with MATE framework.
To begin with its an awesome framework. It really is, I mean it. The documentation of the framework is as good as the framework itself.The most and vital thing about MATE is, it completely separates the VIEW from CONTROLLER.Loosely coupled means loosely coupled :) . Everything starts with an event.
Personally till now while creating my own frameworks or while working with a custom framework of any company I have always seen this as the first lines in the VIEW

function onApplicationInit():void{
this.controller=new ApplicationController(this);
}

This is just to initialise the controller. Then CONTROLLER takes charge of everything and controlls the VIEW.But the problem with this is my view and controller are tightly coupled. I have to write the same initialisation code on all my views just to initialise its controller !!
Well on MATE, its the EVENT ecosystem. Upon VIEW creation on Flex, Flex has a sweet ‘creationComplete’ event dispatched. Now, we can directly bind this event to any eventhadler or make a custom event at this point and dispatch it. Now MATE’s event Map can bind this event to any event handler on any class. So what I will get is VIEW dispatches one event and MATE gives this event to my CONTROLLER and CONTROLLER then handles the situation. VIEW does not know really from where it is being controlled :) sweet as very sweet.

How MATE works? Its a three step process.
1. Create a view (dispatch EVENT for every thing you need to controll)
2. Create an EventMap (maps each EVENT to an EVENTHANDLER)
3. Create a controller (Which handles the EVENT)

Thats it?!! YEAH, thats it. Cool, is not it?

Frame works for web application development

September 2, 2008

This is such a long time, since my last post. Actually things were pretty mess at my side. Now its getting better. Without taking much of the time talking about myself, I am jumping directly into the technical stuff I gathered during this time.
Basically I will talk about some PHP and Flash/Flex frameworks. And then a little about the Flash remoting options I  got into. During last month I was going through a whole lot of reading and analysis of the Flex, Flash and PHP frameworks . The ones I went through are as follows

PHP Frameworks
1. Symphony (http://www.symfony-project.org/)
2. Zend (http://framework.zend.com/)
3. CakePHP (http://cakephp.org/)

Flash Framework
1. Gaia (http://www.gaiaflashframework.com/)

Flex Frameworks
1. Cairngorm (http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm)
2. PureMVC (http://puremvc.org/)
3. Mate (http://mate.asfusion.com/)

Considering myself a beginner on web-frameworks as I am going to develop something for the first time in a well known framework rather than my own application specific frameworks. I found quality experience just by learning the specs of each framework and then diving into coding gave me a little more experience in the frameworks. Then went on for some hands on into them searching for the most easy to learn, flexible and ready to deliver framework.
Beginning with Flash, I never found a framework other than Gaia.Though, this is the only framework I found, but I am more than impressed with the performance of it. As it says itself to make a full website in less than 10 minutes, I found its true to its words.I have studied it for an hour though, just to get some background of it. But yes, if you are a pure flash guy you are going to love this. I fell in love in the first go. Created one website in just 10 minutes as promised by GAIA. I love it. :) . Simple to learn, flexible to work with and clean project management. I would say a must have for Flash.
On Flex side, there are lots of frameworks, some are a little older than the others but almost all of them are pre-mature, though one can develop a full application with any of the frameworks and I have seen a lot of good example projects with each of the framework, but they all are maturing each day. While Cairngorm and PureMVC both seemed powerful, I found the new release of PureMVC with single and multicore to be more flexible and has got more to deliver. The problem with PureMVC is lack of good supported documentation. The learning curve for both of these are kind of equally tough. Then I tried ‘Mate’. Its overwhelming and cool. At first I was a little reluctant regarding the framework but as I started reading it and diving into it, I liked it. It took me just 1 and half day (probably I took more time), to get productive in the framework. But then its productive starting from day 2. I am impressed and going to have it for my next project.
On the server side, I am going to use PHP. I got similar kind of experience in PHP frameworks as Flex. Both ‘Symphony’ and ‘Zend’ framework impressed me with their features, but disappointed me on the learning curve side. Starting with ‘CakePHP’, it took me 1 day to get myself comfortable in the framework, the 2nd day was the code incorporation and going through the docs. And from the 3rd day I am productive on the framework. CakePHP, is simply a cake to bake. Its flexible, powerful, simple and awesome.
Now, though the following are not frameworks, but kind of. I am talking about remoting. I went through AMFPHP and WebORB PHP. Both took me some time to get comfortable with. But once done its pretty easy. If we compare, both are kind of gives the same kind of result. I liked AMFPHP though, because of its tininess. Yes, AMFPHP installation package is much smaller than webORB PHP. But then webORB has code generation feature, which AMFPHP is considering to provide in next version, may be. Here the choice of mine would be either of the two. Then the idea of porting to different server environments came to mind. So finally decided upon WebORB as it has ported itself to JAVA and dotNET. I have tried the dotNET version of webORB and its kind of same as PHP, only the classes would be dotNET assemblies.
So my next development environment contains
CakePHP+webORB PHP+Mate

I hope to put the updates and experiences regarding the frameworks as I continue to develop in them.

I am back :)

cheers

Configuring webORB on IIS7(VISTA)

July 9, 2008

I was struggling with IIS7 on Vista to configure it to run the dotNET applications so as to configure webORB for dotNET.
Actually its 2 steps.First one has to install the dotNET Framework on IIS
C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\aspnet_regiis -i (ref : http://mentaljetsam.wordpress.com/2007/03/31/running-aspnet-20-applications-using-vista-iis-7/)
The second step is to configure the webORB application
appcmd migrate config “Default Web Site/weborb30″ (ref : http://www.themidnightcoders.com/weborb/dotnet/vistainstall.shtm)
Thats it.With it I am already ready with my webORB homepage.Though I have not tested any other settings yet. Since configuring IIS to run ASPX had taken some time for me, I was being tempted to put the procedure down here.
Hope it helps somebody.

Zemanta Pixie