This is a discussion on package htp within the Oracle Database forums, part of the Database Server Software category; --> I know this isn't going to be popular, but here goes. Looking at the HTP package, if I had ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I know this isn't going to be popular, but here goes. Looking at the HTP package, if I had to make a lot of web pages using that, it looks like it would be, well, painful, compared to other languages like PHP, Ruby, ASP, JSP for instance. Is this commonly used to create web pages using PL/SQL, or is there another preferred method? Does PL/SQL have any templating mechanism where you can create a text html template and just "fill in the blanks" procedurally? thanks. |
| |||
| "Jake" <jgarfield@earthlink.net> schreef in bericht news:1194280640.737187.57230@q5g2000prf.googlegrou ps.com... > > I know this isn't going to be popular, but here goes. > > Looking at the HTP package, if I had to make a lot of web pages using > that, it looks like it would be, well, painful, compared to other > languages like PHP, Ruby, ASP, JSP for instance. > > Is this commonly used to create web pages using PL/SQL, or is there > another preferred method? > > Does PL/SQL have any templating mechanism where you can create a text > html template and just "fill in the blanks" procedurally? > > > thanks. > Actually there is, or used to be (not sure about it): pl/sql server pages (psp). Search for psp oracle on google. I haven't seen anyone use it ever, but it worked...... Shakespeare |
| |||
| Jake wrote: > I know this isn't going to be popular, but here goes. > > Looking at the HTP package, if I had to make a lot of web pages using > that, it looks like it would be, well, painful, compared to other > languages like PHP, Ruby, ASP, JSP for instance. > > Is this commonly used to create web pages using PL/SQL, or is there > another preferred method? > > Does PL/SQL have any templating mechanism where you can create a text > html template and just "fill in the blanks" procedurally? > > > thanks. > What could be "painful"? Just run the page through a html to plsql converter, load it, and done - if you deliver the page, I'll stream it from the database 10 seconds later. And - if you plan on doing things from with the database, some form of wrapping might be handy. Application Express and Portal are two examples of Oracle products doing just that. If you want a bit more control, take a look at http://vanbortel.blogspot.com/2006/0...-modplsql.html or this: http://vanbortel.blogspot.com/2006/0...parameter.html Comes with a wrapper, too -- Regards, Frank van Bortel Top-posting is one way to shut me up... |
| |||
| "Shakespeare" <whatsin@xs4all.nl> schreef in bericht news:472f4cba$0$241$e4fe514c@news.xs4all.nl... > > "Jake" <jgarfield@earthlink.net> schreef in bericht > news:1194280640.737187.57230@q5g2000prf.googlegrou ps.com... >> >> I know this isn't going to be popular, but here goes. >> >> Looking at the HTP package, if I had to make a lot of web pages using >> that, it looks like it would be, well, painful, compared to other >> languages like PHP, Ruby, ASP, JSP for instance. >> >> Is this commonly used to create web pages using PL/SQL, or is there >> another preferred method? >> >> Does PL/SQL have any templating mechanism where you can create a text >> html template and just "fill in the blanks" procedurally? >> >> >> thanks. >> > > Actually there is, or used to be (not sure about it): pl/sql server pages > (psp). > Search for psp oracle on google. > > I haven't seen anyone use it ever, but it worked...... > > Shakespeare > Checked it out for AS 10G: it's still there (and it appears Oracle's Yapa was written in psp). Shakespeare |
| |||
| "Frank van Bortel" <frank.van.bortel@gmail.com> schreef in bericht news:fgnov0$emu$1@news5.zwoll1.ov.home.nl... > Jake wrote: >> I know this isn't going to be popular, but here goes. >> >> Looking at the HTP package, if I had to make a lot of web pages using >> that, it looks like it would be, well, painful, compared to other >> languages like PHP, Ruby, ASP, JSP for instance. >> >> Is this commonly used to create web pages using PL/SQL, or is there >> another preferred method? >> >> Does PL/SQL have any templating mechanism where you can create a text >> html template and just "fill in the blanks" procedurally? >> >> >> thanks. >> > What could be "painful"? > Just run the page through a html to plsql converter, load it, > and done - if you deliver the page, I'll stream it from the database > 10 seconds later. > > And - if you plan on doing things from with the database, some > form of wrapping might be handy. Application Express and Portal > are two examples of Oracle products doing just that. > > If you want a bit more control, take a look at > http://vanbortel.blogspot.com/2006/0...-modplsql.html > or this: > http://vanbortel.blogspot.com/2006/0...parameter.html > > Comes with a wrapper, too > > -- > Regards, > Frank van Bortel > > Top-posting is one way to shut me up... I think psp is in fact little more than a plsql converter... with the option to put pl/sql or sql in tags. The actual converter is loadpsp.exe. Shakepseare |
| |||
| On Nov 5, 1:55 pm, Frank van Bortel <frank.van.bor...@gmail.com> wrote: > Jake wrote: > > I know this isn't going to be popular, but here goes. > > > Looking at the HTP package, if I had to make a lot of web pages using > > that, it looks like it would be, well, painful, compared to other > > languages like PHP, Ruby, ASP, JSP for instance. > > > Is this commonly used to create web pages using PL/SQL, or is there > > another preferred method? > > > Does PL/SQL have any templating mechanism where you can create a text > > html template and just "fill in the blanks" procedurally? > > > thanks. > > What could be "painful"? > Just run the page through a html to plsql converter, load it, > and done - if you deliver the page, I'll stream it from the database > 10 seconds later. > > And - if you plan on doing things from with the database, some > form of wrapping might be handy. Application Express and Portal > are two examples of Oracle products doing just that. > > If you want a bit more control, take a look athttp://vanbortel.blogspot.com/2006/07/authentication-in-modplsql.html > or this:http://vanbortel.blogspot.com/2006/0...ible-parameter... > > Comes with a wrapper, too > > -- > Regards, > Frank van Bortel > > Top-posting is one way to shut me up...- Hide quoted text - > > - Show quoted text - By "painful" I was refering to all the frame() formOpen() framesSetOpen() noframesClose() functions/procedures in the htp package just to make a web page. I'll have to check out the other ways of doing it though. |
| |||
| Shakespeare wrote: > "Frank van Bortel" <frank.van.bortel@gmail.com> schreef in bericht > news:fgnov0$emu$1@news5.zwoll1.ov.home.nl... >> Jake wrote: >>> I know this isn't going to be popular, but here goes. >>> >>> Looking at the HTP package, if I had to make a lot of web pages using >>> that, it looks like it would be, well, painful, compared to other >>> languages like PHP, Ruby, ASP, JSP for instance. >>> >>> Is this commonly used to create web pages using PL/SQL, or is there >>> another preferred method? >>> >>> Does PL/SQL have any templating mechanism where you can create a text >>> html template and just "fill in the blanks" procedurally? >>> >>> >>> thanks. >>> >> What could be "painful"? >> Just run the page through a html to plsql converter, load it, >> and done - if you deliver the page, I'll stream it from the database >> 10 seconds later. >> >> And - if you plan on doing things from with the database, some >> form of wrapping might be handy. Application Express and Portal >> are two examples of Oracle products doing just that. >> >> If you want a bit more control, take a look at >> http://vanbortel.blogspot.com/2006/0...-modplsql.html >> or this: >> http://vanbortel.blogspot.com/2006/0...parameter.html >> >> Comes with a wrapper, too >> >> -- >> Regards, >> Frank van Bortel >> >> Top-posting is one way to shut me up... > > I think psp is in fact little more than a plsql converter... with the option > to put pl/sql or sql in tags. The actual converter is loadpsp.exe. > > Shakepseare > > Correct - I was referring to the "mod pl/sql packages" - not psp. The executable is called html2plsql, and can be found here: http://www.vesterli.com/webapps101/outdated.html#tools there's a java counterpart as well. I can still recommend the book, Sten wrote. -- Regards, Frank van Bortel Top-posting is one way to shut me up... |
| |||
| Jake wrote: > > By "painful" I was refering to all the frame() formOpen() > framesSetOpen() noframesClose() functions/procedures in the htp > package just to make a web page. I'll have to check out the other > ways of doing it though. > What I meant with "wrapper". How's this for a page from pl/sql: PROCEDURE LOGOUT (p_str IN VARCHAR2 DEFAULT 'Session ended') IS BEGIN BEGIN g_cookie := owa_cookie.get ('MySecretCookie'); EXCEPTION WHEN OTHERS THEN NULL; END; IF g_cookie.num_vals > 0 THEN BEGIN DELETE FROM session_table WHERE session_id = g_cookie.vals (1); OWA_UTIL.mime_header ('text/html', FALSE); owa_cookie.remove (NAME => 'MySecretCookie', val => g_cookie.vals (1)); OWA_UTIL.http_header_close; EXCEPTION WHEN OTHERS THEN HTP.p (format.errorpage (SQLERRM)); END; END IF; HTP.p (format.infopage (p_info => p_str)); END LOGOUT; Mind you - it's a lot of processing - the page is actually built in one statement: HTP.p (format.infopage (p_info => p_str)); If an error occurs, the error page is built with this: HTP.p (format.errorpage (SQLERRM)); Other examples: Hyperlink, with alternative text, link and pop-up description: HTP.p (format.hyperlink (p_text => 'Home', p_destination => 'myapp.bpage1', p_title => 'Back to start page' )); Build a HTML table, based on an oracle database table, with flexible where clause - no row limit: HTP.p (htmlform.selecttable (label => 'Profile:', NAME => 'p_profiel', tablename => 'myapppr.profiles', textcol => 'profile', valuecol => 'id', orderby => 'id', wherecondition => 'profile not in (''ADMINISTRATOR'',''MAINTENANCE'')', p_default => r_sel_pd.profiel_id )); Etc, etc, etc. So - where's the pain? -- Regards, Frank van Bortel Top-posting is one way to shut me up... |
| |||
| "Jake" <jgarfield@earthlink.net> wrote in message news:1194280640.737187.57230@q5g2000prf.googlegrou ps.com... > > I know this isn't going to be popular, but here goes. > > Looking at the HTP package, if I had to make a lot of web pages using > that, it looks like it would be, well, painful, compared to other > languages like PHP, Ruby, ASP, JSP for instance. > > Is this commonly used to create web pages using PL/SQL, or is there > another preferred method? > > Does PL/SQL have any templating mechanism where you can create a text > html template and just "fill in the blanks" procedurally? > > > thanks. > You could use Application Express. It's free and pretty easy to work with. |
| ||||
| Jake wrote: > > I know this isn't going to be popular, but here goes. > > Looking at the HTP package, if I had to make a lot of web pages using > that, it looks like it would be, well, painful, compared to other > languages like PHP, Ruby, ASP, JSP for instance. > > Is this commonly used to create web pages using PL/SQL, or is there > another preferred method? > > Does PL/SQL have any templating mechanism where you can create a text > html template and just "fill in the blanks" procedurally? > > thanks. WebAlchemy.... a blast from the past -- Connor McDonald Co-author: "Mastering Oracle PL/SQL - Practical Solutions" Co-author: "Oracle Insight - Tales of the OakTable" web: http://www.oracledba.co.uk web: http://www.oaktable.net email: connor_mcdonald@yahoo.com "Semper in excremento, sole profundum qui variat." ------------------------------------------------------------ |