Programming Concepts Glossary

57

By learnprogramming

Recently added: Duck-Typing, Functor, Protected Mode, Flat Memory Model

Coming soon: function prototype, prototype based language, hash value, anonymous method, mutable, immutable, closure, binding, vtable, Currying

Casting

Casts are used to convert the type of an object, expression, function argument, or return value to that of another type.

Some conversions are performed automatically by the compiler (implicit conversions). Other conversions must be explicitly specified by the programmer (explicit conversions).

Certificate

See Digital Signature.

A Certificate contains the public key and the owner's information signed by an authority which is the issuer of the Certificate.

A certificate can be self-signed: the issuer is the same as the owner. This is okay if the receiver already knows and trusts the sender.

Controller

A Controller, in the MVC design pattern, is the link between a User and the System he manipulates. Controller received commands from User and sends messages to views: a view never knows about user input such as keystrokes and mouse operations.

Learn more ...

Default visibility in Java

A variable defined with no access modifier is said to have default visibility. Default visibility means a variable can be seen within the class, and from elsewhere within the same package, but not from sub-classes that are not in the same package.

Delegate

A delegate is like a function pointer in C++ i.e. a reference to a function. Like a pointer it lets some other code call your function (callback function) but unlike a pointer there is no need to know where your function is actually (physically) located.

Digital Signature

You generate a digital signature for a document and send both to the receiver. You also supply the receiver with the public key corresponding to the private key if he doesn't have it already. The receiver uses the public key to verify the authenticity of the signature and the integrity of the document.

A receiver needs to ensure that the public key itself is authentic before reliably using it to check the signature's authenticity. Therefore it is more typical to supply a Certificate containing the public key rather than just the public key itself.

See Certificate.

Duck-Typing

Duck typing is a "natural" feature of programming languages such as Smalltalk, Python, Ruby, JavaScript, and ColdFusion.

Duck-Typing is a principle of dynamic typing so that the language doesn't require type casting.

Encapsulation

Encapsulation allows separation of the interface from the implementation of methods.

The benefit of this is that the details of the code inside a class can be changed without it affecting other objects that use it.

Event Handler

event sink

Flat Memory Model

Under Win32, there's only one memory model: Flat memory model. The memory is a large continuous space of 4 GB. You don't have to play with segment registers: you can use any segment register to address any point in the memory space. This is what makes Win32 assembly programming nearly as easy as C.

Functor

A functor is a function that can be manipulated as an object, or an object representing a single, generic function.

Functors support and encourage a number of powerful programming techniques including programming in a functional style, higher order functions, internal iterators, reuse and specialization through composition rather than inheritance and overloading, generic "callback" or "extension point" APIs, generic "filters" or predicate APIs, many "behavioral" design patterns, such as Visitor, Strategy, Chain of Responsibility, etc.

Java Adapter Class

The adapter classes allow you to use the Listener Interfaces without having to create a body for every method.

Method Signature

A method signature consists of the method name, and the number and types of parameters passed to it.

The compiler is able to determine which method you want to call based on the number and types of parameters you send it.

Model

A model is a human construct that abstracts a real world system to help us better understand them. There are many ways to do so depending on the purposes of the model.

Overloaded Method

Overloaded methods are multiple methods in the same class that share the same name but have different parameter lists.

Private modifier

Private variables are only visible from within the same class as they are created.in. This means they are NOT visible within sub classes.

Protected Mode

The 8088 CPU used in the original IBM PC was not very scalable. In particular, there was no easy way to access more than 1 megabyte of physical memory. To get around this while allowing backward compatability, Intel designed the 80286 CPU with two modes of operation: real mode, in which the '286 acts like a fast 8088, and protected mode which allows programs to access more than 1 megabyte of physical memory, and protects against misuse of memory (i.e. programs can't execute a data segment, or write into a code segment).

Protected modifier

A protected variable is visible within a class, and in sub classes, the same package but not elsewhere.

In Java any class in the same directory is considered to be in the default package, and thus protected classes will be visible. This means that a protected variable is more visible than a variable defined with no access modifier.

public modifier

The public modifier can be applied to a variable or a class. A public class has global scope, and an instance can be created from anywhere within or outside of a program.

If you want to create a variable that can be modified from anywhere you can declare it as public. You can then access it using the dot notation similar to that used when calling a method.

Static method

Static methods (like System.out.println) can only access static variables, of which only one instance can exist per class. Also a static method cannot be overriden to be non static in a child class and a non static method cannot be overriden to be static in a child class..

Utility code is often kept in static methods, thus the Math class class has an entire set of utility methods such as random, sin, and round.

XML Schema Definition

The XML Schema definition language (XSD) is a standard which enables you to define the structure and data types for XML documents.

In addition to its built-in data types (such as integer, string, and so on), XML Schema also allows for the definition of new data types using the simpleType and complexType elements.

View

A View is a Representation of a Model. There can be several Views associated with a Model.

VMM (Virtual Machine Manager)

The virtual machine manager (VMM) is the protected-mode operating system at the core of Windows. Its primary responsibility is to create, run, monitor, and terminate virtual machines. The VMM provides services that manage memory, processes, interrupts, and exceptions such as general protection faults. The VMM allows the virtual devices to intercept interrupts and faults to control the access that an application has to hardware devices.

Please wait working