gri6507 has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I am currently taking an OO desing class. Our professor has given us the most ambiguous assignment - to pick any project on any topic dealing with any language and it could be either coding or research. The only restriction is that it should deal with OO design and that is should benefit the class.

I've looked at some websites, in particular rapid prototyping with perl/tk. HOwever I am wondering if this may not be a better source for ideas. So, if you have any curiously interesting project ideas fitting this scope (and I don't see how any idea would not fit in), please let me know.

Replies are listed 'Best First'.
Re: OO design project ideas
by chromatic (Archbishop) on Feb 05, 2002 at 02:08 UTC
    Write a class hierarchy analyzer that can optimize method dispatch. Use Module::Info to figure out where a subclass gets a method. Then write a module that can pre-install the appropriate methods into the class namespace. That'd save having to look in @ISA.

    In effect, you'd be moving run-time dispatch to compile-time. There are some tricky bits, but it's worth trying.

      Doesn't perl already have some internal optimization (i.e. caching) or is that just for UNIVERSAL::isa? Do perl make use of the UNIVERSAL::isa caching when doing method look-ups? I'd be glad to see some elaborations here.

      -Anomo
Re: OO design project ideas
by toma (Vicar) on Feb 05, 2002 at 05:53 UTC
    Create an XML format that describes the layout of a perl/Tk GUI. Make it easy to do the layout of the GUI without requiring knowledge of perl or Tk. Instead, a user of this program should just have to know how to create the properly formatted XML.

    Get someone else in the class to generate your XML automatically with a drag-and-drop user interface.

    Someone in the class might have a program that works with some sort of big directed graph. Encourage this person to use Graphviz to create a picture of the big graph.

    An example of this type of project would be to create a decently rendered PERT chart from a scheduling program, thus solving a glaring deficiency in a particular widely used yet loathsome scheduling program. Another example would be to make a class hierarchy analyzer as described in other suggestions in this thread.

    You will need a cool application to develop with your cool XML/Perl/Tk integration. For your example, create a control panel to interactively adjust the many parameters used to drive the Graphviz automatic graph layout tool.

    This is actually a research project, in that the Graphviz graphs are truly amazing, but they require adjustment to make them useful. A tool to facilitate this adjustment process would be neato!

    It should work perfectly the first time! - toma
    msg me if you would like me to attempt to clarify any parts of this suggestion.

(shockme) Re: OO design project ideas
by shockme (Chaplain) on Feb 05, 2002 at 04:49 UTC
    Take a look at perlbot. It's OO and utilizes many different modules, from Net::IRC to GTK. The authors are working hard to make it more OO and more modular. This should provide you with plenty of research material, from GTK, to IRC, to networking.

    If things get any worse, I'll have to ask you to stop helping me.

Re: OO design project ideas
by tachyon (Chancellor) on Feb 05, 2002 at 05:09 UTC

    Have a look at the thread hacking a project in groups for some OO related stuff that may be relevant.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Cosmic Wimpout
by gryphon (Abbot) on Feb 05, 2002 at 22:45 UTC

    Greetings gri6507,

    Have you considered building a game? I've been toying with the idea of writing a Cosmic Wimpout game in Perl, probably with OOP and wrapped into a module. The idea being, you could use the module to write a command-line Perl game, Web game, or other. Since the game deals with five dice with similar characteristics, it seems like it would lead naturally into an OOP project.

    Why Cosmic Wimpout? Well, the game rules are very simple, straight forward, and well defined. The game also requires extremely minimal user interaction with the game engine. As a player, you only really decide whether you roll or stand, and what the wild dice becomes when the rules give you the option to choose.

    I've found a great Palm application that's a joy to play, but I can't find any other application of this classic dice game. So your project would also have the advantage of being mostly pseudo original. :)

    -gryphon
    code('Perl') || die;

      Hi,

      I have thought about games. In fact, I've even built several games in perl (althouhg not OO), like tetris, minesweeper, battleship, etc. So, just as an excersize in OO, I am currently working on rewriting Tetris in Java, and, most likely afterwards, in OO-Perl again.

      However, all this is to say that a game will most likely not suffice for a project. The Professor mentioned that our projects should contain on the order of -teen- or so classes, and what he is looking to get out of this is our abilities to deal with the design aspects of medium sized projects. (I should have mentioned that this is going to be a collaboration between two people).