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(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(180) 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
Application Factory
Wednesday, March 7, 2018PrintSubscribe
App Factory vs App Factory (Advanced)

When users create a new project in the app generator using release 8.6.6.0 and later, the project type will now be App Factory.

App Factory projects will create an ASP.NET-hosted web site project, deployable to any server running Microsoft Internet Information Services (IIS).

These projects contain both a REST API web server and stream HTML, CSS, and JavaScript to web browsers, to support user interaction through a publicly accessible web site. App Factory projects also function as a REST API server for native Mobile Apps.

Developers can also enable App Factory integration with DotNetNuke and SharePoint.

App Factory project folder directory root contains metadata files required by the app generator, as well as the Visual Studio solution file. An “app” folder contains the generated code required to run the server.

Project structure of App Factory projects.

Note that projects created before release 8.7.0.0 will use the “WebSite” folder name instead.

The app folder contains a set of resources required for the application to function. The App_Code folder contains the application framework. Upon running the application, the code in that folder is automatically compiled and executed.

All styling is stored under ~/css folder. All client-side scripts are stored under ~/js folder. Standard styling and script files are read by the framework, joined together, and streamed to the client (native app or web browser). The “_ignore.txt” file located in the two directories enumerates which non-standard files and directories are included in the output.

App folder of App Factory projects.

App Factory (Advanced)

An additional checkbox is now present on the New Project screen – “Implement application framework as class library (for experienced users only).”

Implement application framework as class library.

When this option is enabled, the application framework code is placed in a separate class library project, named after the project’s namespace.

Folder structure of App Factory (Advanced) projects.

The developer must have an instance of Visual Studio 2010, 2012, 2013, 2015, or 2017 installed on the development computer in order for the application to run. At compile-time, the Microsoft Visual Studio compiler must compile and package the application source code stored in the namespace folder into a *.dll file under the app folder. Only then will hosting software (Microsoft IIS) will be able to run the application.

App Factory (Advanced) projects store standard CSS and JS files under the class library. Upon compilation, these files are saved as embedded resources and read from the class manifest.

Custom CSS files can be placed under a “css” folder under the “app” directory. Custom JS files can be placed under the “js” folder under the “app” directory. The framework will read any files in those directories and not excluded by the “_ignore.txt” file, and stream them with every page request.

Pros of App Factory (Advanced)

  • Application source code is stored in a re-usable class library.
  • Hosting provider or customer is unable to view or edit the application source code.
  • Developer can only modify code during debugging if solution platform is switched to x86.

Cons of App Factory (Advanced)

  • Microsoft Visual Studio is required.
  • Application takes longer to generate and compile.
  • Developer cannot modify code files while application is running.

Old Project Types

A number of project types have been deprecated or disabled:

  1. Web Site Factory – renamed to App Factory.
  2. Web App Factory – renamed to App Factory (Advanced).
  3. Mobile Factory – a variant of Web Site Factory with Classic disabled. Deprecated. Use App Factory with User Interface set to “Touch UI” instead.
  4. DotNetNuke Factory – a variant of Web App Factory designed to work as a DNN module in DNN 7 and below. Deprecated. Use App Factory with DotNetNuke Connector instead.
  5. SharePoint Factory – a variant of Web App Factory designed to work as a SharePoint extension in SP 2010. Deprecated. Use App Factory with SharePoint Add-in instead.
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.