Posts Tagged templates
Copy those file in this folder for MAC users
(Your User Name) > Library > Application Support > FDT > projectTemplates > Web
and in this folder fo PC users
After that all you have to do is create a new Flash project in FDT and you should see Robotlegs project under web.
All you have to do is specify the package name by entering the client name and the project name and there you go, you have a fully functional Robotlegs project. I did the client+project package name thing because if you work for an agency you could do multiple projects for the same client so I think it is better for code organisation.
This template includes:
- a SiteMain file which is the file that you will compile
- a SiteContext
- an ApplicationModel
- a CreateMediatorCommand
- a StartupCommand
- a SiteEvent class
- and a SampleView and SampleMediator
You could remove the SampleView and the SampleMediator but I felt it made the project more complete and a really good Robotlegs example.
If you have suggestions on how to make this template better or just comments, leave them down here.
I just finished my first project using Robotlegs and I can say I really like it. Way less code to write. The only thing that bothers me is that you have to create new Events when you want to pass around complex data but I think AS3Signals might fix that so I will look into that later on.
Since I have all my templates for PureMVC done in FlashDevelop, I thought I would do the same for Robotlegs. So I have built a template for a Command, a Context, a Mediator, an Actor and I also put in a ResizeModel (I know some people do this in a mediator but if you want to change this go ahead). Now, I don’t think these will be perfect, but it is a good starting point.
I am also working on a AS3 Project – Robotlegs template, but I want to try it out before I give it out. When I am pleased with it, I’ll post it along with an update of the other templates.
Here is the files with the templates:
To add them in FlashDevelop, in the Tools menu click in Application Files. This will open the folder where the applications files for FlashDevelop are. In there open the Templates folder, then the ProjectFiles folder, then the AS3Project folder. Now copy the Robotlegs folder you downloaded there. To use them, in the project view in FlashDevelop, right click on a folder, click “Add” and then Robotlegs. At that point you will see the five templates you just added.
- compile errors while editing
- ant support
But it has two major problems, first it is built on Eclipse which makes it much more complicated than it should be. Secondly it is very expensive (well I had more problems with it than just that, but these are the game changers). I don’t even understand why it cost so much… It even cost more than Flash Builder. Anyway that seems weird to me, but maybe it’s just me. Anyway in comparison to FlashDevelop which is free, it doesn’t stand a chance.
While venturing in the FDT world we came across templates, snippets and short keys. Those are very useful things when you use them. Templates are also time savers when you are using PureMVC because when you want to create a Mediator, all you have to provide it is the mediator name, and it’s view name and type and it will generate the rest; no more copy paste from other mediator. Also project template are very cool. Snippets are mini templates, for example to generate getters and setters. Short cuts are combination of keys you press to do an action instead of going trough a menu to do the same action. Well, it just happens that FlashDevelop has all those things, but I just wasn’t using them… So out of all this I came out with increased efficiency.
FDT might still be a very good tool, mostly if you are already familiar with Eclipse, but for me FlashDevelop is still the way to go. If FlashDevelop gets a Debugger than I won’t even ask myself the question.