Blog

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
Saturday, April 17, 2021PrintSubscribe
Image Preprocessing

The primary focus of every mobile device maker is to deliver a camera that beats the competition. Year after year the consumers are getting better photos with an unbelievable level of detail. Large high resolution images have huge implications for the business app developers since the files need to be transmitted, stored, and processed at an increasing cost and often without a significant benefit. 

Touch UI introduces a simple and powerful set of image preprocessing capabilities that help enforce the image size, format, and compression quality for any BLOB field. The processing is performed entirely on the client and works both in online and offline modes.

Image Size

Apply the tag image-size-WxH to a blob field in a view to ensure that the submitted images will have a fixed size. For example, entering image-size-640x480 in the tag property of a BLOB field in the data controller views createForm1 and editForm1 will ensure 640x480 images. Also only the image files will be accepted and any other types of files will be rejected. 

Mobile browsers and web views provide an option to take a photo with the camera. Photos taken with the device camera will also undergo the pre-processing if the image-size-WxH tag is specified.

The original 4032 x 3024 image in the screenshot below was taken with the Pixel 4XL and occupies 3.43MB of storage. The preprocessing has reduced the image to 640 x 480 pixels and will require 768 KB on the hard drive.

Fit vs Cover

If the large image does not perfectly scale down to the specified size, then the image will be reduced to fit in the specified boundaries with the horizontal or vertical bars (gaps) around it. Developers can change the default image background color from white to yellow by tagging the blob field as image-background-yellow.


Use image-background-transparent tag to have the transparent bars instead. The standard color names 
and the hexadecimal values are allowed when specifying the background.

Tag image-large-cover will prompt the framework to scale the large image down to cover the entire area without gaps.


If the smaller image is provided, then it will be centered on a solid background.


Clipping Large Images

A large image can be reduced to the requested size without the “filler” bars. Tag the blob field as image-large-clip to ensure that no file is larger than the specification. Large images will be reduced and clipped. The smaller images are accepted as-is by default. 

Image Quality and Format

Preprocessing will draw the original image on the DOM canvas. The default binary serialization format of the canvas is PNG with the 92% compression. The latter cannot be changed. Apply the tags image-format-jpeg and image-quality-50 to the BLOB data field and ensure the standard JPEG image format with the 50% compression. 

Rejecting Image Upload

Image size specification can also serve as a client-side image filter. Tag image-small-reject will reject any image that is smaller than the specified size. Tag image-large-reject will reject the larger images instead.

If you want to enforce a specific image size 320 x 320, then apply these tags to the BLOB field in the data controller views:

image-size-320x320 image-small-reject image-large-reject.

The following combination of tags will ensure that all images are uniformly confirming to a particular size requirement and do not have the gaps:

image-size-640x480 image-large-cover image-small-reject
Friday, April 16, 2021PrintSubscribe
Say Goodbye to Glyphicons

 Touch UI has a long history. The framework was introduced in December of 2013. It was built on top of jQuery Mobile and represented our attempt to provide a “mobile” presentation style for apps created with Code On Time.

Here is the sample screenshot from that time:


The graphics of jQuery Mobile were based on a small subset of Glyphicons that was contributed by the namesake company in the SVG format. The extended set of 250 icons found their way into Bootstrap 3.0. We have integrated Bootstrap to provide the means of creating the content pages in Touch UI and promptly upgraded the framework to use the corresponding web font.


Glyphicons continued to be a part of Touch UI framework up until now.


Touch UI of today gets its looks from the Material Icons library and can be extended with an additional icon set when needed. The new framework works equally well on the devices driven by mouse and touch. It supports modern web browsers on any screen size. It can operate in native mode and as a part of a Progressive Web App.


Starting with the release 8.9.18.0 the glyphicons are not the standard component of Touch UI. New projects will not have these icons included. The legacy apps will retain the font in the ~/app/fonts folder but will require one of the following after being re-generated with the new release:

  • Replacing the references to the glyphicons with their  counterparts found in the Material Icons library.
  • Copying of the single CSS file from the code generation library into your own project.

The replacement of icons is simple. Here is how we did that for a few icons found in the current iteration of https://my.codeontime.com.


Either keep the span element of the icon definition or have it replaced with i tag. Replace the CSS classes in the icon definition with a single class material-icon. Enter the icon name between the opening and closing tag.


If you prefer to continue using the glyphicons, then copy and paste the glyphicons.css  file from the code generation library in [Code OnTime]/Library/Legacy/glyphicons folder into ~/app/css folder of your application. Run the app generator and click the “Locate” link below the list of projects to go straight to the library folder.

If you want to start using the glyphicons in the new projects then copy the other two files in the same folder and paste into the ~/app/fonts folder of your application.

Glyphicons are not widely used in the apps created with Code On Time. You may find the references to the icons in the dedicated login page of the app or in the content pages based on the bootstrap. The new code generation library is now referencing the material icons instead. This reduces significantly the size of the framework CSS files and provides a faster first paint in the browsers and web views.

The content pages of the near future will be based on Display Flow technology. The new presentation technology is shared with the Kiosk UI and will have its own Live Visual Designer. You will see it in action in the new community forum and in the support help desk. Materials Icons are integrated in the Display Flow and provide an excellent replacement for the Glyphicons.

Thursday, April 8, 2021PrintSubscribe
UI State and Logout URL

Code On Time release 8.9.17.0 introduces new controls over the user interface state and make a slight but significant change to the logout process. There are various performance improvements and changes to the Display Flow of the upcoming Content Hub Add-on, that serves as the foundation of the new Community Forum. Continue reading to learn more.

UI State Storage

Touch UI application in the screenshot is running as the Progressive Web App (coming soon) and behaves just like the app in the web browser. It retains the minimized sidebar, the data filter, and the reading pane mode when restarted by the end user. The new UI State Storage and Cleanup options ui.state.storage and ui.state.clear can be specified in the application configuration file ~/touch-settings.json to control where exactly the user interface state is being preserved and when it is cleared.

Logout URL

Starting with this release the default logout behavior of the apps built with Code On Time is changing. Previously the successful logout request to the server was followed by reloading of the current URL visible in the address bar of the browser. The server-side code would redirect the user to the login page and return to the same location if the user has opted to sign in again. 

The new framework will redirect the user to the root of your app instead and this will cause the ApplicationServices.UserHomePage() method to be invoked giving the developer a chance to redirect the anonymous user to the desired start location on the first visit after the logout. The default location is ~/pages/home.

New Configuration option membership.logoutUrl specifies what happens when the user signs out. The default value is root, which will cause the web view to redirect to the root of the app. Value current will reload the current page and force the user to confirm their identity. This is the framework behavior prior to this release. Any other URL will cause the app to redirect upon the successful logout. For example, https://codeontime.com specified in membership.logoutUrl option of ~/touch-settings.json app configuration file will navigate to the corresponding web resource. The relative path ~/forum/topics will redirect the app to the page /forum/topics.

Content Hub, Display Flow, and Community Forum

The content presentation framework Display Flow was first introduced as the part of Kiosk UI. Here at Code On Time we are trying to do a lot with as little effort as possible to keep things efficient and tidy. We are using the Display Flow in the Content Hub Add-on to bring the powerful interactive live content designer and content publishing capabilities in the apps created with Code On Time generator. The new Community Forum is coming to https://my.codeontime.com and will demonstrate this exciting technology. It will power our interactions with the customers and will also be available as an add-on for your apps.

The live content designer shares the Object Inspector (Properties Window) with v9 to allow the visual configuration of the Display Flow objects. We will bring the v9 design capabilities in your apps as early as next month. The live project designer of v9 will first enable the full visual editing of all available properties of ~/touch-settings.json. Finally the guesswork will be over. Gradually we will increase the scope of Project Configuration capabilities with every incremental release of 8.9.x.x app generator.  The version number will shift to 9.0.0.0 when the scope of configuration meets the level of current Project Designer implemented with Windows Forms. The migration to v9 will be subtle and pain-free. Eventually you will be building your apps entirely in your favorite web browser (Chrome, Edge, Firefox, Opera) with the app generator running in the icon tray.

Release Summary

The following new features and fixes are included:

  • (Touch UI) Form buttons will appear centered when the full-screen or non-modal view has the "md" width or larger. Otherwise the buttons are aligned to the right.
  • (Installer) MSI file is marked with the correct version number of the app generator release.
  • (Touch UI) Configuration option membership.logoutUrl controls what happens when the user signs out. The default option is root, which will cause the app to redirect to the root of the app. Value current will reload the current page and force the user to confirm their identity. Any other URL will cause the app to redirect there upon the successful logout. 
  • (Touch UI) Option ui.state.clear allow controlling when the user interface state variables are cleared. The default value is 'never'. Option value always will clear the UI state on login and logout. Value logout will clear the UI state on logout only.
  • (Display Flow) Flow Designer maintains the scroll position of the top-most visible display object when the page is resized.
  • (Display Flow) Properties spacing, align, and color are handled in more configuration variations of display objects.
  • (Display Flow) Display flow designer allows Click, Shift+Click, and Ctrl+Click selection of display objects. A count of objects is displayed when the selection is made. Read-only objects are not selectable. This makes possible creating forum posts with the ability to design enabled on the reply  or comment only. 
  • (Touch UI) Content pages will display a 3d shadow on the app toolbar when scrolled down.
  • (Display Flow) Content display object supports the "color" attribute to allow an explicit content color definition overriding the color of the theme and accent.
  • (Display Flow) Tags h1-h6  appear larger in the "hero" display blocks on lg, xl, and xxl screens
  • (Touch UI) Page menu is erased when an article is added to the page.
  • (Touch UI) Page header is invisible if the page is using the content framework (Bootstrap or Display Flow).
  • (Touch UI) Property $app.agent has ie, iOS, chromeOS, and other properties to provide quick shortcuts identifying the web view agent.
  • (Touch UI) Option ui.state.storge with the values local and session will control how the state of the GUI is persisted. The default value is local.
  • (Touch UI) Last vertical scroll position of the Bootstrap and Display Flow page is memorized in the session storage.
  • (Touch UI) Content pages will memorize the scroll position and have it restored when navigating back or forward to the page.
  • (Farmework) Font files are cached up on the client for 1 year .
  • (Touch UI) Icon class names are removed from the page body at runtime. Previously this has affected the page layout under certain conditions.
  • (Touch UI) Implemented an efficient assignment of display width breakpoints to the page. Classes app-min-xxs through app-min-xxl are assigned and removed only as needed for smooth animations and faster rendering.
  • (Display Flow) Increased the font size of "code" blocks to 3/4 or rem.
  • (Touch UI) Pages with the explicitly defined data-app-role="page" and data-container-framework="bootstrap|display-flow" attributes will not have a dedicated container page and will have their contents placed into the "Main" page if there are no other "virtual" pages in the markup. This speeds up the first paint in the browsers.
  • (Touch UI) Modal page header background color is not affected by the presence of the sidebar.
  • (Touch UI) The trailing list divider is not rendered in the mini sidebar.
  • (Classic UI) Fixed the exception raised when the New and Duplicate commands are executed.

Labels: Release Notes