http://www.easytools.com/festival.zip
Developing browser based applications[SysReader Programmers Festival ‘97]
T.N.C.Venkata RanganVishwak AssociatesChennai - 600 033
www: http://www.easytools.comemail: [email protected]
Phone: 489 9109
http://www.easytools.com/festival.zip
Conventional Front Ends
•Powersoft PowerBuilder•Oracle forms•Microsoft Visual Basic•Borland dBase/Microsoft Foxpro•CA-Clipper•C/C++•Borland Delphi
http://www.easytools.com/festival.zip
Conventional … Advantages
•Familiarity and Experience with them
•Reliability
•Connectivity (with backend databases)
http://www.easytools.com/festival.zip
Conventional … Disadvantages
•Portability problems •Compatibility problems
•Distribution & Installation•Support and TroubleShooting
•Complexity to Developers •Inconsistent UI between various Apps.•Restricted navigation for the user
•Security on different Modules
http://www.easytools.com/festival.zip
HTML based Forms + Client/Server Side Programming + Database Source/Server
= Browser based Applications
Browser based Apps?Browser based Apps?
http://www.easytools.com/festival.zip
•Consistent UI between different Applications•Familiar browser paradigm of navigation•Internet/Web Standards
•Installation
•Browsers are inexpensive and some are free
Browser ... AdvantagesBrowser ... Advantages
http://www.easytools.com/festival.zip
HTML - An Example
<HTML><HEAD><TITLE>Welcome</TITLE></HEAD><BODY>
Hello World!</BODY></HTML>
http://www.easytools.com/festival.zip
ActiveX Controls (.ocx)ActiveX Documents (.vbd)
Client Side ProgrammingClient Side Programming
The ACTIVE way [Can I say that as the Microsoft way? :-)]
The JAVA Way [Is it the Programming Nirvana? :-)]
http://www.easytools.com/festival.zip
ActiveX is basically a specification for interfaces between objects.
What is ActiveX … ???What is ActiveX … ???
ActiveX Controls makes up the components used to build other applications, whereas ActiveX Documents is the program.
ActiveX Documents may be loosely called as a sophisticated Form Object.
You don’t, for example, put a bunch of ActiveX Documents on a form, as you do ActiveX controls on it.
http://www.easytools.com/festival.zip
Tools to build ActiveX ...Tools to build ActiveX ...
Microsoft Visual Basic 5.0Microsoft Visual C++ 4.x or aboveMicrosoft Visual J++Borland Delphi 3.x
Tip: VB 5.0 can directly convert your VB 4.0+ forms into ActiveX controls.
http://www.easytools.com/festival.zip
ActiveX - Will it run in ...?ActiveX - Will it run in ...?
ActiveX is supported in IE 3.0 and aboveRuns in Navigator 3.x and above provided you have NCompass labs Plug-in installed:-(
Note:If the ActiveX control or document is developed in VB/VC++/VJ++ you require the respective supporting libraries/DLLs/VM.ActiveX controls are Auto downloadable ! :-)
http://www.easytools.com/festival.zip
Sample HTML with ActiveXSample HTML with ActiveX
<HTML><HEAD><TITLE>VB Form into ActiveX Control inside browser </TITLE></HEAD><BODY><OBJECT ID="UserControl11" WIDTH=557 HEIGHT=442CLASSID="CLSID:1DDBB7E7-62BB-11D1-AA70-008048FD3FDA"> <PARAM NAME="_ExtentX" VALUE="11790"> <PARAM NAME="_ExtentY" VALUE="9335"></OBJECT><H2> I have my VB 5.0 form as an ActiveX control inside IE 4.0 now.</H2></BODY></HTML>
http://www.easytools.com/festival.zip
JAVAJAVA
JAVA: A simple, object-oriented, distributed, interpreted, robust, secure, architecture neutral, portable, high-performance, multi-threaded, and dynamic language.
A JAVA Applet is a JAVA program that adheres to a set of conventions that allows it to run within a JAVA-compatible browser.
http://www.easytools.com/festival.zip
JAVA - SampleJAVA - Sample
<HTML><HEAD><TITLE>A Simple Program</TITLE></HEAD><BODY>Here is the output of my program:<APPLET CODE=“HelloWorld.class” WIDTH=150 HEIGHT=25></APPLET></BODY></HTML>
http://www.easytools.com/festival.zip
JAVA - Sample AppletJAVA - Sample Applet
import java.applet.Applet;import java.awt.Graphics;
public class HelloWorld extends Applet { public void paint(Graphics g) { g.drawString("Hello world!", 50, 25); }}
HelloWorld.java
http://www.easytools.com/festival.zip
Client Side… AdvantagesClient Side… Advantages
•Easier conversion •Server load is reduced•Interactivity•Reduced Network traffic
http://www.easytools.com/festival.zip
Client Side … DisadvantagesClient Side … Disadvantages
•Code is visible to users•Limited Portability •Restricted Browser independence•Requires powerful clients
http://www.easytools.com/festival.zip
Server Side ProgrammingServer Side Programming
Active Server Pages (ASP)
PERL and other CGI tools
Microsoft ISAPI & Netscape NSAPI
JAVA Servers from Sun & Netscape
http://www.easytools.com/festival.zip
ASP - An Example
<HTML><HEAD><TITLE>ASP Example</TITLE></HEAD><BODY><% for i=1 to 7 %><FONT SIZE=<%=i%>>Hello World!</FONT><BR><% Next %></BODY></HTML>
http://www.easytools.com/festival.zip
<HTML><HEAD><TITLE>ASP Example</TITLE></HEAD><BODY>
<FONT SIZE=4>Hello World!</FONT><BR><FONT SIZE=5>Hello World!</FONT><BR><FONT SIZE=6>Hello World!</FONT><BR><FONT SIZE=7>Hello World!</FONT><BR>
</BODY></HTML>
ASP - An Example
http://www.easytools.com/festival.zip
Form Processing - HTML (eating.html)
<HTML><HEAD><TITLE>Sample Form</TITLE></HEAD><BODY><CENTER><H1>Late-night programmers eating habits</H1>Check all that apply<P><TABLE><TR><TD ALIGN=LEFT>
<FORM ACTION=”eating.asp" METHOD=POST TARGET="_top"><INPUT TYPE="CHECKBOX" NAME="chk" value="Pizza">Pizza<BR><INPUT TYPE="CHECKBOX" NAME="chk" value="Coffee">Coffee<BR><INPUT TYPE="CHECKBOX" NAME="chk" value="Chips">Chips<P><INPUT TYPE=SUBMIT VALUE="Submit"></FORM>
</TD></TR></TABLE>
</CENTER></BODY></HTML>
http://www.easytools.com/festival.zip
<HTML><HEAD><TITLE>Sample Form Processing</TITLE></HEAD><BODY><CENTER><H1>Late-night programmers eating habits</H1>Your choices<P></CENTER><B>You like:</B><BR><%=Request("chk")%><BR></BODY></HTML>
Form Processing - ASP (eating.asp)
http://www.easytools.com/festival.zip
<HTML><HTML><HEAD><TITLE><HEAD><TITLE>Project listProject list</TITLE></HEAD></TITLE></HEAD><BODY><BODY><%<%
'----- Open the database, create the record set'----- Open the database, create the record set
Set cn = Server.CreateObject ("ADODB.Connection")Set cn = Server.CreateObject ("ADODB.Connection")
cn.Open "dsn=ProjList;database=ProjInfo;uid=;pwd=;"cn.Open "dsn=ProjList;database=ProjInfo;uid=;pwd=;"
Set rs = cn.Execute ("select ProjName, ProjMgr, DueDateSet rs = cn.Execute ("select ProjName, ProjMgr, DueDate
fromfrom Projects order by DueDate")Projects order by DueDate")
ADO Sample CodeADO Sample Code
http://www.easytools.com/festival.zip
Response.Write ("Response.Write ("<CENTER><TABLE><CENTER><TABLE>")")
'----- Captions'----- Captions
Response.Write ("Response.Write ("<TR><TR>")")
for iCol = 0 to rs.Fields.Count - 1'for iCol = 0 to rs.Fields.Count - 1'
Response.Write ("Response.Write ("<TD><CENTER><TD><CENTER>") ")
Response.Write (rs(iCol).Name)Response.Write (rs(iCol).Name)
Response.Write ("Response.Write ("</CENTER></TD></CENTER></TD>")")
nextnext
Response.Write ("Response.Write ("</TR></TR>")")
ADO Sample CodeADO Sample Code
http://www.easytools.com/festival.zip
'----- Data rows'----- Data rowsdo while not rs.eofdo while not rs.eof
Response.Write ("Response.Write ("<TR><TR>")")for iCol = 0 to rs.Fields.Count - 1for iCol = 0 to rs.Fields.Count - 1
Response.Write ("Response.Write ("<TD><TD>")")Response.Write (rs(iCol))Response.Write (rs(iCol))Response.Write ("Response.Write ("</TD></TD>")")
nextnextResponse.Write ("Response.Write ("</TR></TR>")")rs.MoveNextrs.MoveNext
looploop
ADO Sample CodeADO Sample Code
http://www.easytools.com/festival.zip
Response.Write ("Response.Write ("</TABLE></CENTER></TABLE></CENTER>")")
rs.Closers.Close
cn.Closecn.Close
%>%>
</BODY></BODY>
</HTML></HTML>
ADO Sample CodeADO Sample Code
http://www.easytools.com/festival.zip
PERLPERL
PERL stands for Practical Extraction and Report Language.
Larry Wall (creator of PERL) loves to call it Pathologically Eclectic Rubbish Lister
http://www.easytools.com/festival.zip
PERL - AdvantagesPERL - Advantages
•FREE of cost•Popularity•Available for many platforms
•Socket Support •Pattern Matching (ideal for searching text)•Flexible Text handling (No details to worry)
•Newer packages for Win32 support ODBC
http://www.easytools.com/festival.zip
PERL - SamplePERL - Sample
sub getFormData { my($buffer) = "";
if ($ENV{'REQUEST_METHOD'} eq 'GET') { $buffer = $ENV{'QUERY_STRING'}; } else { read(STDIN, $buffer,$ENV{'CONTENT_LENGTH'}); }}
http://www.easytools.com/festival.zip
Server Side… AdvantagesServer Side… Advantages
•Instant Portability-Platform Independence•No manual installation •Easy/Auto Distribution (upgrades too)
•Scalability•Runs in thin clients•Data + Code resides only in the Server•Code (Core business logics) are secure•No need of seperate S/W client licenses
•No compilation process for ASP & PERL
http://www.easytools.com/festival.zip
Server Side… DisadvantagesServer Side… Disadvantages
•Learning curve (because of New tools)•Server is overloaded?•Server licenses are expensive•Speed (both ASP & PERL are interpreted)
http://www.easytools.com/festival.zip
Decision ?Decision ?Develop. Ease of development not only means that an application can cost less to develop, it means that the team's skills can be better utilized.Scale. It is possible to build a single application that can be used by virtually any number of users—simultaneously. Maintain. Customer requirements change, businesses change, business needs change and will continue to change while the team adapts existing systems to last week's changes.Deploy. Systems should be easy to install and should easily be upgraded to the newer versions.Use. The application must not only work responsively, it must anticipate user needs,
http://www.easytools.com/festival.zip
Programming PERL - Larry WallProgramming PERL - Larry WallHTML The definitive guide - Musciano & KennedyHTML The definitive guide - Musciano & KennedyJavaScript Programming - Reaz HoqueJavaScript Programming - Reaz HoqueUnderstanding ActiveX & OLE - David ChappellUnderstanding ActiveX & OLE - David ChappellActive Visual Basic 5.0 - Eddon & EddonActive Visual Basic 5.0 - Eddon & EddonThe JAVA Tutorial - Campione & WalrathThe JAVA Tutorial - Campione & WalrathUnlocking Active Server Pages - Christoph WilleUnlocking Active Server Pages - Christoph Wille
Reference BooksReference Books
http://www.easytools.com/festival.zip
www.perl.orgwww.activestate.comwww.activestate.comwww.w3c.orgwww.w3c.orgdeveloper.netscape.comdeveloper.netscape.comwww.javasoft.comwww.javasoft.com
www.microsoft.com/iis/default.aspwww.microsoft.com/iis/evaluating/guides
/whitepapers/aspwp.htmwww.microsoft.com/msdn
World Wide WebWorld Wide Web