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

Dear Monks,
I just need someone to share his/her experience in programming on the client side.
When I do web programming I am focused on business logic, which may be quite complicated. I am not good on feature representation on the browser and it's always quite primitive. I think same happens to many of us who does not want to spend much time on learning deeply and implementing GUI html/JavaScript. So all my web stuff is usually simple forms which is good for internal use bud looks not serious for commercial applications. So a good application may be ruined by a primitive GUI.
Would it be a right direction to use some templates and adapt them to my algorithm logic when I do programming on the client side. If it is where I can get such templates.
May be some other thoughts/recommendations.
  • Comment on Web design and Perl/CGI business logic programming

Replies are listed 'Best First'.
Re: Web design and Perl/CGI business logic programming
by dHarry (Abbot) on Aug 22, 2008 at 14:22 UTC

    First of all web clients are supposed to be * thin * clients. Although you can beef things up they will never match a * fat/rich * client developed in C++/VB/... etc.

    Nowadays the MVC pattern is common good for web development, MVC is a term used to describe how to separate a web application into:

    • Model = business logic and data
    • View = the presentation to the user (HTML, CSS, JavaScript, Applets etc.) based on model data
    • Controller = handles the user input, controls the view and notifies model
    This gives a clean separation. Your web application does need a certain critical mass otherwise it can be overkill.

    There are several Perl modules around implementing the MVC pattern (google, Super Search...)

    If you want your pages to look/behave better there are several options: use CSS (Cascading Style Sheets) and JavaScript to "enrich" the client but again don't overdo it. A web client should be a thin client.

    Update

    This site gives excellent examples of how not to do it:-)

      they will never match a * fat/rich * client developed in C++/VB/... etc.

      Never is a mighty long time. In just a couple of years Google's online apps have for many obsoleted desktop mail and calendar applications. The hard limitations on web applications are becoming historical (low bandwidth, dodgy embedded-code engines, lack of real layout facility). The single distribution point makes some amazing things possible too. How much would it cost to buy the entire app + DB of Google Maps? Since it's not a desktop app the cost of the thing can be spread out across the web in thousandths of cents instead of single-point $5,000 licenses.

      Not to say that it's the example to follow. It takes a huge amount of effort, expertise, and manpower to make apps like that.

      Agree about MVC. If done right it creates scalability in design. Start as small/thin as you like and the pieces can be moved up one at a time (like driving the View with JS with no change to the Model and little or maybe even no change to the Controller) or all together as you like.

        I found Catalyst for perl MVC. It it what I probably need?
      dHarry, thanks for such usefull comments. Could you clarify please, what you mean by
      /*First of all web clients are supposed to be * thin * clients. Although you can beef things up they will never match a * fat/rich * client developed in C++/VB/... etc.*/
      Does it mean that with Perl/CGI I cannot do things which are possible with C++/VB/... ?
      and
      /*A web client should be a thin client.*/