Does PB do all this?

Everything else that doesn't fall into one of the other PB categories.
aldewacs
New User
New User
Posts: 7
Joined: Thu Dec 24, 2015 9:21 pm

Does PB do all this?

Post by aldewacs »

Hi, programmers. I'm new here, and I'm a weak programmer but experienced program developer. I probably know enough to cause some major damage. Haven't purchased PureBasic yet, but am getting ready.
I'd like to ask a question to the community - I'm not even sure where to look at this stage. I welcome any input, with a smile. :)

I have a huge VB6 application designed by me and written by someone else, that needs to be redone in a modern way. I'm up for the task.

There are certain processes that were used, and will need to be redone in PB. Does anybody care to take the time to indicate whether these are supported/possible or NOT at all possible? I will be forever and a day grateful.

They include:
----------------
• Use standard DLL's
• Build PB DLL's
• Use Windows API (OK I know that is supported)
• Zip and unzip files
• Connect to databases (Current app uses MS Access tables) but I may end up storing data in a flat file. (I'm now reading up on SqLite - looks promising)
• HTTP uploads and downloads
• Read data from an Excel file.
• Write data to an Excel file (and create an Excel file programmatically)
• Inject / insert text or tables into a WORD file at a specified marker.
• Create PDF file from a WORD or Excel file or report.
• Encrypt variables (OK I can write my own, too)
• Read from INI file, and write to INI file
• Read from Windows Registry Key, and write to Windows Registry Key
• Maintain contacts list
• Send email
• Show data in a multi-level TREE (3 or more nodes deep)
• Show data in a good GRID with the usual features (sort, colours, connect to array, etc)
• Draw Graphs

Note sure if this is available:
• Binary search tree

Have a Merry Christmas 2015!
ElementE
Enthusiast
Enthusiast
Posts: 139
Joined: Sun Feb 22, 2015 2:33 am

Re: Does PB do all this?

Post by ElementE »

Hi aldewacs,
I am somewhat new at programming using PureBasic but I will try to answer a few of your questions.

• Use standard DLL's
Yes, especially if they are "C" DLLs, C++ DLLs might be more difficult to interface with.
• Build PB DLL's
Yes, see the web page
http://www.purebasic.com/documentation/ ... e/dll.html
• Use Windows API (OK I know that is supported)
Yes. Many Win API functions are natively supported by PB. Function prototypes can be written for those that are not natively supported.
• Zip and unzip files
Yes, using the Packer library
• Connect to databases (Current app uses MS Access tables) but I may end up storing data in a flat file. (I'm now reading up on SqLite - looks promising)
Yes, using the Database library
• Read from INI file, and write to INI file
Yes, using Preference library functions
• Read from Windows Registry Key, and write to Windows Registry Key
Yes, using Win API registry functions.
• Draw Graphs
Yes. See the PureBasic example on this web page:
http://rosettacode.org/wiki/Plot_coordinate_pairs
Think Unicode!
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Does PB do all this?

Post by Lunasole »

The following can be done using internal PB libraries/functions:
• Zip and unzip files
• Connect to databases (Current app uses MS Access tables) but I may end up storing data in a flat file. (I'm now reading up on SqLite - looks promising)
• Encrypt variables (OK I can write my own, too)
• Read from INI file, and write to INI file
• HTTP uploads and downloads
• Send email
• Draw Graphs
• Show data in a multi-level TREE (3 or more nodes deep)
• Binary search tree
* you should additionally check is it all supported at the same level as you need. try to do something with demo + check included help file for details


The following is not implemented within STL, but can be done by using external libs, APIs, writing your own functions, etc:
• Read data from an Excel file.
• Write data to an Excel file (and create an Excel file programmatically)
• Inject / insert text or tables into a WORD file at a specified marker.
• Create PDF file from a WORD or Excel file or report.
• Maintain contacts list
• Read from Windows Registry Key, and write to Windows Registry Key


The following is supported:
• Use standard DLL's
• Build PB DLL's
• Use Windows API (OK I know that is supported)

I'm not sure about next one (I don't know is there such UI control in STL or not):
• Show data in a good GRID with the usual features (sort, colours, connect to array, etc)


- also you should realize that there officially are no OOP support in PB (not even class modules, which were in VB6)
- although, COM-libraries (widely used with VB6) should work fine here using special "Interface" keyword, but me personally didn't tried this yet
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
HanPBF
Enthusiast
Enthusiast
Posts: 570
Joined: Fri Feb 19, 2010 3:42 am

Re: Does PB do all this?

Post by HanPBF »

Excel:
There is no lib like ClosedXML (.NET) at PB site
Excel is stored nowadays as zipped XML files (renaming it from *.xlsx to *.zip You are able to unpack it).
You have great XML native lib in PB which You could use to generate Excel.
BUT... and yes it's a big BUT... Excels XML structure ist heavily complex and You end in replacing some things here or there. But buildng an Excel doc from scratch is very difficult.

If You are at client site, consider using VBA to fill up an Excel template by accessing database.
The editor in Excel VBA (Office VBA) is really, really good. It's still better than some modern environments (including PB IDE).
So, maybe running things from Excel would help.

Database access:
There is no native access to Microsoft SQL server or ORACLE SQL server.
But, both the ADOmate lib and the free available OCI.dll can be used to access those DBs.
I did that and it works even it's not so comfortable. But with PB You are either on a lower level of programming.
If You can change/install ODBC, You are free to access every DB.

PDF:
anyone knows something about reading / writing PDF?
I am very interested in that, too...
Fred
Administrator
Administrator
Posts: 18220
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Does PB do all this?

Post by Fred »

aldewacs
New User
New User
Posts: 7
Joined: Thu Dec 24, 2015 9:21 pm

Re: Does PB do all this?

Post by aldewacs »

My sincere appreciation for all answers to:

ElementE
Lunasole
HanPBF
Fred

I get the strong feeling this will become my solution.
From Al in Canada.
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: Does PB do all this?

Post by Dude »

aldewacs wrote:I get the strong feeling this will become my solution.
Download the free demo and try it. Ask questions when you get stuck. You'll soon know if it's your solution.
Fred
Administrator
Administrator
Posts: 18220
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Does PB do all this?

Post by Fred »

Yes, the demo version should be enough for prototyping your app
aldewacs
New User
New User
Posts: 7
Joined: Thu Dec 24, 2015 9:21 pm

Re: Does PB do all this?

Post by aldewacs »

To all who have been kind enough to provide feedback:

It looks like I'm going to build a minuscule application, purpose yet to be determined but probably 100% useless, that incorporates every one of my eventual requirements. Since building a large project mostly consists of building a bunch of small projects and merging them intelligently, I'll try to build modules that can be re-used in the real program if I get that far. That'll allow me to prove to myself that the PD code can not only "DO" it but the result looks and feels modern and friendly. The task now is to convince myself that PB and I can get along and achieve my lofty goals.

Merry Christmas - 2015 and
A safe and Happy New Year - 2016.

Aldewacs
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Does PB do all this?

Post by Lunasole »

aldewacs wrote:To all who have been kind enough to provide feedback:

It looks like I'm going to build a minuscule application, purpose yet to be determined but probably 100% useless, that incorporates every one of my eventual requirements. Since building a large project mostly consists of building a bunch of small projects and merging them intelligently, I'll try to build modules that can be re-used in the real program if I get that far. That'll allow me to prove to myself that the PD code can not only "DO" it but the result looks and feels modern and friendly. The task now is to convince myself that PB and I can get along and achieve my lofty goals.

Merry Christmas - 2015 and
A safe and Happy New Year - 2016.

Aldewacs
Nice speech 8)
My "lofty goals" the same, but targeted to game instead of application. Good luck to you and happy new year.
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
Post Reply