Bluebream Documentation Release 1.0A4
Total Page:16
File Type:pdf, Size:1020Kb
BlueBream Documentation Release 1.0a4 Zope Foundation March 10, 2010 CONTENTS 1 Introduction 3 1.1 Overview.................................................3 1.2 Join our community...........................................4 1.3 Brief history...............................................4 1.4 More about the project..........................................5 1.5 Organization of the documentation...................................5 1.6 Thanks..................................................6 2 What’s New ? 9 2.1 What’s new in BlueBream 1.0 ?.....................................9 3 Getting Started 129 3.1 Introduction............................................... 129 3.2 Preparations............................................... 129 3.3 Installation................................................ 130 3.4 Creating a sample project........................................ 130 3.5 Building the application......................................... 132 3.6 Basic usage................................................ 133 3.7 Package directory structure....................................... 134 3.8 Example 1: Hello World without page template............................. 136 3.9 Example 2: Hello World with page template.............................. 137 3.10 Example 3: A dynamic hello world................................... 138 3.11 Conclusion................................................ 139 4 Concepts and Technologies 141 4.1 Concepts................................................. 141 4.2 Technologies............................................... 146 5 Tutorial — Part 1 149 5.1 Introduction............................................... 149 5.2 Starting a new project.......................................... 149 5.3 The site definition............................................ 156 5.4 The package meta-data.......................................... 157 5.5 Running Tests.............................................. 159 5.6 Creating the application object...................................... 159 5.7 Creating the main page.......................................... 164 5.8 Conclusion................................................ 165 6 Tutorial — Part 2 167 6.1 Introduction............................................... 167 i 6.2 Adding tickets.............................................. 167 6.3 Listing tickets.............................................. 171 6.4 Adding Comments............................................ 172 6.5 Conclusion................................................ 173 7 Manual 175 7.1 Browser Resource............................................ 175 7.2 Browser Page............................................... 176 7.3 Unit Testing............................................... 177 7.4 Interface................................................. 179 7.5 Zope Component Architecture...................................... 182 7.6 Content Component........................................... 188 7.7 Configuration............................................... 190 7.8 Startup.................................................. 192 7.9 Functional Testing............................................ 193 7.10 Skinning................................................. 195 7.11 Zope Schemas and Widgets....................................... 198 7.12 Forms................................................... 206 8 FAQ 207 8.1 General.................................................. 209 8.2 Concepts................................................. 211 8.3 Security.................................................. 211 8.4 User Interface.............................................. 213 8.5 Programming............................................... 216 8.6 Configuration and Setup......................................... 222 8.7 Miscellaneous.............................................. 225 9 HOWTOs 231 9.1 Default view for objects......................................... 231 9.2 Adding new package dependency.................................... 232 9.3 Retrieving absolute URL for an object.................................. 233 9.4 Dynamic fields in forms......................................... 234 9.5 Testing persistent objects......................................... 234 10 Core Development 237 10.1 Contributing to BlueBream....................................... 237 10.2 Developer Resources........................................... 237 10.3 Developing BlueBream......................................... 238 10.4 Technical Decisions........................................... 238 10.5 Documentation Writing Guidelines................................... 239 11 Reference 243 11.1 zope.app.wsgi — WSGI Application................................ 243 12 Glossary 247 13 Contributors 249 13.1 Logo Design............................................... 249 13.2 Other Contributors............................................ 249 14 Indices and tables 251 Module Index 253 Index 255 ii BlueBream Documentation, Release 1.0a4 Release 1.0a4 Date March 09, 2010 Warning: This documentation is under construction. See the Documentation Status page in wiki for the current status and timeline. CONTENTS 1 BlueBream Documentation, Release 1.0a4 2 CONTENTS CHAPTER ONE INTRODUCTION Warning: This documentation is under construction. See the Documentation Status page in wiki for the current status and timeline. 1.1 Overview BlueBream is a web framework written in the Python programming language. BlueBream is free/open source soft- ware, owned by the Zope Foundation, licensed under the Zope Public License (BSD like, GPL compatible license). BlueBream was previously known as Zope 3. A few of the features which distinguish BlueBream among Python web frameworks. • BlueBream is built on top of the Zope Tool Kit (ZTK), a distillation of many years of experience in meeting demanding requirements for stable, scalable software. • BlueBream leverages the power of Buildout a build system written in Python. • BlueBream uses the ZODB transactional object database, providing extremely powerful and easy to use persis- tence. • BlueBream uses ZCML, an XML based configuration language for registering components, providing limitless flexibility. If you don’t need the power of ZCML and the complexity it adds, try GROK, which adds a layer replacing the declarative configuration of ZCML with conventions and declarations in standard Python. • BlueBream features the Zope Component Architecture (ZCA) which implements Separation of concerns to create highly cohesive reusable components (zope.component). • BlueBream supports WSGI using Paste, PasteScript, and PasteDeploy. • BlueBream includes a number of components which provide well tested implementation of common require- ments. A few are of these are: – zope.publisher publishes Python objects on the web, it is geared towards WSGI compatibility – zope.security provides a generic mechanism supporting pluggable security policies – zope.testing and zope.testbrowser offer unit and functional testing frameworks – zope.pagetemplate is an xhtml-compliant templating language – zope.schema and zope.formlib provide a schema engine and automatic form generation machinery 3 BlueBream Documentation, Release 1.0a4 1.2 Join our community We invite you to become part of our community! You can become part of our community by joining/subscribing to these community platforms: • Mailing list: https://mail.zope.org/mailman/listinfo/bluebream • Twitter: http://twitter.com/bluebream • Blog: http://bluebream.posterous.com • IRC channel: #bluebream at freenode.net • Wiki: http://wiki.zope.org/bluebream • Ohloh.net: https://www.ohloh.net/p/bluebream • PyPi home : http://pypi.python.org/pypi/bluebream BlueBream developer community is an active community involved in the development of BlueBream itself. We are looking for contributors to this project. All the development related information in documented in the wiki. You can read this wiki page fore information: http://wiki.zope.org/bluebream/ContributingToBlueBream We aim to provide high quality free online documentation for BlueBream. If you would like to contribute, the Re- structuredText source for this website is available from the zope.org repository (please replace USERNAME with your zope.org username.): svn co svn+ssh://[email protected]/repos/main/bluebream/website If you don’t have svn commit access, please consult: becoming a contributor document. For any queries, please contact us in mailing list or irc chat, we can help you to get reference committer, which is required to fill the contributor agreement form. 1.3 Brief history Our story begins in 1996, Jim Fulton was technical director at digital creations. At the IPC (International Python Conference) that year, Jim gave a presentation on CGI: Python and Internet Programming. Jim, considering CGI less than elegant, envisioned a better way to program for the internet in Python. According to legend, Jim learned CGI on the plane to the conference, and designed Bobo on the plane ride back home. Digital creations then released three open-source Python software packages: Bobo, Document Template, and Bobopos. These packages provided a web publishing facility, text templating, and an object database and were the core of Principia, a commercial application server. In november of 1998, investor Hadar Pedhazur convinced Digital Creations to open source Principia. These packages evolved into the core components of Zope 2, and Digital Creations became Zope Corporation. Since those days, Zope has been under active development. It has evolved in several