Permalink
Browse files

Initial commit

  • Loading branch information...
0 parents commit e94ec84d1754a30e912bc6542406111584c5dd5c @seedifferently seedifferently committed Feb 19, 2012
Showing with 5,573 additions and 0 deletions.
  1. +14 −0 CHANGELOG.rst
  2. +142 −0 README.rst
  3. +18 −0 bottle/README.rst
  4. +29 −0 bottle/bottle_app.py
  5. BIN bottle/hello.db
  6. +10 −0 bottle/templates/db.tpl
  7. +12 −0 bottle/templates/hello.tpl
  8. +9 −0 bottle/templates/master.tpl
  9. +38 −0 bottle/wsgi.wsgi
  10. +18 −0 cakephp/README.rst
  11. +303 −0 cakephp/app/config/core.php
  12. +82 −0 cakephp/app/config/database.php
  13. +22 −0 cakephp/app/controllers/hellos_controller.php
  14. BIN cakephp/app/hello.db
  15. +762 −0 cakephp/app/models/datasources/dbo/dbo_sqlite3.php
  16. +8 −0 cakephp/app/models/hello.php
  17. +7 −0 cakephp/app/views/hellos/hellodb.ctp
  18. +2 −0 cakephp/app/views/hellos/hellos.ctp
  19. +12 −0 cakephp/app/views/layouts/default.ctp
  20. +18 −0 codeigniter/README.rst
  21. +362 −0 codeigniter/application/config/config.php
  22. +69 −0 codeigniter/application/config/database.php
  23. +46 −0 codeigniter/application/config/routes.php
  24. +21 −0 codeigniter/application/controllers/hello.php
  25. +10 −0 codeigniter/application/controllers/index.html
  26. BIN codeigniter/application/hello.db
  27. +10 −0 codeigniter/application/index.html
  28. +10 −0 codeigniter/application/models/index.html
  29. +18 −0 codeigniter/application/views/hellodb.php
  30. +13 −0 codeigniter/application/views/hellos.php
  31. +10 −0 codeigniter/application/views/index.html
  32. 0 django/HelloWorld/__init__.py
  33. BIN django/HelloWorld/hello.db
  34. +14 −0 django/HelloWorld/manage.py
  35. +1 −0 django/HelloWorld/models/__init__.py
  36. +11 −0 django/HelloWorld/models/hello.py
  37. +149 −0 django/HelloWorld/settings.py
  38. +9 −0 django/HelloWorld/templates/base.html
  39. +9 −0 django/HelloWorld/templates/hellodb.html
  40. +4 −0 django/HelloWorld/templates/hellos.html
  41. 0 django/HelloWorld/templates/index.html
  42. +21 −0 django/HelloWorld/urls.py
  43. +13 −0 django/HelloWorld/views.py
  44. +18 −0 django/README.rst
  45. +36 −0 django/wsgi.wsgi
  46. +18 −0 flask/README.rst
  47. +26 −0 flask/flask_app.py
  48. BIN flask/hello.db
  49. +10 −0 flask/templates/db.html
  50. +12 −0 flask/templates/hello.html
  51. +9 −0 flask/templates/master.html
  52. +34 −0 flask/wsgi.wsgi
  53. +18 −0 kohana/README.rst
  54. +120 −0 kohana/application/bootstrap.php
  55. +10 −0 kohana/application/classes/controller/hello.php
  56. +15 −0 kohana/application/classes/controller/hellodb.php
  57. +17 −0 kohana/application/classes/controller/helloorm.php
  58. +13 −0 kohana/application/classes/controller/hellos.php
  59. +14 −0 kohana/application/classes/model/hello.php
  60. +16 −0 kohana/application/config/database.php
  61. BIN kohana/application/hello.db
  62. +7 −0 kohana/application/views/hellodb.php
  63. +7 −0 kohana/application/views/helloorm.php
  64. +1 −0 kohana/application/views/hellos.php
  65. +22 −0 kohana/application/views/master.php
  66. +3 −0 pyramid/HelloWorld/CHANGES.txt
  67. +4 −0 pyramid/HelloWorld/README.txt
  68. BIN pyramid/HelloWorld/hello.db
  69. +25 −0 pyramid/HelloWorld/helloworld/__init__.py
  70. +82 −0 pyramid/HelloWorld/helloworld/models.py
  71. +10 −0 pyramid/HelloWorld/helloworld/templates/db.jinja2
  72. +12 −0 pyramid/HelloWorld/helloworld/templates/hello.jinja2
  73. +9 −0 pyramid/HelloWorld/helloworld/templates/master.jinja2
  74. +22 −0 pyramid/HelloWorld/helloworld/views.py
  75. +22 −0 pyramid/HelloWorld/production.ini
  76. +44 −0 pyramid/HelloWorld/setup.py
  77. +18 −0 pyramid/README.rst
  78. +35 −0 pyramid/wsgi.wsgi
  79. +33 −0 rails/Gemfile
  80. +18 −0 rails/README.rst
  81. +10 −0 rails/app/controllers/hello_controller.rb
  82. +2 −0 rails/app/models/hello.rb
  83. +7 −0 rails/app/views/hello/hellodb.html.erb
  84. +1 −0 rails/app/views/hello/hellos.html.erb
  85. +11 −0 rails/app/views/layouts/application.html.erb
  86. +25 −0 rails/config/database.yml
  87. +62 −0 rails/config/routes.rb
  88. BIN rails/db/production.sqlite3
  89. +7 −0 rails/db/seeds.rb
  90. +18 −0 sinatra/README.rst
  91. +6 −0 sinatra/config.ru
  92. BIN sinatra/hello.db
  93. +17 −0 sinatra/sinatra_app.rb
  94. +7 −0 sinatra/views/hellodb.erb
  95. +1 −0 sinatra/views/hellos.erb
  96. +11 −0 sinatra/views/layout.erb
  97. +18 −0 symfony/README.rst
  98. +12 −0 symfony/app/Resources/views/base.html.twig
  99. +48 −0 symfony/app/autoload.php
  100. +60 −0 symfony/app/config/config.yml
  101. +13 −0 symfony/app/config/parameters.ini
  102. +8 −0 symfony/app/config/routing.yml
  103. BIN symfony/hello.db
  104. +9 −0 symfony/src/Acme/HelloBundle/AcmeHelloBundle.php
  105. +20 −0 symfony/src/Acme/HelloBundle/Controller/DefaultController.php
  106. +15 −0 symfony/src/Acme/HelloBundle/Controller/HelloController.php
  107. +16 −0 symfony/src/Acme/HelloBundle/Controller/HellodbController.php
  108. +28 −0 symfony/src/Acme/HelloBundle/DependencyInjection/AcmeHelloExtension.php
  109. +29 −0 symfony/src/Acme/HelloBundle/DependencyInjection/Configuration.php
  110. +25 −0 symfony/src/Acme/HelloBundle/Entity/Hello.php
  111. +11 −0 symfony/src/Acme/HelloBundle/Resources/config/routing.yml
  112. +7 −0 symfony/src/Acme/HelloBundle/Resources/config/services.yml
  113. 0 symfony/src/Acme/HelloBundle/Resources/doc/index.rst
  114. +11 −0 symfony/src/Acme/HelloBundle/Resources/translations/messages.fr.xliff
  115. +5 −0 symfony/src/Acme/HelloBundle/Resources/views/Default/hello.html.twig
  116. +10 −0 symfony/src/Acme/HelloBundle/Resources/views/Default/hellodb.html.twig
  117. 0 symfony/src/Acme/HelloBundle/Resources/views/Default/index.html.twig
  118. +17 −0 symfony/src/Acme/HelloBundle/Tests/Controller/DefaultControllerTest.php
  119. +10 −0 turbogears/HelloWorld/HelloWorld.egg-info/PKG-INFO
  120. +47 −0 turbogears/HelloWorld/HelloWorld.egg-info/SOURCES.txt
  121. +1 −0 turbogears/HelloWorld/HelloWorld.egg-info/dependency_links.txt
  122. +7 −0 turbogears/HelloWorld/HelloWorld.egg-info/entry_points.txt
  123. +4 −0 turbogears/HelloWorld/HelloWorld.egg-info/paster_plugins.txt
  124. +5 −0 turbogears/HelloWorld/HelloWorld.egg-info/requires.txt
  125. +1 −0 turbogears/HelloWorld/HelloWorld.egg-info/top_level.txt
  126. +4 −0 turbogears/HelloWorld/MANIFEST.in
  127. +24 −0 turbogears/HelloWorld/README.txt
  128. +122 −0 turbogears/HelloWorld/development.ini
  129. +14 −0 turbogears/HelloWorld/ez_setup/README.txt
  130. +229 −0 turbogears/HelloWorld/ez_setup/__init__.py
  131. BIN turbogears/HelloWorld/hello.db
  132. +2 −0 turbogears/HelloWorld/helloworld/__init__.py
  133. +2 −0 turbogears/HelloWorld/helloworld/config/__init__.py
  134. +40 −0 turbogears/HelloWorld/helloworld/config/app_cfg.py
  135. +88 −0 turbogears/HelloWorld/helloworld/config/deployment.ini
  136. +9 −0 turbogears/HelloWorld/helloworld/config/environment.py
  137. +39 −0 turbogears/HelloWorld/helloworld/config/middleware.py
  138. +2 −0 turbogears/HelloWorld/helloworld/controllers/__init__.py
  139. +21 −0 turbogears/HelloWorld/helloworld/controllers/controller.template
  140. +30 −0 turbogears/HelloWorld/helloworld/controllers/error.py
  141. +61 −0 turbogears/HelloWorld/helloworld/controllers/root.py
  142. +5 −0 turbogears/HelloWorld/helloworld/controllers/secure.py
  143. +35 −0 turbogears/HelloWorld/helloworld/controllers/template.py
  144. +24 −0 turbogears/HelloWorld/helloworld/i18n/ru/LC_MESSAGES/helloworld.po
  145. +2 −0 turbogears/HelloWorld/helloworld/lib/__init__.py
  146. +18 −0 turbogears/HelloWorld/helloworld/lib/app_globals.py
  147. +29 −0 turbogears/HelloWorld/helloworld/lib/base.py
  148. +5 −0 turbogears/HelloWorld/helloworld/lib/helpers.py
  149. +62 −0 turbogears/HelloWorld/helloworld/model/__init__.py
  150. +25 −0 turbogears/HelloWorld/helloworld/model/hello.py
  151. +22 −0 turbogears/HelloWorld/helloworld/model/model.template
  152. +2 −0 turbogears/HelloWorld/helloworld/templates/__init__.py
  153. +16 −0 turbogears/HelloWorld/helloworld/templates/db.html
  154. +10 −0 turbogears/HelloWorld/helloworld/templates/db.jinja
  155. +10 −0 turbogears/HelloWorld/helloworld/templates/db.mak
  156. +18 −0 turbogears/HelloWorld/helloworld/templates/hello.html
  157. +12 −0 turbogears/HelloWorld/helloworld/templates/hello.jinja
  158. +10 −0 turbogears/HelloWorld/helloworld/templates/hello.mak
  159. +13 −0 turbogears/HelloWorld/helloworld/templates/master.html
  160. +9 −0 turbogears/HelloWorld/helloworld/templates/master.jinja
  161. +10 −0 turbogears/HelloWorld/helloworld/templates/master.mak
  162. +64 −0 turbogears/HelloWorld/helloworld/tests/__init__.py
  163. +2 −0 turbogears/HelloWorld/helloworld/tests/functional/__init__.py
  164. +1 −0 turbogears/HelloWorld/helloworld/tests/functional/test_authentication.py
  165. +58 −0 turbogears/HelloWorld/helloworld/tests/functional/test_root.py
  166. +52 −0 turbogears/HelloWorld/helloworld/tests/models/__init__.py
  167. +7 −0 turbogears/HelloWorld/helloworld/tests/models/test_auth.py
  168. +19 −0 turbogears/HelloWorld/helloworld/websetup/__init__.py
  169. +16 −0 turbogears/HelloWorld/helloworld/websetup/bootstrap.py
  170. +21 −0 turbogears/HelloWorld/helloworld/websetup/schema.py
  171. +90 −0 turbogears/HelloWorld/production.ini
  172. +32 −0 turbogears/HelloWorld/setup.cfg
  173. +45 −0 turbogears/HelloWorld/setup.py
  174. +25 −0 turbogears/HelloWorld/test.ini
  175. +18 −0 turbogears/README.rst
  176. +35 −0 turbogears/wsgi.wsgi
  177. +18 −0 webgo/README.rst
  178. BIN webgo/hello.db
  179. +26 −0 webgo/hello.go
  180. +9 −0 webgo/tmpl/db.mustache
  181. +11 −0 webgo/tmpl/hellodb.mustache
  182. +11 −0 webgo/tmpl/hellos.mustache
  183. +1 −0 webgo/tmpl/lipsum.mustache
  184. +18 −0 yii/README.rst
  185. +90 −0 yii/protected/config/main.php
  186. +9 −0 yii/protected/controllers/HelloController.php
  187. +10 −0 yii/protected/controllers/HellodbController.php
  188. +9 −0 yii/protected/controllers/HellosController.php
  189. BIN yii/protected/data/hello.db
  190. +28 −0 yii/protected/data/schema.mysql.sql
  191. +28 −0 yii/protected/data/schema.sqlite.sql
  192. BIN yii/protected/data/testdrive.db
  193. +84 −0 yii/protected/models/Hello.php
  194. +9 −0 yii/protected/views/hellodb/index.php
  195. +3 −0 yii/protected/views/hellos/index.php
  196. +12 −0 yii/protected/views/layouts/main.php
@@ -0,0 +1,14 @@
+================================================================================
+Changelog
+================================================================================
+
+
+09/12/2011
+================================================================================
+
+* Updated Ubuntu LTS AMI (ami-fbbf7892 ubuntu-images-us/ubuntu-lucid-10.04-
+ amd64-server-20110719.manifest.xml)
+* Rails 2.x and 3.0 were dropped in favor of Rails 3.1.
+* CakePHP 1.2 was dropped in favor of 1.3, but Symfony and Yii were added as
+ they seem to have considerable market share.
+* Corrected faulty configuration of CakePHP's caching engine.
@@ -0,0 +1,142 @@
+================================================================================
+The Great Web Framework Shootout
+================================================================================
+
+| Copyright: (c) 2012 Seth Davis
+| http://blog.curiasolutions.com/the-great-web-framework-shootout/
+
+
+Synopsis
+================================================================================
+
+Welcome to the great web framework shootout. Here you will find test code and
+benchmark results comparing the performance of a few of the most popular F/OSS
+web frameworks in use today.
+
+Please see the `Great Web Framework Shootout`_ website for more information.
+
+.. _Great Web Framework Shootout:
+ http://blog.curiasolutions.com/the-great-web-framework-shootout/
+
+
+Benchmark Results
+================================================================================
+
+Three basic tests were set up for each framework up to run. Below are the
+results of each test in requests per second from highest (best performance) to
+lowest (worst performance).
+
+
+The "Hello World" String Test
+--------------------------------------------------------------------------------
+
+This test simply spits out a string response. There's no template or DB calls
+involved, so the level of processing should be minimal.
+
+================= ========
+Framework Reqs/sec
+================= ========
+web.go (Go r59) 3346
+Pyramid 1.2 3026
+Bottle 0.9.6 2825
+Django 1.3.1 2159
+Flask 0.7.2 2054
+Sinatra 1.2.6 1583
+CodeIgniter 2.0.3 929
+TG 2.1.2 839
+Yii 1.1.8 726
+Kohana 3.2.0 714
+Rails 3.1 711
+Symfony 2.0.1 273
+CakePHP 1.3.11 254
+================= ========
+
+
+The "Hello World" Template Test
+--------------------------------------------------------------------------------
+
+This test prints out Lorem Ipsum via a template (thus engaging the framework's
+templating systems).
+
+================= ========
+Framework Reqs/sec
+================= ========
+Bottle 0.9.6 2417
+web.go (Go r59) 1959
+Flask 0.7.2 1918
+Pyramid 1.2 1650
+Sinatra 1.2.6 1329
+Django 1.3.1 1005
+CodeIgniter 2.0.3 884
+Kohana 3.2.0 675
+TG 2.1.2 663
+Rails 3.1 625
+Yii 1.1.8 548
+CakePHP 1.3.11 203
+Symfony 2.0.1 171
+================= ========
+
+
+The "Hello World" Template Test With DB Query
+--------------------------------------------------------------------------------
+
+This test loads 5 rows of Lorem Ipsum from a SQLite DB (via the default ORM or
+a sqlite3 driver) and then prints them out through a template (thus engaging
+both the framework’s ORM/DB driver and the templating system).
+
+================= ========
+Framework Reqs/sec
+================= ========
+Bottle 0.9.6 1562
+Flask 0.7.2 1191
+Sinatra 1.2.6 982
+web.go (Go r59) 741
+Pyramid 1.2 555
+CodeIgniter 2.0.3 542
+Django 1.3.1 465
+Rails 3.1 463
+Kohana 3.2.0 423
+TG 2.1.2 298
+Yii 1.1.8 201
+CakePHP 1.3.11 193
+Symfony 2.0.1 113
+================= ========
+
+
+Test Platform Setup
+================================================================================
+
+All tests were performed on Amazon's EC2 with the following configuration:
+
+* ami-fbbf7892 m1.large ubuntu-images-us/ubuntu-lucid-10.04-amd64-server-
+ 20110719.manifest.xml
+* As a "Large" instance, Amazon describes the resources as: 7.5 GB of memory, 4
+ EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each), 850 GB of
+ local instance storage, 64-bit platform.
+* Apache 2.2.14 was used. (Yes, I know there are other options, but with
+ Apache's market share I figured it would be a good baseline.)
+* Python 2.6.5 and mod_wsgi 2.8 (embedded mode) were used for the Python based
+ tests.
+* Ruby 1.9.2p290 and Phusion Passenger 3.0.9 were used for the Ruby based tests.
+* PHP 5.3.2 (with APC enabled) was used for the PHP based tests.
+* ApacheBench was run with -n 10000 and -c 10 about 5-10 times each, and the
+ "best guess average" was chosen.
+
+
+Most Recent Changes
+================================================================================
+
+09/12/2011
+--------------------------------------------------------------------------------
+
+* Updated Ubuntu LTS AMI (ami-fbbf7892 ubuntu-images-us/ubuntu-lucid-10.04-
+ amd64-server-20110719.manifest.xml)
+* Rails 2.x and 3.0 were dropped in favor of Rails 3.1.
+* CakePHP 1.2 was dropped in favor of 1.3, but Symfony and Yii were added as
+ they seem to have considerable market share.
+* Corrected faulty configuration of CakePHP's caching engine.
+
+See `CHANGELOG.rst`_ for more.
+
+.. _CHANGELOG.rst: http://github.com/seedifferently/the-great-web-framework-
+ shootout/blob/master/CHANGELOG.rst
@@ -0,0 +1,18 @@
+================================================================================
+Bottle test code for The Great Web Framework Shootout
+================================================================================
+
+| Copyright: (c) 2012 Seth Davis
+| http://blog.curiasolutions.com/the-great-web-framework-shootout/
+
+
+Synopsis
+================================================================================
+
+This code was last tested using Bottle **v0.9.6** and will likely perform
+differently when using a different version.
+
+Please see `The Great Web Framework Shootout`_ for more information.
+
+.. _The Great Web Framework Shootout:
+ http://blog.curiasolutions.com/the-great-web-framework-shootout/
@@ -0,0 +1,29 @@
+import os
+import sqlite3
+#from bottle import run
+from bottle import route
+from bottle import jinja2_template as template
+
+
+@route('/')
+def index():
+ return 'Hello World!'
+
+@route('/jinja_hello')
+def hello():
+ return template('templates/hello')
+
+@route('/jinja_sql')
+def hellodb():
+ db = sqlite3.connect(os.path.join(os.path.dirname(os.path.realpath(__file__))) + '/hello.db')
+
+ rows = db.execute('select id, data from hello order by id asc')
+ lipsum = [dict(id=row[0], data=row[1]) for row in rows.fetchall()]
+
+ return template('templates/db', hello=lipsum)
+
+
+#if __name__ == '__main__':
+# from bottle import debug
+# debug(True)
+# run(host='localhost', port=8080)
Binary file not shown.
@@ -0,0 +1,10 @@
+{% extends "templates/master.tpl" %}
+{% block content %}
+ <p>Lorem ipsum dolor sit amet, consecteteur adipiscing elit nisi ultricies. Condimentum vel, at augue nibh sed. Diam praesent metus ut eros, sem penatibus. Pellentesque. Fusce odio posuere litora non integer habitant proin. Metus accumsan nibh facilisis nostra lobortis cum diam tellus. Malesuada nostra a volutpat pede primis congue nisl feugiat in fermentum. Orci in hymenaeos. Eni tempus mi mollis lacinia orci interdum lacus. Sollicitudin aliquet, etiam. Ac. Mi, nullam ligula, tristique penatibus nisi eros nisl pede pharetra congue, aptent nulla, rhoncus tellus morbi, ornare. Magna condimentum erat turpis. Fusce arcu ve suscipit nisi phasellus rutrum a dictumst leo, laoreet dui, ultricies platea. Porta venenatis fringilla vestibulum arcu etiam condimentum non.</p>
+
+ <table border="1">
+ {% for row in hello %}
+ <tr><td>{{ row['id'] }}</td><td>{{ row['data'] }}</td></tr>
+ {% endfor %}
+ </table>
+{% endblock %}
@@ -0,0 +1,12 @@
+{% extends "templates/master.tpl" %}
+{% block content %}
+ <p>Lorem ipsum dolor sit amet, consecteteur adipiscing elit nisi ultricies. Condimentum vel, at augue nibh sed. Diam praesent metus ut eros, sem penatibus. Pellentesque. Fusce odio posuere litora non integer habitant proin. Metus accumsan nibh facilisis nostra lobortis cum diam tellus. Malesuada nostra a volutpat pede primis congue nisl feugiat in fermentum. Orci in hymenaeos. Eni tempus mi mollis lacinia orci interdum lacus. Sollicitudin aliquet, etiam. Ac. Mi, nullam ligula, tristique penatibus nisi eros nisl pede pharetra congue, aptent nulla, rhoncus tellus morbi, ornare. Magna condimentum erat turpis. Fusce arcu ve suscipit nisi phasellus rutrum a dictumst leo, laoreet dui, ultricies platea. Porta venenatis fringilla vestibulum arcu etiam condimentum non.</p>
+
+ {#
+ <table border="1">
+ {% for k, v in request.environ.iteritems() %}
+ <tr><td>{{ k | escape }}</td><td>{{ v | escape }}</td></tr>
+ {% endfor %}
+ </table>
+ #}
+{% endblock %}
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+ <title>Hello World</title>
+</head>
+<body>
+ {% block content %}{% endblock %}
+</body>
+</html>
@@ -0,0 +1,38 @@
+import os, sys
+
+# override stdout
+sys.stdout = sys.stderr
+
+# import site directives for virtualenv
+import site
+
+ALLDIRS = ['/var/www/venv_bottle/lib/python2.6/site-packages']
+
+# Remember original sys.path.
+prev_sys_path = list(sys.path)
+
+# Add each new site-packages directory.
+for directory in ALLDIRS:
+ site.addsitedir(directory)
+
+# Reorder sys.path so new directories at the front.
+new_sys_path = []
+for item in list(sys.path):
+ if item not in prev_sys_path:
+ new_sys_path.append(item)
+ sys.path.remove(item)
+sys.path[:0] = new_sys_path
+
+# append project root directory path
+path = '/var/www/bottle_096'
+if path not in sys.path:
+ sys.path.append(path)
+
+os.environ['PYTHON_EGG_CACHE'] = '/var/www/.python-eggs'
+
+os.chdir(os.path.dirname(__file__))
+
+import bottle
+import bottle_app
+application = bottle.default_app()
+
@@ -0,0 +1,18 @@
+================================================================================
+CakePHP test code for The Great Web Framework Shootout
+================================================================================
+
+| Copyright: (c) 2012 Seth Davis
+| http://blog.curiasolutions.com/the-great-web-framework-shootout/
+
+
+Synopsis
+================================================================================
+
+This code was last tested using CakePHP **v1.3.11** and will likely perform
+differently when using a different version.
+
+Please see `The Great Web Framework Shootout`_ for more information.
+
+.. _The Great Web Framework Shootout:
+ http://blog.curiasolutions.com/the-great-web-framework-shootout/
Oops, something went wrong.

0 comments on commit e94ec84

Please sign in to comment.