Path: news.cs.au.dk!not-for-mail From: "Sascha Kimmel" Newsgroups: comp.lang.beta Subject: RE: I feel a bit discriminated Date: 19 Jun 2000 17:35:26 -0000 Organization: University of Aarhus, Department of Computer Science (DAIMI) Lines: 224 Approved: mailtonews@cs.au.dk Distribution: world Message-ID: <20000619173526.8224.qmail@noatun.mjolner.dk> Reply-To: "Sascha Kimmel" NNTP-Posting-Host: daimi.cs.au.dk X-Trace: xinwen.cs.au.dk 961436138 288869 255.255.255.255 (19 Jun 2000 17:35:38 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 19 Jun 2000 17:35:38 GMT Xref: news.cs.au.dk comp.lang.beta:12438 > -----Original Message----- > From: atle@skynet.be [mailto:atle@skynet.be]On Behalf Of Atle > Sent: Monday, June 19, 2000 7:24 PM > To: kimmel@tricos.com > Subject: Re: I feel a bit discriminated > > > Sascha Kimmel wrote: > > > > > > Oh oh oh, don't mix up PHP and Java! > Well, I know nothing of PHP, only that it is like a > shell-extension that is sometimes being 'abused' (in my view :-) to write > programs with. Oh oh oh, you're really a lucky person, because I'm in a good mood, otherwise I would have posted this to *the* PHP Mailing list php-general@lists.php.net ! ;D PHP has NEVER NEVER NEVER NEVER NEVER NEVER been used for shell scripts, it is not intended to use it for shell scripts! You're mixing up PHP and Perl! PHP has been developed ONLY for WEB CGI Programming! Please simply have a look @ http://www.php.net/manual and see for yourself that this is (one of) the best web programming language(s) available! > BTW - do you know if David Medinets "PHP3 Programming > Browser-based Applications" is a good book on PHP3? Never heard about that, only have a German book about PHP (the title is "PHP" :) and the O'REILLY PHP Pocket Reference by Rasmus Lerdorf, the inventor of PHP. > I bought it mostly because there was a complete database toolbox > with it :-) Oh, I bought these books to learn PHP and to have a reference, there was no databse toolbox ;) Oh, yes, I have the O'REILLY book "MySQL and mSQL" :) > > Server vs. Client! > I like to make those things explicit. All the way down to the > socket (or queue) functions. > Comes from my playing with LegoŽ as a child ... I also used to play with LegoŽ as a child, but I think that if you have built a good base why shouldn't you use it again and again? :) > > No, BETA is NOT suited for webserver programming, if you > compare BETA to PHP > > e.g. > > Perl REGEX are not available until now and the MOST things > you're doing when > > programming the CGI is handling from data, normally text, which > has to be > > parsed, filtered, cleaned, compared, saved, loaded and so on :) > I may be confusing scrips with programs. What I think of when I > hear webserver, is a plug where you can hook up FTP, NFS and even > NETBIOS connections, do RPC (isn't there a protocol for that? Or > do they get put in a datagram and retransmitted after timeout?) You're missing HTTP :) You should better look @ the basics before I'm beginning to explain everything to you, this is "off-topic" in this newsgroup! > > Have a look, here is some code from the PERL script I'm just working on: > > > > --------------X<-------------------------------------------------- > >
> > > > > > > > > > > > > >
> face="Arial,Helvetica,Geneva" size="2" color="#000000"> > > Woche vom > > > face="Arial,Helvetica,Geneva" size="2" color="#000000"> > > EOF > > > > # Startdate > > print "\n \n \n"; > > --------------X<-------------------------------------------------- > > > But isn't this more like 'webpage design'? Of course EVERY single CGI program generates ONLY HTML code (okay, maybe some JavaScript on-the-fly) and nothing more. So it IS web programming, but not only. What about this? (This is PHP): --------X<-------------------------------------------------------------- mysql_connect("$db_server","$db_username","$db_password") or die ("$err_connect_db: mysql://$db_server!"); mysql_select_db("$db_data") or die ("$err_select_db: mysql://$db_server/$db_data!"); /* Grab information from database */ $query_article="select * from $db_table_articles where article_id='$article_id'"; $get_results_handler=mysql_query($query_article) or die("$err_sqlstatement_db: mysql://$db_server/$db_users/?query_article!"); $results= mysql_num_rows($get_results_handler); if($results) { while ($gh = mysql_fetch_array($get_results_handler)) { $owner=$gh["owner"]; $title=$gh["title"]; $status=$gh["status"]; $date_show_start=$gh["date_show_start"]; $date_show_end=$gh["date_show_end"]; $date_created=$gh["date_created"]; $last_update=$gh["last_update"]; } $dbfound=1; } mysql_close(); --------X<-------------------------------------------------------------- So where's the webpage? :) > This all runs on top of Netscape, right? No, not really. This company does not have anything to do with PHP ;D Well, to say it again: EVERY CGI-Script/program generates ONLY HTML, because browsers ONLY understand HTML (ok, and something more..) > I would imagine that there would be a way to do this, but I agree > that with Betaenv, too much would have to be defined. I could, Yes, why reinvent the wheel? > however, imagine something coming out of the meta-programming > system that would be better suited. I think that might be a very > interesting problem for someone to solve. Your first BETA project? ;D > Build a Beta-like webpage programming system ... laid out > something like this > > (# > docFont : font(# 'Arial,12' #); No no no, you are a Window$ user, right? The TrueType-Font "Arial" is only supported on Window$ platforms, you should use "Arial,Helvetica,Geneva" to catch Window$, Mac and Unix (X). HTML only supports font sizes from 1 to 6 (or 7?), however if you're using style-sheets (http://www.w3.org) point values (like 12) are also possible. In BETA you would rather use: docFont::(# do 'Arial,Helvetica,Geneva'->face; 2->size; #); But this won't catch this: --------X<-------------------------------------------------------------- Welcome!
This is HTML!
© 2000 by me --------X<-------------------------------------------------------------- > date : dateField(# 'Enter date' #); date::(# do 'Enter date'->string; #); > price1, price2: priceField(# 'DM'; DM=NOK*4.50; ... #); ...... > > do processForm: > (# .. #); > > #) No, it's definetly NOT that simple :) > > Oh, that's defintely a problem :) > I got this 'Mastering algorithms with Perl' - not excactly a book > for beginners :-( Oh, how about "Webmaster in a Nutshell" from - who else - O'REILLY (http://www.oreilly.com). BTW: I'm NOT getting any money for O'REILLY advertising ;) Regards, Sascha Kimmel