What is Cocktail ?
Cocktail is a Code Generation Tool for Java that represents the program structures in Trees. A programmer can create a program in java by adding new components as leaves in the tree. Cocktail generates Java Source Code for the tree developed which can be then compiled and run. The Tree structure is stored in a xml format. Cocktail uses the tree structure to represent the Models (data) and Views (UI). This simplifies the structure of a program making it easier to code and maintain.
Cocktail's Visual Representation of a Java Program is very intuitive. For a Beginner, Cocktail provides a jumpstart to Java and Swing, the GUI toolkit for java. An Expert Programmer can use Cocktail as a GUI Builder tool for developing GUI screens based on Layout's Concept.
Cocktail enforces Model-View-Controller architecture which is one of the core design patterns. MVC is pervasive in SWING Architecture. Adapting to MVC architecture without much effort, provides vast advantage from developing, code reuse and better maintainability.
Who can use Cocktail ?
For Java beginners Cocktail is an Ideal environment which provides strong visual aides.The advanced Java developers can use Cocktail to ease their efforts in mundane tasks like building a GUI and helps them concentrate on the Business Logic.
How can i customize the generated Code ?
The Code generated by Cocktail is much like what a programmer would write.
This code can be altered any way a programmer wishes. But, these changes
would not be reflected in Cocktail project.
How to create data-structures like Array, Vector etc ?
Cocktail not only represents GUI components in trees. It represents the
data in a program also in a xml-tree structure. This approach encapsulates
your code from its data in fashion similar to RDBMS. But RDBMS is not used
to store smaller-data structures (models). for this, Cocktail uses XML.
Model Factory is used to create these data-structures. Model Factory is similar to the User Interface provided by Visual-Basic, Powerbuilder etc. The structure of the data is defined in a xml format.
After creating the models, these models can be associated with view-components through the property-sheet of the view-components.
Can i migrate my existing application to Cocktail ?
No. In this version, importing from java-code is not possible. But this is one of the features planned to be incorporated in future versions.
What is Bean Repository?
Bean Repository is the collection of SWING Components, Java Collections,
Java Basic Datatypes etc. Bean Repository organizes these components in a
Model-View-Controller Hierarchy.
What is MVC?
Model-View-Controller is a Design Pattern that is currently used in
many GUI based applications. SWING itself is based on a variant of this
architecture.
What is the Difference between Collections & UIDataModel?
Collections are basic data-structures such as Stacks, Hashtables etc. that
are found in most modern programming languages like C, C++ etc. Java provides
a standard set of these data-structures.
SWING follows a variant of MVC in which the Model & Controller parts are
more integrated. For User-Interface widgets such as ListBox, ComboBox, Tree
etc which have models, SWING has separate classes such as TreeModels,
ListModels etc.
When to use Collections & UIDataModel ?
Collections are more frequently used to hold data for JLists, JTrees,
JTables etc. You can use collections for adding data-models in these
UI Components without their modifying default behavior
If you are using a data-structure other than the default data-structures
for trees, tables etc, then you have to define these data-structures and also define how to manipulate
them in UI-DataModels.
Should a Container Object be a First level Object? Why ?
In SWING, You have to have a container which can hold any components
within it. Hence a Container object like JFrame, JPanel etc have to
be at the first level.
What is a Layout?
One of the Powerful and Novel ideas that has been incorporated into
Swing is Layouts. In VB, PB and other development tools, to create
a visual component, You have to place them in a container and provide
the X and Y coordinates. These Coordinates are fixed and will not retain
the look and feel that a Developer intends to project to the User when
the User has a different operating System other than the one on which the application
is developed.
This is not a problem for those tools as they were designed to run only
on the platform they were developed.
The advent of Internet changed this. Java which is cross-platform has to
retain the look-and-feel across all platforms. Layouts is the concept
which java uses to achieve this. Here the developer need to specify only the
way the components have to be arranged or laid.
There are several layouts apart from those provided by SUN. In
Future versions of Cocktail, expect a good collection of layouts
from which a developer can choose.
What is Model Factory?
During the course of evolution of Programming Languages, Data Encapsulation
is a feature that has been a common thread. It is very effective to separate
the Data and the Program. The effectiveness and success of RDBMS is this separation it provided between Data Definition and Data Manipulation (programs).
In Cocktail, this separation is extended to models that are not normally stored in rdbms such as menu information, listbox contents etc by exploiting XML. To define Data Models, Cocktail uses the familiar user interface provided in RDBMS to create tables. Developers can create their models in
xml and add it to View Components via Property-Sheet.
The XML-DataModels effectively separates out the Model part from the View and Controller part of the program. Also, the models defined can be reused for other programming environments such as HTML, WML etc.
Model Factory defines the data-models that are to be used in a program. The
user-interface provided is the same as the user-interface used for RDBMS data
definitions.
How to add elements to Models ?
- Open Model Factory and Select Data Manipulation
- Open the XML Structure ( .DML )( DML - Data Markup Language )
- Click Add button and enter data
- Save the Data ( .DAT )
What next after creating the CockTail Object Tree?
- Save
- Generate Source Code
What next after generating the Source Code?
- Goto Dos Prompt and Change to Cocktail\project Folder
- Check whether the classpath is set
- Use JDK 1.2 to Compile the Source Code
( Javac ObjectName.java )
- to run the application ( java ObjectName )
Which is the best Layout in Swing?
Box layout.
What are the steps to follow to create a CockTail Object with Model Components?
- Open Model Factory ( Menu - View , Model Factory )
- create a New XMLBase Structure and Save it.
- use Modify Data to add elements to XMLBase and Save it.
- Close the Model Factory
- Open Tree View create new CockTail Object
- Select Model in Object Tree
- Drag and drop a Collection component from
bean repository.
- Set the Model Component property of Collection Component
with the DML file created in Model Factory.
How to compile & run from cocktail
Select Build in the Menu item of CockTail.Click Compile me.After getting the message compilation over click run in the build
menu for running the application.
What is Declarationf
Use declaration to create global or class variables.To declare model components like integers , arrays etc use Model.For
declaring swing components use view.
what is a method definition
To structure a program into methods use method definition.Method definition provides you an easy to use GUI to specify the
Input arguments,return Type & exceptions .
How to use VB style toolbar
CockTail provides a similar environment for VB programmers for designing GUI.To use this
- Drag & Drop a JFrame from the Object Repository to your CockTail Object.You will get the dynamic design window.Set NULL LAYOUT for the Jframe
- Invoke the VB Floating Tool Bar by clicking on the Tool Bar icon
- Select the component you would like to add.
- Paste it on the Dynamic Design window any where.
- If you want to change the properties go to the cocktail workspace , right click on the component you added and change the
properties
Note : While adding components from The VB ToolBar Select The Container in which you would like to add components in the Design Tree.
I am a VB Programmer. How do i get started without much hazzle ?
- Set the project directory as VBProject.
- Select open and choose any cocktail object in that directory.
Click here to know more about starting an App in VB style
How to use VB property sheets
For all the User Interface components VB property sheets list the Properties similar to VB for Swing Components.Note : In the
current version only Properties changed in VB will reflect in Swing Property sheets.The VB property sheet is given for the
Developers who are not familiar with Java .This help them to understand the similarities between VB / PB like development
environment vs Java.
Why i am not getting preview while using other than Jframe as first level objects.
To get the preview or dynamic design window the container object should be JFrame.
How to use radio buttons as a group
- Add buttongroup first
- Select button group and then add radio buttons
How do I buy CockTail?
To order by check, send the order form and a check to
Application Program Tool Solution Pvt Ltd.,
303-D,PSG STEP,
Software Park - II,
PSGR Block, Peelamedu,
Coimbatore - 641 014. India
Payments must be in US dollars, or you can send international postal money orders in US dollars.
What is the Price of CockTail Standard Edition?
Users | Price/User |
1 User | US $ 99 |
2 - 5 Users | US $ 89 |
5 - 10 Users | US $ 79 |
Site License | sales@applese.com |
What do you get?
CockTail in CD Media & License .The CD contains full Help documentation with Step by Step Tutorials on How to get the Maximum out of CockTail. Support through Email.
The CD will be sent by mail with in Two Business days of realisation of your payment.
Visit http://www.applese.com/buycocktailse.htm for more details.