Web-Applications: TurboGears II BCHB524 2014 Lecture 26 12/03/2014BCHB524 - 2014 - Edwards.

Slides:



Advertisements
Similar presentations
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Advertisements

Tutorial 8 Sharing, Integrating, and Analyzing Data
The Librarian Web Page Carol Wolf CS396X. Create new controller  To create a new controller that can manage more than just books, type ruby script/generate.
Jeopardy Objects Navigation Buttons True/False Parts of a Report Vocabulary Q $100 Q $200 Q $300 Q $400 Q $500 Q $100 Q $200 Q $300 Q $400 Q $500 Final.
Introduction to MVC Adding a View Page NTPCUG Tom Perkins, Ph.D.
An End-User Perspective On Using NatQuery Building a Dynamic Variable T
Chapter 6 UNDERSTANDING AND DESIGNING QUERIES AND REPORTS.
Direct Congress Dan Skorupski Dan Vingo. Inner workings Reminder: MVC design pattern Procedural view: From request to response o Request passed to a view.
Figure 1. Hit analysis in 2002 of database-driven web applications Hits by Category in 2002 N = 73,873 Results Reporting 27% GME 26% Research 20% Bed Availability.
Access Tutorial 8 Sharing, Integrating, and Analyzing Data
Dataface API Essentials Steve Hannah Web Lite Solutions Corp.
Creating Effective School and PTA Websites Sam Farnsworth Utah PTA Technology Appointee
PHP Tutorials 02 Olarik Surinta Management Information System Faculty of Informatics.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
SqlReports Dean Dahlvang PSUG-MO March About Dean Dean Dahlvang Director of Administrative Technology for the Proctor.
Web Technologies Website Development Trade & Industrial Education
What is Sure BDCs? BDC stands for Batch Data Communication and is also known as Batch Input. It is a technique for mass input of data into SAP by simulating.
HTML, XHTML, and CSS Chapter 12 Creating and Using XML Documents.
Creating Effective School and PTA Websites Sam Farnsworth Utah PTA Technology Specialist
Press Esc to Exit ©2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
PHP meets MySQL.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Customizing your own SENSORS (site) Ethan Danahy Tufts University June 7 th, 2001.
Management Information Systems MS Access MS Access is an application software that facilitates us to create Database Management Systems (DBMS)
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Press Esc to Exit ©2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in.
Chapter 17 Creating a Database.
MS Access 2007 Management Information Systems 1. Overview 2  What is MS Access?  Access Terminology  Access Window  Database Window  Create New Database.
Moodle with Style Integrating new technologies to empower learning and transform leadership.
Microsoft Access 2007 Tutorial (Part II) CIS*1000*DE.
HTML Basics BCIS 3680 Enterprise Programming. Web Client/Server Architecture 2  Your browser (the client) requests a Web page from a remote computer.
Damian Tamayo Tutorial DTM Data Generator Fall 2008 CIS 764.
1 What to do before class starts??? Download the sample database from the k: drive to the u: drive or to your flash drive. The database is named “FormBelmont.accdb”
Creating PHPs to Insert, Update, and Delete Data CS 320.
USING WORDPRESS TO CREATE A WEBSITE (RATHER THAN A BLOG) STEP-BY-STEP INSTRUCTIONS.
Microsoft Access 2010 Chapter 10 Administering a Database System.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
6 th Annual Focus Users’ Conference 6 th Annual Focus Users’ Conference Import Testing Data Presented by: Adrian Ruiz Presented by: Adrian Ruiz.
9/28/2015BCHB Edwards Basic Python Review BCHB Lecture 8.
USING WORDPRESS TO CREATE A WEBSITE (RATHER THAN A BLOG) STEP-BY-STEP INSTRUCTIONS.
CSCI 6962: Server-side Design and Programming JSF DataTables and Shopping Carts.
Walkthrough example including SAS output How to create a mobile WebApp? PhUSE / 12. October 2015 / Katja Glaß BHC 4:3 Template 2010 June 2014Page 1.
Microsoft FrontPage 2003 Illustrated Complete Integrating a Database with a Web Site.
Creating a simple database This shows you how to set up a database using PHPMyAdmin (installed with WAMP)
Gold – Crystal Reports Introductory Course Cortex User Group Meeting New Orleans – 2011.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Web-Applications: TurboGears II BCHB Lecture 26 12/7/2015BCHB Edwards.
Web-Applications: TurboGears BCHB Lecture 25 12/02/2015BCHB Edwards.
 Pages within our Framework  Categories within Framework  Products within Framework  Model-View-Controller description of Page, category and products.
CPSC 203 Introduction to Computers T97 By Jie (Jeff) Gao.
CSC 2720 Building Web Applications Basic Frameworks for Building Dynamic Web Sites / Web Applications.
Chapter 12© copyright Janson Industries Java Server Faces ▮ Explain the JSF framework ▮ SDO (service data objects) ▮ Facelets ▮ Pagecode classes.
Chapter 16 Web Pages And CGI Scripts Department of Biomedical Informatics University of Pittsburgh School of Medicine
Module 2: Authoring Basic Reports. Overview Creating a Basic Table Report Formatting Report Pages Calculating Values.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
Relational Databases: Basic Concepts
Practical Office 2007 Chapter 10
Web-Applications: TurboGears
Web-Applications: TurboGears II
Building a User Interface with Forms
Database application MySQL Database and PhpMyAdmin
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Access Tutorial 8 Sharing, Integrating, and Analyzing Data
Web-Applications: TurboGears II
Relational Databases: Basic Concepts
Relational Databases: Basic Concepts
Web-Applications: TurboGears II
Query-by-Example Transparencies
Tutorial 8 Sharing, Integrating, and Analyzing Data
Presentation transcript:

Web-Applications: TurboGears II BCHB Lecture 26 12/03/2014BCHB Edwards

12/03/2014BCHB Edwards2 Last time… We made the empty HoyaTaxa website and learned how to make minor changes, and send dynamic content to template. We added a “taxa” information page with: Clickable Parent link (Variable number of) clickable Children links

12/03/2014BCHB Edwards3 Start web-app and check Check that the web-application is working... In the class Command-Line shell: ~]$ cd HoyaTaxa HoyaTaxa]$ start-hoyataxa.py Start a web-browser and access by urls:

12/03/2014BCHB Edwards4 Empty landing page

12/03/2014BCHB Edwards5 Taxonomy page

12/03/2014BCHB Edwards6 Tour the primary files The files we modified in the HoyaTaxa folder: Controller: hoyataxa/controllers.py Change the index method Add the taxa method to lookup and return Taxonomy given taxid (Data) Model: hoyataxa/model.py SQLObject classes devdata.sqlite download (or populate) the data in the sqlite database View / Template: hoyataxa/templates/welcome.html Remove all but the dynamic title hoyataxa/templates/master.html Change header and footer, remove menus hoyataxa/templates/taxa.html Set-up the taxa page layout

12/03/2014BCHB Edwards7 List all names

12/03/2014BCHB Edwards8 List all names

12/03/2014BCHB Edwards9 Remove the scientific name

12/03/2014BCHB Edwards10 Remove scientific name

12/03/2014BCHB Edwards11 Let's add the lineage

12/03/2014BCHB Edwards12 Let’s add the lineage

12/03/2014BCHB Edwards13 Let’s add the lineage

12/03/2014BCHB Edwards14 Empty landing page

12/03/2014BCHB Edwards15 Set up search form In controllers.py, define a class for the form from turbogears import validate, validators from turbogears import widgets, error_handler class SearchFields(widgets.WidgetsList): query = widgets.TextField(label="Search Term") mode = widgets.SingleSelectField(label="Search Mode", options=["Starts with", "Ends with", "Contains"], default="Contains") search_form = widgets.TableForm( fields = SearchFields(), action = "search", submit_text = "Search" ) class def index(self): return dict(form=search_form, title="All your taxa are belong to us")

12/03/2014BCHB Edwards16 Set up search form Place the form in welcome.html

12/03/2014BCHB Edwards17 Set up search form

12/03/2014BCHB Edwards18 Handle the search request In controllers.py, we add the search method

12/03/2014BCHB Edwards19 Handle the search request Save taxa.html as search.html and modify

12/03/2014BCHB Edwards20 Handle the search request Save taxa.html as search.html and modify

Search for name: gorilla 12/03/2014BCHB Edwards21

12/03/2014BCHB Edwards22 But… There is a problem. What to do about bad input? Too short, spaces at beginning or end… TurboGears provides validators to check values in the fields to make sure they are OK Nice integration with form widgets Users get error messages so they can fix the error

12/03/2014BCHB Edwards23 Validation “Schema”

12/03/2014BCHB Edwards24 Handle errors in search parameters

12/03/2014BCHB Edwards25 Problem is communicated to user

12/03/2014BCHB Edwards26 Problem is communicated to user

12/03/2014BCHB Edwards27 Validators can be quite complicated

12/03/2014BCHB Edwards28 Problem is communicated to user

12/03/2014BCHB Edwards29 Setup for use by web-services Our web-site can now be accessed programatically… …as we did with urllib.urlopen in python Access: However, we usually don’t want to parse HTML. Programs want to parse “easy” no-frills formats.

12/03/2014BCHB Edwards30 Let’s provide XML output format We need a new output template for search: searchxml.html

12/03/2014BCHB Edwards31 XML output format Next we need to tell the search method when to use it…

12/03/2014BCHB Edwards32 XML Output Format To get XML format output, add “&tg_format=xml” to end of URL. Try it:

12/03/2014BCHB Edwards33 Similarly for the taxa page

12/03/2014BCHB Edwards34 Similarly for the taxa page

12/03/2014BCHB Edwards35 XML Output Format To get XML format output, add “tg_format=xml” to end of URL. Try it:

12/03/2014BCHB Edwards36 All done… We can now display a taxonomy record nicely if the user types a URL...and then navigate about its heirachy. Can search the names based on a user query. Search form, list of matching results, etc... XML output for web-services.

12/03/2014BCHB Edwards37 TODO… If only one matching search result – jump straight to taxa page… Even if only one taxa matches? Search/lookup by taxid too? Make pages and tables prettier Center and position tables on page Alternate row colors