Tuesday, May 03, 2016

SuperModule 2 Beta (v1.2.0)

SuperModule 2 has long been overdue. It was almost out a year ago, and then my MacBook Air got stolen with the near-finished code at a Second Cup cafe in Montreal (won't mention which one, but let's just say don't leave your laptop unattended in Downtown Montreal). Fortunately, I got parts of the code stored in a remote Git branch (yeah Git for the rescue!), so I just released SuperModule 2 as beta today to use on my employer's client project.

Feature Summary:
  • New super_module(name) syntax
  • Much simpler implementation with guaranteed correctness and no performance hit
  • Less memory footprint by not requiring method_source Ruby gem for v2 syntax
  • Backwards compatibility with v1 syntax
No need to remember to include SuperModule anymore with the use of the v2 super_module method. Much simpler usage as a result as per popular demand.

Since this version is beta, I'm very curious about user feedback. Let me know how it goes for you.

Enjoy Ruby Modules again!!! Write as simply as any superclass with all of the power of multiple mixins!!!

Cheers... Andy

Sunday, March 20, 2016

Cycle.js Model View Intent in Conference Room Booker

Conference Room Booker has been refactored to the Cycle.js recommended Model View Intent pattern (as shown in this code structure screenshot):

In other words, it has been simplified to the bare essence of a pure decomposable reactive JavaScript function staring with sources of data and ending with sinks.

Intents: represent user action sources, such as keyboard presses and mouse clicks.

Intent Example (bookingDurationSource.es6):

The intent above captures keyboard input for the duration of booking, and outputs duration/time hash.

Models: aggregate data into meaningful structures.

Model Example (bookedRoomTimingSource.es6):

This model aggregates elapsing time, booked room data, and entered duration into a bookedRoomTiming hash structure, which later gets used in rendering the view.

Views: render data into HTML using Virtual-DOM-based Hypersrcipt terse syntax.

View Example (bookingView.es6):

This view renders the top part of the screen shown below.

Conference Room Booker Example Screenshot (Entering Duration):

Conference Room Booker Example Screenshot (Booking Timer Started by Clicking Room):

Conference Room Booker Example Screenshot (Time Elapsing/Booked Room Color Fading):

Check out the codebase over here for more details: Conference Room Booker

Have you had experience with pure functional reactive programming using Cycle.js yet? If so, please share your experience in the comments or ask any questions you might have otherwise.

Wednesday, March 02, 2016

Cycle.js Application Structure (Conference Room Booker)

Added to Conference Room Booker HTTP requests and responses via Cycle.js HTTP driver, obtaining room names (e.g. France, Canada, etc...) and showing them within the floor map SVG.  

A side-effect to my work was refactoring the structure of the app, breaking components out of the main cycle function, primarily the following:

- Models
  - roomCollection
- Streams
  - initialStream
- Views
  - bookingView
  - floorPlanView
Cycles (Both Sources & Sinks):
- roomRequest

Has anybody else been experimenting with Cycle.js's pure functional style of development?.  

Sunday, February 14, 2016

Ultra Light Wizard v0.1.0 (beta)

As promised, I rolled out a new update to Ultra Light Wizard (v0.1.0) that is finally feature complete, and thus labeled as beta. Please install, test, and report feedback on GitHub.

In the meantime, here are a few more tasks I'd like to tackle before it is v1.0.0 (production):

  • (must) Write automated tests
  • (optional) Support for nested resources
  • (optional) Modularize (perhaps extracting sub-generators)
  • (optional) General refactorings

Cheers and happy Rails coding!!

Saturday, February 13, 2016

Tuesday, February 09, 2016

Beyond React: Introducing Cycle.js

I'm giving a talk at the Montreal JS group tonight.

Title: Beyond React: Introducing Cycle.js

"Cycle.js is a reactive RxJS/Virtual DOM based front-end library. Andy will provide a quick introduction to Cycle.js basics and philosophies, go through a tutorial of its concepts and demonstrate with some code examples."


View Slides Online

Sunday, January 31, 2016

Ultra Light Wizard v0.0.6

Now includes basic Rails scaffolding with attributes as part of the work.


rails generate ultra_light_wizard:wizard Project steps:basic_info,project_detail,file_uploads,preview attributes:name:string,description:text,start_date:date,delivery_date:date step_alias:part


More on the way, I promise!