Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Programming a web browser?
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
bill_ion_boi




PostPosted: Tue Jul 26, 2005 4:20 pm   Post subject: Programming a web browser?

Hello i am a 16 years old, and would liek to start a late summer project of a simple web browser in C, I dont know very much in the subject but have alot of initiative. Anyways I was wondering if someone could be kidn enough to direct me to some webpages or tutorials on the subject. Or if one could kindly explain the basics of a web browser liek how they work?
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Tue Jul 26, 2005 4:53 pm   Post subject: (No subject)

That's a bit big a project when you're asking questions like that. Smile

C is a bad language for this, anyway. You'll definitely want something higher-level (which, shy of assembly, is just about anything).

You'll need toolkits. Big swaths of code that someone else has already written, and which you can take advantage of.

It breaks down into several components, many of which can be separately tackled.

You need to form a network connection with a web server. You need to communicate via HTTP (HyperText Transfer Protocol) to retrieve a document.

You need to be able to render HTML documents into something meaningful.

You need to be able to deal with history. Going backwards and forwards in a set of pages that have been visited.
bill_ion_boi




PostPosted: Thu Jul 28, 2005 2:51 pm   Post subject: (No subject)

See i already know that, i would just like to get ideas about how to go about creating a Parser(creates data tree of all the tags) and a rendering edgine which i want to build on my own (a very simple one i might add)... So i guess my question is what is the general format of the parser and rendering engine? Also why isnt C a good language,?
wtd




PostPosted: Thu Jul 28, 2005 4:36 pm   Post subject: (No subject)

bill_ion_boi wrote:
See i already know that, i would just like to get ideas about how to go about creating a Parser(creates data tree of all the tags) and a rendering edgine which i want to build on my own (a very simple one i might add)... So i guess my question is what is the general format of the parser and rendering engine? Also why isnt C a good language,?


C isn't a very good language, especially for this, because you'll end up spending far too much time worrying about niggling little details like pointers, and far too little time worrying about the actual parsing.

Using something like Python's HTMLParser module makes this far simpler. Networking also would be much easier in a higher level language.

Trying to write an HTML parser by hand is a sure path to madness.
bill_ion_boi




PostPosted: Thu Jul 28, 2005 5:23 pm   Post subject: (No subject)

Oh i understand, so i will not try to working with C, but Python is just far too slow...Does anyone have alternate suggestions, what about Tcl?

I have this quote from some website:
Quote:

For example, a Tcl-based Web browser can parse a Web page by translating the HTML for the page into a Tcl script using a few regular expression substitutions. It then executes the Tcl script to render the page on the screen.
wtd




PostPosted: Thu Jul 28, 2005 5:28 pm   Post subject: (No subject)

bill_ion_boi wrote:
Python is just far too slow


Have you worked extensively with Python?

Anything that needs to be is written in C or C++ and then given a Python wrapper interface.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: