Monday, February 6, 2017

Release 0.1.6

This new release delivers the initial class mechanism as well as minor improvements.

New version

Here comes the new version:

Easier setup

The very first time you clone the project and run grunt, a configuration menu will be prompted:

  • It allows you to select the http port the server will run on
  • It will detect cscript (or you may force the detection status)
  • It allows you to change the quality metrics
  • It detects the selenium-compatible browsers

grunt
grunt

Once finished, it builds the library so that the metrics will appear in the project homepage.

homepage
homepage

Better compatibility across hosts

One major feature of the library is to provide the same level of features whatever the host it runs on. Consequently, I am always looking for methods that exist in recent JavaScript versions and that are missing on some hosts (specifically Rhino and Wscript).

For instance, this version introduces Array.prototype.some.

I am also planning to implement Object.assign and deprecate gpf.extend as it does the same.

Backward compatibility

Each version's test file is now kept and tested automatically during the build process. This ensures backward compatibility.

Simple class definition

This version offers the new gpf.define API. It simplifies class creation through a definition dictionary, check the documentation.

Your feedback is welcome: this is the early stage of entity definition and there is plenty of time to improve it.

Lessons learned

Improving maintainability using regular expression

If you have read the other articles on my blog you know that I recently changed my mind about regular expressions. Actually, I found myself using those more and more to reduce the code complexity.

Removing Selenium

I have lots of troubles with Selenium, this is due to several reasons:

  • I use version 2 and version 3 has been released 5 month ago. FireFox does not work anymore with version 2.
  • Selenium relies on drivers. Browsers are updated automatically which implies that drivers must also be updated regularly.

Looking at the way I use Selenium, it could be replaced with a simpler mechanism. I just need it to start the browser, run the proper page and wait for the final result. There is not much automation involved.

Hence I am planning to remove Selenium and implement a custom mechanism in the next version.

Next release

The next release will mostly consist in securing the gpf.define API and handle all the bugs detected during the development of version 0.1.6.

No comments:

Post a Comment