How to develop a zope application
来源:互联网 发布:网络变压器 编辑:程序博客网 时间:2024/05/17 02:49
11.6. Building “Instance-Space” Applications¶
In Zope, there are a few ways to develop a web application. The simplest and fastest way, and the one we’ve been concentrating on thus far in this book, is to build an application in instance space. To understand the term “instance space”, we need to once again put on our “object orientation hats”.
When you create Zope objects by selecting them from the Zope “Add” list, you are creating instances of a class defined by someone else (see the Object Orientation chapter if you need to brush up on these terms). For example, when you add a Script (Python) object to your Zope database, you are creating an instance of the Script (Python) class. The Script (Python) class was written by a Zope Corporation engineer. When you select “Script (Python)” from the Add list, and you fill in the form to give an id and title and whatnot, and click the submit button on the form, Zope creates an instance of that class in the Folder of your choosing. Instances such as these are inserted into your Zope database and they live there until you delete them.
In the Zope application server, most object instances serve to perform presentation duties, logic duties, or content duties. You can “glue” these instances together to create basic Zope applications. Since these objects are really instances of a class, the term “instance space” is commonly used to describe the Zope root folder and all of its subfolders. “Building an application in instance space” is defined as the act of creating Zope object instances in this space and modifying them to act a certain way when they are executed.
Instance-space applications are typically created from common Zope objects. Script (Python) objects, Folders, Page Templates, and other Zope services can be glued together to build simple applications.
11.7. Instance-Space Applications vs. Python packages¶
In contrast to building applications in instance space, you may also build applications in Zope by building them as Python packages. Building an application as a package differs from creating applications in instance space inasmuch as the act of creating a package typically is more familiar to developers and does not constrain them in any way.
Building a package also typically allows you to more easily distribute an application to other people, and allows you to build objects that may more closely resemble your “problem space”.
Building a package is typically more complicated than building an “instance-space” application, so we get started here by describing how to build instance-space applications. When you find that it becomes difficult to maintain, extend, or distribute an instance-space application you’ve written, it’s probably time to reconsider rewriting it as a package.
- How to develop a zope application
- How to develop a window mobile application
- How to develop application
- How to Develop a Bootloader
- How to develop a person
- Learn How to Develop Android Application
- How To Develop a jQuery Plugin
- How to develop your win32 application by hands
- A new method to develop with ajax application
- 四、How to Develop a Boot Loader (1)
- 五、How To Develop A BootLoader (2)
- How to develop a virtual disk for Windows
- Day5、How to develop a test case with RIDE
- How to use libusb1.0 library to develop the application on Mac OS X
- how to manage Zope objects programmatically.
- How to build a struts application
- How to develop web applications?
- How to develop a lsmw for data migration for va01 or xk01 transaction.
- 【笔记】设计模式 - 1 单例模式
- [VB] VB6.0聊天室范例
- rar.exe 命令行参数
- 20100818
- PKU1080 最长公共字串 DP
- How to develop a zope application
- Xen 初学者指南
- 汇总C#.Net常用函数和方法集
- 稳定婚姻问题算法
- Ext2数据块分配
- java.util.HashMap.containsKey hibernate BUG
- RS485接口定义
- acl_users and user folder and user management in ZOpe
- Xen的安装笔记