diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-07-05 21:43:16 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-07-05 21:43:16 +0000 |
| commit | af50286ee2319673e5c41c3ea7aa2ce01e74622f (patch) | |
| tree | 6fc11f83a7008f274349c0788efb2c9e720bea87 /docs | |
| parent | a8a09adc5ccd704f34bbd5f176740e73278bc9c3 (diff) | |
| download | pyramid-af50286ee2319673e5c41c3ea7aa2ce01e74622f.tar.gz pyramid-af50286ee2319673e5c41c3ea7aa2ce01e74622f.tar.bz2 pyramid-af50286ee2319673e5c41c3ea7aa2ce01e74622f.zip | |
Tweak and change test output.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/introduction.rst | 95 |
1 files changed, 46 insertions, 49 deletions
diff --git a/docs/narr/introduction.rst b/docs/narr/introduction.rst index c863b499e..bc2c2c8a1 100644 --- a/docs/narr/introduction.rst +++ b/docs/narr/introduction.rst @@ -1,10 +1,9 @@ :mod:`repoze.bfg` Introduction ============================== -:mod:`repoze.bfg` is a Python web application framework. It is -inspired by :term:`Zope`, :term:`Pylons`, and :term:`Django`. -:mod:`repoze.bfg` uses the :term:`WSGI` protocol to handle requests -and responses. +:mod:`repoze.bfg` is a Python web framework. It is inspired by +:term:`Zope`, :term:`Pylons`, and :term:`Django`. :mod:`repoze.bfg` +uses the :term:`WSGI` protocol to handle requests and responses. Similarities to Other Frameworks -------------------------------- @@ -12,9 +11,9 @@ Similarities to Other Frameworks :mod:`repoze.bfg` was inspired by :term:`Zope`, :term:`Pylons` and :term:`Django`. -The :mod:`repoze.bfg` concept of traversal is inspired by -:term:`Zope`. Additionally, :mod:`repoze.bfg` uses the Zope Component -Architecture ("CA") internally, as do Zope 2, Zope 3, and +The :mod:`repoze.bfg` concept of :term:`traversal` is inspired by +:term:`Zope`. Additionally, :mod:`repoze.bfg` uses the :term:`Zope +Component Architecture` internally, as do Zope 2, Zope 3, and :term:`Grok`. :mod:`repoze.bfg` application developers may use either :term:`ZCML` (an XML dialect, used in Zope) or decorators to perform various application configuration tasks. The decorator support is @@ -22,19 +21,20 @@ provided by the :term:`Grok` project. Like Zope, :mod:`repoze.bfg` allows you to create applications which do not need to be forked or otherwise modified to be extended by a third party developer. -Like :term:`Pylons`, :mod:`repoze.bfg` is mostly policy-free. It -makes no assertions about which database you should use, and its +The :mod:`repoze.bfg` concept of :term:`URL dispatch` is inspired by +:term:`Pylons`. Like Pylons, :mod:`repoze.bfg` is mostly policy-free. +It makes no assertions about which database you should use, and its built-in templating facilities are only for convenience. In essence, it only supplies a mechanism to map URLs to :term:`view` code, along with a convention for calling those views. You are free to use third-party components in your application that fit your needs. Also -like Pylons, :mod:`repoze.bfg` is heavily dependent on WSGI. +like Pylons, :mod:`repoze.bfg` is dependent upon WSGI. The Django docs state that Django is *not* an "MVC" (model/view/controller) framework in their `FAQ -<http://www.djangoproject.com/documentation/faq/>`_. Django's -documentation does a good job of why explaining why they don't use -"MVC" acronym: +<http://www.djangoproject.com/documentation/faq/>`_. +:mod:`repoze.bfg` isn't either. Django's documentation does a good +job of why explaining why they don't use "MVC" acronym: Django appears to be a MVC framework, but you call the Controller the "view", and the View the "template". How come you don't use the @@ -60,18 +60,12 @@ documentation does a good job of why explaining why they don't use probably the framework itself: the machinery that sends a request to the appropriate view, according to the Django URL configuration. -:mod:`repoze.bfg` uses the same non-MVC terminology as Django (as -opposed to Rails or Pylons) in this respect. - -The skeleton code generator of :mod:`repoze.bfg` generates a directory -layout very simliar to the directory layout suggested by the `Django -Book <http://www.djangobook.com/>`_ . Additionally, as suggested -above, the concepts of :term:`view`, :term:`model` and -:term:`template` are used by :mod:`repoze.bfg` as they would be by -Django. - -To learn more about the concepts used by :mod:`repoze.bfg`, visit the -:ref:`glossary` for a listing of definitions. +:mod:`repoze.bfg` uses terminology similar to Django. The skeleton +code generator of :mod:`repoze.bfg` generates a directory layout very +simliar to the directory layout suggested by the `Django Book +<http://www.djangobook.com/>`_ . Additionally, as suggested above, +the concepts of :term:`view`, :term:`model` and :term:`template` are +used by :mod:`repoze.bfg` as they would be by Django. Differences from Other Frameworks --------------------------------- @@ -91,19 +85,23 @@ framework itself rather than by user code. Such a task would typically be performed by user-space decorators in other Python web frameworks. -Like Zope, but unlike :term:`Pylons` or :term:`Django`, when you build -a :mod:`repoze.bfg` application, if you obey certain constraints, the -application you produce can be reused, modified, re-integrated, or -extended by third-party developers without modification to the -original application itself. See :ref:`extending_chapter` for more -information about extending or modifying an existing :mod:`repoze.bfg` +Like Zope, but unlike :term:`Pylons` applications or most +:term:`Django` applications, when you build a :mod:`repoze.bfg` +application, if you obey certain constraints, the application you +produce can be reused, modified, re-integrated, or extended by +third-party developers without modification to the original +application itself. See :ref:`extending_chapter` for more information +about extending or modifying an existing :mod:`repoze.bfg` application. -Unlike application development using Zope, application developers -don't interact with the Zope Component Architecture ("CA") very much -during :mod:`repoze.bfg` application development. Instead, the -:mod:`repoze.bfg` framework tends to "hide" most interaction with the -CA behind special-purpose API functions. +:mod:`repoze.bfg` uses the :term:`Zope Component Architecture` under +the hood. However, while a Zope application developer tends to need +to understand the component architecture (and concepts such as +adapters, utilities, and interfaces) to create a non-trivial +application, a :mod:`repoze.bfg` application developer isn't required +to interact with or understand the component architecture at all. +:mod:`repoze.bfg` tends to "hide" most interaction with the component +architecture behind special-purpose API functions and ZCML directives. Also unlike :term:`Zope` and unlike other "full-featured" frameworks such as :term:`Django`, :mod:`repoze.bfg` makes no assumptions about @@ -143,12 +141,11 @@ easy to keep its documentation up-to-date, which is helpful to bring new developers up to speed. It's our goal that nothing remain undocumented about :mod:`repoze.bfg`. -*Speed*: :mod:`repoze.bfg` is meant to be fast, capable of serving on -the order of 100-1000 requests per second on today's commodity -hardware for views that do "real work" given proper application -implementation. The *hardware is cheap* mantra has its limits when -you're responsible for managing a great many machines: the fewer you -need, the less pain you'll have. +*Speed*: :mod:`repoze.bfg` is faster than many other popular Python +web frameworks for common tasks such as templating and simple response +generation. The "hardware is cheap" mantra has its limits when you're +responsible for managing a great many machines: the fewer you need, +the less pain you'll have. It's Tested ----------- @@ -156,7 +153,7 @@ It's Tested *If it ain't tested, it's broke.* We strive to test :mod:`repoze.bfg` completely. Below a run of the ``nosetests`` command configured to show code coverage information (run against the :mod:`repoze.bfg` -trunk as of the 1.0b1 release). +trunk as of the 1.0 release). .. code-block:: bash @@ -179,7 +176,7 @@ trunk as of the 1.0b1 release). ........................................................................... ........................................................................... ........................................................................... - ........................................ + ............................................ Name Stmts Exec Cover Missing ---------------------------------------------------------------------- repoze.bfg 0 0 100% @@ -198,7 +195,7 @@ trunk as of the 1.0b1 release). repoze.bfg.registry 51 51 100% repoze.bfg.request 67 67 100% repoze.bfg.resource 83 83 100% - repoze.bfg.router 166 166 100% + repoze.bfg.router 167 167 100% repoze.bfg.scripting 10 10 100% repoze.bfg.secpols 166 166 100% repoze.bfg.security 114 114 100% @@ -227,7 +224,7 @@ trunk as of the 1.0b1 release). repoze.bfg.tests.test_registry 95 95 100% repoze.bfg.tests.test_request 230 230 100% repoze.bfg.tests.test_resource 233 233 100% - repoze.bfg.tests.test_router 819 819 100% + repoze.bfg.tests.test_router 830 830 100% repoze.bfg.tests.test_scripting 44 44 100% repoze.bfg.tests.test_secpols 598 598 100% repoze.bfg.tests.test_security 294 294 100% @@ -241,7 +238,7 @@ trunk as of the 1.0b1 release). repoze.bfg.tests.test_urldispatch 166 166 100% repoze.bfg.tests.test_view 409 409 100% repoze.bfg.tests.test_wsgi 99 99 100% - repoze.bfg.tests.test_zcml 1235 1235 100% + repoze.bfg.tests.test_zcml 1290 1290 100% repoze.bfg.threadlocal 29 29 100% repoze.bfg.traversal 200 200 100% repoze.bfg.url 63 63 100% @@ -250,8 +247,8 @@ trunk as of the 1.0b1 release). repoze.bfg.wsgi 27 27 100% repoze.bfg.zcml 274 274 100% ---------------------------------------------------------------------- - TOTAL 9752 9752 100% + TOTAL 9819 9819 100% ---------------------------------------------------------------------- - Ran 640 tests in 22.304s + Ran 644 tests in 22.150s OK |
