Permalink
Browse files

02| Create the Application

`pakyow new the-trend-factory` creates a new Pakyow application skeleton
  • Loading branch information...
robertodecurnex committed Aug 25, 2011
1 parent 8bafa3e commit d3028684b577d03eba07301968bc44a3ca0da4e1
View
54 README
@@ -0,0 +1,54 @@
+# Introduction
+
+Pakyow is a web framework for Ruby that knocks out projects with a serious
+punch. Pound for pound its the best way to build a web app. Get ready to rumble.
+
+Pakyow brings a unique approach to development:
+
+## Views are views.
+Views are 100% HTML, no template language required. The view has finally been
+freed from logic.
+
+## Views are data aware.
+A view knows what it presents. Use this to create powerful connections between
+business logic and views.
+
+## Keep you moving forward.
+Prototype an app by building the views first. Then write the view logic
+without changing a single view.
+
+There are two main components of Pakyow. The first is Pakyow Core, which
+handles routing requests to business logic. The second component is Pakyow
+Presenter, which gives an application the ability to have a presentation
+layer and provides mechanisms for the controller to bind data to the
+presentation layer. Pakyow Core can operate independently of Pakyow
+Presenter for those cases where an application doesn't need a presentation layer.
+
+# Getting Started
+
+1. Install Pakyow:
+
+gem install pakyow
+
+2. Create a new Pakyow application from the command prompt:
+
+pakyow new webapp
+
+3. Move to the "webapp" directory and start the application:
+
+cd webapp; pakyow server
+
+4. You'll find the application running here: http://localhost:3000
+
+# Next Steps
+
+The following resources might be handy:
+
+Website:
+http://pakyow.com
+
+Manual:
+http://pakyow.com/manual
+
+Code:
+http://github.com/metabahn/pakyow
@@ -0,0 +1,6 @@
+class ApplicationController
+ include Pakyow::Helpers
+
+ def index
+ end
+end
View
@@ -0,0 +1 @@
+<h1>Welcome to Pakyow!</h1>
View
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Pakyow</title>
+</head>
+
+<body>
+ <div id="wrapper">
+ <div id="main"></div>
+ </div>
+</body>
+</html>
View
@@ -0,0 +1,10 @@
+require 'config/application'
+PakyowApplication::Application.stage(:development)
+
+app = Rack::Builder.new do
+ # Needed for Pakyow to work
+ use Rack::MethodOverride
+ run PakyowApplication::Application.new
+end.to_app
+
+run(app)
View
@@ -0,0 +1,18 @@
+require 'rubygems'
+require 'pakyow'
+
+module PakyowApplication
+ class Application < Pakyow::Application
+ config.app.default_environment = :development
+
+ configure(:development) do
+ end
+
+ routes do
+ default :ApplicationController, :index
+ end
+
+ middleware do
+ end
+ end
+end
View
No changes.
View
No changes.
View
@@ -0,0 +1,5 @@
+env = ARGV[1] || 'development'
+env = env.split('=')[1] || env
+
+require 'config/application'
+PakyowApplication::Application.stage(env.to_sym)

0 comments on commit d302868

Please sign in to comment.