Oop Pattern

Guidance on How to Design Programs Written in C?
I have always developed programs using an object oriented language (C++, python, java, etc) and now come to a project which I need to write in C. I have always been really successful at designing software for oop implementation using several design patterns, etc but with C everything is different since there are no objects. Do any of you know of a good guide/tutorial/book for designing large C programs?
Thanks
Why don’t you have objects in C? I switch between various versions of Basic, C, C++, Java, and others. When I learned OOP, it changed how I write programs. Things became more organized.
I have a random access file object. It knows everything it needs to know about reading a file that is compartmentalized into blocks of data. It doesn’t know what is in the blocks, but it will allocate a buffer, go to the right location in the file and read or write a block to or from the buffer. It is really fairly simple as objects go, but it does an important job. I can then build on this object and create random access files with fixed size buffers and perhaps even control the data inside the buffers. The only thing unusual about it is it is written in C. To make it a complete C++ object, I could make it handle the creation and destruction of the buffer automatically. In the actual program it is done manually where it would be more or less hidden in the C++ object.
The point is, all your object oriented design doesn’t have to go out the window. You just have to be a bit more exacting in how you design your objects. Use your OOP experience to create objects that can be built upon by other objects or used directly. Just remember that you have to manually allocate buffers and any other object structures you might need. Pass the objects with pointers as needed. It is a little more work than C++, but it still works.
I wouldn’t worry about a book. What you already know will be more than enough to get you through.
Shadow Wolf
PHP OOP Tutorial 21 | MVC Pattern
|
|
BUTTERICK CABBAGE PATCH KIDS BABY DOLL CLOTHES SEWING PATTERN B5264 (2009 OUT OF PRINT) $16.95 CABBAGE PATCH KIDSĀ® BABY DOLL CLOTHES: Package includes patterns and instructions for outfits to fit 11″ and 14″ doll. Pajamas A: contrast pants and purchased appliques for top. Pajamas B: contrast sleeves and binding. Dress and panties C. Top, pants D, E: contrast collar, bands and appliques. Hat E: contrast lining and brim. Socks F. Now OUT OF PRINT… |
|
|
I Spy Junior (Jewel Case) [OLD VERSION] $1.99 This CD-ROM game is based on the award-winning I Spy book series. The game engages children with clever and colorful scenarios and builds learning skills through riddles, puzzles, and games…. |
|
|
Head First Java, 2nd Edition $20.83 Learning a complex new language is no easy task especially when it s an object-oriented computer programming language like Java. You might think the problem is your brain. It seems to have a mind of its own, a mind that doesn’t always want to take in the dry, technical stuff you’re forced to study. The fact is your brain craves novelty. It’s constantly searching, scanning, waiting for something u… |
|
|
Head First Design Patterns $28.52 You’re not alone. At any given moment, somewhere in the world someone struggles with the same software design problems you have. You know you don’t want to reinvent the wheel (or worse, a flat tire), so you look to Design Patterns–the lessons learned by those who’ve faced the same problems. With Design Patterns, you get to take advantage of the best practices and experience of others, so that you… |
|
|
Design Patterns: Elements of Reusable Object-Oriented Software $35.98 Design Patterns is a modern classic in the literature of object-oriented development, offering timeless and elegant solutions to common problems in software design. It describes patterns for managing object creation, composing objects into larger structures, and coordinating control flow between objects. The book provides numerous examples where using composition rather than inheritance can … |
|
|
CANYON- ‘Alley-Oop’ Headphones- Graffiti,Green/Purple $23.95 Stand out from the crowd with these cool DJ-style headphones! With its bold and colorful graffiti pattern, the Alley-Oop model has a cool design but it also offers high power output, good bass and high quality sound. It features large padded earcups for a maximum comfort, as well as a convenient cable-integrated volume control. The Alley-Oop headphones are available in various graffiti patterns to… |
|
|
Republican Party iPhone Design OOPS!- CLEAR Protective iPhone 4/iPhone 4S Hard Case $19.50 Made for iPhone4 or 4s, Verizon or At&T Phones. Black plastic protective iPhone cover. Image size on back side of cover is 4.5″ x 2.25″. iPhone Hard Case – iPhone 4/iPhone 4S Case…. |
|
|
CANYON- ‘Alley-Oop’ Headphones- Graffiti, Black/Orange $23.95 Stand out from the crowd with these cool DJ-style headphones! With its bold and colorful graffiti pattern, the Alley-Oop model has a cool design but it also offers high power output, good bass and high quality sound. It features large padded earcups for a maximum comfort, as well as a convenient cable-integrated volume control. The Alley-Oop headphones are available in various graffiti patterns to… |
Tags: design, development, oop, oop pattern c, oop pattern design, oop pattern net, oop patterns, oop patterns flash, patterns, programming
This entry was posted on Wednesday, March 9th, 2011 at 11:33 pm and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
