Download Interface - Interface Description, Interface Reviews
Contact
 


 

Download

 
Download Now
Perl Artistic License
Downloads till now: 6
 
 

Quick search

 



 

Rate this software

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

No. Votes

0

 

Linux

Assembler Tools , Bug Tracking , Code Generators , Compilers , Debuggers , Disassemblers , Internationalization , Interpreters , Libraries , Localization, Perl Modules , Preprocessors , Quality Assurance and Testing , UI (User Interfaces) , Version Control , Widgets ,

Windows

Mac

Mobile

Drivers

Scripts - DHTML

Scripts - DHTML (new)

Web Developer Blog

Web Developer Blog (new)

Scripts and Applications

Ajax
ASP
ASP.NET
C and C++
CFML
CGI and Perl
Flash
Java
JavaScript
PHP
Python
XML

interface

 

Details

Last Update: 2008-02-05 05:01:23
Version: 0.03
License/Program Type: Perl Artistic License
Publisher: Scott Walters
Price:$0.00
Description:


SYNOPSIS
package Foo;
use interface 'Iterator', 'Generator', 'Clonable', 'DBI::DBD';
ABSTRACT
Compile-time interface compliance testing. Inspects the methods defined in your module, and compares them against the methods defined in the modules you list. Requires no special or additional syntax.
Should you fail to implement any method contained in any of the listed classes, compile will abort with an error message.
Methods starting with an underscore are ignored, and assumed not to be part of the interface.
The modules listed on the use interface line will be added to your @ISA array. This isn't done to re-use code from them - interface definitions should be empty code stubs, or perhaps a reference implementation. It is done so that your module asses the ->isa() test for the name of the package that you're implementing the interface of. This tells Perl that your module may be used in place of the modules you implement the interface of.
Sample interface definition:
package TestInterface;
sub foo { }
sub bar { }
sub baz { }
1;
A package claiming to implement the interface "TestInterface" would need to define the methods foo(), bar(), and baz().
An "interface" may need some explaination. It's an Object Orientation idea, also known as polymorphism, that says that you should be able to use interchangeable objects interchangably. Thank heavens the OO people came and showed us the light!
The flip side of polymorphism is type safety. In Perl, ->isa() lets you check to make sure something is derived from a base class. The logic goes that if its derived from a base class, and we're looking for an object that fills the need of the base class, then the subclass will work just as well, and we can accept it. Extending objects is done by subclassing base classes and passing off the subclasses as versions of the original.
While this OO rote might almost have you convinced that the world works this way, this turns out to be almostly completely useless. In the real world, there are only a few reasons that one object is used in place of another: Someone wrote some really horrible code, and you want to swap out their object with a better version of the same thing. You're switching to an object that does the same thing but in a different way, for example using a database store instead of a flat file store. You're making some minor changes to an existing object and you want to be able to extend the base class in other directions in the future. Only in the last case is inherited code with subclassing even useful. In fact, there is a move towards using composition (has-a) instead of inheritance (is-a) across the whole industry, mainly because they got tired of people pointing out that OO sucks because inheritance only serves to make a great big mess of otherwise clean code.
Seperating the interface from the implementation lets you make multiple implementations of an idea. They can share code with each other, but they don't have to. The programmer has assured us that their module does what is required by stating that it implements the interface. While this isn't proof that the code works, climaing to implement an interface is a kind of contract. The programmer knows what work is required of him and she has agreed to deliver on it.
The interface definition can be a package full of stub methods that don't do anything, or it could be an actual working implementation of an object you're striving for compatability with. The first case is cleanist, and the package full of stubs serves as good documentation. The second case can be handy in cases where the first case wasn't done but someone ignored the Wisdom of the Interface and wrote a package anyway.
The Wisdom of the Interface says to write an interface for each new kind of object that could have multiple implementations. The interfaces serves as a contract for the minimum features needed to implement an object of that type. When working with objects - creating them, checking types when you accept them, etc - always work with the interface type, never the type of an individual implementation. This keeps your code generic.
In order to do the composition thing (has-a), you contain one or more objects that you need to do your work, you implement an interface that dispatches method calls to those objects. Perhaps your new() method creates those objects and stores them in instance variables.
Requirements:
· Perl



Leave a comment




(optional)

What is 7-3?




0 comments


Add to

 Del.icio.us   Digg It   Furl   YahooMyWeb   Blinklist
 

interface Version History

Product Date Added
interface 0.03 2008-02-05 05:01:23


Related Software

Bigtop::Docs::Cookbook
From category: Libraries
Bigtop::Docs::Cookbook 0.15 is libraries software developed by Bigtop::Docs::Cookbook Team. Bigtop::Docs::Cookbook is a Perl module for Bigtop syntax by example. This document is meant to be...
Device::ISDN::OCLM
From category: Libraries
Device::ISDN::OCLM 0.40 is libraries software developed by Merlin Hughes. Device::ISDN::OCLM is a perl module to control the 3com OfficeConnect LanModem. SYNOPSIS $sp = 1; $pw =...
curlpp
From category: Libraries
curlpp 0.6.0 is libraries software developed by Jean-Philippe Barrette-LaPierre. cURLpp is a C++ wrapper for libcURL. libcURL is described as: libcurl is a free and easy-to-use client-side U...
Finance::Currency::Convert::Yahoo
From category: Libraries
Finance::Currency::Convert::Yahoo 0.2 is libraries software developed by Lee Goddard. Finance::Currency::Convert::Yahoo is Perl mdoule that convert currencies using Yahoo. SYNOPSIS...
CVS Manager
From category: Version-Control
CVS Manager 1.0.0 is version control software developed by AdventNet, Inc.. CodeMiner CVS Manager is a web-based CVS (Concurrent Versioning System) repository monitoring/management and reporting so...
Evolution Sharp
From category: Libraries
Evolution Sharp 0.12.0 is libraries software developed by Mike Kestner. Evolution is a .NET language binding for various Ximian Evolution libraries. Building & Installing Evolution: \...
Archetypes 1.3.6 RC1
From category: Localization
Archetypes 1.3.6 RC1 is localization software developed by Sidnei da Silva. Archetypes project is a framework for developing new content types in Plone. The power of Archetypes is first in a...
Language MuldisD
From category: Perl-Modules
Language::MuldisD contains a formal spec of Muldis D relational DBMS language....
EmPy
From category: Preprocessors
EmPy 3.3 is preprocessors software developed by Eleventh Hour. EmPy is a system for embedding Python expressions and statements in template text; it takes an EmPy source file, processes it, and pro...
Convert::Braille::Ethiopic
From category: Libraries
Convert::Braille::Ethiopic 0.05 is libraries software developed by Daniel Yacob. Convert::Braille::Ethiopic is a Perl module that can convert Between Braille Encodings. SYNOPSIS use...
Python Object
From category: Perl-Modules
Python::Object is a Perl module that encapuslate Python objects....
fb_mhash
From category: Libraries
fb_mhash 1.2 is libraries software developed by Richard Kotal. fb_mhash is a UDF library for Firebird/Interbase. fb_mhash implements an interface to the mhash library (libmhash). It support...
Audio::TagLib::MPC::File 1.42
From category: Libraries
Audio::TagLib::MPC::File 1.42 is libraries software developed by Dongxu Ma. Audio::TagLib::MPC::File is an implementation of Audio::TagLib::File with MPC specific methods. SYNOPSIS...
Class::InsideOut
From category: Libraries
Class::InsideOut 1.02 is libraries software developed by David A. Golden. Class::InsideOut is a Perl module with a safe, simple inside-out object construction kit. SYNOPSIS package...
ccontrol
From category: Assembler-Tools
ccontrol 0.9.0 is assembler tools software developed by Rusty Russell. ccontrol program takes over the roles of the compiler and linker, and reads a configuration file to decide what to do before i...
 

Top Downloads

 
1. Canon PIXMA iP1200 Printer Driver
2. Canon PIXMA iP1000 Printer Driver
3. Realtek ALC/ 262/ 265/ 268/ 660/ 861/ 880/ 882/ 883/ 885/ 888 Audio
4. Realtek RTL8139C(L)+/RTL8139D(L)/RTL8100(L)/RTL8130/RTL8139B(L) Driver
5. Canon PIXMA MP210 MP Drivers
6. Canon PIXMA iP1300 Printer Driver c
7. Canon i-SENSYS LBP2900 Printer Driver R
8. dmg2iso
9. Asus EZVcr II
10. Genius Eye 110 Webcam Driver
11. Canon LaserShot LBP-1210 Printer Driver
12. Canon PIXMA iP1600 Printer Driver
13. Canon PIXMA iP1200 Printer Driver x64 d
14. Canon PIXMA MP220 MP Drivers
15. Canon PIXMA MP160 MP Drivers 9xME
16. Lite-On Cd-Rw LTR-48327S firmware
17. Canon PIXMA MP460 MP Drivers xp64
18. BSD Subsystem
19. Sierra Wireless Watcher
20. Canon PIXMA iP1300 Printer Driver a

DownloadTube Editor Reviews

 
1. Ots CD Scratch 1200 Deluxe
Ots CD Scratch 1200 - virtual turntables CD player for music...
2. Ots CD Scratch 1200
Ots CD Scratch 1200 - virtual turntables CD player for music...
3. OtsTurntables Pro
OtsTurntables - virtual Turntables MP3 Mixer for Music Lover...
4. OtsTurntables Free
OtsTurntables - virtual Turntables MP3 Mixer for Music Lover...
5. OtsAV Radio Broadcaster
OtsAV Radio Broadcaster - the quality professional-grade aud...
6. OtsAV Radio Narrowcaster
OtsAV Radio is a powerful playout mixing system for Radio We...
7. OtsAV Radio Webcaster
OtsAV Radio is a powerful playout mixing system for Radio We...
8. OtsAV Radio - Trial
OtsAV Radio is a powerful playout mixing system for Radio We...
9. OtsAVFree
OtsAV Free comes with video, karaoke CD+G and automated beat...
10. OtsAV TV Broadcaster
OtsAV TV Broadcaster is a quality professional-grade AV broa...

Software Reviews Full List



Recent Blog Posts

 
1. Easy Publishing of WordPress Blogs RSS Feeds With FeedBurner
RSS (Really Simple Syndication) Feeds are a modern form of c...
2. Automatic Installation of Joomla! on Windows With JoomlaPC
A convenient alternative for the development or testing of J...
3. An Introduction To Joomla! Templates Creation With Adobe Dreamweaver CS3
Joomla! is a content management system and framework with a ...
4. Two New Firefox Stable Releases Are Available For Free Download: Firefox 3.0.2 and Firefox 2.0.0.17
Recently, two Firefox stable releases for Windows, Mac OS, a...
5. How To Deploy A Linux LiveCD on Windows Using MobaLiveCD
There are many ways to test a certain Linux distribution on ...
6. Ever Needed A Free Video Converter And You Just Couldn’t Find It? Here’s Our Suggestion.
With so many different video (or even audio) converters arou...
7. Top 101 Most Downloaded Windows Software: Free Demo Movies and Download Links
We often have to decide if we should download the latest v...
8. A New Powerful Virus Could Affect Millions of WordPress Blogs
The WordPress blogging platform powers millions of web...
9. Google Chrome – It’s Finally Here. Will A Revolution Begin?
First, it was the rumors. Then, Google announced it official...
10. An Amazing Free Document Processing Software: LyX
The documents management task could be difficult in absence ...

Last 20 Scripts

 
1. Colorize jQuery Plugin
Colorize is a jQuery plugin that allows you to add a backgro
2. JavaScriptMVC
JavaScriptMVC is a framework that brings unique methods to J
3. GWT-Ext
GWT-Ext is a Java based widget library that provides rich wi
4. Shadowbox
Shadowbox is an online media viewer application that support
5. Color Picker Script
Color Picker Script allows your user to easily pick a color
6. dsHistory
dsHistory allows you to handle the browser's back and forwar
7. mooRainbow
mooRainbow is a powerful Javascript color picker that allows
8. Expander Plugin
Expander Plugin is a simple jQuery plugin designed to hide o
9. FancyZoom
FancyZoom provides a smooth Javascript image zooming effect
10. iCarousel
iCarousel allows you to define carousel image galleries widg
11. F->IT
F->IT is a free, open-source, online FTP client created with
12. String Tokenizer for Javascript
String Tokenizer for Javascript is a lightweight class that
13. jQuery.Rule
jQuery.Rule is a jQuery plugin that allows you to easily man
14. jQuery.Preload
jQuery.Preload is an advanced multi-functional preloader bas
15. jQuery.Modularize
jQuery.Modularize provides you the opportunity to use modula
16. jQuery.LocalScroll
jQuery.LocalScroll plugin permits you to include an animatio
17. Online Suite Ultimate
Online Suite Ultimate (formerly known as EBundle PRO) is a c
18. Scripteen Free Image Hosting Script
Scripteen Free image hosting script allows you to deploy a f
19. jQuery.Listen
jQuery.Listen allows you to register event handlers along wi
20. jQuery.FastTrigger
jQuery.FastTrigger provides a simplified version of jQuery.t