Next Previous Contents

14. Efarmoges kai Ergaleia gia thn PostgreSQL

14.1 Glwssa 4hs genias (4GL) PostgreSQL gia efarmoges me web kai bash dedomenwn - Platforma anaptyjhs AppGEN

To AppGEN mporeite na to katebasete apo to

To AppGEN einai mia ychlou epipedoy, tetarths genias glwssa kai platforma anaptyjhs efarmogwn gia thn paragwgh efarmogwn basismenwn sto World Wide Web (WWW). Aytes oi efarmoges typika xrhsimopoiountai sto internet h sto intranet enos organismou. Oi efarmoges toy AppGEN ylopoiountai ws C scripts poy akoloy8oun ta protypa toy Common Gateway Interface (CGI), ta opoia yposthrizontai apo toys perissoteroys Web Servers.

Gia na xrhsimopoihsete to AppGEN 8a xreiasteite ta akoloy8a :-

Thn PostgresSQL, susthma diaxeirishs sxesiakwn basewn dedomenwn

Enan web server poy na yposthrizei CGI opws o HTTPD toy NSCA

Enan metaglwttisth ansi C opws o GCC

To AppGEN apoteleitai apo ta akoloy8a ektelesima gia Unix (Linux) :-

Mporeite na epikoinwnhsete me ton syggrafea, Andrew Whaley, sto

14.2 WWW Web interface gia PostgresSQL - DBENGINE

To dbengine einai ena plug 'n play Web interface gia thn PostgreSQL poy dhmioyrgh8hke apo ton Ingo Ciechowski. Brisketai sto :

Sxetika me to DBENGINE : To dbengine einai ena interface diasundeshs WWW kai Postgres95 poy parexei aplh prosbash se opoiadhpote bash mesa se liga lepta.

To PHP 3 dinei mia glwssa poy moiazei me thn Perl sta keimena sas, alla oxi pragmatikh Perl enw to AppGen kai to wdb-p95 apaitoun na dhmioyrghsete merika arxeia ry8misewn gia ka8e mia apo tis baseis sas -- moiazei san na prepei prwta ap' ola na ma8ete kapoio eidos neas glwssas prin na jekinhsete.

Anti8eta me ta alla ergaleia, den apaiteitai na ma8ete eidiko programmatismo h kapoia scripting language gia na jekinhsete na doyleuete me to dbengine. Den yparxei epishs kapoio arxeio ry8misewn gia ka8e bash, etsi de xreiazetai na ejoikeiw8eite me mia nea domh. Parolayta - se periptwsh poy 8elete na exete prosbash se ola ta xarakthristika toy dbengine 8a htan kalh idea na ma8ete th glwssa Perl.

Olo to susthma mporei na ry8mistei mesw aplwn xeirismwn se mia pros8eth bash dedomenwn poy periexei plhrofories sxetika me to pws na optikopoihsete ta dedomena sas. Mporeite epishs na orisete virtual Fields ta opoia ypologizontai amesws prin na emfanistoun sthn o8onh.

Adeia To dbengine einai dwrean logismiko katw apo toys idioys oroys opws kai h Perl. Diabaste thn adeia ths an den eiste sigoyroi gia ti mporeite h den mporeite na kanete. Se telikh analysh, ayth einai mia elastikoterh kai pio hpia ekdosh apo thn GNU adeia -- den ephreazei th doyleia sas an 8elete na "daneisteite" kati apo to dbengine h na sygkentrwsete kommatia apo ayto san meros enos emporikou proiontos!

14.3 Apache Webserver Module gia PostgreSQL - NeoSoft NeoWebScript

O Apache einai enas polu gnwstos Web Server. Ena module diasundeshs PostgreSQL me ton Apache Webserver brisketai sto -

To NeoWebScript einai mia glwssa programmatismou poy epitrepei kai apla kai sun8eta programmata na enswmatw8oun se arxeia HTML.

Otan zhteitai mia selida HTML poy periexei enswmatwmeno kwdika NeoWebScript, o webserver poy yposthrizei NeoWebScript ektelei to(a) enswmatwmena script(s), kai paragei mia web selida me periexomeno kommeno kai rammeno stis protimhseis toy programmatisth, h opoia dhmioyrgh8hke me ayto to programma.

To NeoWebScript einai enas grhgoros, asfalhs, eukolos tropos gia na ma8ete isxyro, server-based programmatismo ston kwdika HTML twn web selidwn. Me to NeoWebScript, einai eukolo na ftiajete metrhtes (counters), formes gia email, gkrafiti stis selides, guest books kai na kratate stoixeia gia toys episkeptes, akomh kai gia enan arxario programmatisth. Deite poso kala to NeoWebScript krata ta dika toy se sugkrish me thn PERL kai to JavaScript.

An 8elete na egkatasthsete to NeoWebScript ston webserver sas, o Webmaster sas prepei na diabasei to Sysop FAQ gia na jekinhsei. H "8ewria twn Leitoyrgiwn" (Theory of Operations) 8a ejhghsei pws doyleuei to NeoWebScript, enw h egkatastash 8a sas ka8odhghsei sta diafora stadia ths. H diaxeirish asxoleitai me 8emata ru8mishs kai ekteleshs toy server, diaforoi elegxoi epalh8euoyn th swsth leitoyrgia twn NeoWebScript sas kai h aposfalmatwsh asxoleitai me ta problhmata toy server.

Den yparxei kanena kostos gia th xrhsh toy NeoWebScript-2.2 gia ton ISP sas, to intranet sas h to extranet sas. 8a deite thn plhrh adeia xrhshs, otan eggrafeite gia na to katebasete, alla h oysia einai pws 8a 8elame 99 spartarista dolaria an 8elete na to enswmatwsete sta dika sas proionta h na to xrhsimopoihsete se enan server emporikwn syndiallagwn (p.x. SSL).

To NeoWebScript einai ena module gia ton Apache webserver poy sas epitrepei thn enswmatwsh ths glwssas programmatismou Tcl/Tk stis istoselides sas san ena ergaleio scripting. Epinoh8hke apo ton Karl Lehenbauer, ton Texniko Diey8ynth ths NeoSoft, kai tekmhriw8hke, employtisthke kai epekta8hke apo toys programmatistes kai texnikous syggrafeis ths NeoSoft.

O Apache webserver einai o pleon dhmofilhs webserver ston kosmo, xrhsimopoioumenos sto 68 % twn sites poy ejetasthkan.

H Tcl/Tk einai h panisxyrh, dwrean, anejarthth platformas glwssa scripting, poy anaptux8hke apo ton Dr. John Ousterhout. Para8etoyme ta logia toy

"H Tcl/Tk epitrepei stoys programmatistes logismikou na kanoyn thn doyleia deka fores taxutera apo oti xrhsimopoiwntas ergaleio8hkes (toolkits) basismenes se C h C++. Einai epishs mia teleia glwssa enswmatwshs hdh yparxontwn efarmogwn poy tis kanei pio grafikes kai tis ejoplizei me Internet-ikes dynatothtes".

O Karl Lehenbauer, Idryths kai Proistamenos toy Texnikou Tmhmatos ths NeoSoft, apotelei meros ths anaptyjhs ths Tcl/Tk apo ta prwta ths stadia. Mazi me ton Mark Diehkans, dhmiourghsan thn Extended Tcl, gnwsth epishs kai ws TclX h NeoSoft Tcl, ena isxyro sunolo epektasewn sth glwssa. Polles apo tis basikes entoles ths Tcl proekycan apo thn Extended Tcl, kai meta eishx8hsan apo ton Dr. Ousterhout sto basiko pyrhna ths glwssas.

NeoSoft Inc., 1770 St. James Place, Suite 500, Houston, TX 77056 USA

14.4 Oi HEITML epektaseis ths HTML ston server kai mia glwssa 4hs genias gia thn PostgreSQL

To ergaleio heitml einai enas allos tropos gia na epikoinwnei h postgres me to world wide web. Gia perissoteres plhrofories epikoinwnhste me ton

          Helmut Emmelmann H.E.I. Informationssyteme GmbH 
          Wimpfenerstrasse 23 Thl. 49-621-795141 
          68259 Mannheim Germany Faj. 49-621-795161 

To heitml einai epektaseis ths HTML sthn pleyra toy server kai taytoxrona glwssa 4hs genias. Mporeite na gracete efarmoges gia to web se styl HTML xrhsimopoiwntas HTML-oeidh tags.

To heitml (proferete "Xai"-TiEmEl) einai epektash toy HTML kai mia plhrws ejoplismenh glwssa 4hs genias poy epitrepei se efarmoges Web na allhlepidroun me dedomena poy fylassontai se SQL baseis, xwris na katafeugoyn se periploka CGI scripts.

To heitml epekteinei to HTML sthn pleyra toy server, metatrepontas dynamika arxeia ".hei" se HTML kai einai loipon symbato me ka8e web browser. Xrhsimopoiei thn gnwrimh, euxrhsth suntajh HTML kai parexei plouto prokataskeyasmenwn Tags kai Biblio8hkwn gia na lusoyn 8emata poy mexri twra xreiazontan CGI. Opws kai to XML, to heitml parexei tags orismena apo ton xrhsth. Me to heitml ta orismena apo ton xrhsth tags metatrepontai se HTML kai stelnontai ston browser.

To heitml stoxeuei kai stoys sxediastes HTML kai stoys epaggelmaties programmatistes. Oi sxediastes HTML mporoun na xrhsimopoioun heitml Tags gia na xtistoun dynamikes selides web, na prospelaunoyn SQL baseis, h na dhmioyrgoun sun8etes efarmoges web. Metrhtes, baseis me stoixeia kataxwrhshs, formes anazhthshs, formes email , ierarxika menou, ola mporoun na kataskeyastoun apla xrhsimopoiwntas proka8orismena HTML-oeidh Tags poy briskontai stis diafores Biblio8hkes.

Gia toys programmatistes, to heitml enswmatwnei mia plhrh glwssa 4hs genias se HTML

          (p.x. <if>, <while>, kai <let> Tags), 
syn isxyres dynatothtes ypologismou ekfrasewn me akeraioys, pragmatikous, dyadikous, alfari8mhtikous, tuples telestes. Ta Tuples antimetwpizontai opws stis monternes antikeimenostrafeis glwsses kai fylassontai se metablhtes swrwn (heap variable). Oi metablhtes ths heitml, symperilambanomenwn kai olwn twn sun8etwn domwn dedomenwn, fylassontai sto swro diathrwntas tis arxikes toys times metaju twn selidwn xrhsimopoiwntas to Session Mode. Einai dynaton na orisete ta dika sas tags h tags toy periballontos kai akoma kai na epanorisete ta HTML-tags.

To heitml kanei dynato to na

- - - anaptyx8oun Web Sites me ena domhmeno kai spondylwto tropo, wste na meiw8ei drastika h ka8ysterhsh logw synthrhshs.

- - - anaptyx8oun ejypna kai allhlepidrastika Web Sites, me periexomeno poy prosarmozetai dynamika stis anagkes toy xrhsth.

- - - emfanisete to periexomeno SQL basewn xwris na xreiastei ka8oloy programmatismos ektos apo to na xrhsimopoihsete th biblio8hkh mas twn proka8orismenwn "dba" Tags.

- - - anaptyx8oun efarmoges sun8etwn basewn dedomenwn kai katalogwn agorwn xrhsimopoiwntas tis Session Variables

To heitml trexei se Linux me opoiondhpote Web Server poy xrhsimopoiei CGI interface, kai einai idiaitera grhgoro (apofeugontas thn ka8ysterhsh logw CGI) me ton APACHE Web Server xrhsimopoiwntas to Apache API. Mexri twra yposthrizontai oi baseis MSQL (ekdosh 1 kai 2), PostgreSQL (ekdosh 6), mysql, kai h yard. To heitml doyleuei epishs se Linux, BSDi, Solaris kai SunOS, ka8ws kai se Windows NT me CGI kai ISAPI kai ODBC kai Windows 95.

To heitml (se linux) einai dwrean gia ereynhtikh, mh-emporikh kai idiwtikh xrhsh. Ta emporika Web Sites prepei na plhrwsoyn telh gia thn adeia xrhshs. H plhrhs leitoyrgikh ekdosh toy heitml einai dia8esimh na thn katebasete gia mia periodo dokimhs dwrean. (Shmeiwste, parolayta, oti ka8e Web selida ".hei" poy anaptussete 8a emfanizei ena mhnyma poy 8a to xarakthrizei san ekdosh gia mh emporikh xrhsh. Meta thn eggrafh, 8a labete ena kleidi gia na ejafanisete ayto to mhnyma xwris na xreiastei na epanegkatasthsete to programma.)

To heitml (proferetai "Xai"-TiEmEl) epekteinei kai employtizei shmantika th leitoyrgikothta ths HTML me ton orismo tags kai xarakthristika plhres programmatismou. Ayto kanei dynath thn uparjh efarmogwn dynamikou periexomenoy kai basewn dedomenwn mesa ston kosmo ths HTML, xwris CGI kai ejwteriko scripting h alles glwsses programmatismou. Ayto shmainei oti eseis, san syggrafeas HTML, mporeite na pros8esete efarmoges stis web selides sas, xrhsimopoiwntas apla merika nea tags xwris CGI kai ka8oloy programmatismo. Apo thn allh, san proxwrhmenos xrhsths h programmatisths mporeite na dhmioyrghsete isxyres programmatistikes biblio8hkes me tag. Ayth h proseggish kanei to heitml katallhlo toso gia toys neofertoys sthn HTML oso kai gia toys epaggelmaties programmatistes. To heitml trexei sto web server kai dhmioyrgei dynamika HTML, etsi wste to heitml na einai symbato me ta stantar toy internet kai me opoiodhpote web browser. Epitrepei plhrh prosbash se baseis enw prostateuei to xrhsth apo thn peritth polyplokothta toy CGI. To heitml exei anaptyx8ei sumfwna me prosfates ereynes kai se systhmata kataskeyhs metaglwttistwn kai dosolhciwn (transaction).

Oi selides heitml anaptussontai opws kai oi selides HTML, me enan text editor h enan HTML editor, kai topo8etountai sto web server me to gnwsto tropo. Parolayta, oi selides mporoun na periexoyn twra dynamika heitml tags kai biblio8hkes tag gia prosbash se baseis. Mporeite na xrhsimopoihsete ayta ta tags gia na exete prosbash se baseis, na dhmioyrghsete dynamiko periexomeno, na steilete emails, kai na dhmioyrghsete akomh isxyres efarmoges opws eggrafh se baseis kai systhmata agorwn.

Oi neofertoi sthn glwssa HTML kai oi epaggelmaties programmatistes 8a meinoyn ekplhktoi me to poso grhgora kai eukola mporoun na sxediasoyn endiaferoyses efarmoges opws to Interactive Guestbook xwris na xreiazetai na ma8oyn na grafoyn sun8eta kai poluploka CGI scripts, apla kai mono xrhsimopoiwntas ta ergaleia poy parexontai me th dba biblio8hkh mas.

To heitml synodeuetai apo ena megalo plh8os tag biblio8hkwn, gia na dhmioyrghsete guestbooks, efarmoges synthrhshs ths bashs, epektasimes formes erwthsewn, isxyres formes email h na domhste to web site sas xrhsimopoiwntas ena ierarxiko menou. Ayta ta ergaleia einai etoima, apla pros8este ta antistoixa tags sto web site sas.

San empeiros programmatisths, mporeite na kanete plhrh xrhsh ths heitml arxitektonikhs dynamikwn eggrafwn: To heitml den einai apla mia scripting glwssa me dynamikous tupoys, isxyrh ston ypologismo ekfrasewn, anadromikes roytines kai perasma ektetamenwn parametrwn, alla xarakthrizetai epishs apo dynamikes eggrafes gia thn aytomath diaxeirish twn dedomenwn enos session anejarthtoy mege8oys.

14.5 America On-line AOL Web server gia PostgreSQL

O dwrean emporikos webserver, AOLserver ekdoshs 2.3 yposthrizei syndeseis sth bash PostgreSQL ekdosh 6.2.1 kai megaluterh. Gia perissoteres plhrofories episkefteite to

14.6 Problem/Project Tracking System Application Tool gia PostgreSQL

Brisketai sto :

14.7 Metatroph arxeiwn dbase dbf se PostgreSQL

To programma dbf2msql doyleuei acoga me mSQL kai PostgreSQL. Mporeite na to breite sto

To programma ayto grafthke apo ton Maarten Boekhold, Faculty of Electrical Engineering TU Delft, NL Computer Architecture and Digital Technique section

Mporeite na xrhsimopoihsete epishs python gia na diabasete arxeia dbf kai na ta fortwsete se mia bash dedomenwn postgres.


Next Previous Contents