public
Description: Ruby framework i wrote and use in projects
Homepage:
Clone URL: git://github.com/hakunin/pocket-ruby.git
hakunin (author)
Wed Oct 07 23:59:05 -0700 2009
commit  ec6d7fadfe1dd8c0d2b71030c6ada153d736f366
tree    90686f45c5d920b45f4e26ef0b2493251b762ad9
parent  e5ca1eb175ed7b31d1ffe54edde8ed0b4013b223
name age message
file README Loading commit data...
file TODO
file irb.bat
file jruby.jar Wed Jul 15 10:47:16 -0700 2009 first commit [hakunin]
directory pocket_ruby/
directory ruby_home/
file server.bat Fri Jul 17 02:50:15 -0700 2009 nicer entry_point handling [hakunin]
README
 ___   ___   __    _     ____ _____      ___   _     ___   _
| |_) / / \ / /`  | |_/ | |_   | |      | |_) | | | | |_) \ \_/
|_|   \_\_/ \_\_, |_| \ |_|__  |_|      |_| \ \_\_/ |_|_)  |_|


Pocket ruby is a portable framework that uses JRuby.jar and provides high level
abstraction for building web apps.


USAGE:
 - run server.bat
 - see http://localhost:2046/



FEATURES

 - object persistance

    Just inherit record and all attributes
    that you define using blocks will be persisted.

    class Doggie < Record
      Block.describe(self, {
        :name => Title,
      })
    end

    Or you can use Record.persist for custom attributes.

    class Doggie < Record
      persist :name
    end


 - building blocks for your records

    class Task < Record
      Block.describe(self, {
        :name => Title,
        :hours => IntegerBlock,
        :programmer => BelongsTo.new(Programmer),
        :description => Text.new(:rows => 5),
        :state => StringBlock
      })
    end


 - scaffolding

    Use blocks to define the basic structure of you record
    and get the scaffolding behaviour at Programmer.public.

    If you define your own behaviour, you just extend the
    default scaffold, so there is no code generation and is
    code reuse.


 - domain namespaces

    class Task < Record
      Block.describe(self, {
        :name => Title,
        ...
      })
    end

    #site structure

    class PlanningGame < SiteRoot
      def initialize
        super
        # Task.public is the namespace,
        # it returns a class for behaviour
        # which has a default implementation
        # and that is how i do scaffolding
        map :index => Task.public.list
      end
    end


 - templating engine

    html {
      head { title "My little app" }
      body {
        h1 "My little app"
        add @content
      }
    }