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??

Sounds fun. It's a weird situation because there are a number of us here focused on web development who could probably knock out the skeleton of a Craigslist clone in a work week—I knocked out a personal wiki in a three-day weekend a couple months ago—but for a beginner it's probably a three year project and will not be right, robust, secure for another two years.

I don't mean to dissuade with that. I think you should go for it and I think Perl is arguably the best tool though there is a strong case for any high level language with a good web app framework and community support. Friendly, clear questions will get you terrific support.

The issue with this kind of project is it's the death of a thousand cuts. HTML is easy. CSS is easy. HTTP is easy. HTTPS is pretty easy. Forms are easy. Automated email is easy. DB programming isn't hard. But you start to compound things and being a sysadmin AND a QA tester AND the programmer AND the designer AND the content manager… it blooms into 18 hour days quickly with little success to show. Finally, while most of that stuff is fairly easy at the roots, security is not; best practices are not; good testing is not; performance tuning is not; maintaining and defending a website is not; solid DBA skills are not. Without all those hard parts, you get what is colloquially known as spaghetti. High risk spaghetti if it contains personal data.

Now constructive. You asked what to try to tackle.

  • Something that should always be in your mind is security. This is the best one-stop shop: https://www.owasp.org/.
  • You want to use a database. No one recommends MySQL at this point. Instead, consider PostgreSQL or MariaDB; in that order. SQLite is ideal for playing around. It has zero barrier to entry and is much easier to "just use." It's also built into a lot of devices and browsers so knowing its quirks/defaults is a good idea.
    • Try, learn DBI. Most of Perl's database solutions are built on it. There are many DB specific packages that go with it, like DBD::SQLite, DBD::Pg, DBD::MariaDB.
    • Once you have the basics of one or more I personally strongly recommend DBIx::Class but there are naysayers. For me, it removes a huge amount of the tediousness of DB development and affords, if you're careful, extremely semantic and easy to maintain code.
    • Try to find as many good tutorials on databases and database design as possible. Bad data design will complicate your work tremendously.
  • Avoid CGI.pm. There are 20+ years of Perl documents suggesting otherwise. Ignore them. It was Perl's killer app in the 90s. It's an albatross today.
  • Next, web framework. Do not try to roll your own framework. It's a rookie move many of us did that is an excellent teacher but it will absolutely backfire down the road if you hitch your wagon to it.
    • Mojolicious; a favorite among many with extremely smart testing and integrated web-related packages.
    • Catalyst; the 800lb gorilla since 2005 or so. It's what I'm good with. It runs a lot of big websites. It also has excellent testing. I wish it were tighter and smaller and not Moose based. That said, it's amazingly powerful and the steep learning curve, much as with DBIx::Class, makes things easy later. It's like Ruby on Rails but much freer.
    • Dancer2; another favorite. I'm not keen on it but it has a lot of fans who are good hackers.
  • Learn a web server. I strongly recommend nginx. Many still rely on apache; the everything and the kitchen sink of web servers. There are a couple other options but I think those two are the only worth considering.
    • You will probably need an application server eventually. uWSGI is amazing. The nginx guys have one called unit now. I have made the most cursory foray into playing with it so no review.
    • That leads to PSGI. CGI's modern replacement env/interface. Its best implementation is in the Plack space. All modern frameworks support PSGI.

Lots more… That's a decent baseline to start. If you have specific questions, you'll get great help here. This is a great guide to using the site: How (Not) To Ask A Question.

Afterward…DERP Afterword: I don't have a CS degree either, or even a BS. This stuff is accessible to anyone with aptitude who is willing to put in the time.


In reply to Re: I want to build a Craigslist clone by Your Mother
in thread I want to build a Craigslist clone by newbietocode

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 wandering the Monastery: (4)
As of 2024-03-28 21:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found