Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Websites Using Perl

by bennierounder (Sexton)
on Jun 11, 2012 at 14:12 UTC ( #975573=perlquestion: print w/replies, xml ) Need Help??

bennierounder has asked for the wisdom of the Perl Monks concerning the following question:

Hi Guys I haven't been involved for a few months, but getting back into Perl as of now. I'm setting up a new online business, which will be mainly run using Perl because perl is the only computer language I know. I have found it easy to pick up and although there is alot I dont know I am comfortable learning what I need to know as and when I need to.

My question isn't specifically related to perl, but I know alot of you guys are experts in not only perl. I am wanting advice on building a website. Even though 'I know/can find what I need' to hardcode a website using HTML, CSS and Javascript I am wanting to know a quicker way to build a website and then I want to be able to copy that HTML code and paste it into a Perl programme, which can be integrated and executed using the CGI, HTML modules etc.

I want to soley use perl for my website, however designing the actual webpage will be easier if I use things like, Dream Weaver and Wordpress. I have found that wordpress is not giving me the sophisicated site I need, and dreamweaver costs money or I just might not have learned enough about either of them.

I think if anyone knows of an open source type of website builder/designer and can point me in the right direction of tutorials to learn how to use it, I will be in a better position to accomplish my business plan

I am a person with 50 a week for living expenses, no job, a flat/roof over my head, enough food and water to keep me going, an internet connection, 6 months of hosting for as many websites as I want, alot of enthusiasm, a little knowledge of perl/sql/html/css/wordpress/apache/javascript(self taught, learning more all the time), a suit for business meetings, a transit van insured, taxed and tested for a year, normal day wear clothes and my laptop. It doesn't sound alot, but I am very grateful not everyone is fortunate enough to have these

My aim is to build a successful business from nothing, with nothing other than my brain and what I have mentioned above, I plan to do this over a 12 month period starting now using open source products. I will then give back to the open source community and others in my current situation when I am able to in the future. I think this is what open source should be about.

Sorry I have gone on abit, but not posted for over six months. Any help at all will be very much appreciated in relation to designing the website. I would like to thank you in advance for any replys I may get.

Replies are listed 'Best First'.
Re: Websites Using Perl
by marto (Cardinal) on Jun 11, 2012 at 14:47 UTC

    I've looked at many of these WYSIWYG HTML editors/site builders in the past and have found that they more often than not generate messy content (harder to maintain in the long run) and can cause cross browser problems. None of them have ever done a job I'm happy with.

    I tend to use keep my HTML/CSS/JavaScript code separate from my server side code, and store my contents in a database. Frameworks make this easier. I've had success with CGI::Application. For the front end UI I use jQuery UI, it's very easy to create a custom theme/package containing all of or a subset of the features it has to offer (see jQuery UI themeroller), jQuery makes AJAX stuff simple.

    What I would suggest doing is creating a static site template you're happy with, using HTML/CSS and develop it form there. Once you've done this you can use Perl (using a framework if desired) to create a dynamic site, the contents of which are stored in a database. Adding/administering content can be as simple as entering data into a form, much like posting this question. There are a lot of modern frameworks out there which I have not yet investigated (dancer, Mojolicious), do some research before deciding which framework suits you best.

    Tools and services like Wordpress are great for people who are only concerned about the contents, they don't want to have to write an entire system to get their content out there. Perhaps time spent focusing on customising wordpress would reveal exactly what it's strengths and weaknesses are. Having installed Wordpress for a few non profit organisations I know that it can do a lot more than most people want.

    Please note I am not a graphic designer :)

Re: Websites Using Perl
by ww (Archbishop) on Jun 11, 2012 at 16:34 UTC
    Suggest you invest a little more time to "really get" the basics of HTML and CSS. Believe you'll be far happier in the long run.

    Like marto and druthb, I put no stock in WYSIWYGs or blogging tools or the like for writing compact, accurate and maintainable HTML which produces a user-friendly rendered product. I find the code output of all the HTML-generators I've ever looked at to exhibit the flaws our colleagues have already mentioned... and the pages they render to be either extremely limited or broken in at least some browsers.

    By way of context for any competence my views may have, I was solely self-and web-taught when I began creating a variety of governmental, personal and commercial websites many years ago. My errors (as observed by viewing their rendering with just a couple browsers) and readily available tools such as w3c's validator (w3c's CSS checker ... and proprietary ones like CSE's "HTML Validator" -- + + ), led me to believe the learning curve is NOT ALL THAT STEEP. Sure, even today, there are nooks and crannies I've never explored, but I nonetheless believe that continuing your effort to learn the fundamentals will help you get rich (or rich enough to hire webmasters and programmers) whereas the WYSIWYG's et al will more likely frustrate you.

    ...but you'd best also have a product or service to sell. :)
Re: Websites Using Perl
by druthb (Beadle) on Jun 11, 2012 at 15:24 UTC

    Depending on the size and scope of your application, a framework like Dancer or Catalyst may be useful for bolting all the bits together. There are a *lot* of websites out there that don't use those icky WYSIWYG-generated pages to do the work.

    I'm fond of Dancer, and have used it for a number of little things--there are plugins for database access, and you've got some choices in the web templating, as well.

    There Is More Than One Way To Do It; experiment, ask questions, and find the one that works for your style and your application.

    D Ruth Bavousett
Re: Websites Using Perl
by aaron_baugher (Curate) on Jun 11, 2012 at 21:55 UTC

    I'll chime in with the others to say to stay far away from WYSIWYG web page creators. Only use something like Dreamweaver if you have no intention whatsoever of ever viewing the page source and trying to figure out what's going on. I have yet to see one that doesn't make a mess of HTML/CSS that's brutal to decipher. The moment you have trouble getting a page to work exactly how you want it to in the editor, so you try to edit the code by hand, you'll soon be pulling out your hair.

    Wordpress presents a similar problem. First of all, you say you want to use Perl, and Wordpress is PHP, so it would seem to be out. But since you mentioned it: Wordpress is a very powerful system, and there are tons of plugins to do just about everything you might want to do, plus loads of free themes. But trying to be all things to all bloggers, especially extreme newbie bloggers, necessarily has bloated it badly. Again, as long as you use it for what it provides and never, ever look under the hood, it may be fine; but the moment you decide to hack it to get some special behavior, you're digging through hundreds of PHP files just trying to figure out which one is responsible for the bit of page you're concerned with.

    I'll admit I use Wordpress for my personal blog, but that's all I do with it, and it's fine for that. Even then, I sometimes feel like, as a programmer, using a packaged blog software -- especially one written in a language I loathe -- is a little like a carpenter hiring Home Depot to put in his kitchen cabinets. I really should build my own blog from scratch on Dancer or something, but that's not on top of the priority stack just yet.

    Frameworks like Dancer are definitely the way to build serious sites these days, in my opinion. And yet, I think it would be a good idea for anyone getting into web programming to do some basic stuff with and hand-written HTML forms first, to learn the basics of what's going on between the browser and the server. Later you can move up to a framework, and fully appreciate the time savings and the better separation of code from presentation.

    Aaron B.
    Available for small or large Perl jobs; see my home node.

      I would like to thank you for your reply. The website I'm building is a mixture of all different web pages. I am using wordpress and am getting used to using it quite quickly.

      I copy and paste the code in the editor into vim and then do a search for the part I need to change, which I am finding useful. I'm still learning, but this is working well for me.

      I am wanting to build a quote system for my website using Perl The way I have decided to do this is by making a sub domain and then setting up a hyper link to that subdomain, which will be wrote in Perl. Do you think this is a good idea, I haven't done it yet but I don't think it will interfere with wordpress. The more I use Wordpress the more I am finding it amazing as a CMS. However, that being said I am going to take a look as Dancer, as advised by yourslef and others.

      Thanks again for your reply and thankyou to all the rest of you guys too.

Re: Websites Using Perl
by flexvault (Monsignor) on Jun 12, 2012 at 18:48 UTC

    Welcome back bennierounder,

    I am in the middle of reading "The Lean Startup" by Eric Ries. I believe I saw a reference to it on PM, and then ordered it from Amazon. It has changed my "mis-views" about business. I'm in the US, so I don't know if you can get it from a library, but you sound like the perfect candidate for it's content.

    As a programmer, I have always waiting to get a "perfect" finished product before announcing it. The book was written by a programmer and that was how he was taught also. But he discovered that the best way was to build a MVP, or minimum viable product and then test the waters, and then retest again and again.

    So why am I mentioning this, because one of those 'toy' tools may help you build your MVP faster, and then you can test your ideas.

    In 1996, my wife wrote a book that was published by Howell Book House, a Simon and Schuster Macmillan Company titled 'Natural Food Recipes for Healthy Dogs'. Needless to say it was very controversial at the time! Now there are 100s of books about the subject.

    I put up her web-site in 1997, and took months learning HTML. I couldn't find a product that could do what I wanted. ( When your looking for 'perfect' you never will. )

    In 2003/4, my wife wanted to add a blog to her site, so she asked me to find one that would work for her. Again, I couldn't find the 'perfect' one, so I wrote one in Perl for her use. She would write the blog in Word, and I would move it into HTML for displaying on the blog. But the feedback from my wife was "...after you finish tinkering with my work, it doesn't look how I wanted it..." So now the compromise: She used a open source tool called 'Kompozer' on a linux desktop and publish the blog to a directory on a Unix server, and I wrote a Perl script to remove the headers and re-publish her blog at the time/date she wanted. She doesn't care about the HTML/CSS/javascript, but the content looks the way she wants and I don't have to look at the ugly code generated

    Something like that might work for you! What ever you do, I wish you great success and keep using Perl.

    Good Luck!

    "Well done is better than well said." - Benjamin Franklin

Re: Websites Using Perl
by thomas895 (Deacon) on Jun 12, 2012 at 09:46 UTC

    Stay away form the WYSIWIG ones. That includes the proprietary ones such as Dreamweaver and the many Micro-soft tools for the task. The open source(not all are free software, as defined by the GNU) ones can make a mess of it too, though. Joomla, Open- or LibreOffice can generate some messy or incomprehensible markup as well.

    If you know how to do it and have time, you could write your own framework from scratch. That takes a lot of time, though, and you're probably better off using a framework and building off of that. My fellow Monks have recommended some very great frameworks in the writeups above.

    Or, if you are extremely lazy, you can just get one of those webhosting subscriptions with one of those "app installers" that will install the shopping cart software(in PHP, almost invariably) for you with "1-click".
    But that's for end-users, and quite frankly a waste of your programming skills

    confess( "I offer no guarantees on my code." );

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://975573]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2021-01-28 11:16 GMT
Find Nodes?
    Voting Booth?