|
|
Tutorial : Hello World
From $1
This is an outdated Tutorial. Please use the Learn tab inside of Bungee Connect. Goal: To introduce you to using Bungee Builder, the Bungee Connect on-demand IDE, for developing and deploying software.
Result: After building and deploying a Hello World application to the public Internet, you will understand the basics of developing and deploying applications with Bungee Connect.
This tutorial is the first step in the "Bungee Initiation" portion of the Learn tab for Bungee Connect.
Objectives
By completing this tutorial, you will:
- Learn the basics of designing, building, and deploying applications.
- Gain initial familiarity with the Bungee Connect environment.
Prerequisites
Click Image to Print  |
Before starting this tutorial, we recommend that you:
- Print the Bungee Builder Layout image. This will provide you with a quick reference to the names of the different layout areas in Bungee Builder.
- If you get stuck at any point in the tutorial, post a question in the Q & A Knowledgebase.
Overview
The tutorial comprises two parts.
- In Part 1, you design an extremely simple application using Bungee Builder, and then learn how to simulate your application. The application uses a TypLib, containing a single class, with one field, one form, two controls, and no custom program logic. The user interface is a form with a simple TextEdit box and a label. When a user enters some text, the text gets displayed directly below the TextEdit box on the label.
- In Part 2, you build and deploy the 1.0 release of your application. This requires you to check in the application's components (the development phase is now complete), then place the application in the Staging Depot. From there, you move the application into Production and deploy it as a live web application. Once deployed, you can run your application from any supported web browser with an Internet connection.
Part 1: Design and Simulate the Application
Estimated Time to Complete Hands-on Activity: 4-10 minutes
In this section, you will learn the basics of working in Bungee Builder, the IDE portion of Bungee Connect. The application you create is extremely simple. It does not demonstrate the complete depth and sophistication of a complex Bungee-powered application, but it does give you an initial orientation to the process of developing applications in Bungee Connect. The user interface you design has only two controls: a TextEdit control and a Label control. When an end user enters text into the TextEdit control, the text appears in the Label control.
This short video (2m:40s) explains the steps that you will do in part 1 of the tutorial. Each step shown has corresponding instructions on the page below.
Create New Solution and Projects
| |  | Solution | | | A solution functions as a top-level container for all code created in Bungee Connect. Within each solution, you create different types of Projects. Any developer who is a member of the DesignGroup in which you create the solution can access the solution. | | | |
- In the Solution toolbar, click the New Solution icon.
 - In the Create a Solution dialog box, do the following:
- Use the default Design Group for the new Solution.
- For Solution Name, type Hello_World.
- Under Choose the Projects you would like to include in your new Solution, leave the checkboxes for TypeLib and AppProject selected.
- Click Next.
 - In the dialog box that's displayed, do the following:
| |  | TypeLib | | | A TypeLib (pronounced: type-LIBE) is one of several types of project that you can add to a solution. You use a TypeLib as a container for the classes that power application logic. You can organize your classes into functional groups by using more than one TypeLib. | | | | - Under Name, type HelloTypeLib.
- Click Next.
 - In the dialog box that's displayed, do the following:
| |  | App Project | | | App Projects are used for deploying a finished application to the web. App Projects typically contain at least one Page, which contains at least one Form. When you deploy an App Project, the forms on the main page of an App Project become the first user interface of your application. | | | | - Under Name, type HelloApp.
- Click Done.

Add a Class to your TypeLib Project
| |  | Class | | | Bungee Connect is an Object-Oriented Programming (OOP) environment. You use classes to define the different types of objects used in your programs. As in other OOP-based systems, a class defines the abstract attributes (fields) and behaviors (functions) of an object. Unlike other OOP-based systems, classes in Bungee Connect include views (forms) and adapters (which you learn to apply later in your Bungee Initiation). Developers often use the term type interchangeably with class, which is why the primary container for classes is called a TypeLib--it's a library of type definitions, or classes. | | | |
- In the Solution Explorer, right-click on HelloTypeLib and select Add Class. The Add Class Wizard is displayed.
 - In Class Name, type Main (leave the remaining settings at their default values). Click OK.
The Solution Explorer should now display your solution like this:

Add a Field to your Class
| |  | Field | | | Fields are one of four types of class members. Fields define the data that a class can store. A field can be based upon a primitive type (such as an integer or a string), or based on a complex type (defined by a class, either in your solution or in the Runtime Types in Bungee Connect). Other object-oriented programming languages may use a terms such as property or instance variable for field. | | | |
- In the Solution Explorer, right-click on the Main class and select Add Field. The field is displayed in the Solution Detail (below the Solution Explorer).
- In the Property Editor, change the name of the field to text.
The Solution Explorer should now display your solution like this:

Add a Form to your Class
- In the Solution Explorer, right-click on the Main class and select Add Form . The Add Form Wizard is displayed.
| |  | Form | | | In Bungee Connect, forms are a similar concept as in other IDE frameworks, but they are implemented much differently than in other object-oriented programming (OOP) systems. In Bungee Connect, each form is a member of a class, just as fields and functions are. For many—especially experienced developers—this can be a challenging concept. However, this approach unlocks an enormous amount of power, as you will soon find out from subsequent learning modules. | | | |  - Leave all settings at their default values. Click OK.
The Solution Explorer should now display your solution like this:

Design your Form
Here is a preview of the form you will now design:

- In the Solution Detail, double-click the form Default. This opens it in the Design Editor.
- Click the dark gray background area just outside the form to select the form. This selects the form's top-level container, causing two types of form-editing controls to appear on the rulers. The green buttons are the Edit Row and Edit Column buttons, which let you add or delete rows and columns and change other settings. The gray row and column handles are for resizing the rows and columns.
- Your form needs only one column; click the green Edit Column button at the right end of the horizontal ruler and select Remove Column. Click outside the menu to close it.
- To add controls to the form, first select the text field in the Solution Detail. (If you do not do this step, you're app will have issues.)
- From the Selection group in the Toolbox, drag a TextEdit control into the Design Editor and drop it into the top row of the form.
Note Because you had already selected the field string text in the Solution Detail, the TextEdit control is automatically linked, or bound, to the field string text. This binding between a control and a field is a powerful aspect of the Bungee Connect platform that you will learn to use in increasingly more sophisticated ways as you work with Bungee Connect. - From the Selection group in the Toolbox, drag a Label control into the Design Editor and drop it into the bottom row of the form. (You still have the text field selected, right?)
- Save your solution.
Run (Simulate/Test) your Project
- To see your form in action, click the Run icon on the Run toolbar.
 - A new window is displayed with the form you just built. Type Hello Bungee Connect (or other text) into the TextEdit control and press Enter. The text is displayed in the Label control.

As you can see, you have now made a functional (albeit, not very interesting) end user interface. This gives you your first taste of how development is done in Bungee Builder. Although you have tested the user interface, it has yet to become a live Web application—that is the goal of Part 2.
Some items to note about what you have created so far:
- Bungee Builder provides the ability to simulate forms as you develop your applications, allowing you to test the effects of each new change to an application's functionality in real time. No compile is required.
- Updates between the TextEdit control and the Label do not require a full page refresh. Dynamic interface updates are an inherent property of applications created with Bungee Connect, which you will learn about in the video that follows this tutorial.
- Although you did not create any program logic to make a basic, interactive form, Bungee Connect does provide an advanced programming language for your applications. You will learn more about this in later modules.
Part 2: Build and Deploy Your Application
Estimated Time to Complete: ~6 minutes
There are just a few steps required to put your application live on the Internet. In the following procedure, you modify your App Project by adding a page and making it the default for your application. This default page is what is displayed at the URL that you assign to your application. Next, you need to check in the components of your application. This moves it from your personal workspace in Bungee Builder into a location called the Depot.
Putting your code in the Depot allows other members of your DesignGroup to collaborate with you on your solution, and it is the location from which you post your code into Production. Production is the location from which you can import your code into other solutions, share code with developers outside of your DesignGroup, and from which you can deploy your application to an Internet-accessible URL.
This short video explains the steps you do in Part 2.
Add a Page to your AppProject
| |  | Page | | | Pages exist only in App Projects, and are used by applications to host one or more forms. Whatever page is declared as an App Project's "Main Page for Application" is the page that is first displayed when an end user connects to your application. | | | |
- In the Solution Explorer, right-click HelloApp and select Add Page.
- In the Property Editor, change the Name of the page to MainPage.
The Solution Explorer should now display your solution like this:

Edit the Page
In order to display your form as a web application, you must first add it to a page in your App Project. To prepare the page for your form, you will remove one of the default rows.
- In the Solution Explorer, double-click the MainPage page to open it in the Design Editor.
- Use the green Edit Row button to delete one of the two rows from the page. You should be left with one row and two columns when finished.

Add the Form to the Page
- In the Solution Explorer, select the class Main (in HelloTypeLib).
- From the Solution Detail, drag the form Default and drop it onto the right-most cell of the MainPage page in the Design Editor. (The visual feedback for this is subtle: the page should now show the outline of the TextBox control from the Default form.)
- Save your solution.
Set the Main Page for Application Property
| | | | Depot | | | The Depot is a code repository shared between you and other developers who you have invited into your DesignGroup. As you develop in Bungee Connect, all your work is saved to your own private workspace. To share your code with other members of your DesignGroup, or to ready your application for deployment, you must check it into the Depot. Members of your DesignGroup can check code out of the Depot as you collaborate on solutions. | | | |
- In the Solution Explorer, select HelloApp.
- In the Property Editor, for the Main Page for Application property, click the ellipsis button.
- In the dialog box that's displayed, select Page: MainPage, then click OK
Check in the Solution
- In the Solution Explorer, right-click on the solution Hello_Worldand select Check In.
- Save your solution.
Post your Application
- At the top of Bungee Builder, click the Staging tab.
- Under Depot, expand the DesignGroup that contains your application, expand Solution: Hello_World, and then select AppProject: HelloApp.
- Click Post.
- If the Software Posting Agreement is displayed, read the agreement, select the I Accept option, and click Close. (Unless, of course, you choose not to. In that case, please let us know your concerns: info@bungeelabs.com.)
- In the dialog box that is displayed,
- For Post Name, enter HelloWorld. (The application name cannot contain spaces.)
- For Version, enter the current date in this format: 20080420. (You can use any format, such as 1.0, but using the date has the advantage of giving you automatic incrementing, and quickly tells you when you last posted.)
- Click OK.
| | | | Production | | | Production is a code repository from which you can do two major operations: share code with other developers, and deploy applications live to the World Wide Web. Over the life of your applications, you can post multiple versions to Production. This allows you to beta test new versions, and to upgrade your applications. Previous versions remain available in production so that you can fall back to a previous version in the event that you discover a problem in your latest release. | | | |
Deploy your Application
- Under Production, expand the DesignGroup that contains your application, expand HelloApp, and then select HelloWorld (Version: 20080420).
- Note There is currently a minor defect in the Production component of Bungee Connect that may prevent your Application from appearing in the DesignGroup after posting it from the Staging Depot. To force Production to refresh, click the Design tab, and then click the Staging tab again. You should now see a + symbol on the Design Group, allowing you to expand the design group and view the application you posted to Production.
- Click Deploy.
- If the Application Deployment Agreement is displayed, read the agreement, select the I Accept option, and click Close. (Again, should you choose not to, please let us know your concerns: info@bungeelabs.com.)
- A dialog box is displayed with the Thresholds for Beta/Free Deploy applications.
- Read threshold information and click OK.
- A dialog box is displayed. This dialog box lets you assign a name to the deployed application and set whether SSL (Secure Socket Layer) is allowed or required (for this application we're not going to need SSL). By default, the name used when the application was posted to Production is used as the Deployment Name. Click OK.
- Under Deployments, select HelloWorld.
- In the bottom section of the page, expand Deployment Settings.
- You can now click on the URL to see your application live or copy the URL and email it to friends.
| | | | Deployment | | | A deployment is a live Bungee-powered application, accessible from a standard URL. You only need to deploy an application once, after which you can update the deployment to newer versions by selecting the latest post in Production in the Deployment Settings section of the Staging tab. | | | |
Congratulations! You have deployed your first web application with Bungee Connect. As you create more complex Bungee-powered applications, you will follow this the same procedure in order to deploy and update your applications as you manage them through their lifecycle.
Summary
In this tutorial you have:
- Developed a basic understanding of the high-level steps of managing applications
- Learned how to design, simulate, build, and deploy an application in Bungee Builder
- Become familiar with the interfaces for managing your applications in Bungee Connect
What Next?
Don't stop here. A short video follows this tutorial. You can access it from the Learn tab in Bungee Connect.
|