Austin Kottke's Code Site

Thoughts about Architecture – Java, C/C++, JS, Objective-C, Swift, Groovy, Grails, (RIP Flash)
Archive for the ‘flex’ Category

For some reason, companies like Microsoft, Google do not seriously believe javascript is a great programming language. I have constantly been working in javascript and see the pros and cons. I see that because of it’s amazingly dynamic nature you can do almost anything. However, because of this dynamic nature it makes it prone to errors almost immediately. Most recently Microsoft unveiled it’s new language called Typescript, which converts an object oriented scripting language with Interfaces, Classes, constructors into javascript. Now look at Google Dart which by the way is in full swing and it does nearly the same thing except with an actual VM. Some people thought it died, but they are working on a milestone 1 release. So the big question is, which one is going to DIE first??? Or is Apple going to come up with their own intermediary language and pose another type of intermediary language that converts to JS. Ahh, I miss the days of Flash being King. Where you had one tool to do amazing stuff and never needed to worry about browser dependencies. I was knee deep into an HTML5/CSS3 book about 8 months ago and the opening introduction said “We need to infer to our clients that the project will not look the same on multiple browsers.” Wow, seriously? It’s because of this problem and competing vendors that we have this issue. Why cant vendors just work together one on project and support it? There is very little money in open source tools. Wouldn’t it be nice…

I would like to get feedback from developers from using Adobe’s Mobile Development toolset, particularly in flex sdk 4.5. Can some developers provide some pros and cons in using it? Speed of performance, android phones, tablets. Also, Ive tried some apps on an Iphone 3GS and found them really slow. How is the speed now? What can and cant be done? Please follow and like us:0

So, Im always digging into new frameworks and trying to understand the philosophies behind why developers chose to make new frameworks to help others. After falling in love with the new [Inject] metatag and thinking it’s the coolest thing since Java has been doing this for years anyway with Annotations, I thought this framework must be rad =) So after hours of looking at the documentation, the one thing I found out and is the bane of all robot legs development is CLASS NAMING. Lord have mercy, there is a base class called “Actor” – THATS THE NAME OF THE CLASS. Ok, so after reading GoF and all these development books over the years the one thing that java/flex/flash developers have a huge problem is is correctly conveying the names of classes. Conceptually representing something. With that said “ACTOR” is the worst name for a class ever – I mean, it communicates absolutely nothing! The concept is so ambiguous and it hurts just thinking about it. And it’s used EVERYWHERE. PureMVC atleast names the classes by common design patterns so it’s clear to everyone using it if you’ve studied these patterns. Lord have mercy – can we just get a pure mvc framework with an [Inject] meta tag? Ill be happy then =) Please follow and like us:0

So, the new flash player is out. And the one thing Im thinking is – AWESOME. So, I’ve been looking at the API docs and the program code and all that looks hot. Stencil Buffer, Depth Buffer, Vertex Buffer – they basically made it almost identical to NVidia’s C++ CG, CGFX. However I did not see profiles, but Im sure this is going to be a smart solution done. So the wheels are turning and Im only thinking to myself, If Adobe, NVidia, and Microsoft can get together to develop some kind of HLSL (High Level Shader Language) that all three can use – a simple wrapper – MAN we’re going to be in heaven as 3d developers. Then, the shaders for say your favorite PC game can be loaded directly into a flash game, and the same shaders can apply to the model. Because you’ll be using a PC for all types of development. The only issue this poses is when you export to mobile – a lot of the same shaders will have to be dummied down – so adobe will need to come up with some kind of profile mechanism – similar to how CGFX does it where it loads back up shaders if the hardware cannot support the shader. Are you excited about this? I think this is going to kick ass!!! Please follow and like us:0

For the last few years I’ve been developing in flex. One of the very nice features is RSLs to save on file space, but no matter how much optimization work you end up with a huge SWF right? Which is why developers end up using flash for web development. How many times have you wanted to use the RPC components but ended up scrapping them because they bloat your SWFs? I’ve had to resort to custom AS3 soap libraries, or even have had to hack an existing AS3 web service implementation because it wasn’t compatible with ALL SOAP specs, as in each server has little nuances which can potentially break an AS3 implementation. The joys =) Ive been doing a lot of flash dev recently, and one option which I think a lot of flash developers miss over is the fact that they compile assets within assets that are shared across multiple SWF files. E.g. you have the Pure MVC framework or cairngorm classes compiled into 5 swfs, when really, all you need to load in a single shell SWF and all future SWF files can reference the classes normally WITHOUT compiling in the entire framework. So how do you do this? How do you make your other SWFs not compile the entire framework such as ui components and buttons and flash? Well, instead of doing all the runtime instantiation and non strong typing – you know like var myClass:* – which is prone to errors, use mxmlc -load-externs. So the steps are as follows:…

I come from a myriad of development backgrounds, actually started doing C/8086 assembly back in the day. Went into playstation development, and then moved onto flash, qt c++, win 32, java, and ajax. I developed heavily in java for the last few years and stumbled upon rails – couldn’t stand the syntax although I loved the power and the scaffolding. I then discovered grails and man this is like a new world. The power of ruby on rails but in a java-like syntax. The key problems I see in web development are: 1. Properly planning the development project2. Allocating enough time to do the project without shortcutting it3. Implementing the project in the time allotted4. Getting management to work with the clients to properly allocate enough time/money to spend on the lifecycle without shortcutting the features I think projects that are heavily ajax/html or flex projects can be GREATLY simplified by using grails as it writes a lot of the code for you and can really make some of the back-end development which we never want to do a breeze and very integrated. The problem with writing entity beans in java is that the annotations and amount of code written pales in comparison to a grails entity bean and how simple it is to add validation, etc. I plan to do some more examples as I get more and more familiar with the grails code base. Check it out: Please follow and like us:0

January 31st, 2010

runtime mxml

1 Comment, as2, as3, flex, by austin.

Ok guys, for one I have to give kudos to flash builder 4 – I think it rocks! But the one thing which I think would just be the cream of the crop is runtime mxml! I actually ported 60% of the functionality of the flex ui component framework to as2 and now im considering doing an as3 version. I mean, I think that it would so useful to have runtime mxml, maybe no logic, but just the layout code, that’s all. Does anyone concur? Please follow and like us:0

I tell you it’s been a while since I last posted, but one thing that I have been spending a lot of time is looking at web frameworks. I looked at wicket, web macro, jsp, velocity, and I have to say that the most awesome framework I can see is stripes. I was first reading a book on hibernate – harnessing hibernate and in the end of the chapter it mentions about Stripes. One of the things I can’t stand is the auto-wiring of Java bean objects and a web form. It’s not a big deal with flex because you have amf, but in a web site it’s a pain. So take stripes, I just take an entity bean and I can specify the bean on the page and stripes will auto-validate, and send errors if a field is not required. It’s pretty nice. See below: */ @ValidateNestedProperties({ @Validate(field=”firstName”, required=true, minlength=3, maxlength=50), @Validate(field=”lastName”, required=true, minlength=5, maxlength=50), @Validate(field=”email”, required=true, minlength=5, converter=EmailTypeConverter.class ), @Validate(field=”userName”, required=true, minlength=5 ), @Validate(field=”password”, required=true, minlength=8 ) }) @Validate(encrypted=true) public UserVO getUser() { return this.beanContext.getUser(); } Using annotations the validation occurs and its just a simple matter of inserting a field and binding directly: Doing this will automatically validate the field in java. Cool huh? Well that’s one of the major things I like about it. Besides flex, it’s pretty smoothe. I like wicket, but for some reason I just cant get over writing all my UI logic in java…. I feel like im doing swing again! Anyway, check out stripes – its…

January 11th, 2009

2009 – Actionscript 4?

8 Comments, actionscript, as2, flex, by austin.

Is there any kind of official word on whether there is going to be an actionscript 4? Im curious, as i develop mainly in as2.0 and some 3, but the jumps are huge. Is there just going to be actionscript 3 and small modifications to it as the player comes out? Please follow and like us:0

Is it me, or did Colin Moock’s post stir up some feelings I have about flash 9 cs3? I’ve used flash 8 for years and haven’t had a single problem with it except for the slow compile times. Now, adobe comes out with the new flash 9 cs3. Not only do they take out the data services, they add in this really odd way of generating classes and re-work the entire way the objects are created on the stage. This makes the workflow not as simple and generally re-works the flow. So, my question on flash 9 cs3 is, why? 1. Why take out the data services? So we all move to flex? I do flex projects, don’t get me wrong. I think flex is great for what it is. But the problem is in flash there is SOOO much more freedom because of assets and the timeline and animation and designs are so much easier to create. 2. Why make it more complex? Why make every object it’s own class? What if we have a whole series of nested objects and don’t want to make every nested symbol a property in a file? Why not just simply let it be by itself… Keep it simple. The amount of times I’ve opened a project and not been able to compile it because of the “Automatically declare stage instances.” really gets on my nerves. Error messages — Man – some of these just don’t make sense. They are verbose and unclear. In flash 8 it was…