Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

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

There is no such thing as a web application, there is only a web interface. Personally- this is what I do.. If I have a FastFood application, my tests.t, FastFood.pm, bin/fastfood, FastFood/Base.pm, etc code does nothing at all with web anything.
I develop FastFood in a terminal environment. Test it all out etc.
Once I am somewhat happy with that, I will start work on FastFood::WUI (Web User Interface).

I have come to great affection for CGI::Application, so my WUIs are CGI::Application based interfaces to ..
whatever- in this case; FastFood.
Thus, my fastfood.cgi only uses FastFood::WUI, not FastFood, FastFood::Base, none of that.

If you want to use CGI::Application- one word of advice; use as many of the plugins as possible, if they do what you want- even if what the way they do it seems counter-intuitive to you. I've found that the plugins seem at first to do some unneeded stuff.. but when I proceed with it.. things make more sense. Almost as if.. the people that came before me knew what they were doing when they suggested these ways of working.. go figure!

Compared to SQLite, in my experience- mysql is slow at inserts and fast on queries; consider doing any heavy lifting, operations.. cpu intense whatevers.. all offline, that is.. drop a crontab entry.

Keep focus on the web interface *as the web interface* and NO more. Any operations, db interactions etc.. Code all of that in your base modules. If the code is not about taking user input or displaying output- it does not belong in the "web app", the web user interface, the WUI.

My final suggestion would be to look up Conway's book on Perl Best Practices, although you probably have it already. He talks about doccumentation in there somewhere, I believe he also suggests writing the docs first, then the code. One very disciplined way to work is to write the tests first, as how you would like to interact with the non existing API- and then write your API so that the tests do not fail- I use Test::Simple- very sexy.


In reply to Re: Large Web Application Ponderings by leocharre
in thread Large Web Application Ponderings by stonecolddevin

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 browsing the Monastery: (6)
As of 2024-04-18 17:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found