Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Do Youu KNow Of C++ for CGI Rsources?

Posted on 1998-09-30
8
Medium Priority
?
227 Views
Last Modified: 2013-12-25
I am new to C++ and am looking for info on replacing perl
   scripts for cgi with C++ programs....I would rather write C++ than perl for many things on our
   web servers.
0
Comment
Question by:vernk
8 Comments
 
LVL 5

Expert Comment

by:b2pi
ID: 1828896
Other than arguments come in from the environment, just like perl, and
you print to stdout for the resultant html, just like perl, what do
you want to know?
0
 

Author Comment

by:vernk
ID: 1828897
Thanx for the interest b2pi....basically I'm looking to find
reference literature on the subject...pretty much anything
that will help me to understand......so I can see how to
do things like pull the info from value pairs in a form and pass it/process it, then output it,etc....I figure I should probably put the effort into the C++ rather than splitting myself between the two.  
0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1828898
are you fluent in C++?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:vernk
ID: 1828899
MaDdUCK,
No, just beginning.....I've been an isp for 4 years (nt3.51-4.0) and have a very narrow scope of practical knowledge....just hacked some perl scripts for a couple customers (with help from here) and have been wanting to get a basic foundation in C....the local com. college only offers C++ classes, so I'm the cherry old guy (41) in the class. I do have needs for perl like scripts, but figured i might as well write them in C++. I'm trying to get a handle on how to pass things from forms to a C++ program and back to some virtual pages that are built on the fly. Any documentation you know of is appreciated.
0
 
LVL 8

Expert Comment

by:Answers2000
ID: 1828900
vernk -

1. Buy an introductory book on C++.  Browse your local books store and find the one that best suits your level of knowledge (which isn't clear from the comments you made).

2. Buy this book

The CGI Book
By William E. Weinman
ISBN 1-56205-571-2
Published by New Riders Publishing 1996

It doesn't explain C (it assumes a basic knowledge).  It will tell and show you how to write C (plus a few Perl and shell script examples mostly for comparison - but I would think this helps given your previous experience)

Quite often the book gives an example in Perl or shell script, and then the same thing in C.

Here is the review I wrote of it:

(begin quote)

This is a book I really like.  It's not flash, it's not cool, but it's packed with tons of useful information, and you won't need a Fork Lift Truck to carry it around with you.

In terms of content this book is mostly UNIX, Perl and C orientated, which will make it appear dated to some.  You won't find the latest web gadgets covered within it's pages, but you will find plenty of good advice about writing CGI programs.

Thankfully this book also avoids one of the most common pitfalls with Internet and computing books - it doesn't try to teach you everything.  As you build up your library of technology books, you'll appreciate not having yet another introduction to basic C programming or HTML.

Apart from covering the basics of creating a CGI program, the book also walks you through many related topics including processing forms, URLs (the clearest explanation I've seen yet), image maps, cookies and server side includes.

Given the current concern about Internet security, I was also glad to see an entire (and thoroughly readable) chapter about security issues with CGI, as well as a scattering of security discussions through out the book whenever an issue arises.

The only criticism that I would make concerns the quality of the source code.  While I'm sure each example program would work, and is individually clear, if used as the starting point for larger project, you could quickly get into trouble.  C programming newbies, in particular, should be aware that these are examples rather templates.  

In conclusion, this is an excellent book.  If you consider yourself a web technologist you should buy it.  Even if you consider yourself an expert, you still might find surprises in its well-crafted pages.


(end quote)


3. Another good book

ActiveX Web Programming
By Adam Blum
ISBN-0-471-16177-2
Published by John Wiley & Sons, Inc. 1997

This has chapters on C++ CGI and ISAPI and includes some really nice sample code.  Some of this book may not be relevant to you, but in combination with the CGI book listed in #2, this makes a great combination.

Here's a review I wrote on this

(begin quote)

If you're looking for a book containing a pretty good single volume overview of Microsoft Internet and Intranet technologies, then this is it.    

This book is well put together and well thought out.  It doesn't try and teach you everything, for example, it (happily) omits tutoring you on HTML and other web basics.  Because of this wise decision and some good editing, it manages to pack a tremendous amount of information into the 277 pages of the main text (there's about another 120 pages of Appendices as well which is mostly source code).

In general there's one chapter per topic, and topics include ISAPI, VBScript, IIS,
Perl, Java, CGI, ActiveX Server and as well as ActiveX controls. Of course each of these topics would merit a book in itself, so don't expect too much detail.  However I found that each chapter was enough for me to understand the basics of a technology, and get me started.
 
So what's not included, and what could be improved?

Obviously you can guess by the title, this book is strongly Microsoft focused (but not as much as you might think).  Fortunately, this book avoids the "lecturing" element you find in so many books of this kind, but still don't expect to find much on rival technologies such as those from Sun or Netscape.  

The weakest chapter is the one about Perl, frankly you won't learn Perl by reading its 26 pages - though it does make a valiant attempt.  

To some, the most serious deficiency will be that books like this, date very quickly.  The information contained within is still accurate, but you won't find any information about all the latest Internet gadgets from Microsoft.

In summary I would recommend this book without any reservation to anybody who is building a Microsoft based Intranet.  If you're targeting the Internet, then you should still seriously consider this book, but buy some others too!  

(end quote)

I hope this helps.
0
 
LVL 1

Expert Comment

by:wisdom042597
ID: 1828901
C++ and CGI are two different things.  What you really need to do is learn C++ first and then get ahold of a basic C++-based CGI library and you'll be in business.  Beyond that you want to get a grasp of CGI fundamentals (MIME headers, setting Cookies if necessary, etc.)  
0
 
LVL 8

Accepted Solution

by:
MaDdUCK earned 0 total points
ID: 1828902
This is what I was saying.
For a start on C++, get Bjarne Stroustrup's _The C++ Programming Language_ (http://www.amazon.com/exec/obidos/ASIN/0201889544/o/qid=908898589/sr=2-1/002-9422771-2473620) and work your way through it. Get fully acquainted with output and input, different types, classes, and everything else.

Then surf to www.cgi-resources.com and check out the documentation there. The next thing to do is to download a good CGI library written in C or C++ and study it. You can also find such at the last site.

Finally, the following books could be of help:
(the first proposed by Answer2000)
NCSA HTML 1.1 Specifications
W3C CGI 1.1 Specifications

if you have any questions then please ask. Over the past year I have been going through the process that you are about to go through and I should know how to help you. You can find contact information on my webpage which is cited in my profile page (click my name above)...

hope this helps.
MaDdUCK
0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1828903
of course I would appreciate more than _5_ points --> for just 5 points I will not be able to give you more info than what I just gave (which was a lot more than a 5 pointer anyhow)...
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
This article will show, step by step, how to integrate R code into a R Sweave document
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question