Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 14 in printed book and digital formats -- plus a one-year subscription so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Recent issues

Article Preview

Buy Now


Web Applications

App and Session

What's the difference?

Issue: 9.4 (May/June 2011)
Article Description: No description available.
Article Length (in bytes): 4,482
Starting Page Number: 85
RBD Number: 9412
Resource File(s): None
Related Web Link(s):


Known Limitations: None

Excerpt of article text...

When you create a new Real Studio web application project, you get several objects created for you automatically: App, Session and WebPage1.

This month, we will take a look at App and Session (subclasses of WebApplication and WebSession).

What is the App?

Much like in a desktop application, the App object in a web application is a global object. It has some different web-specific properties, of course.

In particular, the Timeout property tells your web application how long it should remain running after the last session is closed.

Other properties on the App allow you to find out what session a particular WebControl (usually a page) belongs to.

If you create properties in the App object, they will be global to the entire application and all clients that connect to it. For properties that should only be visible to a connected session (and not others), you should use the Session object.

What is a Session?

Before we get too far along, it is important to understand what a session is in general. Remember that a web application can have multiple clients connecting to it. Each time a new client connects to your web application, a new instance of the Session object is created for you automatically. The Session object is where you will track information that is specific to the client. For example, many web applications have a login page of some kind. In the session you can save the login name for display on subsequent pages.

...End of Excerpt. Please purchase the magazine to read the full article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.




Weblog Commenting and Trackback by HaloScan.com