GithubHelp home page GithubHelp logo

lefedor / mojo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mojolicious/mojo

1.0 2.0 1.0 1.88 MB

Mojolicious: Perl Duct Tape For The HTML5 Web!

Home Page: http://mojolicious.org

License: Artistic License 2.0

Perl 99.97% XProc 0.03%

mojo's Introduction

Back in the early days of the web there was this wonderful Perl library called
CGI, many people only learned Perl because of it.
It was simple enough to get started without knowing much about the language
and powerful enough to keep you going, learning by doing was much fun.
While most of the techniques used are outdated now, the idea behind it is
not.
Mojolicious is a new attempt at implementing this idea using state of the art
technology.

Features:

    * An amazing MVC web framework supporting a simplified single file mode
      through Mojolicious::Lite.

    * Very clean, portable and Object Oriented pure Perl API without any
      hidden magic and no requirements besides Perl 5.8.1.

    * Full stack HTTP 1.1 and WebSocket client/server implementation with
      IPv6, TLS, IDNA, pipelining, chunking and multipart support.

    * Builtin async IO and prefork web server supporting epoll, kqueue, hot
      deployment and UNIX domain socket sharing, perfect for embedding.

    * CGI, FastCGI and PSGI support.

    * Fresh code, based upon years of experience developing Catalyst.

    * Powerful out of the box with RESTful routes, plugins, sessions, signed
      cookies, static file server, testing framework, Perl-ish templates,
      JSON, I18N, first class Unicode support and much more for you to
      discover!

Duct Tape For The HTML5 Web:

    Web development for humans, making hard things possible and everything
    fun.

        use Mojolicious::Lite;

        get '/hello' => sub { shift->render_text('Hello World!') }

        get '/time' => 'clock';

        websocket '/echo' => sub {
            my $self = shift;
            $self->receive_message(
                sub {
                    my ($self, $message) = @_;
                    $self->send_message("echo: $message");
                }
            );
        };

        get '/fetch' => sub {
            my $self = shift;
            $self->render_data(
                $self->client->get('http://mojolicious.org')->res->body);
        };

        post '/:name' => sub {
            my $self = shift;
            my $name = $self->param('name') || 'Mojo';
            $self->render_text("Hello $name!");
        };

        app->start;
        __DATA__

        @@ clock.html.ep
        % my ($second, $minute, $hour) = (localtime(time))[0, 1, 2];
        The time is <%= $hour %>:<%= $minute %>:<%= $second %>.

    For more user friendly documentation see "perldoc Mojolicious::Guides"
    and "perldoc Mojolicious::Lite".

The Cake:

    .---------------------------------------------------------------.
    |                             Fun!                              |
    '---------------------------------------------------------------'
    .---------------------------------------------------------------.
    |                                                               |
    |                .----------------------------------------------'
    |                | .--------------------------------------------.
    |   Application  | |              Mojolicious::Lite             |
    |                | '--------------------------------------------'
    |                | .--------------------------------------------.
    |                | |                 Mojolicious                |
    '----------------' '--------------------------------------------'
    .---------------------------------------------------------------.
    |                             Mojo                              |
    '---------------------------------------------------------------'
    .-------. .-----------. .--------. .------------. .-------------.
    |  CGI  | |  FastCGI  | |  PSGI  | |  HTTP 1.1  | |  WebSocket  |
    '-------' '-----------' '--------' '------------' '-------------'

To install this module type the following:

    perl Makefile.PL
    make
    make test
    make install

mojo's People

Contributors

abh avatar acajou avatar acme avatar afresh1 avatar burak avatar charsbar avatar cornett avatar gbarr avatar ka2u avatar kraih avatar lefedor avatar marcusramberg avatar markstos avatar melo avatar memowe avatar mvuets avatar rsp avatar sharifulin avatar trendels avatar uwe avatar yuki-kimoto avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.