With CodeAssist, you create re-usable Data Objects to drive the code generation process. Data Objects are logical groups of fields that can be assembled from single or multiple tables and queries within a database. CodeAssist combines Data Objects with Templates to produce code that is tailored to your specific data environment. Data Objects make it easy to implement the same database functionality across several platforms; for example, you can use the same Data Object to generate code for Visual Basic, SQL, C++ and HTML! Or if you have numerous modules in a Visual Basic project that refer to the same data, you can generate code for each of them by combining different templates with the same Data Object.
CodeAssist's templates contain code in the language of your choice combined with intelligent keywords called SmartFields. When code is generated, the SmartFields control what text is inserted into the code and how the code is formatted. SmartFields can insert the names of objects from your database, insert keywords for different types of variables, intelligently enclose code in quotation marks or brackets, loop through the different types of fields in a table, create legal variable names from field names, plus more! CodeAssist's integrated Code Editor provides auto-completion of SmartFields to make working with them a snap.
By giving you an easy and flexible way to generate code, CodeAssist puts the computer's strengths to work for you instead of making you work against the computer's weaknesses. Although you save time, CodeAssist's template-based code generation insures that you don't sacrifice any control over the quality of your code. And the templates included with CodeAssist make it a fantastic resource for ready-to-run database functionality in many of the most commonly used programming languages. Begin by modifying the included templates, add your own code where appropriate and soon you will have your own customized, reusable template libraries.
But that's not all! New to version 1.1 is support for Visual Basic 5 and 6's add-in model! This means that you can run CodeAssist as a Visual Basic add-in and output code to any project within the current Visual Basic IDE session! Output will include appending code or creating a new module. Choices of new modules will include standard Visual basic file types.
CodeAssist includes template libraries for the following languages and data access methods:
- Access SQL
- Sybase SQL
- Oracle
- ADO (Visual Basic ActiveX Data Objects)
- ASP (Active Server Pages)
- C++
- DAO (Visual Basic Data Access Objects)
- Delphi 2.0
- Internet - HTML & ISAPI/CGI
- MTS (Microsoft Transaction Server)
- Multiple Table Joins
- ODBC API
- RDO (Visual Basic Remote Data Objects)
- SQL
- VBSQL
CodeAssist's Intuitive User Interface
Workspace Explorer:
The CodeAssist user interface is designed to give you the tools you need to quickly put together all of the ingredients to generating database code. The Workspace Explorer is a tabbed dialog that gives you one-click access to all parts of your project—databases, Data Objects and Code Templates.
Data Object Editor:
The Data Object Editor is where you construct Data Objects based on the individual fields of your database tables and queries. Simply drag fields (or entire tables or queries) from the Databases tab of the Workspace Explorer and drop them in the Data Object Editor window to add them to your Data Object. You can specify an SQL statement in text area at the bottom of the window to further define the scope of the Data Object. If you add fields from two or more related tables, CodeAssist will automatically create the WHERE clause for you that links the tables. Data Objects are the logical building blocks used to generate data access code. When you generate code, the field information in a Data Object is applied to a Code Template. SmartFields in the Code Template are replaced with the actual field information (such as field name, data type, etc.) and, if necessary, multiple lines of code are generated for each single line of code in the Code template.
Each Data Object is part of a Data Object library, which appears on the Data Object Tab of the Workspace Explorer. Data Object libraries make it easy to group sets of related Data Objects and use them in multiple projects.
Code Template Editor:
Using the CodeAssist Code Editor, you can modify any of the templates that come with CodeAssist, or create your own templates from scratch. Like Data Objects, Code Templates are grouped in to libraries. Open any library or any of the templates it contains from the Templates tab of the Workspace Explorer. You can also create your own libraries for new templates and include the existing templates into your own libraries. The Code Editor window is a fully functional code editing environment, with auto-completion of SmartFields and context-sensitive color coding. The Code Editor is language neutral—you can use it to create templates for any programming language. CodeAssist modifies only the SmartFields in the template, replacing them with field information drawn form the Data Object being used to generate code. Depending on the size of the Data Object being used to generate code, and the contents of the template, creating a Code Template requires much, much less work than creating by hand the code it generates. Don't be surprised if you routinely generate code that is ten or twenty times longer than the template that created it! And because the computer is processing information directly from the database, errors due to misspelled field names and other typing errors are all but eliminated.
Generate Code Dialog and Wizard:
When you are ready to put Data Objects and Code Templates together, you have two choices for producing code. The Generate Code dialog lets you quickly take a single Data Object and combine it with a template. The resulting code can be copied to the clipboard, saved to a text file, or displayed within CodeAssist, ready for proofing or manual copying. When you've created a large number Data Objects and Code Templates and are ready to produce lots of code, you can call up the Generate Code wizard. Use the wizard interface to choose multiple Data Objects and combine them with multiple Code Templates. You can then place the generated files into a directory, copy them in a block to the clipboard, or display them in multiple CodeAssist preview windows.
Code in Three Easy Steps:
CodeAssist's built-in tools streamline the process of code generation. In fact, you can use CodeAssist to generate working code in just three easy steps:
1. Use the Database tab of the Workspace Explorer to bring in data sources from any location. Open Microsoft Access, Oracle, Sybase, and SQL Server databases and view the tables, querydefs, relationships and fields they contain. These database structures will serve as the "raw material" you'll need for the next step...
2. Create a Data Object using the Data Object Editor. You can easily build Data Objects by dragging fields or entire tables out of the Database Browser and dropping them into the Data Object Editor window. Combine fields from multiple tables, or even add an SQL WHERE clause to exactly model the data structures needed by your application. Once you've created a Data Object, it appears on the Data Object tab of the Workpace Explorer, and you can use it as many times as you'd like.
3. Choose a Code Template that you will use as the basis for your database code. Add one of the included template libraries to the Templates tab of the Workspace Explorer, or use the Code Editing window to create your own template or modify the existing ones. Then use the Generate Code dialog or Generate Code Wizard to specify a destination for your generated code.
That's all it takes! CodeAssist does the rest!