You really need to break your design into functional units and figure out how to implement each unit. Converting from one file format to another is a good, handy, and even reusable part of your project. So is the login system, which from reading your node it seems already exists but I'm not sure.

You mention this is a web application. Your code on the server won't have a way to scrape what's in the browser window, because HTTP just doesn't offer that level of integration between client and server. It was never meant to, so that's not a failing of the protocol. Yet it is a limitation of the environment you'll be using. Your best bet is to get the data from the same place on the server that the current page did and convert that. If you want to use JavaScript in the browser and communicate back to the server, scraping what's already there is possible but in this situation is likely to be far more complex than just grabbing the data on the server again.

Allowing the user to save a file rather than viewing it is partly the browser's issue, because some browsers can be configured to do one or the other with a particular file type no matter how it's sent. However, you can usually have an influence on those options by using the Content-Disposition header.

Getting a description of what's needed is the first step. Figuring out what pieces you'll need is the next step. Getting each piece of the puzzle to work is after that, and finally you can fit the pieces together into a usable whole. Don't forget to test early and often, preferably using automated testing tools.

Perl (just like several other languages) is quite capable of taking some data, putting it into a particular file format, and presenting the file to the user. It's done with spreadsheets, graphics files, PDFs, and more all the time.

As for VCF files, there are a few different types of files that typically get that extension. vCard files are a breeze to process and there are lots of tools available such as Text::vCard. For some others I'm not sure what tools there are to convert to or from them.


In reply to Re: Need some advice on project design by mr_mischief
in thread Need some advice on project design by jdlev

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, details, 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, summary, 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.