Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
With size comes complexity, and you'll have to manage that somehow. One way is to treat the app as a group of smaller scripts, i.e. modules.

Keep the modules separated enough that they don't need to know so much about each other (this is de-coupling). They should only talk to each other using well defined interfaces (this is data hiding). Doing this will make it possble to keep it "small enough" in each module and the overall complexity low by not having to know the big picture everywhere.

Something you actually (hopefully :) did but maybe never thought about when scripting is analysis and design. These have to become more explicit when developing larger applications. You have to take a step back and get an idea of the structure of your application, what subsystems and modules it consists of and how they tie together.

You have to document this somehow and communicate it to other people, maybe fellow programmers, maybe sysadmins, maybe a project leader, maybe yourself six months from now. Pictures are good. Good writing is good.

When the script grows, things that can go wrong add up. Depending on your application, it may need to log things for debugging purposes, and more importantly for outright errors. When things go wrong, abort early, log what happened and notify the programmers (that would be you) by email. This way you'll know when, in your production environment, things didn't work out as planned. This will happen. Promise. Sorry :)

/J


In reply to Re: Writing a large application in perl? by jplindstrom
in thread Writing a large application in perl? by BUU

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-24 09:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found