Difference between revisions of "Object Oriented Programming"

esse quam videri
Jump to: navigation, search
(See also)
 
(59 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:IAM Classes]]
 
=Programming Object Oriented Programming=
 
<p>I can't get syntax highlight to work in the wiki bahhh</p>
 
please see http://iam.colum.edu/oop
 
  
==Syntax Highlighting Test==
+
=Definition=
<java> /*
 
  
* Algernon - a rule-based inference engine in Java.
+
=Relevance=
* http://algernon-j.sourceforge.net/
 
*
 
* This example shows how to open a Protege knowledge base
 
* in Java and use Algernon to query the KB.
 
*
 
* To run it, be sure to change the path in NEWSPAPER_PROJECT
 
* to match the correct project on your system.
 
*
 
* Micheal Hewett
 
* 05 May 2004
 
* hewett@cs.stanford.edu
 
*/
 
  
package org.algernon.test;
 
  
import java.util.*;
 
</java>
 
  
 +
=Explanation=
  
<cpp> /*
 
  
* Algernon - a rule-based inference engine in Java.
+
==Benefits of Object Oriented Programming==
* http://algernon-j.sourceforge.net/
 
*
 
* This example shows how to open a Protege knowledge base
 
* in Java and use Algernon to query the KB.
 
*
 
* To run it, be sure to change the path in NEWSPAPER_PROJECT
 
* to match the correct project on your system.
 
*
 
* Micheal Hewett
 
* 05 May 2004
 
* hewett@cs.stanford.edu
 
*/
 
  
package org.algernon.test;
+
Object Oriented Programming was made for humans by humans to help deal with the complex, irrational, rigid system that is the computer. Object Oriented languages don't benefit the machine very much but they do benefit the humans that need to program the machine.  
  
import java.util.*;
+
*Ease of maintenance :
</cpp>
+
**no more file new project most code need to be maintained for long period of time. This gets even more difficult with many authors. It's very rare to hit file-> new project in the real world
 +
*Extend-ability
 +
**Flexible modular clean code lasts much longer. We will make a new project every week but solutions and projects are often used in a modular fashion. Groups of '''loosely coupled objects''' are one of the goals in object oriented programming
 +
*Re-usability
 +
**Once a problem has been solved with OOP the solution can often be reused over and over again. One of you goals is to keep code DRY
 +
***'''D'''on't (or at least try not to)
 +
***'''R'''epeat
 +
***'''Y'''ourself
 +
**of course this concept can be stifling to beginning programmers so we will also try to adhere to the [https://people.apache.org/~fhanik/kiss.html K.I.S.S principal]
  
<csharp> /*
+
=Resources=
 +
== See also ==
  
* Algernon - a rule-based inference engine in Java.
+
* [[Object Oriented Programming I | 2014 OOP I Class Site]]
* http://algernon-j.sourceforge.net/
 
*
 
* This example shows how to open a Protege knowledge base
 
* in Java and use Algernon to query the KB.
 
*
 
* To run it, be sure to change the path in NEWSPAPER_PROJECT
 
* to match the correct project on your system.
 
*
 
* Micheal Hewett
 
* 05 May 2004
 
* hewett@cs.stanford.edu
 
*/
 
  
package org.algernon.test;
+
==Notes==
  
import java.util.*;
 
</csharp>
 
  
=== Perl ===
+
==External Links==
<perl>
 
#!/usr/local/bin/perl5.8.2
 
#envia un correo a account_for_backups@gmail.com como usuario wickle con el backup de las
 
#ultimas base de datos de wickle y con el label Backup
 
#Usa Mail::Webmail::Gmail en #http://search.cpan.org/dist/Mail-Webmail-Gmail/lib/Mail/Webmail/Gmail.pm
 
#Syntax ./send_gmail.pl file_to_backup.tar.gz
 
  
use Mail::Webmail::Gmail;
+
[http://www.archive.org/details/arsdigitac04 Object-Oriented Program Design and Software Engineering]
 +
http://www.codeproject.com/cpp/oopuml.asp OOP and UML
  
my $backup_label="Backups";
+
[[Category:Programming Language Concepts]]
my $file_to_backup=$ARGV[0];
+
[[Category:Object Oriented Programming]]
my $mail_to_backup="account_for_backups@gmail.com";
+
[[Category:C Sharp]]
my $now = localtime time;
 
print "It is now $now.\nfile to backup: $file_to_backup\n";
 
my ( $gmail ) = Mail::Webmail::Gmail->new(
 
            username => 'mygmailaccount', password => 'mypassword', );
 
    my $msgid = $gmail->send_message( to => 'account_for_backups@gmail.com', subject => 'Backup bases de datos '. $now, msgbody => 'Backup del dia '.$now. ' realizado', file0 => [$file_to_backup] );
 
    print "Msgid: $msgid\n";
 
    if ( $msgid ) {
 
        if ( $gmail->error() ) {
 
            print $gmail->error_msg();
 
        } else {
 
                ### Add this label to our new message ###
 
                $gmail->edit_labels( label => $backup_label, action => 'add', 'msgid' => $msgid );
 
                if ( $gmail->error() ) {
 
                    print $gmail->error_msg();
 
                } else {
 
                    print "Added label: $backup_label to message $msgid\n";
 
                }
 
        }
 
    }
 
</perl>
 

Latest revision as of 17:49, 10 June 2019

Definition

Relevance

Explanation

Benefits of Object Oriented Programming

Object Oriented Programming was made for humans by humans to help deal with the complex, irrational, rigid system that is the computer. Object Oriented languages don't benefit the machine very much but they do benefit the humans that need to program the machine.

  • Ease of maintenance :
    • no more file new project most code need to be maintained for long period of time. This gets even more difficult with many authors. It's very rare to hit file-> new project in the real world
  • Extend-ability
    • Flexible modular clean code lasts much longer. We will make a new project every week but solutions and projects are often used in a modular fashion. Groups of loosely coupled objects are one of the goals in object oriented programming
  • Re-usability
    • Once a problem has been solved with OOP the solution can often be reused over and over again. One of you goals is to keep code DRY
      • Don't (or at least try not to)
      • Repeat
      • Yourself
    • of course this concept can be stifling to beginning programmers so we will also try to adhere to the K.I.S.S principal

Resources

See also

Notes

External Links

Object-Oriented Program Design and Software Engineering http://www.codeproject.com/cpp/oopuml.asp OOP and UML