Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
You seem to be hinting at a profound distinction between library (or module) and framework. If I'm smelling right, would you care to share your thoughts on the differences?

You hit the nail dead on.

Of course, the distinction gets blurry around the boundary, but in simple terms it comes down to this:

My code calls library modules.

Frameworks call my code.

With the former, I structure my application to fit my requirements and call library routines to perform specific tasks.

With the latter, the framework provides a generic structure for the application, and it calls my code to fill in the details.

Both are perfectly legitimate, but historically, I have had much greater problems with the latter than the former.

With the library approach, if the library goes out of mainenance, takes a divergent course or otherwise fails to meet my requirements, I can substitute another library by providing a shallow interface mapping layer between existing calling code and the new library. At worst, I have to write a replacement from scratch--but my investment in the calling code is not wasted.

With the framework approach, when it takes a course divergent from my requirements or stops being maintained, or when my requirements change to fall outside of it's facilities, my choices are limited. I can petition for changes to the framework to accomodate my needs. I can fork a local version and make my own changes to it, perhaps seeking to feed my patches back into the mainstream with the risk of them being rejected. Or I can move to a different framework, but the chances that my existing investment of code will be easily modified to work with that new framework are low.

Frameworks have a very difficult and fine line to walk. That between being very generic which makes it most flexible, but also has a tendancy to mean sticking to the lowest common denominator; and being highly specific, which makes for clean, targeted interfaces, but can also limit the range of applications that they are useful for.

Open source frameworks carry less risk than the proprietory ones that I have had trouble with on two occasions in the past.

In one case, a small company, 3 or 4 guys got into an internal wrangle that eventually became letigious, stopped development and prevented the company I was working for even attempting to buy the source, because the litigants couldn't decide who owned it.

In the second case, a quite large and successful company producing a quite widely used framework were bought out by a much larger software house who produced a less successful competitive product. They took the designers, programmers and the good ideas and used them to improve there own product, but squashed the one we were using. The costs and difficulties involved in moving from the original to the competitive product were the death knell of what had been a promising application.

So yes, I see a world of difference between libraries and frameworks, and I strongly favour the former to the latter.


Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.

In reply to Re^7: which perl gui toolkit to use? by BrowserUk
in thread which perl gui toolkit to use? by redss

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others surveying the Monastery: (3)
    As of 2020-08-12 03:35 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Which rocket would you take to Mars?










      Results (64 votes). Check out past polls.

      Notices?