Porcupine Web Application Server

Download PorcupineWelcome to inno:script, home of the Porcupine Web Application Server project. Porcupine includes everything you need for building high quality modern Web 2.0 applications just by using the Python and JavaScript scripting languages.

If you are a web developer then you should already have a good knowledge of JavaScript. If Python is what you still missing then you shouldn't worry about that. The following quote is taken from the Python Web site:

"Python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days".

After a month you will be able to write applications that you never thought were possible!

Here are some facts that make Porcupine stand out from the other Web frameworks out there: 

Porcupine is specially designed for hosting multiple diverse Web applications using a single embedded object database.

Porcupine applications adhere to the SPA (Single Page Application) concept. Applications are rendered and run inside a single page. No page reloading ever occurs due to the fact that page segments are updated using AJAX.

Porcupine comes with a context-aware object query language (Porcupine OQL). The result set of every single query is based on the current security context. Therefore, the results of the same database query may vary, depending on the user identity the query is executed on behalf.

Porcupine applications are data-centric, not silo-based. This simply means that since each object type's behaviour is bound to the object class itself, it becomes available across all other applications, ready to be leveraged by them. Thus, if application A has defined a new object type, this type including all of its exposed functionality can be re-used by your application, assuming of course that application A is already installed. As an example take the following remote method that is bound on the base class of all Porcupine data objects (aka content classes):

from porcupine import webmethods
from porcupine import db
from porcupine.systemObjects import GenericItem

@webmethods.remotemethod(of_type=GenericItem)
@db.transactional(auto_commit=True)
def deletePermanent(self):
    self.delete()
    return True

This remote method deletes an object permanently and is available to all custom Porcupine data objects. Therefore you don't have to re-implement a new web method for deleting your objects. Every remote method is actually a Web service. Calling this method from the browser is as simple as:

var xmlrpc = new QuiX.rpc.XMLRPCRequest(my_item_id);
xmlrpc.oncomplete = my_callback;
xmlrpc.callmethod('deletePermanent');

The server's integrated JavaScript framework (QuiX) makes it extremely easy to define rich UIs using XML. Below you can find an example of a QuiX XML file that produces a window with a menu bar on top:

<?xml version="1.0" encoding="utf-8"?>
<window xmlns="http://www.innoscript.org/quix"
    title="My App"
    resizable="true" close="true" minimize="true"
    maximize="true"
    img="myapp/images/icon.gif" width="600"
    height="400" left="center" top="center">
  <wbody>
    <vbox spacing="0" width="100%" height="100%">
      <menubar height="24">
        <menu caption="File">
          <menuoption caption="New query"/>
          <sep/>
          <menuoption img="myapp/images/exit.gif" caption="Exit"/>
        </menu>
        <menu caption="Edit">
          <menuoption img="myapp/images/configure.gif" caption="Options"/>
        </menu>
        <menu caption="About">
          <menuoption img="myapp/images/about16.gif" caption="About"/>
        </menu>
      </menubar>
      <rect id="clientArea" overflow="auto"/>
    </vbox>
  </wbody>
</window>

Stay tuned with the latest inno:script's news by subscribing to my Weblog.

Clicky Web Analytics