Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sybase's Powerbuilder a question 2

Status
Not open for further replies.

allofyourbaseare

IS-IT--Management
Mar 16, 2003
1
0
0
US
Hi,

I'm absolutely unfamiliar with Powerbuilder. When using this development tool just what language is the being utilized. Is Powerbuilder basically using SQL? Or somthing else? Can any of you guys elaborate a bit? I'm a beginning programmer and and this stage I'm simply trying to satisfy some curiousities.

Thanks!

Allofyourbaseare
 
PB is a RAD tool that uses it's own syntax called PowerScript which is based (losely) on C++. One can embed SQL and create dynamic SQL within the PB code, a little like breaking into ASM from C++.

PB has a set of standard classes which can be inherited, events extended, new functions and events written etc.

 
You don't have to code embedded SQL. The system Datawindow/Datastore objects will be used instead.
PB comes with sample applications.
 
Hi,
I am running winzip32.exe from my appl.n for extracting db.zip. I want to use OpenChannel() for knowing if winzip has completed it's processing before my PB appl.n performs any other processing. But i am failing to do so.
Can anyone be kind enough to guide me relating to this? Do i have to specify the path of db.zip or where am i going wrong?
Thanx a ton in advance.

***my code****
time starttime
str = "c:\inv\"
long hndl
OpenChannel("Winzip","db.zip")
IF hndl < 1 then
run(&quot;C:\Program Files\WinZip\Winzip32.exe -min -e -o &quot; + str + &quot;db.zip &quot; + str)
starttime = Now()

DO
setpointer(hourglass!)
Yield()
hndl = OpenChannel(&quot;winzip&quot;,&quot;db.zip&quot;)
IF hndl > 0 THEN EXIT
LOOP Until SecondsAfter(StartTime,Now()) > 60
setpointer(uparrow!)

IF hndl < 1 THEN
MessageBox(&quot;Error&quot;, &
&quot;Can't start Notes.&quot;, StopSign!)
SetPointer(Arrow!)
RETURN
END IF
END IF
 
try using CreateProcess() and WaitforSingleObject() API Functions
 
Congratulations on getting to work in a great environment!

Powerbuilder is an Object Oriented, Event Driven, Graphical User Interfaced environment primarily geared for client / server applications. PowerBuilder uses its own language, called PowerScript. Powerbuilder is considered a 4th generation language. (C++ and Java are considered 3rd generation languages.) With Powerbuilder, you get the object oriented power of the 3rd generation languages along with the GUI front-end of 4th generation languages.

Powerbuilder's first true strength is an object called the &quot;Datawindow&quot;. It will be important for you to learn how to truly use this object and its related control, the datawindow control. If you become a good programmer
who understands Powerbuilder, you should almost never have to embed SQL in your Powerbuilder applications, as there is virtually no need. Datawindows allow you to encapsulate your SQL (along with a display format) into an object that can be used throughout your application.

2. Powerbuilder's second major strength is that it is truly object-oriented - Inheritance, Polymorphism, Encapsulation. In Powerbuilder, Learn how to create your own classes and inherit from them, making your programs much more robust and often easier to maintain.

3. Powerbuilder's third major strength is that it can connect to most databases. Unlike vendor specific tools, Powerbuilder allows the developer the freedom to develop on any database and often through native drivers. (Much faster, more stable, and better than using ODBC connections, for example.) For example, I created one application for an Access database and was able to place it directly onto an Oracle database without making 30 minutes worth of changes. Had I used embedded sql, this task would have taken weeks.

There is no other environment that I have used which even comes close to Powerbuilder in client/server. VB is not object oriented (no inheritance, though VB.Net makes claims that it now has that capability) and does not have near the database manipulation power that Powerbuilder provides. However, if you have used VB before, then you will be familar with some of the standard controls found in Powerbuilder. Java and C++ may provide a bit more flexibility, performance, and fewer limitations but the design and maintenance costs would be extremely higher than a 4th generation language like Powerbuilder.


PB Books and Tips:
1. Make sure PowerBuilder's &quot;ONLINE BOOKS&quot; are installed onto your work computer! This will become your life's blood.

2. Utilize the software package that comes with the PB software (if purchased) called &quot;Infobase&quot;. Infobase will provide you with a lot of great examples of how to implement your code.

3. Get some good PB books and get old issues of Powerbuilder Journal Magazine. You did not say which version of PB you will be using. There were some changes with the interface from version 6.5 to 7, but there is an incredible amount of changes from 7 to 8. You should get a basic fundamentals book and any of the unleashed books. Start off with the basic book and graduate to the unleashed. (Go to amazon.com and type in powerbuilder to get a list of available books.)
Or BookPool.com

4. Learn your datawindow - Know your datawindow - Love your datawindow. There is an entire book devoted to the datawindow in powerbuilder - get it. :)

5. Once you have the fundamentals down, begin learning the proper techniques for implementing good Object Oriented Programming. Learn to create user objects, custom user objects, and non-visual user objects. Inherit from those user objects rather than recreating a new controls like VB programmers typically do. (Powerbuilder is only object oriented if the programmer codes that way!)

6. Graduate into learning Powerbuilder's PFC's (Powerbuilder Foundation Classes) and using &quot;Services&quot;.

7. Did I say Know your datawindow?

8. Know your SQL. Powerbuilder offers a nice GUI interface for creating your SQL statements for your Datawindows but it is always best to know how to do it yourself.

9. Check your local junior colleges for courses on Powerbuilder.

10. SHIFT-F1 in the script painter brings up Help. Learn how to use it!

Good Luck and Welcome to Powerbuilder.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top