Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: I want to build a Craigslist clone

by Your Mother (Archbishop)
on Mar 26, 2019 at 04:04 UTC ( [id://1231681]=note: print w/replies, xml ) Need Help??


in reply to I want to build a Craigslist clone

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.

Replies are listed 'Best First'.
Re^2: I want to build a Craigslist clone
by newbietocode (Novice) on Mar 26, 2019 at 08:18 UTC
    Thank you for your kind reply, 'Your Mother'. I kind of had a feeling that it would be a tough job for a newbie like me, that is why I spent some time seeking out clones or similar software to buy first. I will chew over what you suggest. I will read the 'questions' link you posted too.l apologise if I did not format correctly.

      I didn't mean to imply you did anything wrong; you didn't. That page just has a lot of good advice on how to get the most out of the site. I hope you stick around.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1231681]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-29 15:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found