MySQL, HTML, L
ATEXe Perl/PHP
Ole Peter Smith, IME, UFG[email protected] EMSL '10 15/10/2010/2010 UFU, Uberlândia-MG
Introduction Table Interface Sample Applications
The Road to Knowledge? Simple: Err, and Err, and Err again But Less, and Less, and Less
Piet Hein
Real programmers can write assembly code in any language Larry Wall
TIMTOWTDI: There is more than one Way to Do It! Larry Wall
The Problem....
I Inspiration: PHPMyAdmin
www.phpmyadmin.net
I Adminsitrators
Not for humans...
I BD e Tables
I Application:
Interface onto a List of Tables
I SQL Table
ID data1 data2... dataN Matrix
I Relations between Tables
id data1.. id-of-table.. dataN
I Module in Layers
Language: whatever...
Introduction
Table Interface Sample Applications
Table
Data & HTML Item & Items ENUM Data
Table
I id: NOT NULL PRIMARY KEY AUTO_INCREMENT
I Data dened by hash:
"Sql"=> "VARCHAR(255)",
"Name"=> "Nome do Participante", "Size"=> "25",
"Compulsory"=> 1, "Visible"=> 1,
I Basic Types:
INT - REAL - VARCHAR - TEXT - ENUM - PASSWORD
I Advanced Types:
Derived: Authors from Author1,... SQL Derived (other table)
Data & HTML
I ID: Never seen - Always Used
I INT - REAL: INPUT TEXT
I VARCHAR: INPUT TEXT
I PASSWORD: INPUT PASSWORD
I TEXT: TEXTAREA
I ENUM: SELECT
or RADIO SET or CHECKBOX
I FILE: INPUT FILE (enctype!)
I Derived: No edit!
> PostProcessing
I SQL Derived: SELECT
Table name
Data to read in other table
Introduction
Table Interface Sample Applications
Table Data & HTML
Item & Items
ENUM Data
One Item
I Singular view: One Row
I HTML Form:
DataName1: InputField or Show
DataName2: InputField or Show
.. ..
DataNameN: InputField or Show
I Show - Another TABLE...
I Edit: FORM
I Print: LATEX> PDF
I Delete - Are You Sure?
I Filter:
<A HREF='#ID' TITLE='Editar dados do #NAME'>#Name</A>
> File
I Add - Copy
ENUMs
I "Group"=> array ( "Name"=> "Grupo", "Sql"=> "ENUM", "Values"=> array ("Administrativo","Docente", "Substituto","Outros",) "Public"=> 1, ), I As Values or as 1,2,3,... I > SELECT or CHECKBOX/RADIOIntroduction
Table Interface Sample Applications
Table Data & HTML Item & Items
ENUM Data
SQL ID
"Name" => "Bibliografia Complementar No ".($k+1), "Sql" => "INT",
"SqlTable" => "Bibliografias",
"SqlDerivedFilter" => "#Authors - #Name: ". "#SName - #Volume - (#ID)", "SqlDerivedData" => array("Name","SName","Authors",
"Editor","City","Country", "Year","Volume","Edition"), "SqlDerivedSkelVar" => "Book",
"NamerLink" => "Bibliografies.php?Edit=1&ID", "NamerText" => "Editar Bibliografia",
"ShowIDCols" => array("Coordinator","Teacher");, "EditIDCols" => array("Coordinator");,
List of Items
I Plural view: (Sub)Matrix I List of id's
I Show in List I Edit in List I Print int List
Select Data & Search LATEXSkeletons > PDF
I Export
HTML - LATEX- PDF - CSV - SQL
HTML headers
I Search> SearchVars > ListOfIDs
I Sort by DataK,.. - (Reverse)
#ID_#DataK_#DataKK...
Introduction Table Interface Sample Applications Interface Layers (Camadas)
Table Interface
I Menus: NavegationI Left Menu: Application Level
Other Tables
I Top Menu(s):
Singular: Show - Edit - Delete - Print
I
Head: Company Info - Logos Top Menu Left Menu Table: Singula r/Plural - Baile!
Layers (Camadas)
Divide & Conquer
I Base: Basic methods
I Html: HTML tables, selects, etc. I Latex: LATEXtables, etc.
I CGI: CGI environment
I Actions: Actions and Menus
I TInterface: Make Interface
I MySql: Mess with the DB
I Login: Authentication I Access: Authorization
Introduction Table Interface Sample Applications Interface Layers (Camadas)
Layers (Camadas)
I Data: Datas and Data Types
I DataGroups: Groups of Data
I Item: One Item
I Items: Several Items
I Paging: Paging when Several Items
I Search: Searching/Selecting I Sort: Sort for ex. Alfabetically
I Export: Dump to other formats
Web Application
I List of Involved Tables
I Module per Table
Herits MySqlObj + Specics
I Access Levels
Public - Human Being - Admin Groups
I Session: Authentication
Login - Logo - Change Pwd
I Authorization
I Multiple Setups: Company1,...
I Modules and State
Introduction Table Interface Sample Applications Web Application HTML/HTTP Features To Do
HTML/HTTP Features
I CGI: GET & POST
I Cookie Vars
I Hidden Vars
I CSS
I HTTP headers: Output
Application: Inscription
I Participants
1-Table Model: Slicing
I Persons Data: Name - Email - Password
I Public: Registration
I Logon
I Admin Interface
I Inscription Specic Data
Fx. Talk Prefs - Assessors
I Internal Data
Fx. Assessment - Certicate Data
I 2-Table Model < best
Site Users - Events - Participants
I Schools and Pupils (Olympiad)
Introduction Table Interface Sample Applications Web Application HTML/HTTP Features To Do
Application: Planos de Ensino
I SPE: Sistema de Planos de Ensino
Pessoas - Plano de Ensino - Horarios & Salas
I Cursos
I Disciplinas
I Bibliograas
I Turmas
I Plan
I Print Plano: LATEXSkeleton
I Admin - Cadastros Básicos
I Coordenador - Ementas - Bibliograas - Livro Adotado
I Professor - Metodologia - Avaliação I User May Use LATEX!!!
I Public - Planos - Horarios - Salas I IME & ProGrad, UFG, 2010/11
Application: Distr. de Salas Univ.
I SiDS: Sistema de Distribuição de Salas I Cursos: Coordenador - Períodos I Disciplinas - Grade
I Turmas
I Horários & Salas
Tipo de Sala - Capacidade
I Distribuição
Pedidos
Tabela de: SELECT Rooms Disponivel AND CapacityOK Quanto Distribuído Horário não Altera
I Relatórios: Por Turma/Curso - Por Sala/Prédio I IME & ProGrad, UFG, 2010/11
Introduction Table Interface Sample Applications Web Application HTML/HTTP Features To Do
Application: Unidade Acadêmica
I Pessoas: Tec. Adm. Docentes - Substitutos
I Cursos: Projeto - Grade - Disciplinas
I Turmas - Planos de Ensino
Horários & Salas - Distribuição
I Web Users & Inscriptions I Diário Eletrônico
I Conselhos e Atas
I Interface Público/Restrito
I UnidadeS AcadêmicaS...
I The Project goes one...
To Do
I Errors
I Users & Groups
I Logging
I Import
I Interface on Data defs
I Import
Introduction Table Interface Sample Applications Web Application HTML/HTTP Features To Do
The End
I Idéias - Cementes - Fertilíssimos
Divide and it's Still Yours!!!
I My Projects goes on:
UnidadeS AcadêmicaS... Computational Geometry Optimization Visualized
FreeSoftware, Thinking, Society, University, Science...
Os Gambal Livre
I Life sure is a Mystery to be Lived Not a Problem to be Solved
I Live as Though You Should Die Tomorrow