Archive for the ‘design patterns’ Category

Composition vs Inheritance

Wednesday, November 21st, 2007

I have been reading a lot these days about composition and inheritance. Inheritance is a pretty easy concept to grasp; composition on the other side is a bit more complicated. I have read quite a bit and I found much more advocates of composition than of inheritance. At least, with all this reading, i finally understood what interfaces were used for. I started looking on the subject because I had 2 problems, my first one in ActionScript 2 where I had 4 symbols all using the same base class. This worked good until I had to import that swf into another swf. Than it was as if Flash was using an older version of my swf. My second problem in ActionScript 3, I was working on a button class using 2 symbol on the stage. All these button were to use the same code so I wanted to extend another class; no can’t do because it cannot find definition for the symbols on stage in the superclass… Well I think I am going to use composition for the latest problem, but I haven’t found a solution for the first one…

Some Flex again

Tuesday, October 23rd, 2007

Yesterday I got my hands dirty with Flex and I found out that I would need much work to do what I wanted. I guess my first application will be buggy. Well I actually did a store-locator in Flex for the website vichy.ca. I programmed mostly not knowing what I was doing but the result is ok, not great but ok.

What I can’t get in my head is where to put the ActionScript and how multiple views can update global variables. What I want to do is a five step process and each step build a piece of a xml that describe a picture. I want to be able to move picture and rescale them also. Well, I bought the book, I guess I’ll have to wait until then.

Also today I watched this presentation about what framework to use with the Flex framework (you read correctly) that I came across reading this blog. It’s pretty interesting, a lot is said about design patterns. They bash a lot on cairngorm which I had started reading about but just couldn’t figure what it was about. I guess I shouldn’t have dropped that design pattern class in favor to an Astro-biology class.

Just in time papervision3D example

Thursday, October 11th, 2007

Yesterday I spoke about Papervision3D; well today’s FWA is a site made using Papervision3D and it’s quite amazing. I also found a blog post from the company explaining the process they went trough.  Ah yeah, by the way the website is this one, Sony Bravia. Also I have found a tutorial giving you the big steps to make good models for papervision3D. I’ll be sure to read it.

I also read a lot about design patterns today, and I really ask myself if it really applies to Flash and simple interfaces, because implementing a MVC (Model-View-Controller) pattern for each and every button seems a bit too much. I’m trying to keep an open mind, but sometimes object-oriented programming seems cool in theory but far from practice… Maybe if I keep on reading…


Close
E-mail It