<pageinfo title="Overview of Escarpment"/>
<?include resource=103?>
<<<$TEMPLATE>>>

<xPageTitle>Overview of Escarpment</xPageTitle>

<xSectionTitle>SDK Feature List</xSectionTitle>
<p>
	Do the C++ Windows applications you write look like
	rusted-out monochrome hulks compared to the color and polish of web pages? Do gray and
	impersonal dialog boxes limit your user interface options? If so, check out the Escarpment
	SDK. Escarpment is a Windows DLL that lets C++ developers include web-style user
	interfaces in their applications. It replaces DialogBox() resources with something very
	close to HTML, letting you include coloring, fonts, and images just like a web page. And
	that's not all... Tired of those boring buttons and monotonous scrollbars? Escarpment
	comes with a host of stylish 3D controls that blend in nicely with your polished user
	interface. Order now and you'll not only get the DLL and controls, but the first
	1,000,000,000 downloads will include documentation and samples. Sorry, no COD.
</p>

<p>
	Escarpment is a SDK for Windows that includes:
</p>

<xul>
	<li><bold>
		A <a href=r:113>HTML-like page display language</a> which allows you:
	</bold></li>
	<xul>
		<li>
			Full control over <a href=r:114>text formatting and placement</a>, just like HTML.
		</li>
		<li>
			Incorporation of square or transparent <a href=r:122>bitmaps and JPEG images</a>.
		</li>
		<li>
			<a href=r:115>Easy-to-incorporate controls</a> that look like they belong in a modern
			GUI using 3D rendering.
		</li>
		<li>
			<a href="r:131#CEscWindow::Print">Easily print</a> the same pages you design for the screen.
		</li>
	</xul>
	<li><bold>
		Ease-of-use functionality:
	</bold></li>
	<xul>
		<li>
			Built-in application <a href=r:138>search functionality</a>.
		</li>
		<li>
			<a>HoverHelp<xHoverHelpShort>This is hover help.</xHoverHelpShort></a> that tells users what a control does.
		</li>
		<li>
			<a href="r:132#EscChime">MIDI Audio cues</a>.
		</li>
		<li>
			Text-to-speech <a href=r:130#CEscPage::MBInformation>messages and alerts</a>.
		</li>
	</xul>
	<li><bold>
		Documentation
	</bold></li>
	<xul>
		<li>
			<a href=r:114>MML page display language</a>
		</li>
		<li>
			<a href=r:108>C++ objects</a>
		</li>
		<li>
			<a href=r:132>APIs</a>
		</li>
	</xul>
	<li><bold>
		Samples
	</bold></li>
	<xul>
		<li>
			The Escarpment help application is built in Escarpment, and all the
			source code is included.
		</li>
		<li>
			A page editor, MMLEdit.exe, so you can edit your pages and
			immediately see what they look like. Source code for the sample is included.
		</li>
		<li>
			Source code for the built-in controls is included so you can write
			your own controls.
		</li>
   </xul>
</xul>

<xSectionTitle>Escarpment's Goals</xSectionTitle>

<p>
	I developed Escarpment because I want my applications
	to look better than the traditional Windows GUI (aka: monochrome dialogs
	and gray buttons). The web has put the GUI of old's look-and-feel to shame.
	Furthermore, the traditional rigidness of Windows dialogs ultimately
	makes the user interface a little more difficult
	for end-users to comprehend than the flexibility of HTML;
	I want to answer as few product-support questions as possible.
</p>

<p>
	So, when I sat down to design Escarpment I wrote down a number of goals.
	These are (in no particular order):
</p>
<ul type=pointer>
	<li>
		<ThreeD width=20% height=20% timerinterval=125 posn=edgeright border=0>
			<Translate point=0,-1,3/>
			<Rotatex val=45/>
			<RotateYTime from=0 to=360 interval=20/>
			<ShapeTeapot/>
		</ThreeD>
		<bold>Make applications look as good as the web</bold> - The functionality in Escarpment is
		mostly comparable to HTML; there are tables, images, fonts, and the ilk. With a bit of graphic
		design skill, you can make an Escarpment page look as good as any web page. Better, if truth
		be told. Escarpment provides much better looking controls and more flexible object/font
		interaction. And if there's something missing, please send me E-mail at <xMyEmail/>.
	</li>
	<li>
		<bold>Easy to write applications with</bold> - I hate doing unnecessary work, and I've cursed many
		APIs for making the common every-day tasks difficult. The purpose of an API is not only to provide
		functionality, but also to make developers' lives easier. If my APIs aren't easy to use please
		contact me; I may be able to fix them.
	</li>
	<p><italic>
		For awhile I thought about using
		Internet Explorer's to save me the work of writing Escarpment. IE is very modular and has ActiveX
		controls. With a bit of reading I'd be able to write all my applications in Internet Explorer. Assuming
		I didn't mind the difficulty. Just look at a web page using ActiveX controls in Internet Explorer - not
		a very pretty site. Plus, if I required Internet Explorer for my applications many people wouldn't have the
		latest version installed (which is the only one I'd be able to test with) and pulling in the incredibly
		huge IE would slow down my applications.
	</italic></p>
	<li>
		<bold>Easy for end-users</bold> - Don't forget the end-users. I want to make my applications as easy
		to use as possible so <bold>a)</bold> more people use them,
		and <bold>b)</bold> I get fewer support questions. Escarpment is
		loaded with ease-of-use, or rather, it's clean of clutter.
		The system makes it obvious when and where users can click - notice the blue coloration meaning
		clickable? And red being clicked? And the audio queues that subconsciously inform users if what they
		click on can be dragged?
	</li>
	<li>
		<bold>It must be small</bold> - I sell software over the Internet. If I have to distribute a large binary
		then not only do fewer people take the time to try out my application, but I have to pay my Internet
		server company more money; they charge me by the megabyte. Plus, larger downloads are more likely
		to fail part way through due to a temporary Internet disconnect, a large problem here in Australia.
	</li>
	<p><italic>
		Because the software must be small I've tried to minimize the image and sound resources I include
		in Escarpment.dll and in applications that use Escarpment.dll. That means that beeps are generated
		using MIDI, and as many images as are generated algorithmically. You can still include JPEGs if you
		want, but add too many and your software will soon baloon to several megabytes.
	</italic></p>
</ul>

<xSectionTitle>How it's architected</xSectionTitle>

<p>
	Escarpment is a <bold>Windows DLL</bold> that exports a handful of <bold>C++ objects</bold> and a few utility functions. It does not
	use COM (component object model) and is even relatively light on the C++. I've designed and implemented
	COM APIs before. The theory and flexibility of COM are nice, but I've discovered that many developers find
	it more difficult to write COM applications, and even slightly confusing. I agree. In fact, because developers
	found it so difficult I ended up adding a C++
	wrapper over the COM objects on my previous API. And to theorist's dismay, not everything in Escarpment
	is an object. I even use a few callbacks, since sometimes they're easier to write than subclassing virtual
	C++ objects.
</p>

<p>
	It is fundamentally based on a page layout format <bold>very close to HTML</bold>. I've followed most of the HTML specification,
	but stopped where it became obvious that the elements were a hack based upon a hack. I call my
	variant <a href=r:113>MML</a>.
	At any point in the help application you can click on the "View MML Source"
	on the lower left and
	see what MML has created the display.
	The <a href=r:114>tags</a> are virtually identical to HTML. You'll see lots of
	 &lt;p&gt; tags, just like HTML.
</p>

<xCode>
	<p>&lt;p&gt;This is a test&lt;/p&gt;</p>
</xCode>

<p> </p>
<p>
	Most of the text formatting tags are identical, although I may have souped a few up with added functionality.
	The largest changes come from my addition of new tags
	and introduction of <a href="r:113#Macros">macros</a>. In my MML you'll see
	plenty of tags beginning with "x". I use this to denote a macro, which is really a combination of other tags.
	Macros save typing time and allow an entire application's look-and-feel to be easily changed. If all buttons
	are hidden within a macro, changing the one text entry for the macro will change all the buttons
	in the application.
</p>

<p>
	I've added <bold>easy-to-use control functionality</bold>, and changed many HTML tags into controls.
	For example, to put
	a <a href=r:117>button</a> in MML, all you need it:
</p>
<xCode>
	<p>&lt;Button href=pressme&gt;Press me!&lt;/Button&gt;</p>
</xCode>

<p> </p>
<p>
	HTML also makes it fairly easy to add controls, but HTML has a very limited selection of pallid controls.
	I'm rubbed the wrong way when I see a web page with professionally designed graphics
	containing a gray box button with "OK" on it. It's like putting a Velvet Elvis in a room full of priceless paintings.
	The poor quality of the Velvet Elvis really stands out. As a result, I provide a plethora of controls, each having
	a <a href=r:115>wide variety of styles</a> to suit anyone's taste.
	And if they don't, I can modify them or so can you, since I've
	provided control source code in the SDK.
</p>

<p>
	The MML and controls are all glued together, code-wise,
	in a C++ object called <a href=r:130>CEscPage</a>. It knows about
	all the controls in the page and gets notifications from the controls when they're clicked. It's kind of like half
	a Windows HWND. Developers even write their own code to handle page interactions by providing a callback
	for CEscPage. The callback is very similar to the WindowProc from Windows.
</p>

<p>
	Pages are only half of the traditional window. The web has introduced the concept of jumping from
	page to page without the window containing the page disappearing and a new one reappearing. As a result,
	I have a <a href=r:131>CEscWindow</a> object. The window object is the stationary box on the screen while the CEscPage handles
	the window's changing contents.
</p>

<p>
	That's the basics. For more information you should look
	at the "<a href=r:107>Hello World</a>" tutorial or delve
	into the <a href=r:108>documentation</a>.
	Escarpment applications end up looking and acting an awful lot like
	web-based HTML applications.
</p>


<xSectionTitle>Tradeoffs</xSectionTitle>

<p>
	In case you haven't noticed, while Escarpment's DLL is fairly small, it does take a lot of CPU. At 200 mHz a user
	can barely notice the slowness. At 100 mHz it's a bit unbearable. Of course, this doesn't matter too much because
	the slowest computer you can buy is around 500 mHz.
</p>

<p>
	Just as a matter of developer pride, I wanted to tell you why escarpment is slow:
</p>

<ol>
	<li>
		Escarpment basically duplicates the display functionality of a web browser, which is any browsers slowest
		part. Since one of the priorities was to make Escarpment look as good as the web, I had to take the speed hit.
	</li>
	<li>
		Actually, Escarpment can look better than the web. It's controls and graphics are much more flexible. As a
		result, it's a bit slower. Notice that all controls are "transparent" - which means that they don't block whatever
		background is behind them.
		Also notice the 3D buttons and how their perspective is correctly drawn depending where
		they are placed on the screen.
	</li>
	<li>
		Algorithmic images take more processing than JPEGs. Because I algorithmically generate a lot of graphics
		in order to minimize download size I end up using more CPU. Again, CPU is not the problem today; the 56K
		bandwidth limitation to the server is.
	</li>
	<li>
		I am just one person doing design, development, test, documentation, and marketing of Escarpment. As a result I don't
		spend too much time on optimizations. If I did do a lot of optimizing the code would take twice as long
		to write and have four times as many bugs in it. I'd rather have relatively bug-free code than a super fast
		application that always crashes.
	</li>
</ol>

<xSectionTitle>Why I named it Escarpment</xSectionTitle>

<p>
	I live near Darwin, at the "top end" of Australia. In my opinion, the most picturesque areas of the Darwin
	region are what's called "escarpment country." Basically, the escarpment country is wherever
	a large (sometimes thousands of square kilometers) plateau ends suddenly, falling down to the flood
	plains below.
</p>

<p>
	The escarpment country is the prettiest area because it's littered with picturesque waterfalls tumbling
	a hundred meters down to deep swimming holes. (Not usually crocodile infested.) The escarpment
	is also where most of the ancient Aboriginal art can be found. (They recognized that
	the escarpment was a good place to live.)
</p>

<p>
	Escarpment country is a thin border between two worlds, the dry land above and floodplains below.
	Consequently, it has wildlife from both regions, and sometimes its own unique life.
	It attracts both worlds.
</p>

<p>
	I called this user-interface SDK Escarpment because it produces picturesque applications that aren't
	at all flat looking, like traditional Windows applications. And just as the escarpment country is half
	way between the dry plateau and the boggy wetlands, Escarpment takes the best from traditional
	Windows applications and combines it with the best from HTML web user interface.
</p>