Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
That huge project wouldn't happen to be XINA, would it? ;) I just took a look at some of your source code and see that you use a number of different HTML generation styles: functional, object oriented, here docs, and plain old strings. I know this is a lot to ask, but why not branch off a new version that uses a full blown templating system instead? I recommend HTML::Template because it is not too large, fast, and has no non-core module dependencies.

Note that while you need to take many steps backwards, your new code will be free of embedded HTML, allowing you to concentrate on logic only. You might even be able to completely deprecate xistlyesheeteditor.cgi, for example, because your users will instead be able to supply their own (unless you are holding their hand because they can't write CSS).

Personally, i think XINA is cool, but it could use a serious re-write. There is a lot of repeated functionality in every cgi script that should be abstracted into a module instead (meta data collection, database connection, etc). Also, i notice that you only allow connections to MySQL and PostreSQL databases. If you instead allow the user to specify any DBD module, then maybe other programmers will be willing to port XINA to work with those databases for you. ;) Keep your code modular and marvel at the input of others.

For the record, i still love - but i only use it in conjunction with HTML::Template for any serious production code that i produce. Once i made the "clean break" to templates, managing web apps became a lot easier. (CGI::Application might server XINA well, by the way.) Best of luck to you and XINA. :)


(the triplet paradiddle with high-hat)

In reply to (jeffa) Re: CGI versus CGI::* modules by jeffa
in thread CGI versus CGI::* modules by michellem

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 editor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2021-05-11 14:34 GMT
Find Nodes?
    Voting Booth?
    Perl 7 will be out ...

    Results (116 votes). Check out past polls.