Application Factory

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(9) OAuth Scopes(1) OAuth2(13) Offline(20) Offline Apps(4) Offline Sync(5) Oracle(11) PKCE(2) Postgre SQL(1) PostgreSQL(2) PWA(2) QR codes(2) Rapid Application Development(5) Reading Pane(2) Release Notes(183) Reports(48) REST(29) RESTful(29) RESTful Workshop(15) RFID tags(1) SaaS(7) Security(81) 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
Application Factory
Monday, December 12, 2011PrintSubscribe
Live Inspection, EASE Auditing, New Themes

Code On Time has released update 6.0.0.16. The new updates includes a collection of new features and bug fixes described below: 

  • Live Inspection is now available.
     
  • Integrated EASE Auditing is now available in Unlimited edition.
     
  • New Modern and Dark Knight themes.
  • Reduced metadata footprint with all databases. Previous version would have enumerated all table columns even if the tables are not selected in the project.
     
  • Custom project references (for example, external assemblies) are not lost when Visual Basic projects are re-generated.
     
  • Mr. Adalberto Hernandez Vega has contributed Spanish localization for es-HN culture. Thank you!
     
  • Client Library now supports new data controller URL parameter, which allows indicating, which URL filter fields shall remain visible. The default behavior is to hide the data fields specified in the URL.
     
    A comma-separated list of fields can be specified as follows: _display=Field1,Field2,Field3. The client library will also populate field values from the values in the URL when _commandName is New. Read more about data controller URL parameters at /blog/2011/01/data-controller-url-parameters.html
     
  • Left Shift + Click on the project name will re-generate the project.
  • If the HyperlinkFormatString property of a field starts with “mailto:” then the links is formatted correctly.
     
  • The header text of the action group with scope "Action Column" is displayed in the header of the action column. If the text is blank then "Actions" is displayed instead.
     
  • Various cosmetic improvements to Project Designer.
     
  • Project Explorer tracks and updates multiple visible nodes linked to the same data controller on all tabs.
     
  • Client library detects HTML tags and does not perform HTML formatting in menus and "filter details" area of views if HTML is detected.
     
  • Automatic expansion of collapsed nodes in Project Explorer upon refresh of a node by monitor. 
     
  • Code generator will not try to delete project folders under control of Subversion.
     
  • Multi-field filter fields (up to five) are now available to allow multi-level master detail configuration with multi-column primary keys.
     
  • Client library now supports [Master.FieldName] expressions in When Client Script of actions and in new Visible When property of data views.
    Multiple-value filter fields are now working correctly.
     
  • Visual style of buttons in "Action Column" scope has changed.
     
  • Data Field Visibility is now a property of a Data Field instead of a list of Visibility expressions.
     
  • Shortcuts to Value/Text Items and Validators are displayed in fields and data fields.
     
  • Fixed the bug that was preventing deletion of visibility expressions on data fields in grid views.
     
  • Core.css has been changed to use the new Outer CSS class for icons. Existing apps will require modification to support custom action icons.
    For example: .NewIcon .Outer, .FlatGroupIcon.NewIcon
     
  • Fix the problem with disappearing “Reports|*”  nodes due to wrong schemas deduced from "_" in the names of tables.
     
  • Preview window is maximized if the Designer window is maximized.
     
  • Data controller URL parameters now support _commandName2 and _commandArgument2. The second command is executed as a follow up to the first set of _commandName and _commandArgument. Use the first set to select a record and the second command to execute a custom action on the activated record when needed.
     
  • CloudApp project file in Azure Factory applications is now compatible with Azure SDK 1.6.4
     
  • Action groups and actions feature Id property. It is used as as a CSS style on all user interface elements representing actions.
     
  • App Preview shows precisely on top of the Designer window. 
     
  • Utility Css classes are assigned to UI elements representing actions to support Designer inspection.
     
  • Icon column in grid views now renders a span to allow better formatting.
     
  • Menu options now feature Inner, Outer, and Self CSS classes to allow sophisticated styling.
  • Restored ability to go back from Controller Summary page in Project Wizard.
Friday, November 18, 2011PrintSubscribe
Project Explorer, Project Actions, Wizards, Action Column Scope

This release of Code On Time introduces new productivity tools. Project Explorer is designed to simplify the development process. The future releases will include further enhancements to the Project Explorer including full drag and drop support.

Some of the promised functionality is not included in the current release due to compatibility issues. We are working on a follow-up that will go out later this week.

Make sure to refresh the cache of your browser to load the latest version of the client library after you re-generate you web application.

Features and enhancements included in release 6.0.0.15:

  • Project Explorer and new Project Actions menu.
     
  • New action Status allows implementation of sophisticated Wizards.
     
  • Use Shift+F10 to open a context menu on the focused node in the Project Explorer.
     
  • Use F4 to toggle focus between the Project Designer and Project Explorer.
     
  • Significant improvements to the memory management. Integrated web browser has been leaking memory in previous released. The current version takes care of releasing the memory.
       
  • Mr. Zsolt Panka has contributed localization for hu-HU. Thank you!
     
    If you are creating Code On Time applications in languages other than English then please contribute your localizations. Read about localizing application here.
     
  • Code generator will eliminate empty containers in the pages of new applications.
     
  • Reports menu option is now created in single-schema projects only.
     
  • Actions with confirmations will automatically execute 'Select' command in grid view if Confirmation property is not blank.
     
  • Grid view now supports new action group scope “Action Column”. A column with conditional actions is rendered if action group with the scope is present.
     
  • Automatic printing of detail views include summary fields of the master record displayed under the report title in the filter details area.
     
  • Find "spyglass" and "refresh" buttons are rendered as "grey" and will show color if you hover over the link. Refresh button replaces "Refresh" link in the pager.
     
  • Client Library display a refresh icon instead of Refresh word in the page of the grid and data sheet view.
     
  • The project title is now displayed in the Title bar of code generator window.
     
  • Code generator will stop produce exceptions logged when a "copy" instruction is executed in some types of projects.
     
  • Azure Factory detects the most recent version of Azure SDK installed on computer. Previous version had a hard-coded reference to SDK.
     
  • DotNetNuke Factory correctly upgrades the project to Visual Studio 2010 if Visual Studio 2008 is not present.
     
  • Added CSS override for links in DNN 5.06.03.
     
  • Dynamic expressions default type is ClientScript to allow a single expression visibility on categories.
     
  • Status bar implementation is integrated in the application framework and designer.
     
  • Category visibility is now a property of the category. Visibility tab is not available anymore.
     
  • The height of SELECT elements is the search bar is now matching the height of the value input boxes.
     
  • Fixed the problem with Web.DataView._peformFieldChanged throwing an exception in Designer.
  • List of actions now shows When Client Script property.
     
  • New +/- buttons are now displayed on automatic search bars.
     
  • Compound labels of fields are now correctly handling Text Label Construction maps.
Saturday, October 22, 2011PrintSubscribe
Wizards and Status Bars

Code On Time web applications offer powerful methods of presenting your data with very little effort. In this tutorial we will show you how to create a wizard form view with the context sensitive status bar.

image

Form views editForm1 and createForm1 are included with each data controller in a generated Code On Time web application.  The first form, editForm1, is typically used to present a data row in “view” or “edit” mode. The second form, createForm1, provides user interface for “new” data rows.

The picture below shows an example of  editForm1 rendering an employee record in “view” and “edit” modes.

image

image

Each form view must have at least one category that binds data controller fields to a view. A binding of a field to a view is called a “data field”. Only one binding of a field to a view can exist in any type of view.

For purposes of this tutorial, create your own Northwind sample application as explained at /blog/2011/10/northwind-sample.html.

Multiple Data Field Categories in Form Views

A simple list of business object data fields presented in a form view works well in many situations. On the other hand, business requirements might call for a grouping of related fields and even conditional display of field groups based on the user input.

Consider the following screenshot depicting automatically generated createForm1 of Employees data controller.

image

Let’s break this form in four categories presenting “New Employee” fields, “Address”, “Miscellaneous” information, and an overall “Summary” of a new employee record.

Start the web application generator, select the name of your project, and click the Design button.

Select Employees data controller on All Controllers tab.

Activate Views tab and select view createForm1.

Activate Categories tab, shown below.

image

Rename New Employees category to New Employee and clear the description.

Add three more categories with the following properties:

Header Text Visibility Description
Address true Enter address of {FirstName} {LastName}.
Miscellaneous true Enter {FirstName} {LastName}'s phone number, birthday, any relevant notes.
Summary true

Please review the summary of the new record.
<div style="margin:8px; padding:8px; height:220px; overflow:auto; border:solid 1px silver">
Last Name: {LastName}<br/>
First Name: {FirstName}<br/>
Title: {Title}<br/>
Title Of Courtesy: {TitleOfCourtesy}<br/>
Birth Date: {BirthDate}<br/>
Hire Date: {HireDate}<br/>
Address: {Address}<br/>
City: {City}<br/>
Region: {Region}<br/>
Postal Code: {PostalCode}<br/>
Country: {Country}<br/>
Home Phone: {HomePhone}<br/>
Extension: {Extension}<br/>
Notes: {Notes}<br/>
Reports To: {ReportsTo}<br/>
Photo Path: {PhotoPath}<br/>
</div>

The list of categories in Designer will look as follows.

image

All data fields are presently bound to the New Employee category.

image

Let’s change that. Select view createForm1 in the path at the top of the Designer page and activate Categories tab.

Select Address category, activate Data Fields tab and add new data fields referencing Address, City, Region, PostalCode, and Country fields of the controller.

You will notice that the Designer automatically copies properties of the fields from New Employee category. Designer also removes the fields from New Employee category to ensure that there are no duplicate field references.

Now follow the same routine and add TitleOfCourtesy, BirthDate, HomePhone, Notes, ReportsTo, and PhotoPath to Miscellaneous category of view createForm1.

The new layout of fields of the view createForm1 is presented in the screen shot.

image

We also recommend that you select data fields Title and TitleOfCourtesy and set their Auto Complete Prefix Length property to “1”. This will provide an auto complete option for both fields.

Generate web application and start creating a new Employee record. As you enter values in FirstName and LastName fields, the descriptions of categories will change. Notice that John Doe is displayed in the category descriptions in the picture below.

image

Dynamic Category Descriptions

References to the names of fields enclosed in curly brackets are automatically replaced with field values as soon as the field value is changed, provided that the category visibility is dynamic.

Descriptions are automatically formatted with field value injection when you open a form view. If the category visibility is not dynamic then the values will not change even if the user is editing the record.

We have entered “true” expression in Visibility property of Address, Miscellaneous, and Summary categories. The expression is written in JavaScript and evaluated whenever data values are changed by user. This will ensure that the categories will be permanently visible, as true tends to evaluate to true.

The following picture shows collapsed Address and Miscellaneous categories and fully expanded New Employee and Summary categories. Note that Summary  category has no fields bound to it but displays dynamic content thanks to the expressions embedded in the category description.

image

Converting Form View to a Wizard

Our form is quite lengthy and warrants some refinement and simplification.

We will change the form to present one category at any given time and move between categories upon request. This style of presentation is often referred as a wizard. Data field categories in view createForm1 will become “pages” of the wizard.

If  a category is visible then two buttons Back and Next will be visible as well to allow advancement to the next step or return to previous step of data collection.

We will rename OK button to Finish and have it available on the Summary page of New Employee wizard only. Button Cancel will remain visible at all times.

“Status” Field

The upcoming release of EASE (Enterprise Application Services Engine) will be available in Unlimited edition of Code On Time. It has also brought some enhancements to the application framework for other editions.

Various elements of your application pay special attention to the presence of a field named “Status”.

The column named Status is frequently found in database tables of a typical line-of-business application. This column generally contains a short phrase or a number reflecting the business state of a data row representing a business object. For example, an Order can have a status of Draft, Open, Cancelled, or Ready to Ship.

Code On Time application framework assumes that field Status exists in all data controllers. Client library will automatically add a virtual Status field to any business object if the physical field is not found.

Visibility of Categories

Implementation of a wizard calls for some sort of status that can be used to determine the active “page” of the wizard.

We will use the virtual “Status” field to determine the visibility of a category and have the value of the field change when a user moves from one “page” of the wizard to another.

Change the Visibility expression of categories in createForm1 view as follows.

Category Visibility Expression (JavaScript)
New Employee [Status] == null || [Status] == 'Step 1'
Address [Status] == 'Step 2'
Miscellaneous [Status] == 'Step 3'
Summary [Status] == 'Step 4'

The screenshot of Project Designer shows categories with modified Visibility expression.

image

The initial value of virtual field “Status” is null, which will guarantee that only New Employee category is visible when a user starts creating a new record.

image

“Status” Action

If you were to implement an order management system with each order having a certain status then it is possible that you would have used a drop down list of available statuses to present the current status value.

Most of the time, change of the internal status of a business object results in a change to the user interface.

A status change is better implemented as a user interface action. For example, a buyer will set the order status to Submitted by pushing a Submit button. An employee in the shipping department will select a menu option Ship to change the order status to Shipped.

Code On Time web applications offer different action scopes that result in clickable links and button rendering in forms, on action bars, in action column, and grid context menu. We have introduced a new standard action Status that will change the value of a virtual or physical field with the name “Status” to the argument of the action.

Click Employees controller in the path at top of the page in the project designer and activate Action Groups tab.

Select action group ag2 with scope of Form. Activate Actions tab of the group.

Filter available actions by When Last Command Name property with value New. You will see definitions of two actions with command names Insert and Cancel. These actions are rendered as push buttons with captions OK and Cancel in the previous picture.

image

Add seven actions defined below.

# Command Name Command Argument Header Text Causes Validation When Last Command Name When Client Script
1. None   Back No New [Status] == null || [Status] == 'Step 1'
2. Status Step 2 Next Yes New [Status] == null || [Status] == 'Step 1'
3. Status Step 1 Back No New [Status] == 'Step 2'
4. Status Step 3 Next Yes New [Status] == 'Step 2'
5. Status Step 2 Back No New [Status] == 'Step 3'
6. Status Step 4 Next No New [Status] == 'Step 3'
7. Status Step 3 Back No New [Status] == 'Step 4'

Open the context menu of Insert action and choose Make Last.

image

Change its Header Text to “Finish and enter the following expression in When Client Script property.

[Status] == 'Step 4'

The list of actions will look as follows in the project designer.

image

Wizard in Action

Generate application and start entering a new Employee record.

User can cancel creation of a new record at any time by pushing Cancel button.

The first “page” of the wizard displays a disabled “Back” button representing the action with command name None. Action None is always displayed as disabled and provides a useful placeholder that gives the user interface consistency.

On this page, Status equals “Step 1”.

image

Press Next, and Status will change to “Step 2”.

image

Status equals “Step 3”.

image

Status equals “Step 4”.

image

Complex “When Client Script” Expressions

The configuration of navigational actions may seam to be quite a challenge at first. The truth is that there is not much value in a simple flow of wizard “pages” in our sample. A simple list of categories and ability of web pages to scroll do the job quite well.

In a real world your When Client Script expression will likely be more complex.

For example, one can imagine that different employee setup scenarios will be required, based on the employee job description or country.

You can add multiple Status actions activating various categories of the wizard with When Client Script expressions such as this.

[Status] == 'Step 4' && [Country] == 'USA' && [Title] =='Senior Manager'

The expression can manipulate any data field if you are referencing them in square brackets.

Status Bar

Business applications are designed to reflect complex processes of real life. Software developers and designers use the visual language of screens, menus, and various controls to approximate the business processes.

Naturally, the end users of your applications are true experts in their field and will evaluate any such approximation with a critical eye. It usually takes time for a user to understand the relationship of an application screen to an element of a real-world process.

Assigning a status to data representing a business process goes a long way towards making it easier for users to interact with your application.

The perfect example of a business process is an internet shopping cart. A seller has to collect enough information from a customer to ensure that the order is correctly placed, processed, and fulfilled. Internet customers are very impatient and will abandon their shopping cart if takes too long to complete the process or if the ordering process is confusing.

Sellers are “holding” the customer’s hand through the checkout by presenting information about the completed, current, and next steps that need to performed. Typically this is accomplished though a progress bar that indicates the current stage of the checkout process.

image

A progress bar gives customers a peace of mind and helps them better understand what is going on.

The same exact care must be exercised when programming any other business process.

Start web application generator and select your project. Click Design button and select Employees data controller on All Controllers tab.

Enter the following in the Status Bar property of the data controller and save the changes.

Employees.createForm1.Status: null
[New Employee] > Address > Miscellaneous > Final Review >

Status: Step 1
[New Employee] > Address > Miscellaneous > Final Review >

Status: Step 2
New Employee > [Address] > Miscellaneous > Final Review >

Status: Step 3
New Employee > Address > [Miscellaneous] > Final Review >

Employees.Status: Step 4
New Employee > Address > Miscellaneous > [Final Review] >

Generate your project and observe the status bar displayed just above the description of the view createForm1. This illustration shows the status bar detecting that value of the Status field is “Step 3”.

image

A status bar is defined by a collection of status values matched to the bar’s topology.

A status value is defined using one of the following methods:

  • Status: Value
  • ControllerName.Status: Value
  • ControllerName.ViewId.Status: Value

ControllerName and ViewId components of the status value are optional.

The second method is provided to support workflows of applications with EASE (Enterprise Application Services Engine). One workflow may define action groups, views, and virtual pages of multiple data controllers. A single status bar definition is defined per workflow.

Use the third method to create variations of status bars presented in different views. This method is also useful when there is no physical Status field.

If field Status in a given data row is empty then the status value is assumed to be null.

Status value is followed by status bar topology. Simply list logic definitions of the past, current and future statuses ending them with “greater than” character. The current logical status is wrapped in square brackets and separates past statuses from the future ones.

It is up to you to provide meaningful logical statuses. For example, our physical status values Step 1, Step 2, Step 3, and Step 4 are defined in status bar topology as New Employee, Address, Miscellaneous, and Final Review.

You can even make up your own logical statuses to help users establish a relationship of a visual presentation with the real world.

image

Note that Status Bar feature is available in Premium and Unlimited editions only.

Conclusion

Code On Time web applications offer first class high end features that require little or no programming. Wizards and Status Bars are a great example.

EASE workflows will make it possible creating user-specific views and pages enhanced with custom actions and status bars at runtime without changing the application.

Continue to Northwind Sample