Internet/SQL support

BlitzMax Forums/Brucey's Modules/Internet/SQL support

TwoCorin517(Posted 2008) [#1]
I've been wondering as to the full extent of your Internet and SQL support. could you offer some examples of how it could be used?

How do you use it? Like PHP?


Brucey(Posted 2008) [#2]
I'm not completely sure what you are asking.

The Database framework allows you to connect to and use any of the supported databases, using the methods of connection they support. For example connecting to SQLite requires nothing more than telling it what database file to use, whereas for MySQL, you can connect via TCP (either to your PC or over a network).

For internet functionality there are a couple of modules.
libcurl and libcurlSSL enable you to use standard internet protocols (HTTP, FTP, HTTPS, FTPS etc) to connect and speak with servers. The difference between the two modules is that one uses SSL to provide HTTPS support using standard strong encryption methods.
These modules let your app work like a browser/ftp client.

The ClearSilver module is a templating library which works a bit like Smarty for PHP, in that you predefine templates with some inline logic, populate some variables, and output it to the console.
What's cool about this is that you can run your BlitzMax app as a cgi-script with Apache. I've had it running on my Mac like that and it works very well!
Google use ClearSilver as the underlying engine for their googlegroups (according to the author who works there).

Of course, you could also use it for code-generation, as it will output anything you need from a starting template.

The FTPParser module is a helper util for parsing FTP directory listings as you might get by using libcurl with an FTP server. It saves you having to work out what the output from the server means by putting file info into types that you can query.

Libxml/libxslt can also be used to parse html/web data if need be.

Hope that helps.

:o)