POV-Ray : Newsgroups : povray.off-topic : Need a scripting language Server Time
2 Nov 2024 18:52:07 EDT (-0400)
  Need a scripting language (Message 1 to 9 of 9)  
From: Chambers
Subject: Need a scripting language
Date: 15 Mar 2008 04:18:32
Message: <47db9468@news.povray.org>
OK, I don't know if I'll ever get around to doing this, but *if* I 
decide to do it, I need a new tool for it...

Basically, I need to write an app that will store user submitted data in 
a database, create visual representations of said data, and query 
specific web sites based on the data selected.  In other words, a 
language that makes it easy to:

) Use forms to enter data
) Store data in a DB
) Query said DB through other forms
) Create graphical presentations
) Fetch a web page
) Process said web page, looking for specific information

Ideally I would also be able to format data for sending to a printer, 
but that's optional.

In this particular instance, I don't care about "the right way to do 
things", or efficiency (whether in terms of execution speed or memory 
use), or anything like that.  All I want is rapid & easy development of 
this tool.

Does anyone have any suggestions for a good language to handle these tasks?

-- 
...Ben Chambers
www.pacificwebguy.com


Post a reply to this message

From: Orchid XP v7
Subject: Re: Need a scripting language
Date: 15 Mar 2008 04:28:20
Message: <47db96b4$1@news.povray.org>
Chambers wrote:

> ) Use forms to enter data
> ) Store data in a DB
> ) Query said DB through other forms
> ) Create graphical presentations
> ) Fetch a web page
> ) Process said web page, looking for specific information

Hmm... tricky.

I'd say Haskell, except that Haskell will make you do it "properly", no 
matter what the cost. That makes for good, strong final applications, 
but it's not suited to rapid prototyping at all. Everything you listed 
is doable, but it'll take you ages.

I'm struggling to think of any scripting language that's likely to be 
able to handle parsing HTML. (Or speak HTTP for that matter.)

I'd suggest Tcl, except that I don't think there's a way to talk to a DB 
with that. (Or do the HTML/HTTP part.)

I suppose Perl is insane enough that somebody probably has a binging to 
Curl or something, and a half-broken XML parser. Some nutcase wrote a 
*game* in Perl, so apparently it has graphical capabilities. [I can't 
even begin to imagine how that's even possible...] Obviously, Perl is 
not a language to be recommanded to sane human beings.

I can't think of any other scripting languages which might be useful. 
Possibly a .Net language if the base libraries provide the 
functionallity you want. [Having never seen them, I couldn't say.]

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Gilles Tran
Subject: Re: Need a scripting language
Date: 15 Mar 2008 05:04:03
Message: <47db9f13$1@news.povray.org>

47db9468@news.povray.org...
> Basically, I need to write an app that will store user submitted data in a 
> database, create visual representations of said data, and query specific 
> web sites based on the data selected.  In other words, a language that 
> makes it easy to:
>
> ) Use forms to enter data
> ) Store data in a DB
> ) Query said DB through other forms
> ) Create graphical presentations
> ) Fetch a web page
> ) Process said web page, looking for specific information

In MS Access : the 4 first tasks are just default behaviour with MS Access 
so no scripting is necessary (unless you want specific behaviour for data 
checking etc.). Just set up your tables in Access or any other database 
(provided you can get the data through ODBC) and create the forms and graphs 
through the built-in form editor. If the problem is simple it's a matter of 
minutes.
After that a little bit of VBA would be required to open, download and 
process the web pages. There's a function named URLDownloadToFile to do 
this, but I've never used it, I just know it's possible.

G.

-- 
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray, Cinema 4D and Poser computer art
- Posters


Post a reply to this message

From: Darren New
Subject: Re: Need a scripting language
Date: 15 Mar 2008 12:44:02
Message: <47dc0ae2$1@news.povray.org>
Chambers wrote:
> ) Use forms to enter data

In a web browser or on the screen?

> ) Store data in a DB
> ) Query said DB through other forms
> ) Create graphical presentations

How graphical?  Like pie charts?

> ) Fetch a web page
> ) Process said web page, looking for specific information

Tcl will do all those things, with minimal work, both for web and GUI. 
PHP is probably easiest (bleh) if you're just talking about interacting 
via a browser.

> Ideally I would also be able to format data for sending to a printer, 
> but that's optional.

Tcl can *format* some stuff for a printer. It's not trivial to get 
graphics onto a printer from Tcl. If you're talking about sophisticated 
graphics like 3D charts and such, you might want to have Tcl drive 
Excel, or output a CSV file that you suck into an Excel spreadsheet.

If you're talking about Windows, any of the .NET stuff will do that.

I bet if you dug around hard enough, you could do it entirely in Word 
and Excel, including the DB interface.

There are probably CPAN modules for all that too. I don't do Perl enough 
to know, tho.

Also consider breaking it into different parts. Use the scripting 
language to do the processing, some image command-line tool to generate 
a graphic, something like that...


-- 
   Darren New / San Diego, CA, USA (PST)
     "That's pretty. Where's that?"
          "It's the Age of Channelwood."
     "We should go there on vacation some time."


Post a reply to this message

From: Warp
Subject: Re: Need a scripting language
Date: 16 Mar 2008 17:38:31
Message: <47dda167@news.povray.org>
Chambers <ben### [at] pacificwebguycom> wrote:
> ) Use forms to enter data
> ) Store data in a DB
> ) Query said DB through other forms
> ) Create graphical presentations
> ) Fetch a web page
> ) Process said web page, looking for specific information

  I believe the majority of sites out there use PHP for this.

  You can use the web browser as a GUI for the application. This way you
don't need to write a GUI (except in html). PHP has strong tools to parse
webforms and query SQL databases. Many people use this combination for
management purposes.

-- 
                                                          - Warp


Post a reply to this message

From: Chambers
Subject: Re: Need a scripting language
Date: 16 Mar 2008 22:21:05
Message: <47dde3a1$1@news.povray.org>
Warp wrote:
> Chambers <ben### [at] pacificwebguycom> wrote:
>> ) Use forms to enter data
>> ) Store data in a DB
>> ) Query said DB through other forms
>> ) Create graphical presentations
>> ) Fetch a web page
>> ) Process said web page, looking for specific information
> 
>   I believe the majority of sites out there use PHP for this.
> 
>   You can use the web browser as a GUI for the application. This way you
> don't need to write a GUI (except in html). PHP has strong tools to parse
> webforms and query SQL databases. Many people use this combination for
> management purposes.
> 

I thought about something like that, but then I'd need to either run 
Apache on my local machine, or set up a part of my website for that.

Probably the latter would be the easiest option, although I would 
appreciate having the data stored locally.

-- 
...Ben Chambers
www.pacificwebguy.com


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Need a scripting language
Date: 16 Mar 2008 22:28:39
Message: <47dde567@news.povray.org>

> I thought about something like that, but then I'd need to either run 
> Apache on my local machine, or set up a part of my website for that.

Apache isn't the only webserver that can use PHP ;)


Post a reply to this message

From: Darren New
Subject: Re: Need a scripting language
Date: 16 Mar 2008 22:45:39
Message: <47dde963$1@news.povray.org>
Chambers wrote:
> I thought about something like that, but then I'd need to either run 
> Apache on my local machine, or set up a part of my website for that.

You can set up an entire domain name just for this application if you 
like. It's pretty trivially straight-forward.

> Probably the latter would be the easiest option, although I would 
> appreciate having the data stored locally.

Nothing keeps PHP from accessing the data in a mysql server on your 
local machine.  If you want something fast and easy and HTML is good 
enough interface-wise, PHP is probably good enough.

PHP isn't what you'd call an elegant language, but it has piles of 
poorly-named and poorly-organized functions that do most everything 
you'd want to do, and it's easy to find help doing things.

Just remember to escape any string you pass as SQL, and it's probably a 
bad idea to mix HTML and PHP in the same file, even tho that's how it's 
designed.  Remember that PHP stands for "Phil's Home Page" and grew from 
there, and expect quality commensurate with that.

-- 
   Darren New / San Diego, CA, USA (PST)
     "That's pretty. Where's that?"
          "It's the Age of Channelwood."
     "We should go there on vacation some time."


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Need a scripting language
Date: 16 Mar 2008 23:06:37
Message: <47ddee4d$1@news.povray.org>

> Remember that PHP stands for "Phil's Home Page"

No, it used to stand for "Personal Home Page Tools", then in PHP3 
changed to the recursive acronym "PHP: Hypertext Preprocessor".

But yeah, it started as a bunch of CGI scripts for somebody's personal 
homepage and grew from there...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.