Frequently Asked Questions

The most frequently asked questions about Project Zero are answered in this section. The Developer's Guide has a wealth of information also. Feel free to ask your own questions in the Forum.

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 WebSphere sMash?

After nearly a year of incubation, we are proud to announce IBM WebSphere sMash and IBM WebSphere sMash Developer Edition. These two products are based on the technology developed here at projectzero.org. Project Zero will continue to live as the incubator project, with frequent builds of the latest technology. WebSphere sMash Developer Edition will be a stable build of Project Zero, offered free of charge for development and limited deployment usage to anyone and everyone who wishes to download it. Finally, WebSphere sMash, the retail product, will give businesses the opportunity to deploy this same innovative technology, to simplify their application creation, and greatly improve their time to value.

The following is a comparison of these three offerings:

  • IBM WebSphere sMash consists of only stable modules for production deployment. WebSphere sMash is available for purchase. Watch the WebSphere sMash product page at IBM.com for details on availability:
  • IBM WebSphere sMash Developer Edition includes tools useful for developing applications in WebSphere sMash and is free for development and limited deployment (see license for details.)
  • Project Zero gives access to the latest features by defaulting to the experimental modules. Project Zero is free for development and limited deployment (see license for details).

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 targeted at the problems you have and a technology that truly delivers on its objectives.
back to top

Why does the Web use the .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 the www.projectzero.org site. 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. Its purpose is to allow developers 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 accomplish this, 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. Project 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, Project 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 in mid 2006 and the www.projectzero.org site went live June 29th, 2007.
back to top

What is the future of Project Zero?

Project Zero is an experiment. IBM is tracking the development efforts and contributions to Project Zero and will 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

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 is coming, provide feedback, and help set priorities. Suggestions and decisions throughout the development cycle are logged in the public view 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 the projectzero.org site 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 that 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
    For the data interchange format
    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. IBM's 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
  • 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. This includes 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 or suggestion you are making, 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 to download the platform.
back to top



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, and PHP development languages are supported, as well as assembly techniques and other scripting support.
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 run in the same JVM as the rest of Project Zero's Java code. Scripts are converted into classes on each request, therefore 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 Project Zero environment. Project 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 Developer's Guide is a great place to learn about the platform and includes tutorials, demos and samples. Also check the Documentation page and Blogs for additional examples and techniques.
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?

The fast path to install and run a Zero applications:

  1. Unzip the exported package
  2. Type zero run.

For more detailed information, see the Developer's Guide.
back to top

Are there sample applications I can follow?

Yes. There is a collection of sample applications available. Among them is the "employee demo," which is a nice demonstration of REST services. For more details, see the Developer's Guide.
back to top

How do I get a Zero application to talk to another Zero application?

Two separate applications can 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 Project Zero's security by defining security rules that determine which resources are protected, by what means they are protected, and what users and groups are allowed to access those resources. You can find more information in the security documentation in the Developer's Guide.
back to top

Can Project Zero be extended?

Yes. The loosely coupled nature of the Project Zero platform fosters componentization, reuse, and extensibility. Extensions can 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 configuration file.
back to top

What does Project Zero do for database connection management?

Lightweight abstractions on JDBC, zero.data.Manager and zero.data.groovy.Manager, provide an extensible framework and convenience methods for common query patterns. The managers do not attempt to provide complex connection management. You can obtain an instance of a manager 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 use the zero.config file. The create method configures the manager with a data source that is specified in the zero.config file (see the information about configuring data access in the Developer's Guide) for more information).

If a manager is created with a data source, the getConnection() and connection.close() methods are called on every method that requires a connection. If the data source is configured with a connection pool, the getConnection() and connection.close() methods 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 reuses 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 in the Developer's Guide.
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 example illustrates how to execute a group of database operations in one transaction:

def data = zero.data.groovy.Manager.create('personDb')

data.inTransaction{
  data.update(...)
  data.update(...)
  data.queryList(...)
}
If an exception occurs, the group of statements is rolled back. If the closure successfully runs, the group is committed.

You might want more granular control over the group of statements in some situations. The following explicit example is a model of how this is done:

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 using JDBC. The manager provides a number of convenience methods that makes running 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
}

You can likely 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 previous methods is overloaded. ResultSet processing and, therefore, the returned data structure is different based on the method parameters. The following examples use 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 use the RowHandler and ResultHandler interface implementations to fully customize the results processing of the run queries.

See the data access information in the Developer's Guide for more examples.
back to top

Does Project Zero do anything to help maintain the database schema?

Not currently. We are exploring a design (for some time now) and seeking feedback in this area of functionality and would appreciate any input. However, the Zero Resource Model extension can be used to generate database tables for resources using a top down mapping scheme (at the moment the scheme is a simple one-way top down generation scheme with no roundtripping).
back to top

What is Zero Resource Model (ZRM)?

The Zero Resource Model extension refactors resource handlers into a model (that you define) and CRUD/HTTP REST support (provided by ZRM). The motivation for ZRM is to reduce the amount of boilerplate code that is repetitive for basic CRUD patterns. In other words, ZRM enables you to focus your development on the unique attributes of your resource while leveraging ZRM for "the rest of it", including RESTful API, feeds, search, etags, programmatic API, data validation, and more.
back to top

When should I use ZRM versus data.Manager?

ZRM is a great option if you need basic CRUD patterns over REST for top-down mapped data. For applications that need more control or need to access existing databases, the data.Manager remains a viable solution.
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 in the following example:

<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 allows the browser to reach the content served by your Project Zero application regardless of the context root where the application is installed. For those instances where you must use absolute URIs, 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 on this wikipedia site.
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 want 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 Project 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 want 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 in the core functions information found in the PHP function information in the Developer's Guide. Currently supported language features are listed in the PHP language features information in the Developer's Guide.
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 scenarios:

  • As a client to Project Zero services using 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 using 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 example, the Zend Framework. Note, however, that because of the currently missing base functions it's unlikely that frameworks implemented in PHP will run as you would want them to today.

As previously noted, 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 the PHP information in the Developer's Guide for more information about PHP. A good tutorial to start with is also available in the documentation.
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 the extending PHP information in the Developer's Guide
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 in the Developer's Guide.
back to top

Known Problems

Why does my Groovy breakpoint not suspend?

See the debugging information on setting Groovy breakpoints in the Developer's Guide.

Why does my Groovy binding not work in a static method or block?

Bindings do not work within static methods and blocks because the check to see if they are defined is done at compile-time when they are not yet available. More information on bindings is available in the Developer's Guide in the Groovy handlers and bindings information.

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.5 plugin by doing the following:

  1. Download the 1.5 plugin from the Groovy updateDev site.
  2. Unzip the contents into your ${eclipse_home} directory.
  3. Restart Eclipse.
  4. Navigate to the Help menu and select Software Updates -> Manage Configuration.
  5. Find the Groovy plugin (for example, GroovyFeature 1.5).
  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.

Why do the PDT Include Paths not show up?

This is a known problem with PDT. Your Include Paths may not display any content after you resolve a Project Zero application. Ordinarily, when you resolve a dependency that contributes PHP content (as either an include-able script in /app/scripts or a code-assist-only artifact in the /code-assist directory) there should be one or two entries in the Include Paths container. The workaround is that you need to restart the Eclipse workbench after resolving the Project Zero application. Bug 3651 has been opened for this issue.