Skip to content

Created strongly typed configuration class#98

Closed
kant2002 wants to merge 1 commit intoapache:masterfrom
kant2002:master
Closed

Created strongly typed configuration class#98
kant2002 wants to merge 1 commit intoapache:masterfrom
kant2002:master

Conversation

@kant2002
Copy link

@kant2002 kant2002 commented Jul 7, 2014

Created strongly typed configuration for the following purposes:

  • Remove configuration parsing logic and defaults handling from the
    CDVViewController.m
  • Improved testability of the Cordova configuration and other parts of
    code which related on configuration could be much clearly mocked.
  • Reduction for code duplication during configuration parsing.
  • Ability to verify configuration issues during parsing, For example
    passing not a number to the value which expected to be a number should
    result to warning, so application developer could easily find error on
    their side.
  • Single place for storing configuration defaults.

Drawbacks in current implementation

  • Not sure about memory leaks during such approach. Not very familiar
    with iOS. This is need review
  • No tests so far, could be added later if whole idea get traction.
  • Currently no support for settings with limited set of values allowed.
    Like «PaginationMode». Again could be added if whole idea would be
    supported.

Created strongly typed configuration for the following purposes:
- Remove configuration parsing logic and defaults handling from the
CDVViewController.m
- Improved testability of the Cordova configuration and other parts of
code which related on configuration could be much clearly mocked.
- Reduction for code duplication during configuration parsing.
- Ability to verify configuration issues during parsing, For example
passing not a number to the value which expected to be a number should
result to warning, so application developer could easily find error on
their side.
- Single place for storing configuration defaults.

Drawbacks in current implementation
- Not sure about memory leaks during such approach. Not very familiar
with iOS. This is need review
- No tests so far, could be added later if whole idea get traction.
- Currently no support for settings with limited set of values allowed.
Like «PaginationMode». Again could be added if whole idea would be
supported.
@shazron
Copy link
Member

shazron commented Jun 17, 2015

Thanks but due to the pluggable webview feature, each WebView plugin has its own configuration now (4.0.x branch). This PR will be auto-closed.

@asfgit asfgit closed this in 30170c9 Jun 17, 2015
keianhzo pushed a commit to ludei/cordova-ios that referenced this pull request Jul 1, 2015
# By Shazron Abdullah (35) and others
# Via Shazron Abdullah (6) and Vladimir Kotikov (1)
* '4.0.x' of https://github.com/apache/cordova-ios: (48 commits)
  CB-8197 Switch to nodejs for ios platform scripts
  WebStorage backup: re-added line that enables WebStorage to be persistent that was mistakenly removed (in removing iOS 5.1 conditional code)
  Stale PR auto-closing - closes apache#119, closes apache#133, closes apache#136
  Stale PR auto-closing - closes apache#98, apache#119, apache#133, apache#136
  CB-9203 - iOS unit-tests should use tmp instead of same folder
  Adding .ratignore file.
  CB-8954 Adds `requirements` command support to check_reqs module
  Fixed jshint
  CB-8468 - Application freezes if breakpoint hits JavaScript callback invoked from native
  Added CDVURLRequestFilter Protocol (which can be used by plugins. It's used by cordova-plugin-whitelist)
  CB-9088 sms urls won't open in iframe (closes apache#143)
  CB-8812 - moved system schemes handler into its own plugin (CDVSystemSchemes)
  Add CDVHandleOpenURL plugin to defaults.xml
  CB-8812 - protocol hander raises error on second firing
  Fix failing unit tests.
  Fix jshint errors, and typo
  CB-9050 - cordova run --list does not show that you have an outdated ios-sim
  CB-8730 - Can't deploy to device
  CB-8788 - Drop armv7s from default iOS Cordova build to align with Xcode 6
  CB-9046 - cordova run ios --emulator --target "iPhone-5, 7.1" (target with runtime) does not work
  ...

Conflicts:
	CordovaLib/Classes/Public/CDVViewController.m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants