Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

The first rule (or at least an important one) of software engineering is that a complete rewrite is never as good an idea as it seems.

You are correct to be concerned about making any moves that lead to a complete rewrite.

Look for ways that you can work these ideas in edgewise, at the margins. Move code around, change what happens behind the scenes, but keep the interfaces the same.

Having everything going through those 4 modules may be what makes it possible to change.

I'm willing to take a look at your Base::* modules and see what I think is reasonable to target for refactoring.

For example, to use my suggested approach for menus, you can start by changing your existing print_menu() in Base::Menu.

  • First put the logic that traverses your website into one routine, call it build_menu(). Build the menu data structure in build_menu().
  • Simply insert build_menu() at the top of your print_menu() routine and let it create the structure on the fly, exactly as it does now.
  • Then modify print_menu() to use the results of build_menu().
  • Now you can make a separate script that uses the build_menu() routine to build the menu data and save it to a file.
  • Modify Base::Menu::print_menu() to use data loaded from the file.
  • Now you can modify the build_menu() routine to handle the case where you have an all-in-one file, for example, Monsters
  • Now you can convert each directory to use an all-in-one approach.

    These steps don't require a rewrite, and at each part of the process you never have a broken website.

    Also, while it may have taken you several years to get where you are now, most of that work was not in the production of code, but rather, the acquisition of the knowledge required to produce the code.

    I think you may find that a better architecture will pay off handsomely. A good structure will come together with much less effort than a patched one.

    BTW, don't worry too much about UTF-8 until you need it. I haven't needed to worry about it, so I haven't bothered to learn anything other than the basics. I know that when I need to know, I will be able to find the resources I need to make it work. That is enough.


    TGI says moo


    In reply to Re^5: Seeing Perl in a new light: Epilog by TGI
    in thread Seeing Perl in a new light by Lady_Aleena

    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 romping around the Monastery: (2)
    As of 2024-04-25 04:55 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found