Blog: Posts from April, 2013

Labels
AJAX(112) App Studio(7) Apple(1) Application Builder(245) Application Factory(207) ASP.NET(95) ASP.NET 3.5(45) ASP.NET Code Generator(72) ASP.NET Membership(28) Azure(18) Barcode(2) Barcodes(3) BLOB(18) Business Rules(1) Business Rules/Logic(140) BYOD(13) Caching(2) Calendar(5) Charts(29) Cloud(14) Cloud On Time(2) Cloud On Time for Windows 7(2) Code Generator(54) Collaboration(11) command line(1) Conflict Detection(1) Content Management System(12) COT Tools for Excel(26) CRUD(1) Custom Actions(1) Data Aquarium Framework(122) Data Sheet(9) Data Sources(22) Database Lookups(50) Deployment(22) Designer(177) Device(1) DotNetNuke(12) EASE(20) Email(6) Features(101) Firebird(1) Form Builder(14) Globalization and Localization(6) How To(1) Hypermedia(2) Inline Editing(1) Installation(5) JavaScript(20) Kiosk(1) Low Code(3) Mac(1) Many-To-Many(4) Maps(6) Master/Detail(36) Microservices(4) Mobile(63) Mode Builder(3) Model Builder(3) MySQL(10) Native Apps(5) News(18) OAuth(8) OAuth Scopes(1) OAuth2(11) Offline(20) Offline Apps(4) Offline Sync(5) Oracle(10) PKCE(2) PostgreSQL(2) PWA(2) QR codes(2) Rapid Application Development(5) Reading Pane(2) Release Notes(179) Reports(48) REST(29) RESTful(29) RESTful Workshop(15) RFID tags(1) SaaS(7) Security(80) SharePoint(12) SPA(6) SQL Anywhere(3) SQL Server(26) SSO(1) Stored Procedure(4) Teamwork(15) Tips and Tricks(87) Tools for Excel(2) Touch UI(93) Transactions(5) Tutorials(183) Universal Windows Platform(3) User Interface(338) Video Tutorial(37) Web 2.0(100) Web App Generator(101) Web Application Generator(607) Web Form Builder(40) Web.Config(9) Workflow(28)
Archive
Blog
Posts from April, 2013
Monday, April 29, 2013PrintSubscribe
Feature: Tools for Excel

Code On Time Tools for Excel provides an alternative designer that allows rapid changes to configuration element properties. This tool can be used interchangeably with the Project Designer.

List of data fields in Code On Time Tools for Excel.

The picture below shows the default Orders form in a sample Northwind web application. Let’s compare methods of changing the form layout in Project Designer and Tools for Excel.

Suppose that it is necessary to place shipping fields in a second column in the form. The word “Ship” must be removed from the field labels.

Default Orders edit form.

Using the Project Designer, you would create a category and drag all shipping data fields into the new category.

Dropping all shipping fields onto the 'Shipping Information' category.     All shipping data fields moved into 'Shipping Information' category.

Next, you would need to click on every data field, change the Header Text of the data field, and press OK to save.

You may save quite a few clicks using Tools for Excel.

Start Microsoft Excel, and switch to the Code On Time tab. Press Open | Northwind / Web Site Factory to link the project to the workbook, and then select Categories shortcut on the ribbon. Filter down to Orders controller by pressing Filter | Orders.

Filtering Categories project configuration sheet down to 'Orders' controller.

Add another category with the following properties:

ID View Controller Header Text Description New Column
myCat editForm1 Orders Shipping Information This is the shipping info. yes

Adding a new category to Orders controller.

Next, click on the Data Fields shortcut. Make the changes highlighted below:

Field Name Category View Controller Header Text
ShipName myCat editForm1 Orders Name
ShipAddress myCat editForm1 Orders Address
ShipCity myCat editForm1 Orders City
ShipRegion myCat editForm1 Orders Region
ShipPostalCode myCat editForm1 Orders Postal Code
ShipCountry myCat editForm1 Orders Country

Changing the properties for all shipping fields in editForm1 of Orders controller.

On the ribbon, press Sync to apply changes to the application. Then, press Browse to generate and open the web app in the default browser. Navigate to the Orders page and select a record. The shipping fields will now be in a separate category in a new column with new labels.

Orders edit form with shipping information in a second column.

Learn more about Tools for Excel.

Sunday, April 28, 2013PrintSubscribe
Tools for Excel: Controllers

This is a typical view of controllers in a project.

Typical view of controllers in Tools for Excel.

Consult the following table when entering property values:

Property Description
Name This is the name of the data controller. If changed, the original data controller will be deleted. Rename the controller instead.
Conflict Detection Valid values are “Overwrite Changes”, “Compare All Values”.
Connection String Name Specify a connection string name if the controller is working with the database other than the one selected for this project.
Handler Specify the name of a business rules class that can be extended to respond to the controller actions.
Annotations Specify if free form notes and attachments can be assigned to any data row by end-users at run-time.
Status Bar

The status bar is displayed in form views to provide a visualization of the Status field.

Representational State Transfer (REST) Configuration Defines settings for the REST application server.
BLOB Adapter Configuration Defines the BLOB Adapter configuration.
Sunday, April 28, 2013PrintSubscribe
Introducing Tools for Excel

Code On Time application generator includes a Project Designer that allows drag & drop modification of project configuration elements. Project configuration is composed of pages, containers, data views, user controls, controls, controllers, commands, fields, views, categories, data fields, action groups, actions, business rules, styles, items, and field outputs.

Code On Time Tools for Excel is a Microsoft Excel add-in designed to provide a bird-eye view of project configuration element properties with the ability to make rapid and massive changes when needed. Users can change element properties, add, rearrange, and delete elements. A dedicated ribbon tab allows synchronizing changes with the project, modifying project settings, and generating entire applications straight from Microsoft Excel. Code On Time developers can switch between Project Designer and Tools for Excel, whichever tool is better for the task.

Getting Started

First, download and install both Code On Time application generator and Tools for Excel.

Start Microsoft Excel and open a blank workbook. On the ribbon, select Code On Time tab. Click on New button to create a new web app.

Creating a new project from Tools for Excel.

The application generator will start and display a list of project types. Proceed to create a sample Web Site Factory project named “Northwind” based on a sample Microsoft SQL Server database by following these instructions.

Creating a Web Site Factory project.

When application generation is complete, the web site will open in the default browser. Navigate to the Customers page. Let’s use Tools for Excel to make the following changes marked in the picture below:

  1. Change the title of the page to “Current Customer List”.
  2. Change “Company Name” column label to “Business”.
  3. Remove “Region” column.

Changes to be made in Customers page.

Using Tools for Excel

Switch back to Microsoft Excel. On the ribbon, select Open to see a list of existing projects. Select Northwind / Web Site Factory project from the list.

Opening a project in Tools for Excel.

A new sheet will be added, displaying instructions. The ribbon will display the project control buttons.

Project loaded in Microsoft Excel.

The table below shows descriptions of controls on the ribbon.

Control Type Description
Sync Button Sync the current changes to project configuration files into the project. If errors are found, the sync will be canceled.
Browse Button Generate and open the web application in your default browser.
Project Button Display a menu of all available project actions.
Develop Button Open the application source code in Visual Studio.
Open Button Open the application project folder in Windows Explorer.
Filter Dropdown Click here to apply a page or controller filter to all sheets.
Pages Shortcut Pages are the building blocks of the application, and host instances of data controllers (Data Views) and custom user controls (Controls).
Containers Shortcut Containers are placed on pages, and hold instances of data controllers (data views) and custom user controls (controls).
Data Views Shortcut Data views are instances of a data controller. Data views render views of the data controller on the page, along with corresponding data controller action groups. The same data controller can be exposed with data views on the same or multiple application pages.
User Controls Shortcut User controls are the primary mechanism for extending the user interface of generated application pages. Instances of user controls (called controls) are placed in page containers alongside data views or other controls.
Controls Shortcut Controls are instances of custom user controls that are placed in containers on a page.
Controllers Shortcut Controllers define metadata used by the application framework to retrieve data, present it to the users, and respond to actions in live applications.
Commands Shortcut A command provides a developer-friendly dictionary of SQL expressions that correspond to the individual fields and also define the base table and joined tables. The application framework uses the command text elements to compose Select, Update, Insert, and Delete statements at run-time.
Fields Shortcut Fields represent a piece of data in a record. It may either reflect data in a specific column, or it may be derived from a calculation. Fields are instantiated on views in the form of data fields.
Views Shortcut A view is a configuration of the data controller composed of data fields and optional categories. Form views require all data fields to arranged in categories. Other types of views are incompatible with categories.
Categories Shortcut Categories are used to group data fields in a view. They are only compatible with form views.
Data Fields Shortcut Data fields are instances of fields in a view.
Action Groups Shortcut An action group is a collections of actions placed in in a specific area of the user interface. Action group scope determines determines how the actions are rendered.
Actions Shortcut Actions are rendered as buttons or action bar menu options in the user interface of the data controller view. The scope of the parent action group determines the part of the user interface that will display the action. Action commands with optional arguments are interpreted by the application framework. Custom actions can be processed with business rules.
Business Rules Shortcut Business rules extend the functionality of a web application through SQL, C# or Visual Basic, JavaScript, or Emails.
Styles Shortcut Styles are JavaScript expressions that evaluate to a true or false. When true, a CSS class is applied to the row.
Items Shortcut Items represent static values for a lookup field.
Field Outputs Shortcut Field outputs specify the output location of a command that produces data.

Click Pages configuration shortcut on the ribbon. A new sheet will be added to the workbook containing all pages and their properties. Make the following change:

Name Title
Customers Current Customer List

Changing the Title of a page in Tools for Excel.

Next, click on Data Fields configuration shortcut on the ribbon. Then, set a filter by pressing Filter | Customers.

Filtering data fields down to "Customers" controller.

Set the Header Text of CompanyName data field in view grid1.

Field Name View Name Header Text
CompanyName grid1 Customers Business

Changing the Header Text of a data field.

Right-click on the leftmost column of Region data field row of view grid1, and press Delete Row.

Removing a data field from the Data Fields sheet using Tools for Excel.

The changes are not yet integrated into the project.  Press the large Sync button to synchronize all workbook sheets with the project. Alternatively, activate the dropdown and select a specific element type to synchronize.

Synchronizing project changes in Tools for Excel.

Tools for Excel will validate the data entered in the workbook. If any errors are found, the invalid data will be highlighted and synchronization will be canceled.

Invalid data is highlighted by Tools for Excel.

If the data is valid, Tools for Excel will save the workbook and submit data sheets to the application generator one-by-one.

Application generator will detect changes and modify project configuration elements accordingly. The updated project configuration data will be returned to Tools for Excel.

Tools for Excel will delete processed data sheets and replace them with fresh data received from the application generator. The workbook will be saved.

The changes have been synced for data fields and pages.

On the ribbon, press Browse to regenerate and open the web app in the default browser. Navigate to Customers page. Note that the title of the page has been changed, the second column has been renamed to “Business”, and Region column is no longer present.

The changes made in Tools for Excel have been applied.