Page 6 of 6

Re: Programming Terms

Posted: Tue Jun 08, 2010 5:46 am
by Ginto8
XianForce wrote:
ismetteren wrote:
Ginto8 wrote: *encapsulation: making everything private and only accessible through functions.
[/list]
Nice list, i think this one is wrong though. I dont really know how to describe what it really is, since im not good at descriping stuff and english isent my main language, but to "encapsulate what varries" is a OOP design principle, where you put stuff that you are going to change in a different class(the strategy design patternhttp://en.wikipedia.org/wiki/Strategy_pattern, so you dont have to change that class later, but can instead just write another class, and use it instead, so that you can follow the open/closed principle.

But maybe encapsulation has a more general meaning too..
Yeah, I'm pretty sure what Ginto posted is sort of a means of implementation of encapsulation.

Encapsulation is like hiding data away to make things simpler.
Okay I changed it. How do you like this?
*encapsulation: Hiding class data so that the class can control all access to it.

Re: Programming Terms

Posted: Sun Aug 15, 2010 4:33 pm
by wearymemory
Ginto8 wrote: Okay I changed it. How do you like this?
*encapsulation: Hiding class data so that the class can control all access to it.
Perhaps your definition would be more meaningful (and lengthy :| ) if you explained it in more depth, and provided an explanation as to why it is a factor in determining a well-designed API from a poorly designed one. I would define encapsulation as:
Encapsulation or Information Hiding wrote: The fundamental design-concept of a module that hides its internal data and other implementation details from other modules, so that modules communicate only through their APIs and are unaware of each others' nuts and bolts, is known as encapsulation or information hiding.

While the separation of a module's API from its implementation does not necessarily result in better performance, it speeds up maintenance, development, and testing, and it facilitates optimizing, invariants, and software reuse.

The general principle is to make each module, its instance data and implementation, as inaccessible as possible. Exceptions can be made for static, constant variables that are immutable*, or if the module will not be a user-accessible part of the public API, then there is nothing wrong with making its instance data public.

*Note: arrays are not immutable, and should be defensively copied before being accessed if at all possible

Re: Programming Terms

Posted: Sun Aug 15, 2010 9:03 pm
by Ginto8
wearymemory wrote:
Ginto8 wrote: Okay I changed it. How do you like this?
*encapsulation: Hiding class data so that the class can control all access to it.
Perhaps your definition would be more meaningful (and lengthy :| ) if you explained it in more depth, and provided an explanation as to why it is a factor in determining a well-designed API from a poorly designed one. I would define encapsulation as:
Encapsulation or Information Hiding wrote: The fundamental design-concept of a module that hides its internal data and other implementation details from other modules, so that modules communicate only through their APIs and are unaware of each others' nuts and bolts, is known as encapsulation or information hiding.

While the separation of a module's API from its implementation does not necessarily result in better performance, it speeds up maintenance, development, and testing, and it facilitates optimizing, invariants, and software reuse.

The general principle is to make each module, its instance data and implementation, as inaccessible as possible. Exceptions can be made for static and constant variables that are immutable*, or if the module will not be a user-accessible part of the public API, then there is nothing wrong with making its instance data public.

*Note: arrays are not immutable, and should be defensively copied before being accessed if at all possible
these are supposed to be general definitions, not in-depth explanations. Go to google if you actually want to fully understand it all :roll:

Re: Programming Terms

Posted: Sun Aug 15, 2010 10:37 pm
by dandymcgee
Weary must be real bored tonight, he's been digging topics left and right. :roll:

Re: Programming Terms

Posted: Mon Aug 16, 2010 4:36 pm
by MrDeathNote
dandymcgee wrote:Weary must be real bored tonight, he's been digging topics left and right. :roll:
You know i was just thinking something along those same lines lol.

EDIT: Chaos Rift Maniac - Woot!!!

Re: Programming Terms

Posted: Mon Aug 16, 2010 4:44 pm
by XianForce
MrDeathNote wrote:
dandymcgee wrote:Weary must be real bored tonight, he's been digging topics left and right. :roll:
You know i was just thinking something along those same lines lol.

EDIT: Chaos Rift Maniac - Woot!!!
Congratulations :D

Re: Programming Terms

Posted: Wed Oct 13, 2010 1:00 am
by Khearts
Uhh:

Singleton ??
Heap ??
"Foo" ??

Re: Programming Terms

Posted: Wed Oct 13, 2010 7:48 am
by Ginto8
Khearts wrote:Uhh:

Singleton ??
Heap ??
"Foo" ??
Singleton: A method of restricting a class so that it can only have 1 instance at a time
Heap: a more loosely-structured version of the stack, used for dynamic memory allocation
foo: just a standard generic name for a function (or sometimes a variable). Don't ask me where it comes from, idk

Re: Programming Terms

Posted: Wed Oct 13, 2010 5:18 pm
by Khearts
I feelz morz edukated! Thkz!!

Re: Programming Terms

Posted: Fri Jun 01, 2012 9:13 pm
by ladygaga627
Just want to say you are great...like this topic so much...learning more ine here.
________________
Like shopping when i have a good time.
Rs Gold|Diablo 3 Items|Wedding casino To Celebrate Your Love story|Runescape Gold|D3 Items