Currently Browsing: Object Oriented Programming

Simple Object Pooling in Flash

Been loving 360 Flex this year! Tyler and I finally finished our presentation, and so I had some time to write a post I've been meaning to. One of the issues one comes across in building performant applications in Flash is object creation and garbage collection. Object pooling helps overcome this. Object pooling is keeping old objects around and reusing them instead of throwing them away and always creating new fresh objects. Creating objects in Flash isn't bad. It's when you create hundreds or thousands of throw-away objects very quickly that this becomes a problem. Used Pooling in Observe For...read more
Page 1 of 3123

ooCommerce Help

We are calling for developers who would like to join in on a fun object oriented PHP 5 ecommerce project entitle ooCommerce. Please email me or leave a comment if you would like to be a developer on this project or help in any way. The project is hosted at SourceForge and currently only has downloads for the template system it will be using, Arras Template. Arras Template has a website at www.arrastemplate.org. We (actually just myself right now) hope for this to be a good learning experience for others and are blogging about our design decisions how we are putting it together along the way....read more
Page 1 of 3123

ooCommerce – A Deeper Look, More Decisions

We've broken down our system down into some general parts already. Now it's time to make some decisions on more specific pieces of ooCommerce and break the system down into some main objects. What's in our Model Well, first off, we know we need a database to store all of our store's data. We'll put off the database schema for now. But what we do need to decide is what database to use. And if we want to support several databases (which we do), what should we do to abstract the databases so that we use the same API no matter which database we use. There are a few object-oriented options out there....read more
Page 1 of 3123

ooCommerce – The Overall Picture

So, we're going to build ooCommerce, an ecommerce solution, an open source one. What pieces are involved? What are the major components of the system? Let's get this organized using a top down approach. Every ecommerce system has a few major parts in common. One is the catalog. This is where we can browse and search for the products. Then, we have the shopping cart. This is where we put the products when we want to buy them. We have our checkout, which is the process where we can purchase what is in our shopping cart. And lastly, many systems including ours will have a customer account...read more
Page 1 of 3123

Tutorial? How About a Project!

In writing the articles on object oriented programming I have stuck with theory. After all, it is not language specific and takes less space to say what there is to say. However, I have been asked by serveral to provide a tutorial or include examples on object oriented code. Well, I've decided to do something more. My good friend Andrew Branch has pointed out many times before that we learn better when we do things ourselves. And so, in that spirit, we will start a new full-fledged project together. I will write along as we develope it about how we should try to do things, so we can more...read more
Page 1 of 3123

PHP Package Management and Autoloading

In PHP 5 and greater there is a magic function called __autoload (note: two underscores). __autoload allows us to load a class on the fly so to speak. It only gets called when a class can not be found, then it has a chance to load the class. If the class still can not be found, you get your regular error stating so. __autoload can be really useful if all of your classes happen to be in one directory, but what happens if you are managing a large project with many packages of classes? We will look at some different options. Single Directory of Classes This is the simplest solution, and the best...read more
Page 1 of 3123