Creating a basic web browser

Started by
11 comments, last by JY 18 years, 8 months ago
I decided for my next little project it might be fun to create a web browser; however I'm not exactly sure where to start. Would I have to parse the HTML myself and go from there?
//------------------------------------------------------------------------------------------------------The great logician Bertrand Russell once claimed that he could prove anything if given that 1+1=1. So one day, some fool asked him, "Ok. Prove that you're the Pope." He thought for a while and proclaimed, "I am one. The Pope is one. Therefore, the Pope and I are one."
Advertisement
I'm sure there's libraries to help, but yeah.

Apparently you've never done anything with VB ;)
I don't want to use VB, because that does everything for you; besides I haven't used that in years. The point of this exercise for me is to learn how things work, not to throw something together. If I wanted that, I would just create an MFC app using CHtmlView.
//------------------------------------------------------------------------------------------------------The great logician Bertrand Russell once claimed that he could prove anything if given that 1+1=1. So one day, some fool asked him, "Ok. Prove that you're the Pope." He thought for a while and proclaimed, "I am one. The Pope is one. Therefore, the Pope and I are one."
Fair enough. Have you considered trying to write your own HTML engine or are you just looking to use MSHTML?
It depends on what you want to learn. Are you trying to learn what data passes between the client/server? Use some sort of socket, not a library to do it for you. Are you trying to learn how to display HTML? Then again, don't use a library for it.

I'm not sure what aspects you're trying to get a learning experience out of. That should really make up your mind whether you should parse HTML and such, as you asked.
I guess I start with parsing html. My question is how I'd start that, the actual process of turning html into something on screen.
//------------------------------------------------------------------------------------------------------The great logician Bertrand Russell once claimed that he could prove anything if given that 1+1=1. So one day, some fool asked him, "Ok. Prove that you're the Pope." He thought for a while and proclaimed, "I am one. The Pope is one. Therefore, the Pope and I are one."
Well, I can't give the exact low down on how to do that, but if you know HTML, it shouldn't be a problem. Look at a part of HTML, and ask yourself what does that do? Once you know what it does think about different ways you could make it happen. Say it's a center tag. Find out how many characters can fit into a row on the screen. Subtract the number of characters that needs to be centered. Then divide by 2 and that will be how much space you need to tab over before you output that text. Following me?
We should do this the Microsoft way: "WAHOOOO!!! IT COMPILES! SHIP IT!"
You'll need to familiarize yourself with RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1. You also might want to go to rfc-editor.org and do a search for HTTP and HTML to turn up some more relevant RFCs.
Quote:Original post by Sfpiano
I guess I start with parsing html. My question is how I'd start that, the actual process of turning html into something on screen.


I'm by no means trying to bash you, but if you dont atleast have a vague idea of where to begin then I believe your being a little to ambitious. I only say this because a few years ago when I was first learning windows api I thought the same thing. I quickly learned it was out of my current scope, so I worked on smaller less ambitious projects. Now I have a partially complete html parsing class. Only partially complete because I only work on it like once a month if that. :D I have been working on my own game engine primarily.

This topic is closed to new replies.

Advertisement