Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://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 CGI.pm, object oriented CGI.pm, 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 CGI.pm - 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. :)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(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

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: (4)
As of 2024-03-29 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found