CakePHP with AMFPHP and Flex Update
So first off I finally found, cleaned up, and posted the source code to the little demo/tutorial on CakePHP and AMFPHP I posted a while ago here. I didn't write the most comprehensive tutorial, I highlighted on some key points. However, getting CakePHP to work with Flex is quite easy.
Also note that since this tutorial which used CakePHP 1.1 and AMF0 (I believe you can still switch that out for AMF3) there has been some new things going on. First off, there's AMFEXT which is much much faster than AMFPHP because it's a server extension. It also makes things easier for you as far as programming is concerned. There's a CakeAMF project that implements AMFEXT in CakePHP. I have yet to try this, but am very eager. The only downside I should note is that you have to install the server extension, so that pretty much cuts most shared hosting sites out.
Then there's SWX, which is a native data format for Flash. So that of course has been implemented in CakePHP as CakeSWXPHP which can be read about on the CakePHP Bakery. I personally didn't have much success with that at a first quick try, but it's also apparently very easy to use and setup. It also appears to be less code work involved than AMFPHP. I am unsure about the speed though. Here's a little tutorial about using flash remoting with SWX and CakePHP to make a Flash blog written by wouter.
So there's a few options for flash remoting and CakePHP. Now, I'm going to say the same thing I always tell people. Be CAREFUL how, when, and where you use Flash. You probably should not make a blog done completely in Flash if you write a lot and want it to be picked up by search engines. First off, it takes longer to load...but that aside, you're really missing out on what blogs are so great for - getting traffic. Search engines love text and hence crawl and list blogs a lot. So if they can't see the text in your Flash blog...you're in trouble.
I'm of course working on a media blog that will utilize both HTML/CSS and Flash to get the job done. Making it not only load more efficient, but also reach that maybe 10% market that doesn't have Flash and also be better optimized for search engines. More on that later, or go back and read some of my blog posts. I'm kinda at a point where I need to clean up some things to move forward with it - but the major functionality is done with that. You can also see Minerva blog in action...and kinda unrelated to this post - it doesn't use flash remoting, it uses RSS feeds...because I felt they were more universal and can be used for not just the galleries but also syndication. Aside from, perhaps, the most important reason: there's no writing back to the database using Flash with my blog. See how planning goes a long way?
Syntax Highlighter Plugin
I stumbled upon a really cool plugin for WordPress that I think deserves a special notation. I found it listed on wordpress.org along with many other plugins to highlight code, but I found this one very easy to install and use. We'll see how it works for various languages, but it looks great. It doesn't seem to have basic HTML language support (perhaps I can write an xml definition file for that), but it does have support for ActionScript (2 not 3, but that should be ok), JavaScript, PHP, and Perl which I'll probably never use.
The other nice thing is it will allow you to copy and paste code. Expect more code snippets from me (which I've been meaning to get to). You can download the plugin yourself by visiting the Flash Text Formatter web site.
Fisix and APE … physics engines for AS3
So I'm going to try and post to my blog more often. I research non-stop and really need to write down a lot of it for my own reference now moreso than ever. However, don't forget that I also put interesting sites into my custom Google search engine for design.
So what did I find this time? Fisix and APE. Two physics engines for ActionScript3 / Flash 9. Wonderful libraries that make the tasks of gravity, bounce, velocity, collision, springs, and more very easy! Essentially you can just stick in a nice easy line of code and voila you have a ball/wheel that can bounce around and interact with things in your "world." Same goes for creating lines/planes/vectors/etc. that can have different properties applied to them to modify such objects.
All in all my taste of physics engines in AS3 ranged from easy to advanced...there is quite a bit of math involved when you get down to it and it really started bringing back memories of my high school physics class and all the spring formulas, etc.
So what can you do with a physics engine? Well, you probably will want to be making animations, simulations, or games with it. I suppose you could have an informative web site that has windows that bounce around with info in them, or perhaps a slick navigation, but that's probably a seldom thing.
The Fisix Engine is available for use in Flex projects and APE (Actionscript Physics Engine) is available for use in Flex and Flash CS3 projects.
The Power of Actionscript 3
Well obviously my previous post is related here...in that Flex really is Actionscript3 (when it gets compiled). However, some people have seen page turning examples in Flash8. There's also even been some 3D (Sandy) and that's been carried over to AS3/Flash CS3/Flex as well.
I wanted to clarify though that the manner in which things are done is different and much faster than AS2. I'm by no means an Actionscript expert. I write PHP applications and work with HTML/CSS. I'm a graphic designer by nature and photographer. However, I'm also a researcher.
So what is the power of Flex and Actionscript 3? SPEED. As well as some new features brought to us by Actionscript 3 (new features of course that are available to us in Flex and in Flash CS3). However I like Flex over Flash CS3 since I'm already comfortable with XML and the Eclipse IDE, I find myself being able to move through Flex very quickly.
What are these new features in AS3? One main excitement that I'm running into is the socket connections. AS2 allowed this for XML but now we can connect and read/send data in many new formats including binary. So this makes possible connections to SMTP/POP and other such things. Ok, build on that one step further with Adobe's Apollo and you can create e-mail and instant messenger applications to run on your desktop. Remember the power of speed. These applications can be developed very quickly! Here's another example of what the socket connection can be used for ... joystick control in Flash.
I don't think Flex, AS3, or Flash CS3 have caught on yet...and I'm not really sure Flash CS3 is going to propel the Flash users further and engage them as much as Flex would. The reason being is because Flash CS3 still behaves like Flash 8 and there's not much to entice someone to take advantage of AS3. It's been designed to be seamless and there's already Flash multi-user servers and multi-player games for Flash 8 that most people don't take advantage of as is...so why start with Flash 9? For most Flash designers I highly doubt life will change much. Aside from the Mac users getting a nice dock feature (much to Ryan's enjoyment). Also don't forget the "native" Photoshop document support.
I haven't really even scratched the surface of AS3 and it's power. All I talked about was the socket connections and the fact that it's faster to develop and faster to run on computers. LOL, ok that's big, but it's not the entire picture. There's a lot more out there. I think a lot more than most people know. There's barely any books out yet (and the ones out right now don't cover some of the more advanced features). The more blogs I read the more I find out. Information is quite scattered at this phase because everything is so new. I know the power behind AS3 (previously not a Flash/AS fan) and I truly do believe it will change the web as we know it. However, I still wish there was more SEO involved with Flash.
The Power of Adobe Flex
All I can say is WOW. Adobe Flex is simply amazing. It's converted me from a Flash hater to a Flash lover. I still am a stickler for SEO so I have my reservations, but the ideas flowing through my head now are endless...ok they usually are endless, but I mean the ideas for using Flex and all the new possibilities with projects.
I came across an example for a book. Sure, we've all seen variations of book page turning in Flash. However, Flex does it right and Ely Greenfield's Flex Book work is shining proof of what everyone has been wishing Flash could do. His examples are beautiful, especially the one with transparency effect for the medical anatomy overlay book. It's also nice to note that he's also used Apollo to create a desktop application for this. I think quite a few encyclopedias and medical companies will be knocking on his door. Of course Ely has been extremely gracious enough to publish his source code so he's put everyone at a level playing field. Ahh, the joys of open source. Well, of course he's always going to have a better knowledge than anyone and can always create something even better.
Anyway, I'm definitely a big supporter of Flex now and of Ely's work here for one, but there are many other developers out there (ok, Google groups' count is only a couple hundred, but it's getting there, yea...sorta kinda). Another great link to share would be Flex Box, which contains over a hundred (currently) Flex components, most with source code or some sort of explaination. This is a Flex showcase site as well as a place to learn. Again, thank you open source and people who like to share. When I create something as cool, I'll share. However, mainly I combine technologies and web scripting languages all over the place...I'm not an inventor really. "Visionary" ha, I like that one. "Graphic Designer" ha, I almost forgot that one with all this code. Well, enjoy.