Application Factory

Labels
AJAX(112) App Studio(6) 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(178) 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) 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
Thursday, May 30, 2019PrintSubscribe
VS 2019, Multi File Upload, Command Line Mode
Code On Time release 8.7.11.0 brings support for Visual Studio 2019, Multi-File Upload in Touch UI applications, and new command line options that allow creating apps with automated scripts.

Start using Visual Studio 2019 with your projects. The new development environment is fully integrated in the app generator. If you do have an existing project and want to migrate to the latest tools from Microsoft, then select the app on the start page of the generator and choose Open option. File Explorer will show the project files. Either delete the file with *.sln extension and regenerate your app or right-click the solution file, open it with Visual Studio 2019, select the solution file item in Solution Explorer, and press Ctrl+S.

Multi-file Upload is now available in Touch UI if you add Upload action to a compatible data controller. End users of your app will be able to choose multiple files to upload. The app will create a database record for each file, have the file submitted to the server, and persist it to the first BLOB field.


Command Line support is now available in the app generator.

Enter the following in the command line to generate a database app that works on mobile devices and in the web browser:

codeontime -Generate "c:\apps\myapp3" -DbConnection "Data Source=;Initial Catalog=northwind-cmd;Integrated Security=True;" -run

Build mobile and web database apps in seconds in command line. Use generated apps to validate your ideas, prototype data input forms, enter sample data, and much more. Apps built with Code On Time are metadata-driven. Create you own customization tools to invoke codeontime.exe in command line mode. The upcoming Code On Time v9 will be using command line mode extensively since the entire development environment is incorporated directly in the apps.


The following features and fixes also included in this release:
  • (Model Builder) All words in field labels are capitalized when a model is created.
  • (Touch UI) Optimized packaging of JSON properties of FieldValue object instances to minimize footprint for offline/disconnected logging.
  • (Client Library) Values of static Check Box List are correctly displayed when more than one item is selected.
  • (Framework) Blob adapter configuration is not included in the JSON controller descriptor.
  • (Touch UI) Selection of files in BLOB input will make the input focused.
  • (Framework) New TemporaryFileStream class is used for temporary storage of BLOB content.
  • (Touch UI) Method $app.confim support chained alternative execution of code with promises when confirmation is canceled.
  • (Offline Sync) Concurrent uploading of BLOBs is implemented with optional reconciliation of failed to upload blobs.
  • (Offline Sync) End user can opt to sync without data refresh. The option will remain selected until data refresh is explicitly requested. This makes possible working offline and only uploading changes to the server.
  • (Framework) Batch Editing of many-to-many fields works correctly when the primary key field is explicitly included in the view.
  • (Framework) Batch Editing will not erase values of many-to-many fields that are not selected in the Batch Edit form.
  • (Framework) Surveys accept inline functions and non-string values as "Visible When" and "Read Only When" expressions in questions and topics.
  • (Framework) Signature prompt is vertically aligned to the middle.
  • (Touch UI) Download icon is not displayed anymore next to "DOWNLOAD" button.
  • (Offline Sync) Added support for signatures.
  • (Touch UI) Placing $none in "Notify" property of action will prevent notification from being displayed.
  • (ODP) Completed implementation of thumbnail production on the client.
  • (Model Builder) New implementation of multi-level construction of Copy property of lookups for both 1-to-Many and 1-to-1 relationships.
  • (Classic) Implementation of BLOB uploading is now moved to Offline Data Processor.
  • (Framework) Download cookie is set on the server only when specified in the request.
  • (Framework) Azure Blob Adapter now uses HTTPS by default.
  • (Touch UI) Fixed signature resizing.
  • (Model Builder) "Enter" key in the property of the last field will post changes and re-select the same field property.
  • (Localization) Italian localization contributed by Massimo Ciurleo.
  • (ODP) Signatures in child data views are fully supported in transactional mode (when odp is enabled).
  • (Project Wizard) New "Addons" section in Features.
  • (Framework) Filter expression in the model will not cause errors when advanced search is executed.
  • (Framework) Default transaction scope is "sequence",
  • (Offline Sync) If transaction scope is "sequence" then ODP-assigned sequence is overridden with an offline sequence number. If transaction scope is explicitly set to "all", then the sequence is assigned to 0 for all transactions in the log.
  • (Touch UI) Button "driving directions" correctly composes Google Maps query based on fields tagged as map-latitude and map-longitude.
  • (Client Library)  Failed blob will be abandoned since there is not much that the user can do. The row was either inserted or updated already. The blob was rejected by the server. Abandoning of blob eliminates infinite loop of submission.
  • (Framework) A registration record for on-demand fields with blank "On Demand Handler" is not generated in Blob.generated.cs(vb) to prevent duplicate "empty" handlers when more than one such field is defined.
  • (Classic) Rich Text editor correctly sets the value produced in custom editors.
  • (Classic UI) Data views correctly synchronize with the inserted record.
  • (Touch UI) Forced notifications without text will not cause an empty alert displayed when ui.notification.enabled = false.
  • (Framework) Generated data access object has a unique name to prevent clashing with parameters created from access control rules.
  • (Framework) New property ApplicationServices.DisplayName returns application name. The value is derived either from the default app name or from the value stored in appName property in ~/touch-settings.json.
  • (Framework) Method ApplicationServices.ValidateBlobAccess ensures that user can access the row that contains the BLOB field. The field must also be accessible to the user. Otherwise access to blob is denied.
  • (Touch UI) Context menu options for child data views that were defined in their own containers are not displayed anymore. Use fields of DataView type to display child data instead. Previously visible context options have caused exceptions at runtime.
  • (Framework) Method NodeSetCollection.SetTag correctly sets tags for both data fields and views in both singular and chained calls.
  • (Touch UI) Inline editing in child data views will not cause identity fields to be marked as "Modified" and allow entering rows without errors
  • (Touch UI) Refactored panel opening and closing.
Our next goal is to release Offline Data Processor and Offline Sync in update 8.9.0.0 due out by the end of June 2019. We are skipping 8.8.0.0 release numbering since both features are being released together. Cloud On Time for Android will be out in July 2019. The new roadmap has been prepared and will be unveiled soon!


Friday, May 11, 2018PrintSubscribe
Inline Editing and Native Client

Release 8.7.0.0 is finally here and introduces many new amazing features! Your apps will run in a native mode with inline editing, multi-level master-detail data views, transactional data input, and more.

Inline Editing mode in a form of app based on Touch UI created with Code On Time app generator.

In the coming days we will post multiple video tutorials covering the new features available in your apps. Subscribe to our YouTube to say up-to-date at https://youtube.com/codeontime

Please make sure to watch the following tutorials right now:

  1. Controlling Inline Editing
  2. Multi-Level Master-Detail
  3. Wide Scrollbars
  4. Default Actions in Grid/List/Cards
  5. Transactional Data Input

Native Apps are discussed in these tutorials:

  1. Mobile Development with Code On Time
  2. Online and Mobile Preview
  3. Configuring Application for Cloud On Time.

Inline Editing

We are very excited to offer the first practical and universal implementation of inline editing in Touch UI. Inline Editing is the built-in feature available in apps created with Premium edition of Code On Time. It requires zero configuration and offers a high level of control when needed.

The feature is stable and ready for production use. We have a long list of various enhancements planned already. Many of them will be addressing some imperfections that we know about. 

Another minor release will go out in about a week and will introduce a performance enhancing feature called Optimistic Saving. This feature will be enabled by default in all apps. It will further enhance inline editing and change our approach to data saving via forms in general.

Native Client

The native client is here. We have started with two native clients for Windows 10 and Windows 7. Our app generator is a Windows-based product. We wanted to make sure that you can build native apps without requiring anything else on the development machine. In the next 45 days we will release support for iOS with Android and MacOS to follow.

Download the universal native client for Windows 7 and above at https://codeontime.com/releases/cloud-on-time-for-windows-7.

Download the universal native client for Windows 10 at https://www.microsoft.com/en-us/store/p/cloud-on-time/9nblggh404nb.

Multi-Level Master Detail

Touch UI now supports multi-level master-detail relationships between data views in dashboards, full-screen, and modal forms. Data View fields can another such field in the data controller serve as the filter. Developers can configure relationships with any number of levels and complexity.

Multi-level master-detail form in an app based on Touch UI created wtih Code On Time app builder.

Data Pre-Fetching

Build a new app and try it in a web browser. You will notice that the data displays virtually instantly. Open the source of the page with CTRL+U and you will see that the data comes embedded in the page. This is a performance enhanching feature targeting web users of your apps. We are preparing a tutorial explaining how that works.

Transactional Data Input

Transactional data input is now available. The feature is disabled by default. Enter odp.enabled=true in ~/touch-settings.json and your will be able to enter data in transactional fashion if you add Data View fields in createForm1.

Note that inline editing is not yet compatible with ODP (Offline Data Processor). Some features of the server-side framework are also missing.

Release 8.8.0.0 will go out in June of 2018 along with a new product called Offline Sync Add-On. The release will make ODP a standard feature enabled by default and will make possible to build apps that work in disconnected/offline mode without writing any code. The majority of the code has been completed. We are preparing the infrastructure to start selling Offline Sync.

New Folder Structure

New apps will have a new folder structure. Learn more at http://codeontime.com/blog/2018/03/app-factory-vs-app-factory-advanced.

Real Time with Code on Time

We are planning to start hosting live video sessions on our YouTube channel each Friday at 10:00 AM. The purpose is to provide a real time demonstration of various product features. Viewers will be able to submit questions ahead of time, watch the show live, or review the latest episodes at their own convenience. Each session will include answers to your questions, we will tell you about the new stuff we are working on. The primary purpose will be to demonstrate how to use our product with practical exercises.

Release Summary

This is a brief description of the features and bug fixes included in this release:

  • New field values changed with custom actions are displayed when user activates the invisible content with tabs. Previously the original row values were displayed instead.
  • Method $app.execute now supports argument property "background" to control if the UI is to be blocked. If set to true then a non-blocking background call is executed without any indication of progress.
  • Data views displaying data in grid are automatically synced when user returns to the previous pages and there were changes to the same data controllers prior to return.
  • Wide scrollbars are enabled if (1) ui.scrollbars.wide == true or (2) ui.scrollbars.wide == 'pointer' and the pointing device is not "touch".
  • Tags inline-editing, inline-editing-none, inline-editing-when-pointer, and inline-editing-option-none are controlling "Inline Editing" mode in the view.
  • Web.config now includes <authentication mode="None"> for apps with no membership.
  • Ensured js/_ignore.txt is copied to output directory in Web App Factory projects.
  • ListBox, CheckBoxList, RadioButtonList styling is matched to accents.
  • Fixed issue with agenda not selecting rows properly.
  • Fixed issue with incorrect page being displayed as selected in site menu.
  • Added support for "view-selector-none" tag to disable view selector on lookup fields.
  • URL Hashing replaces spaces with "+" when getting from URL to avoid exception.
  • Fixed Azure Publish re-authentication bug.
  • Dbl-click on modal title bar will toggle fullscreen mode of a form.
  • Added haxisformat and vaxisformat properties to allow formatting the axis values using the following options: none, decimal, scientific, percent, currency, short, long.
  • Publish now supports FTPS by using "ftps" in the URL.
  • Blob Handler now checks if user has acess to BLOB column and requested row before streaming to user.
  • Blob adapters are publicly accessible if no membership is enabled.
  • ApplicationServices.HandleError and ApplicationServices.HandleException is now overridable to allow for custom error logging.
  • If command Confirm with argument set to the name of the child dataview field is specified then field values are accessible in business rules of custom data controller as @Parameters_MasterFiel1, etc. It is now possible to implement custom search with stored procedures as explained at https://www.youtube.com/watch?v=ClCHL8JuuMg&t=0s&index=4&list=PLy2g3SjvDe2b2cl9i0msBaMVLntQucZtb.
  • SQL business rules support @[FieldName]_FilterValue1 and @[FieldName]_FilterValue2 for reading filter values.
  • New Advanced Search tags for data fields.
      - tag “search-sample-distinct” will force distinct samples
      - tag “search-sample-all” will force all samples
  • Field values with HtmlEncode = false and containing HTML content will not be trimmed.
  • Advanced Search displays "yes" and "no" options for Boolean fields.
Monday, April 9, 2018PrintSubscribe
Changing Field Values Via JavaScript Business Rules

Some form of validation is required in every application to help the user insert the correct data. Applications created with Code On Time app generator offer validation in the form of business rules.

Validating the Last Name field of the New Employees form.

Let’s add validation business rules the Employees controller of our sample Northwind app.

Open the Project Designer. In the Solution Explorer, switch to the Controllers tab, right-click on Employees / Business Rules node, and press New Business Rule.

Creating a new business rule on Employees controller.

Specify the following:

Property Value
Type JavaScript
Command Name Insert
Phase Before
Script
if ($row.LastName == 'Smith') {
    this.preventDefault();
    $row.LastName = null;
}

The above script will run when the user presses Save. It will check if the user has specified a Last Name of “Smith” – if so, it will cancel the save operation and clear the field.

Save the new business rule. On the toolbar, press Browse to run the app. Navigate to the Employees page and create a new record.

Creating a new employee with Last Name of "Smith".

Enter values for the employee and press Save. The save operation will not be executed, and the Last Name field will be cleared.

The Last Name field has been cleared.

Our business rule does ensure the user does not enter an incorrect value, but it does not make it clear to the user what is going on. We will want to add some feedback in the form of a message box to help the user understand.

Change the business rule as shown below:

if ($row.LastName == 'Smith') {
    this.preventDefault();
    // show message box
    $app.alert('Last Name "Smith" is not allowed.').done(function () {
        // update field value to null
        $app.input.execute({
            values: [
                { name: 'LastName', value: null }
            ]
        });
        // focus on the field
        $app.input.focus({ fieldName: 'LastName' });
    });
}

Our updated business rule has a few changes. Notice that the $app.alert function is used to display a message to the user. However, this alert will show a different form and change the current context. Attempting to update the field LastName after an alert is displayed will attempt to update a LastName field inside the alert form – which does not exist. Therefore, a done handler will need to be added to the $app.alert method call in order to execute code after the user closes the alert.

One more point to notice is that the $row variable is only in scope during the execution of the business rule. The asynchronous code in the done handler is executed when $row is out of scope. Therefore, it is necessary to use the $app.input.execute API to update the field values when the user returns to the Employees create form. The execute method accepts an object with the property values that contains a list of key value pairs. The $app.input.focus API is called in order to focus on a field called LastName as well.

Save the business rule and regenerate the project. Create a new employee with the last name of “Smith” and attempt to save. Notice that a message box now notifies the user that the last name is not allowed.

Alert message box is displayed to the user.

Press OK to close the message box. The Last Name field has been cleared and is currently focused.

The last name field is cleared and focused.

There are other ways of displaying a message to the user without interrupting the workflow. Let’s try the following:

if ($row.LastName == 'Smith') {
    this.preventDefault();
    $row.LastName = null;
    // focus and show message next to field
    this.result.focus('LastName', 'Last Name "Smith" is not allowed.');
}

The example above will clear the field, and use the result.focus() method to focus on the field, and display a message next to the input. The result can be seen below.

Focus message displayed next to the LastName field.

Another technique is to use the notification API to display a transient message to the user at the bottom of the screen.

if ($row.LastName == 'Smith') {
    this.preventDefault();
    $row.LastName = null;
    this.result.focus('LastName');
    $app.touch.notify('Last Name "Smith" is not allowed.');
}

The result can be seen below:

image

The notification will disappear after a default of 2 seconds.