Title: Creating Databases for Web Applications
1Creating Databases for Web Applications
- Work session
- Open Source versus Proprietary
- important topics
- HW finish projects. Look at final quiz guide.
Final posting.
2Final posting
- post your considered, reasoned opinion on Open
Source vs proprietary asp versus php Access
versus MySql or any related issue. - Catch up on other postings.
3Postings php vs asp, etc.
- Proprietary can be companies other than
Microsoft. For example, Cold Fusion is product of
Macromedia (formerly Allaire). - Keep in mind that there are many topics,
functions, relevant standards,etc. in these
systems that we did not cover.
4Things to consider
- things to store away in the back of your mind
for consideration when building a 'real' Web
application.
5Performance
- Performance of Web sites governed by connection
AND site itself. - presence of large images, other large files, big
consideration. - Some DBMS provide for stored procedures that
carry out a query. Sometimes these can involve
parameters. This is a way to improve
performance. The function is compiled and not
interpreted. - Some DBMS provide for (extra) index fields
besides the primary key. This is another way to
improve performance.
6Important topics
- multiple (concurrent) users of database
- DBMS may handle this.
- single table versus multiple tables
- transaction concept
- writing/updating across multiple tables
- paging
- handling of larger recordsets
7Important topics, continued
- scaling up application
- multiple users many, many users
- larger tables
- maintenance of program
- version control
- backup
- databases
- scripts / code
- data base administrator
- data dictionary
- 'quality assurance'
- test suite
- bug/feature list
- investigate how bugs happen
8Important topics, continued
- disaster control
- backup data stores
- backup procedure
- security
- hackers
- insiders
- Note security protections also help in benign
situations knowing where you need to look and
where you don't need to look to uncover problems.
9Reminder Objects
- are information procedures
- properties methods
- attributes operators
- information behavior
- can be defined by you, the programmer.
- DOM is the Document Object Model used for client
side (for example, document.write( ) ). - asp is essentially a set of objects (Request,
Response, etc.) called the intrinsic objects. - php support resembles other oo languages more
than JavaScript (maybe more than VBScript?)
10php example (partial)
- class node
- var mparent var mfirstchild var mnextsib
var mname var mlocation - function Node (parent, name, location)
- this-gtmparent parent
- this-gtmnamename
- this-gtmlocationlocation
- function addchild(child)
- if isset(firstchildthis-gtmfirstchild)
- firstchild.addsib(child)
- else this-gtmfirstchildchild
- function addsib(sib)
constructor method
ends class
11php example
see next
-
- newnode new Node (current, 'curley', 'NYC')
- invokes a call to the constructor function node,
which sets up an instance of a node. -
- current.addchild (newnode)
- this invokes the method of current that will
connect it to newnode. - Access object properties
- current.mlocation
12more php
- inheritance
- class specialcustomer extends customer
- overriding
- re-use name of method
- reference operator (pointer)
- place node place will refer to same
thing, not a copy - eval (string) evaluates the contents of
string.
13JavaScript OO support
- Limited, but can use functions in a var statement
and can name a procedure as a property. - connects data and code
- Neither php nor JavaScript has information hiding
mechanisms - This is not for keeping something secret as much
as for catching an error during compilation that
would otherwise lead to a logical, runtime error. - no inheritance support
- building objects from other objects to save
redundant coding AND have the system apply the
appropriate procedure.
14JavaScript OO support basic
- var node new Object()
- node.mname "curley"
- node.addchildaddchild
a function defined elsewhere
15JavaScript example using constructor
- function node (parent, name, location)
- this.mparent parent
- this.mname name
- this.mlocation location
- this.addchildaddchild
- this.addsib addsib
- function addchild (child)
- function addsib (sib)
this is term for thing being created.
16JavaScript example usage
- var person new node (parent, 'moe','nyc')
- parent.addchild(person)
- person.mlocation
17Benefits of oo
- Encapsulates information and treatment of
information to make code either to maintain and
to re-use - only one place to check and to modify if you need
to change how you 'add a child' in the previous
example. - catches errors as compilation (syntactic) errors.
18Emerging technologies, infrastructure
- broadband
- wirelesssmaller devices
- WAP, XML, XSL, XSLT, WML
- Application Service Providers
- new/not so new offerings
- Cold Fusion
- asp.net, vb.net, Active X objects (for sale)
- Open Source
- php 4.3.6 www.php.net
19XML
- Building XML applications with Java
- Larger applications requiring communication
between components - Creating User Interfaces
- xml and xslt, also wml, VoiceXML
20Questions for final quiz
- See guide to final quiz posted online.
- Note final will be open book, open notes. You do
need to study.
21Projects
- Prepare to demonstrate and to show your
storyboard diagram (and maybe the others diagrams
as reminders). - Prepare hardcopy of diagrams plus choice essay if
you needed to do one. - Send URL of project to me!