Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Bruce started the training off with an overview of what web apps are, including a warning that he would be lying to us. Not to be alarmed - this is lying in the sense of making some things simpler than they really are so they're understandable. 

Key things to know about web apps and specifically NetTalk apps:

  • server and browser are disconnected
  • one EXE, multiple users
  • server is written in Clarion
  • client is written in JavaScript
  • appearance is handled by CSS
  • uses HTML/HTML5 (HTML5 isn't an accepted spec yet but many browsers have implemented many of the HTML5 features)
  • the app you ship is the web server - there is no external web server requirement (e.g. IIS, Apache)
  • the visual designer is gone 
    • deciding what the app looks like comes at the end, and you can style the whole app at once, e.g. make all browses look the same way 
    • this freaks a lot of people out
    • it's actually much much better to do the visual design at the end - it's less work
  • main 4(5) browsers supported
    • IE
    • Firefox
    • Chrome
    • Safari
    • Opera too
  • start thinking about procedures in a NetTalk app as event handlers
  • you can't have local variables (but there's a way to get around that)

Bruce then whipped up a new app using the NetTalk wizard.

You can use localhost. Bruce also mentioned setting up your own names for IP addresses - the file you need for this is found under %SystemRoot%\system32\drivers\etc\hosts 

Setting a limit of 100 threads is a good place to start. That will probably translate to about 1000 requests per second, and chances are your IO will be the limiting factor before you get to that many requests anyway. 

Bruce explained the basic structure of an HTML page. So there are controls (HTML for browses, forms etc which can be called as you would call a browse) and snippets of HTML or NetWebSource procedures which just dump in the requested HTML and can not be called directly by the user.  

Example of HTML you when you request a control:

<body>
	<!-- Net:PageHeaderTag -->
	Control
	<!-- Net:PageFooterTag -->
</body>

The menu is added to the page header procedure as an extension. Want another menu? Add another extension.

Bruce explained the important differences in the ways you can navigate using the different menu options: Link, Content (using the Content div, which must be enabled in global settings) and Popup. 

Popups will give you a very Windowsy (Bruce actually compared it more to CPD) experience. Not search engine friendly, however.

SPAs - single page applications

You can create SPAs with NetTalk. Bruce talked a bit about future directions. Front loading also works well with SPAs; you dump all of the unchanging HTML into the initial page load so all you need to do is load up the changing data. The static page can be on a CDN (content delivery network). You can even offload the static page delivery to a CDN or different server. And what if that server were a JavaScript server using the browser's local store? Then you could use PhoneGap to create pseudo-native mobile apps. Not there yet, but clearly lots of interesting stuff to come from CapeSoft. 

Template expressions

Most fields in NetTalk are expressions - you can type in anything you like. There are a few exceptions. 

Scalability

You can have your web app quickly (thin client, maybe 20 users per server) or you can do the work and make an app that can scale up to thousands of users per server. 

Browse settings

There are a whole lot of browse settings, and a whole lot of settings for each field in a browse. For display, there are really only four types: text (string), date, button and procedure. The latter means you can embed controls in browses, such as a browse of browses.  

 

More coming later on this page... 

 

 

  • No labels