Frequently Asked Questions (FAQ)
The most frequently asked questions about Project Zero are answered in this section. The
Core Developer's Guide has a wealth of information also. Feel free to ask your own questions in the
Forum or the
Comments section below.
General FAQ
What is Project Zero?
Project Zero is about agile development of the next generation of dynamic Web applications. Project Zero introduces a simple environment for creating, assembling and running applications based on popular Web technologies. The Project Zero environment includes a scripting runtime for Groovy and PHP with application programming interfaces optimized for producing REST-style services, integration mash-ups and rich Web interfaces.
back to top
What is ProjectZero.org?
The Web site www.projectzero.org is both an online Web community of people who share an interest in Project Zero and the primary infrastructure used for developing Project Zero itself. The community is composed of developers of Project Zero, users of Project Zero and other interested parties who might want to create extensions that enhance Project Zero. The community members seek and share information about Project Zero, get access to code that can be downloaded, and participate in the development process for Project Zero.
Above all, projectzero.org is an invitation for your feedback, insight, suggestions, criticism, and dialog. We believe this interaction will yield a better solution that is more targeted at the problems you have and a technology that truly delivers on its objectives.
back to top
Why an .org domain?
Projectzero.org is focused on freely available code and discussion of the technology and approaches that are suited to the development of the next generation of dynamic Web applications. While we do anticipate commercial activity around Project Zero, any such commercial activity (from IBM or third parties) will be separate from www.projectzero.org. Both the www.projectzero.org site and the code available here are expected to remain available as a separate, noncommercial entity focused on the technology and discussion of the technology.
back to top
Why is it called Project Zero?
The name Zero is a reminder of the project's aspirations:
- Zero unnecessary overhead and complexity
- Zero barriers to success
- Zero of what you don't need
back to top
Who is the intended audience for Project Zero?
Project Zero is intended for Web developers with scripting skills who want to create the next generation of dynamic Web applications quickly and efficiently.
back to top
Why would I be interested in Project Zero?
Project Zero is designed to enable faster, more productive development and deployment of Web applications and Web-based services. It's purpose is to allow you to spend more time writing actual code instead of complex configuration files. Small scripts and well-defined conventions replace conglomerates of code, configuration, and deployment information. To this point, Project Zero provides a great deal of assistance specifically targeted for development of applications using REST patterns. By adhering to REST patterns, developers can increase the interoperability of their components.
back to top
What are the benefits and features of Project Zero?
Project Zero gives developers the power to create modern Web applications very quickly. Zero achieves this in several ways. The platform is quite loosely coupled by design, which fosters componentization and ultimately, extensive code reuse. Project Zero optimizes time to value by maximizing coding efficiency. Scripting support is the pinnacle of coding efficiency, and as such, Zero provides extensive scripting support.
back to top
Who is working on Project Zero?
IBM incubated the initial release of Project Zero within IBM's internal technical community prior to releasing it publicly. IBM will continue to drive the development of the Zero Core with feedback and contributions from the community as described in some of the following sections.
back to top
How long has Project Zero been around?
The efforts began over a year ago and www.projectzero.org went live June 29th, 2007.
back to top
Can I contribute to Project Zero?
IBM is following a community driven commercial development process for Project Zero. Feedback and suggestions are welcome.
As the Project Zero community grows, there will be a facility for community members to share reusable components (for example, libraries, widgets and services). This is similar to the way Eclipse plug-ins work in that plug-ins extend the base Eclipse platform, but the plug-in itself is owned by the person or company that developed it.
back to top
If I develop extensions on Project Zero, who owns them?
You do.
back to top
Can I sell my extensions (or applications) that I develop on Project Zero?
Yes. You own the license to your code and can choose to sell the applications or make them available free of charge. The Project Zero license, however, does not allow you to redistribute the Project Zero code. You will need to point your customers to the Project Zero Website to obtain the Project Zero code and license.
back to top
Why does IBM think "community driven commercial development" is a good strategy?
The community driven commercial development process is designed to open up IBM's approach to commercial software development by asking customers to weigh in on future product releases as they are being developed. Today IBM's software development is estimated at 35% open source, leaving 65% of development behind closed doors. We want to build stronger ties to our customers and users, so we're providing a panoramic view of the development process for Project Zero. With regular milestones throughout the development of a release, users get the opportunity to see what’s coming, provide feedback, and help set priorities. Suggestions and decisions throughout the development cycle are logged out in the public for educational and historical purposes.
Someone commented that Project Zero is kind of like going into a restaurant and being able to see the chef prepare your meal. While you can not supply your own ingredients, you do have a say in the end result as it is being cooked.
back to top
Is Project Zero an open source project?
No. While Project Zero is not open source, it does potentially open up a new business model with new ways to embrace openness while maintaining some level of control. Project Zero is not an open source source project, but it is an open process project.
back to top
Does this mean IBM will not be pursuing new open source activities?
IBM remains committed to open source. Project Zero follows a commercial software development effort, in much the same way as other commercial offerings from IBM. The fact that Project Zero is based on a number of open source technologies and that it represents such a significant investment on top of these technologies speaks to IBM’s commitment.
back to top
How much does it cost?
Project Zero is licensed, not sold. The code available on projectzero.org is non-warranted and not supported. The license restricts use to 4 processor cores, does not allow commercial redistribution, and is provided for use on up to 4 instances per physical location. Please refer to the license agreement for further details. In the future, IBM might choose to provide commercial offerings if there is demand for support or for use beyond the limits of the current license. If you would like to provide feedback on this topic, you can contact Joe Lea, IBM Project Zero Product Manager at
jdlea@us.ibm.com or post to the forum on this site.
back to top
What is the business benefit of developing applications on Project Zero?
Project Zero simplifies next-generation Web application development and increases developer productivity by providing:
- A simplified approach to development through the introduction of agile programming and assembly techniques which are attractive to Web developers.
- A platform optimized around popular technologies found on the Web that are recognized for their ability to lower complexity and shorten development time. This platform uses REST and ATOM to form the basis of the service invocation model; JSON and XML as the data interchange format; and Ajax as the model for a rich client.
- Building blocks that enable developers to get applications up and running quickly by leveraging reusable components such as code snippets, widgets, libraries, templates and pre-built services.
back to top
How does Project Zero benefit IBM?
IBM provides a broad portfolio of software offerings designed to form the trusted infrastructure where mission critical business content and functionality reside. Our customers are achieving success in improving business unit productivity and reusing IT assets with SOA. Project Zero can make it easier and faster to build useful applications that leverage content and functionality that reside within SOA. We believe significant additional benefits of SOA will be born out of the myriad applications that are easily composed of these services.
back to top
What is the future of Project Zero?
This is an experiment and IBM will track all the development efforts and contributions and make an assessment on its success in the near future. IBM encourages developers to provide feedback on their experiences building Web applications with Project Zero, sharing ideas and suggestions for improvements with the community. In the future Project Zero will establish a public catalog where community members can share components built on Project Zero with other members of the community.
There is not a a public timeline for commercial offerings, though it's fair to say there will be ongoing updates to the code available here and that is expected to continue as long as there is interest in the project.
back to top
What types of applications can I develop with Project Zero?
Project Zero lends itself to the development of the next generation of dynamic Web applications. By
"Next Generation" we mean applications that incorporate popular "Web 2.0" patterns such as user contributed content, ratings, tagging, reputation management, and richer user experiences. By "dynamic Web applications" we mean Web accessible applications composed of services and feeds, with special assistance provided for applications that make use of increasingly popular Web technologies and approaches to Web development such as using REST and ATOM to form the basis of the service invocation model, using JSON and XML as the data interchange format, and using Ajax as the model for a richer client.
back to top
How can I stay updated on Project Zero news and technologies?
There are several ways to stay informed about the latest offerings, updates, and news about Project Zero:
- Subscribe to the Project Zero Newsletter.
- Subscribe to Really Simple Syndication (RSS) feeds.
- Sign up to "watch" the active discussion forums.
back to top
What if I have questions about Project Zero? What type of support is provided for Project Zero?
Although no official technical support is provided, Project Zero has an established Developer FAQ section and your questions and comments are encouraged and welcomed in the forum. Your questions will likely be answered by the development teams who monitor the forums or by the community using the same technology.
back to top
How do I report any bugs I find in a technology or suggest additional features?
Bug fixes and suggestions can be reported in the
bug tracking system.
Be sure to include the details of the bug you are reporting, including an example if possible. This information will allow the architects who developed the technology and the community who use it to respond to your concerns.
back to top
How can I download the Project Zero technology?
See the
Downloads section of this Web site. You must then accept the license agreement in order to download the platform.
back to top
Documentation.MilestoneTwo
Development FAQ
What platforms does Project Zero support?
As this is a technology incubator, all platforms fall under the "try it and give us feedback" model. Project Zero has been tested on Windows XP , Linux (SLES 10), and Mac. The Java/Groovy development languages are supported, as well as assembly techniques and other scripting support. PHP is currently not supported on Mac.
back to top
What is Groovy?
Groovy is a scripting language that supports Java syntax and provides templating capability. Groovy scripts are converted under the covers into Java classes, and executed in the same JVM as the rest of Zero's Java code. Scripts are converted into classes on each request, and thus changes do not require a server restart.
back to top
What value add does Project Zero provide on top of Groovy?
Through the GlobalContext and event infrastructure, the Project Zero core provides an extremely loosely coupled programming model which fosters componentization and reuse. The Project Zero core also provides a convention for arranging scripts on disk in such a way that prescribes their location in an application's URI space. Groovy is one vehicle for plugging into this environment, but on its own is simply a scripting language.
back to top
What IDE can I use to develop Zero applications?
The Eclipse IDE (
http://www.eclipse.org) works very well for the Zero environment. Zero supports the Eclipse Update Manager function to find and resolve prerequisites and updates.
back to top
How do I develop a Zero application?
The
Core Developer Guide is a great place to learn about the platform. For example, here is a
Simple Todo Example.
Also many examples will be available on the
Documentation page.
back to top
How do I report any bugs I find in a technology or suggest additional features?
Bug fixes and feature suggestions can be reported in the
bug tracking system.
Be sure to include the details of the bug you are reporting, including an example if possible. This information will allow the architects who developed the technology and the community who use it to respond to your concerns.
back to top
How do I install and run a Zero application?
Two steps:
1. unzip exported package
2. type 'zero run'
For more details, consult the
Core Developer Guide.
back to top
Are there sample applications I can follow?
Yes. There is a collection of sample applications available. Among them are "The Zile", which is an application composed of reusable Zero services, and the "employee demo," which is a nice demonstration of REST services. For more details, see the
tutorials page?.
back to top
How do I get a Zero application to talk to another Zero application?
Two separate applications may communicate using HTTP, specifically REST conventions. For client->server interactions, this is accomplished using Ajax through JavaScript. For interactions between server processes, Java/PHP based HTTP clients must be used to connect between them.
back to top
What is the security model in Project Zero?
Project Zero implements system-level authentication and authorization. Applications can take advantage of Zero's security by defining security rules which determine which resources are protected, by what means they are protected, and what users and groups are allowed to access those resources. More information may be found in the
security documentation.
back to top
Can Project Zero be extended?
Yes. The loosely coupled nature of the Project Zero platform fosters componentization, reuse, and extensibility. Extensions may be bundled as self-contained units that include configuration, code, and static Web content. Dependencies are resolved using a technology called Ivy, which means that extensions need not be bundled with all of their dependencies; they must simply be declared in a config file.
back to top
What does Project Zero do for database connection management?
zero.data.Manager and zero.data.groovy.Manager are lightweight abstractions on JDBC that provide an extensible framework and convenience methods for common query patterns. The Managers do not attempt to provide complex connection management. An instance of Manager can be obtained using a data source or a physical connection:
// groovy
def data = zero.data.groovy.Manager.create('personDb') // create mgr. on a datasource specified in zero.config
def data = new zero.data.groovy.Manager(datasource) // create mgr. on a datasource
def data = new zero.data.groovy.Manager(connection) // create mgr. on a connection
// java
zero.data.Manager data = zero.data.Manager.create("personDb");// create mgr. on a datasource specified in zero.config
zero.data.Manager data = new zero.data.Manager(datasource); // create mgr. on a datasource
zero.data.Manager data = new zero.data.Manager(connection); // create mgr. on a connection
The first examples of both Groovy and Java versions make use of the zero.config. The 'create' method configures the Manager with a data source that is specified in zero.config (see the
configuring data access documentation for more information).
If a Manager is created with a data source, the getConnection() and connection.close() will be called on every method that requires a connection. If the data source is configured with a connection pool, the getConnection() and connection.close() methods will obtain or close a connection, respectively, from the connection pool, thus achieving more resource efficiency. At present, Project Zero does not implement any connection pooling behavior but has been known to work with
Apache's DBCP and
C3PO, although these configurations are not officially supported.
If a Manager is created on a connection, the Manager will reuse the connection until it is closed (the application developer is responsible for closing the connection). The connection is also held open across method invocations when using certain transaction demarcation methods that are described in the answer to the
question on transactions.
back to top
What databases can my Project Zero application use?
Project Zero's zero.data module uses JDBC 3.0 at its core and therefore can connect to any database with JDBC drivers. If you find otherwise, please open a bug. More information on how to configure access to a database can be found in the
configuring data access documentation.
back to top
Does Project Zero support transactions?
Project Zero does not support JTA transaction through the use of Transaction Managers or Resource Managers. However, local, single-database transactions are supported. No more functionality beyond JDBC is offered. However, there are conventions and convenience methods that simplify the application code.
The following illustrates how to execute a group of database operations in one transaction. If an exception occurs, the group of statements is rolled back. If the closure successfully executes, the group is committed.
def data = zero.data.groovy.Manager.create('personDb')
data.inTransaction{
data.update(...)
data.update(...)
data.queryList(...)
}
However, more granular control over the group of statements may be desired in some situations. As such, this is made possible by using the following explicit example as a model:
def data = zero.data.groovy.Manager.create('personDb')
data.startTransaction()
try {
data.update(...)
data.update(...)
data.queryList(...)
data.commitTransaction()
} catch (Throwable e) {
data.rollbackTransaction()
} finally {
data.endTransaction()
}
back to top
What kinds of database queries can I perform?
You can perform any SQL queries that can be sent to the database via JDBC. The Manager provides a number of convenience methods that makes executing the queries and processing the results easier. For example, the Groovy version of Manager has a quick way to iterate over the results from a query:
def data = zero.data.groovy.Manager.create('personDb')
data.eachRow('SELECT * FROM person') { row ->
println '-----'
println row['id'] // use associative array syntax
println row.name // or dot notation
}
More than likely, you can achieve most of what you need with these convenience methods:
query // perform a query
queryFirst // perform a query and return the first row of the result set
queryList // perform a query and return the results in a List
queryArray // perform a query and return the results in an Array
queryIterator // perform a query and return the results as an Iterator
Each of the above methods is overloaded. ResultSet processing and, therefore, the returned data structure is different based on the method parameters. Below are some example uses of the query API:
// Retrieve data as a List of Map or tuples where the key is the column name
def data = zero.data.groovy.Manager.create('personDb')
def adultFemales = data.queryList('SELECT id, first_name FROM person WHERE age > ? AND sex = ?', [17, 'f'])
// will bind values from the list to SQL
for (person in adultFemales) {
println person['id']
println person['last_name']
}
For more advanced use cases, the convenience methods optionally make use of RowHandler and ResultHandler interface implementations to make it possible to fully customize the results processing of the executed queries.
View the
data access overview for more examples.
back to top
Does Project Zero do anything to help maintain the database schema?
No. Not at present. We are exploring a design (for some time now) and seeking feedback in this area of functionality and would appreciate any input.
back to top
I added a contextRoot to my application, and placed it behind a proxy, and now my application does not work. What happened?
This is probably the result of using absolute URIs, rather than relative URIs, in your application. Now that the relative root of your application has moved, the browser is no longer able to reach the files and resources that are referred to in the browser parsed HTML and JavaScript. For example, when you include Dojo in your application, you should use HTML like the following:
<script type="text/javascript" src="dojo.js"></script>
A general rule of thumb is that you should use page relative URIs in all of your static content, and that you should use the APIs provided by
URIUtils to create URIs in your dynamic content. This will allow the browser to be able to reach the content served by your Zero application regardless of the context root where the application is installed. For those instances where you must use absolute URIs, it will be necessary to use the
URIUtils API to create those absolute links.
back to top
PHP FAQ
What is PHP?
PHP is a widely used and easy to learn scripting language. It is primarily used for writing server side Web applications.
Background information about PHP can be found
here.
back to top
What is Project Zero doing to support PHP?
Project Zero includes an implementation of a runtime to support the PHP language, written in Java.
back to top
Is it a complete PHP implementation?
No. Our intent is to provide a PHP scripting environment for programmers who wish to exploit the unique benefits of Project Zero. We have therefore focused on the language level constructs so far, and spent less effort implementing function libraries. At this point we have a fairly complete implementation of the PHP language. The php.net PHP runtime ships numerous functions with the default distribution, that we have yet to implement. It is our intention, over time, to provide a full set of those library functions and language features that make sense in the Zero environment. We are certainly interested in feedback on prioritization of features as we move forward.
back to top
Can it run existing PHP applications?
Given the previous point, we don't believe many existing PHP applications will run unchanged on our implementation. Our focus is on enabling new applications to be developed in an agile fashion using the Project Zero environment rather than on enabling existing applications. That said we recognize that being able to run existing PHP code unchanged is an important contributor to the productivity of a PHP programmer and we look to be able to run some existing PHP applications in the future.
back to top
Does this pass the PHP implementation certification tests? And does it conform to the PHP specification?
PHP does not currently have an implementation certification test, nor a specification. At least, not in the same sense that some other languages do. There are a significant number of test cases available in the php.net PHP source download, we run these so that we can gauge how close we are getting to the php.net PHP implementation. In addition, we set up an IBM team to help complete the PHP test suite, they are writing additional PHP tests and contributing them directly to php.net. The tests that the IBM team are writing have improved the
gcov.php.net test coverage for PHP. These tests are already being used by the php.net PHP implementation to further ensure compatibility between php.net PHP releases.
back to top
What PHP functions and language features are currently working ?
Currently supported functions are listed here:
Core PHP functions. Currently supported language features are listed here:
PHP language features.
back to top
Can Project Zero use the php.net PHP runtime?
Not in the way you would typically think, in that the Project Zero runtime could invoke the php.net PHP runtime to service Web content. Of course, the php.net PHP runtime can be used in the following sorts of scenarios:
* It can be used as a client to Project Zero services via HTTP.
* A Project Zero service implementation could 'shell out' to the php.net PHP runtime to do some processing.
* A Project Zero service implementation could act as a client to a php.net PHP runtime via HTTP to do some processing.
back to top
Is there any relationship between Project Zero and the php.net PHP runtime?
Not in terms of code sharing for the runtime. The core runtime (the PHP 'virtual machine', if you will) is implemented in Java for our PHP implementation and in C for php.net PHP. The same is true for 'extension' functions. Of course, both implementations can use existing PHP libraries implemented in PHP. For instance, the Zend Framework. Note however that because of the currently missing base functions it's unlikely that frameworks implemented in PHP will run as desired today.
Also, as noted above, IBM engineers are contributing tests back to the PHP project, which are directly consumable by the php.net PHP implementation.
We have also spent some time working on the PHP Development Toolkit (PDT) at the Eclipse project, adding function to the PHP debugger to enable it to debug PHP code using the XDebug (dbgP) protocol. Our implementation, in fact, uses the XDebug protocol for it's own debug capabilities.
back to top
How do I get started with PHP and Project Zero?
See
PhpDevelopersGuide.
A good tutorial to start with is available
here.
back to top
Can I develop extensions to PHP in Java?
Yes, the engine has a Java extension API. This allows a Java developer to write new PHP language functions. It also allows a Java developer to leverage the huge number of Java class libraries available. More information on developing extensions can be found in
Extending PHP.
back to top
Can I debug PHP applications?
Yes, PHP source code debugging is available in Eclipse.
More information on setting up Eclipse for PHP debugging is available
here.
back to top
Known Problems
Why is the Derby plugin's option to start the database not available?
The Derby plugin for Eclipse does not work in conjunction with the
Groovy 1.0.1 plugin for Eclipse. If you plan to use both plugins you should not update the Groovy plugin beyond 1.0. Alternatively, you can install the updated Groovy 1.0.1 plugin by doing the following:
1. Download the 1.0.1 plugin from the
Groovy updateDev site
2. Unzip the contents into your ${eclipse_home} directory
3. Restart Eclipse
4. Navigate to
Help menu then select
Software Updates ->
Manage Configuration
5. Find the Groovy plugin (for example,
GroovyFeature 1.0.1)
6. Right-click on the feature, select
Replace with and left-click on
Another Version…
7. Select
GroovyFeature 1.0.1.20070726 and click
Finish
8. Restart Eclipse
Documentation.MilestoneTwo
Comments
How do I provide feedback?
-- marcg - 02 Oct 2007