Application Factory

Blog
Application Factory
Friday, October 27, 2017PrintSubscribe
User Roles in SQL Business Rules

Code On Time release 8.6.8.0 introduces ability to test user roles in SQL Business Rules and fixes several remaining issues related to the recent change to the folder structure of projects in the preparation to the Native App generation.

Testing Roles in SQL Business Rules

Developers can now access parameter @BusinessRules_UserRoles in the code of SQL Business Rules and test user roles for conditional processing.

For example, create a Transact-SQL business rule in Products data controller may look as follows:

if @UnitPrice > 30 AND CHARINDEX('Administrators', @BusinessRules_UserRoles) = 0
    set @Result_Error = 'Only admin can set a high price!'

Set Command Name of the rule to Insert|Update and Phase to Before. Run the app, login with a non-administrative account, and try to update a product with a price higher than $30.

SQL business rules tests user Roles to prevent data input in an app created with Code On Time app generator.

Use the corresponding “contains” function and parameter marker in front of “BusinessRules_UserRoles” when working with the database engines other than Microsoft SQL Server.

Bug Fixes

The following fixes are also included in the project.

  • Project Builder removes resources under bin folder.
  • Web App Factory marks js, css files as content.
  • File  ~/js/_ignore.txt is now marked as embeddedResource to allow compiler to build Visual Basic projects.
  • Removed "ToUniversalTime" in value converter to fix datetime shifting issue in ASPX apps.
Monday, July 17, 2017PrintSubscribe
July 2017 Hotfixes 2

Code On Time release 8.6.5.0 introduces the second collection of July hotfixes described below:

  • Added support for ReportViewer 2016.
  • Trust Origin URI specified for Report Viewer 2016 to ensure reporting DLLs loading correctly after being copied to another machine.
  • Windows Live OAuth Handler wrong redirect URI fixed.
  • App generator “User Interface” option now has "Touch UI + Classic" option. When "Touch UI" is set, no Desktop themes will be generated.
  • URL Hashing in HTML implementation is now fixed.
  • New projects will not permit “space” characters in the name.
  • Reports Viewer version is now a variable stored in the project file.
  • Fixed issues with Report Viewer version not detecting when generating from Project Designer.
  • Home page of the app generator displays the descending order of projects
  • Older ReportViewer references are removed from the VS project file.
  • ReportViewer DLL files are copied to the “bin” folder only when v14 is used.
  • Added MSGraphOAuthHandler implementation.
  • "Login with Microsoft" button appears on login page when MSGraph config entry is present in the site content.
  • Fixed exception in BusinessRules.UserId implementation raised when user is not logged in.
  • Added "IsEmpty" and "IsNotEmpty" to row filter operations. New options can be used in “soft” filters set on the server.
  • Fixed DotNetNuke Factory project compilation issues.
  • Touch UI: Fixed. Multi-select checkboxes are not cleared after Batch Edit.
  • Touch UI: New “Select All” option is displayed when more than one option is available for selection in a basket.
  • Touch UI: Keyboard navigation in the list scrolls the page when item is not visible.
  • Touch UI: Key “Right” goes to the lookup page after selecting “See All”.
  • Touch UI: Last focused field is recorded in the touch.lookup() method to correctly restore input focus when the lookup view is canceled.
  • Touch UI: Blank lookup field shows a popup when scrolled into view.
  • Touch UI: Removed excessive blank space in front of Add Item in empty basket.
  • Touch UI: Calendar is opened in correct position if the date input field has been scrolled into view in IE.
  • Updated app generator to use correct version of MSBuild for VS 2017, 2015, 2013, with MSBuild4.0 as fallback.
  • Touch UI: Command separator is displayed in popup with items for AutoComplete/Lookup.
  • Action with command name Select works correctly after command Update.
  • Fixed issue with Active Directory loading ASP.NET membership provider with no connection string.
  • Dropping/pasting controller view onto page will set the view as well.
  • Ensure "standalone database" checkbox is checked when membership dialog is loaded.
  • Fix for "asp_CheckSchema" exception with custom membership.
Thursday, March 2, 2017PrintSubscribe
Native Online and Offline Apps

The new product release 8.6.0.0 is coming out March 3, 2017. See the video tutorials that explain the development process at https://youtube.com/codeontime.

The release introduces new Touch UI 2017 and provides the foundation for the future Native Online/Offline Apps. The foundation is provided by the following features:

Batch Import in Touch UI 2017.

Native Online Apps

The next release 8.7.0.0 is expected to go out last week of March. This release will introduce generation of native apps for iOS, Android, and Windows 10.

Here is how you will build a native app with the release 8.7.0.0:

  1. Create an application with SPA page model for a "real" database engine such SQL Server, Oracle, MySql, etc.
  2. Indicate platforms required for native deployment. This will enable CORs support in the app.
  3. Publish an app.
  4. App generator will make special versions of all pages in "Native" deployment folders. All scripts and CSS stylesheets will be copied there as well. Native platform code will be also created.
  5. Deploy the server code of the app to the web server.
  6. Deploy the native code to the app stores.
  7. Install the app and run it on native device.The native code will create a native WebView instance and load local instances of the pages, JavaScript, and CSS. Pages will make remote requests to the server side components. User login and session state is managed through the feature called Identity Manager.

Native Offline Apps

Release 8.8.0.0 is expected to be ready in May of 2017.

The new "Offline" property will be available for application pages.

The data controllers will be generated in ".json" format instead of ".xml". We also need that for both new CoT v.9 and Cloud On Time. The new format of controllers is used by built-in Project Designer.

If at least one page is marked as "Offline", then the following will happen when a native app is running:

  1. Native application will download controllers and data in JSON format from the server.
  2. Only offline pages will be visible/selectable in navigation system of the app if there is no connection.
  3. Any requests for offline data will be executed by the local JavaScript library. Data updates will be executed against the offline copy of the data. The log of requests to update data will be maintained and persisted. There is no need for additional software such as SQLite. We are providing a JavaScript equivalent of the server-side code that will use JSON data controllers on the client to work with data.
  4. "Cloud" icon will be displayed on the application toolbar. There will be several states for the icon:
    • Offline
    • Online + No Local Data Changes
    • Online + Local Changes Require Sync
  5. If the app is "online" then "Cloud" button will be in "Online+" state. If the button is pushed then the following will happen:
    1. The log of updates will be send to the server via the Batch Import API introduced in 8.5.12.0 if data synchronization is required.
    2. Conflict errors will be reconciled by the user when needed
    3. Fresh copies of controllers and data in JSON format will be retrieved from the server replacing the previous offline data set.

Transactional Data Input

Native Online and Web apps will benefit from this new "offline" capability as well. Starting with the release 8.6.3.0, forms will work in "offline" mode. It will be possible to enter child records when a new record is created. The data will be posted to the server only when the master record is posted. This capability will be available in all product editions.

Continue to Page Icons