May 05, 2024, 03:08:49 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Common Classes

Started by Zen, December 18, 2005, 06:37:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zen

A bit later on, once Aurora has settled down a bit and is more stable i plan to make some common classes for use with Aurora.

Here are some ideas i had in mind.

Base Class - Handle errors and such for all classes

Internet:Base

POP3:Internet - For communicating with pop3 servers to recieve mail
SMTP:Internet - For communicating with SMTP server to send e-mail
HTTP:Internet - Use GET and POST commands with http and other common HTTP functions
NNTP:Internet - Send and recieve Network News
SAOP:Internet - Send and recieve XML format files on the SOAP protocol
Raw:Intrernet - Raw Internet API for making your own servers and clients

Database:Base

MySQL:Database - For communicating directly with MySQL (No MyODBC required)
MSSQL:Database - For communicating directly with Microsoft SQL Server (No ODBC)
Access:Database - Maybe added, but i think Paul will be doing this as part of the ODBC library

Dialogs:Base

Find:Dialogs - The common Find dialog you see everywhere
Replace:Dialogs - The Common Find/Replace dialog
About:Dialogs - An about dialog template.

Files:Base

XML:Files - For parsing and creating XML documents
SQ::Files - For parsing Structured Query Languages

Hash:Base

MD5:Hash - Used to create MD5 Hashes
CRC32 - Used to create CRC32 Hashes

More to be added

Compression:Base

Zip:Compression - Extract and add files to Zip archives
Gzip:Compression - As used in fletchies Pak gen
Rar:Compression - Another common archive format
Cab: - Yet another common archive, mainly for windows

----------------------------------------------------------------------------------------

Thats all i have thought of at the moment. If anyone else has any ideas for some more common classes then let me know.

Lewis

Parker

This looks like it could take quite a while to implement all of them.

Internet - I've never used internet API, but these would be pretty useful. Maybe you could include a CGI library (for parsing arguments, handling environment variables, GET/POST, cookies, etc), save me the work ;)

Database - These will be a lot easier when Paul has written the conversion utility from C. The MySQL programming doesn't look too much different than what's in PHP though. It shouldn't be too hard.

Common dialogs - I wish windows had these built in :) - They have an about dialog, but who wants to be called "Microsoft MyApp"? They put their name on the dialog.

Files - These will be pretty hard to implement. Take for example this XML statement:
<sometag value=C:\someapp.exe mode = "true" />
Values don't have to be quoted, which makes it kind of hard to write a lexer for. Also, if you're parsing them, you may want to look into using queues and lists to store various records about the files in.
For SQL type languages, the tokenizing shouldn't be too hard, but it works somewhat like a standard language, but a little easier to read.
SELECT * FROM some_db WHERE `record1` = 'Hello';
Some keywords consist of two separate words also. But if you work at it I'm sure you can get it. It would just take a while.

Hashing - I think this just takes some conversion. You may want to do the SHA algorithms too.

Compression - You're definitely going to want to use 3rd party libraries on these. There's no way you're going to get any better just writing on your own. But wrappers would be nice. There's also bz, bz2, tar, I wonder if 7zip has an API you can use.

Zen

Yes this will take a while. I have started my own CGI library (for you know what) it can be used for server variables, get and post and many other things like sorting out headers easily. If there enough people who want it then i will also include the ISAPI class, however this can only be used in windows as it is an IIS API specific DLL.

Obviously i want to use as little DLL files as possible so people do not have to re-distribute them with there apps but unfortuanatley i dont think everything is going to be that simple. Things like compression librarys will most likley need to use a DLL library rather than a static one.

Im glad you think it is a good idea.
Lewis

Parker

The libraries like gzip, tar, bz have equivalents on windows and linux, I think you can just link to the static libraries

Zen

Topic has been locked, see software projects board (http://www.ionicwind.com/forums/index.php?topic=165.0)

Just incase anyone goes digging up these old bones.

Lewis