What is luban http://luban.danse.us A python package Simple, - - PowerPoint PPT Presentation

what is luban
SMART_READER_LITE
LIVE PREVIEW

What is luban http://luban.danse.us A python package Simple, - - PowerPoint PPT Presentation

Luban : use just python to create web services for scientific applications Jiao Y.Y. Lin and Michael Aivazis California Institute of Technology, Pasadena, CA 91125 USA Jiao Lin and Michael Aivazis Scipy 2010 What is luban


slide-1
SLIDE 1

Scipy 2010 Jiao Lin and Michael Aivazis

Luban: use just python to create web

services for scientific applications

Jiao Y.Y. Lin and Michael Aivazis California Institute of Technology, Pasadena, CA 91125 USA

slide-2
SLIDE 2

Scipy 2010 Jiao Lin and Michael Aivazis

What is luban

  • http://luban.danse.us
  • A python package
  • Simple, natural syntax for creating user interface

using a generic UI specification (a hierarchial structure of UI elements and actions)

  • Auto-translation to html and javascript for web UI

app, and to wxpython for native UI app.

  • Make it easy to create dynamic web user interface
  • Auto-translation of data objects to forms
  • Easy to create UI for scientific applications
slide-3
SLIDE 3

Scipy 2010 Jiao Lin and Michael Aivazis

What can luban do? Demo: VNF (the virtual neutron facility)

  • https://vnf.caltech.edu
  • Run virtual neutron experiments/material

simulations/material modelings

  • An online database of computations and datesets
  • A web application

built using just luban

slide-4
SLIDE 4

Scipy 2010 Jiao Lin and Michael Aivazis

Concepts of luban

  • Simple, generic descriptions of UI

elements and actions can be used to describe useful, dynamic, and sophisticate user interface

slide-5
SLIDE 5

Scipy 2010 Jiao Lin and Michael Aivazis

Concepts of luban: UI represention as a tree of UI elements

+ document(title="my interface") |-- paragraph(text=['some text']) |-+ form(title='my form') |-- textfield(label='input1', value='initial value') |-- textarea(label='input2', value='initial value') |-- submitbutton(label='Submit')

slide-6
SLIDE 6

Scipy 2010 Jiao Lin and Michael Aivazis

Concepts of luban: actions

>>> <element>.<eventhandler> = <action> Example:

>>> button.

  • nclick = alert(“clicked”)

>>> button.

  • nclick = load(actor=‘login

’, routine=‘onsubmit’, …) >>> button.

  • nclick = select(element=textfield).hide()
slide-7
SLIDE 7

Scipy 2010 Jiao Lin and Michael Aivazis

Demo: aokuang

  • http://luban.danse.us/aokuang
  • A online demo/documentation of luban

API

slide-8
SLIDE 8

Scipy 2010 Jiao Lin and Michael Aivazis

Demo: orm

slide-9
SLIDE 9

Scipy 2010 Jiao Lin and Michael Aivazis

Demo: gongshuzi

  • http://docs.danse.us/pyre/luban/sphinx/t

utorials/video/gongshuzidemo.html

  • A UI builder for luban applications
  • Built by using luban itself
slide-10
SLIDE 10

Scipy 2010 Jiao Lin and Michael Aivazis

Documentation

  • Homepage: http://luban.danse.us
  • Demos: http://docs.danse.us/pyre/luban/sphinx/Demos.html
  • Installation:

http://docs.danse.us/pyre/luban/sphinx/Installation.html

  • Tutorials: http://docs.danse.us/pyre/luban/sphinx/Tutorials.html
  • API: http://docs.danse.us/pyre/luban/sphinx/API.html
  • API demo: http://luban.danse.us/aokuang