glimmer 2.7.3 → 2.7.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47db370b7e55a13d57155cb65baefc6176157af4abfb520405b49287c0dd1d53
4
- data.tar.gz: '082b27860acaa6ccac808aec5190f08f87d28b56c2eadeb8939bdff52a4e0563'
3
+ metadata.gz: fa5ebf6796cc72af7513d3cc33d0549140d40c1c6e724a1450225b382149d412
4
+ data.tar.gz: ad4748aeed1161fa76308c9580b80bed8070d156b7b52324cd95deea3e97ccec
5
5
  SHA512:
6
- metadata.gz: a24bc2dda1ced284c21e5f6e251f92425522e4f173f1adc55db8584cb53d8ab0302967a5441585e0e09bb4dbd34132c944373f06e79e92f78f2b3564ebcd76bb
7
- data.tar.gz: c9366d6aaca9b26e7632faa12f61c50e50e1ad5d5d5a3a43f37c75a6eb753b16add2045ce018d2fc96f1c935facd5a9919489352f604409bd22323a50523eadb
6
+ metadata.gz: cbcb834defb6bcfb0c9f700398867025eae0c89f69880e79736c944ee14aff82c1d408ce1485692f60c5e38c4ff70bebabed6d2f10a8e952c1a345ebb019396c
7
+ data.tar.gz: b4a9c367cecbea65fed73f8b5cafd38dcf4efecded0c16a8ba944b757af76d5f2412be55faf4c74f9eabe669be0c54b9cf2a62d20c2f07fb982e38e95a1ab48d
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  Related Change Logs:
4
4
  - [glimmer-dsl-swt/CHANGELOG.md](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/CHANGELOG.md)
5
5
 
6
+ ### 2.7.4
7
+
8
+ - Have `ObserveExpression` support passing an arbitrary number of arguments (not just the object and attribute) to support newer options from the Glimmer DSL like `recursive: true`
9
+
6
10
  ### 2.7.3
7
11
 
8
12
  - Support case-insensitive static expressions
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 style="position: relative; top: 20px;" />](https://rubygems.org/gems/glimmer) Glimmer 2.7.3
1
+ # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 style="position: relative; top: 20px;" />](https://rubygems.org/gems/glimmer) Glimmer 2.7.4
2
2
  ## DSL Framework for Ruby GUI and More
3
3
  [![Gem Version](https://badge.fury.io/rb/glimmer.svg)](http://badge.fury.io/rb/glimmer)
4
4
  [![rspec](https://github.com/AndyObtiva/glimmer/workflows/rspec/badge.svg)](https://github.com/AndyObtiva/glimmer/actions?query=workflow%3Arspec)
@@ -6,39 +6,54 @@
6
6
  [![Maintainability](https://api.codeclimate.com/v1/badges/38fbc278022862794414/maintainability)](https://codeclimate.com/github/AndyObtiva/glimmer/maintainability)
7
7
  [![Join the chat at https://gitter.im/AndyObtiva/glimmer](https://badges.gitter.im/AndyObtiva/glimmer.svg)](https://gitter.im/AndyObtiva/glimmer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
8
8
 
9
- **(The Original Glimmer Library Handling the World’s Ruby GUI Needs Since 2007. Beware of Imitators!)**
9
+ **[If You Liked Shoes, You'll Love Glimmer!](#faq)**
10
10
 
11
- [**(Glimmer DSL for LibUI Won a Fukuoka Ruby 2022 Special Award!)**](http://www.digitalfukuoka.jp/topics/187?locale=ja)
11
+ **(Original Glimmer Library Handling World’s Ruby GUI Needs Since 2007. Beware of Imitators!)**
12
12
 
13
- [**Glimmer**](https://rubygems.org/gems/glimmer) started out as a [GUI Library](https://github.com/AndyObtiva/glimmer-dsl-swt) and grew into a full-fledged [DSL Framework](#dsl-engine) with support for multiple GUI DSLs. Glimmer's namesake is referring to the Glimmer of Ruby in Graphical User Interfaces (contrary to [popular myth](http://blog.headius.com/2007/11/tab-sweep.html) perpetrated by [Charles Nutter](http://blog.headius.com/2007/11/tab-sweep.html), Glimmer has nothing to do with the ill-fated Whitney Houston movie, which does not in fact share the same name)
13
+ (**[Glimmer DSL for LibUI Won a Fukuoka Ruby 2022 Special Award](https://andymaleh.blogspot.com/2022/02/glimmer-dsl-for-libui-wins-fukuoka-ruby.html)** [[Announcement]](http://www.digitalfukuoka.jp/topics/187?locale=ja))
14
+
15
+ (**[***RubyConf 2023 Workshop - How To Build Desktop Applications in Ruby***](https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby)**)
16
+
17
+ (**[***RubyConf 2022 Talk - Building Native GUI Apps in Ruby***](https://andymaleh.blogspot.com/2023/02/rubyconf-2022-talk-video-for-building.html)**)
18
+
19
+ [**(Ruby Rogues Podcast Interview - Desktop Apps in Ruby ft. Andy)**](https://andymaleh.blogspot.com/2022/05/ruby-rogues-podcast-interview-desktop.html)
20
+
21
+ [GLIMMER VIDEO TUTORIAL CHANNEL](https://www.youtube.com/channel/UC5hzDE23HZXsZLAxYk2UJEw)
22
+
23
+ ![glimmer demo](https://github.com/AndyObtiva/glimmer-dsl-swt/raw/master/images/glimmer-dsl-swt-demo-hello-world.gif)
24
+
25
+ [**Glimmer**](https://rubygems.org/gems/glimmer) started out as a [GUI Library](https://github.com/AndyObtiva/glimmer-dsl-swt) and grew into a full-fledged [DSL Framework](#dsl-engine) with support for [multiple GUI DSLs](https://github.com/AndyObtiva/glimmer#glimmer-dsl-comparison-table). Glimmer's namesake is referring to the Glimmer of Ruby in Graphical User Interfaces (contrary to [popular myth](http://blog.headius.com/2007/11/tab-sweep.html) perpetrated by [Charles Nutter](http://blog.headius.com/2007/11/tab-sweep.html), Glimmer has nothing to do with the ill-fated Whitney Houston movie, which does not in fact share the same name)
14
26
 
15
27
  [<img src="https://covers.oreillystatic.com/images/9780596519650/lrg.jpg" width=105 /><br />
16
28
  Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) and [Chalmers/Gothenburg University Software Engineering Master's Lecture Material](http://www.cse.chalmers.se/~bergert/slides/guest_lecture_DSLs.pdf)
17
29
 
18
30
  [**Glimmer**](https://rubygems.org/gems/glimmer) is a DSL (Domain-Specific Language) Framework that consists of two things:
19
31
  - [DSL Engine](#dsl-engine): enables building internal DSLs embedded in Ruby (e.g. for GUI, XML, or CSS).
20
- - [Data-Binding Library](#data-binding-library): enables synchronizing GUI with Model Attributes bidirectionally **(now with [Shine](#shine-data-binding-syntax) syntax support in v2)**.
32
+ - [Data-Binding Library](#data-binding-library): enables synchronizing GUI with Model Attributes bidirectionally **(now with [Shine](#shine-data-binding-syntax) syntax support in v2, which was [originally conceived back in 2007](https://andymaleh.blogspot.com/2007/12/data-shining-in-glimmer.html))**.
21
33
 
22
34
  [**Glimmer**](https://rubygems.org/gems/glimmer) is ***the cream of the crop*** when it comes to building DSLs in Ruby:
23
35
  - Supports building the tersest most concise domain specific language syntax in Ruby.
24
36
  - Maximum readability and maintainability.
25
37
  - No extra unnecessary block variables when not needed.
26
- - DSL Blocks are true Ruby closures that can conveniently leverage variables from the outside and utilize standard Ruby code in and around. Just code in Ruby as usual and be happy! No surprising restrictions or strange uses of `instance_exec`/`eval`.
38
+ - DSL Blocks are true Ruby closures that can conveniently leverage variables from the outside and utilize standard Ruby code in and around. Just code in Ruby as usual without any hinderances! No surprising restrictions or strange uses of `instance_exec`/`eval`.
27
39
  - DSL syntax is limited to classes that mixin the `Glimmer` module, so the rest of the code is fully safe from namespace pollution.
28
40
  - Multiple DSLs may be [mixed](#multi-dsl-support) together safely to achieve maximum expressability, composability, and productivity.
29
41
  - DSLs are fully configurable, so you may activate and deactivate DSLs as per your current needs only.
30
42
 
31
- Start by checking out [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt), Glimmer's original GUI DSL (for [JRuby](https://www.jruby.org/)), which got extracted into its own gem; and [Glimmer DSL for LibUI](https://github.com/AndyObtiva/glimmer-dsl-libui), Glimmer's CRuby GUI DSL, which has no prerequisites beyond installing the Ruby gem.
43
+ Start by checking out:
44
+ - [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt), Glimmer's original GUI DSL (for [JRuby](https://www.jruby.org/)), which got extracted into its own [Ruby gem](https://rubygems.org/gems/glimmer-dsl-swt).
45
+ - [Glimmer DSL for LibUI](https://github.com/AndyObtiva/glimmer-dsl-libui), Glimmer's GUI DSL for standard [Ruby](https://www.ruby-lang.org/) (aka MRI Ruby or CRuby), which has no prerequisites beyond installing the [Ruby gem](https://rubygems.org/gems/glimmer-dsl-libui), and has won a [Fukuoka Ruby 2022 Special Award](https://andymaleh.blogspot.com/2022/02/glimmer-dsl-for-libui-wins-fukuoka-ruby.html).
32
46
 
33
- **[Glimmer](https://rubygems.org/gems/glimmer) DSL Comparison Table:**
47
+ ## [Glimmer](https://rubygems.org/gems/glimmer) DSL Comparison Table:
34
48
  DSL | Platforms | Native? | Vector Graphics? | Pros | Cons | Prereqs
35
49
  ----|-----------|---------|------------------|------|------|--------
36
50
  [Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)](https://github.com/AndyObtiva/glimmer-dsl-swt) | Mac / Windows / Linux | Yes | Yes (Canvas Shape DSL) | Very Mature / Scaffolding / Native Executable Packaging / Custom Widgets | Slow JRuby Startup Time / Heavy Memory Footprint | Java / JRuby
37
51
  [Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps)](https://github.com/AndyObtiva/glimmer-dsl-opal) | All Web Browsers | No | Yes (Canvas Shape DSL) | Simpler than All JavaScript Technologies / Auto-Webify Desktop Apps | Setup Process / Incomplete Alpha | Rails
38
52
  [Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-libui) | Mac / Windows / Linux | Yes | Yes (Area API) | Very Simple Setup / Fast Startup Time / Light Memory Footprint | LibUI is an Incomplete Mid-Alpha Only | None Other Than MRI Ruby
39
53
  [Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-tk) | Mac / Windows / Linux | Some Native-Themed Widgets (Not Truly Native) | Yes (Canvas) | Fast Startup Time / Light Memory Footprint | Complicated setup / Widgets Do Not Look Truly Native, Espcially on Linux | ActiveTcl / MRI Ruby
40
- [Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-gtk) | Mac / Windows / Linux | Only on Linux | Yes (Cairo) | Complete Access to GNOME Features on Linux | Not Native on Mac and Windows | None Other Than MRI Ruby on Linux / Brew Packages on Mac / MSYS & MING Toolchains on Windows / MRI Ruby
41
- [Glimmer DSL for FX (FOX Toolkit Ruby Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-fx) | Mac (requires XQuartz) / Windows / Linux | No | Yes (Canvas) | No Prerequisites on Windows | Widgets Do Not Look Native / Mac Usage Obtrusively Starts XQuartz | None Other Than MRI Ruby on Windows / XQuarts on Mac / MRI Ruby
54
+ [Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-gtk) | Mac / Windows / Linux | Only on Linux | Yes (Cairo) | Complete Access to GNOME Features on Linux (Forte) | Not Native on Mac and Windows | None Other Than MRI Ruby on Linux / Brew Packages on Mac / MSYS & MING Toolchains on Windows / MRI Ruby
55
+ [Glimmer DSL for FX (FOX Toolkit Ruby Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-fx) | Mac (requires XQuartz) / Windows / Linux | No | Yes (Canvas) | No Prerequisites on Windows (Forte Since Binaries Are Included Out of The Box) | Widgets Do Not Look Native / Mac Usage Obtrusively Starts XQuartz | None Other Than MRI Ruby on Windows / XQuarts on Mac / MRI Ruby
56
+ [Glimmer DSL for WX (wxWidgets Ruby Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-wx) | Mac / Windows / Linux | Yes | Yes | Fast Startup Time / Light Memory Footprint | wxruby3 is still beta and does not support Mac yet | wxWidgets, Doxygen, SWIG, GNU g++ 4.8 on Linux or RubyInstaller+DevKit on Windows
42
57
  [Glimmer DSL for JFX (JRuby JavaFX Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-jfx) | Mac / Windows / Linux | No | Yes (javafx.scene.shape and javafx.scene.canvas) | Rich in Custom Widgets | Slow JRuby Startup Time / Heavy Memory Footprint / Widgets Do Not Look Native | Java / JRuby / JavaFX SDK
43
58
  [Glimmer DSL for Swing (JRuby Swing Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-swing) | Mac / Windows / Linux | No | Yes (Java2D) | Very Mature | Slow JRuby Startup Time / Heavy Memory Footprint / Widgets Do Not Look Native | Java / JRuby
44
59
  [Glimmer DSL for XML (& HTML)](https://github.com/AndyObtiva/glimmer-dsl-xml) | All Web Browsers | No | Yes (SVG) | Programmable / Lighter-weight Than Actual XML | XML Elements Are Sometimes Not Well-Named (Many Types of Input) | None
@@ -60,9 +75,11 @@ DSL | Platforms | Native? | Vector Graphics? | Pros | Cons | Prereqs
60
75
  - [Glimmer DSL for CSS](#glimmer-dsl-for-css)
61
76
  - [Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-gtk)
62
77
  - [Glimmer DSL for FX (FOX Toolkit Ruby Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-fx)
78
+ - [Glimmer DSL for WX (wXwidgets Ruby Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-wx)
63
79
  - [Glimmer DSL for JFX (JRuby JavaFX Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-jfx)
64
80
  - [Glimmer DSL for Swing (JRuby Swing Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-swing)
65
81
  - [Data-Binding Library](#data-binding-library)
82
+ - [FAQ](#faq)
66
83
  - [Glimmer Process](#glimmer-process)
67
84
  - [Resources](#resources)
68
85
  - [Help](#help)
@@ -248,7 +265,7 @@ end
248
265
  ### Setup
249
266
 
250
267
  Follow these steps to author a [Glimmer](https://rubygems.org/gems/glimmer) DSL:
251
- - Add `gem 'glimmer', '~> 2.7.3'` to `Gemfile` and run `bundle` or run `gem install glimmer -v2.7.3` and add `require 'glimmer'`
268
+ - Add `gem 'glimmer', '~> 2.7.4'` to `Gemfile` and run `bundle` or run `gem install glimmer -v2.7.4` and add `require 'glimmer'`
252
269
  - Create `glimmer/dsl/[dsl_name]/dsl.rb`, which requires and adds all dynamic expressions for the [dsl_name] Glimmer DSL module as per the code shown in the previous section (or [Official DSLs](#official-dsls) as examples)
253
270
  - Create `glimmer/dsl/[dsl_name]/[expresion_name]_expresion.rb` for every [expresion_name] expression needed, whether dynamic or static
254
271
 
@@ -1338,6 +1355,66 @@ This example unidirectionally binds the enabled property of a widget like entry
1338
1355
 
1339
1356
  Learn more by reading the [GPG](PROCESS.md) (Glimmer Process Guidelines)
1340
1357
 
1358
+ ## FAQ
1359
+
1360
+ (Frequently Asked Questions)
1361
+
1362
+ **How do Glimmer GUI DSLs compare to Shoes?**
1363
+
1364
+ If you liked Shoes, you'll love Glimmer!
1365
+
1366
+ That is because Glimmer does everything that Shoes did, but with a lighter and better GUI DSL (Graphical User Interface Domain Specific Language) that addresses all the issues that Shoes suffered from, such as:
1367
+ - Shoes does not allow code in Shoes blocks to use variables defined outside of Shoes blocks in a straightforward manner as it changes `self` inside Shoes blocks, breaking Ruby expectations and producing confusing behavior. On the other hand, Glimmer DSL blocks are 100% standard Ruby blocks that represent real closures, so they enable usage of variables defined outside the blocks in a 100% standard Ruby way.
1368
+ - Shoes lacks support for high-quality business widget controls (View components) like table and tree. Glimmer GUI DSLs that are feature complete like Glimmer DSL for SWT do support table and tree widgets. Some non-final Glimmer GUI DSLs like Glimmer DSL for LibUI support the table control too.
1369
+ - Shoes does not encourage proper separation of concerns with a correct MVC architecture (Model-View-Controller), resulting in a lot of non-presentation logic mixed with View code. Glimmer GUI DSLs do support proper separation of concerns 100% following the MVC or MVP (Model-View-Presenter) architecture by default.
1370
+ - Shoes does not provide a simple way for connecting View components to Model data. Glimmer GUI DSLs provide full bidirectional/unidirectional data-binding support out of the box that provides the terest code syntax for connecting Views to Models and keeping them in sync.
1371
+ - Shoes does not support a native mechanism for building custom View components. Glimmer GUI DSLs do support the ability to build custom widgets (aka controls or View components), custom windows (aka shells), and custom shapes (canvas graphics), enabling software engineers to expand a Glimmer DSL’s vocabulary with new keywords representing brand new visual concepts. That results in much higher productivity by enabling the reuse of higher visual concepts as their own self-encapsulated components.
1372
+ - Shoes does not expose native features of its wrapped GUI toolkit. Glimmer GUI DSLs do expose all native features of their wrapped GUI toolkits, thus enabling developers to use a GUI toolkit like SWT directly when needed on top of using Glimmer DSL for SWT (a widget initialized via SWT directly could be passed to Glimmer DSL for SWT to wrap as a Glimmer `WidgetProxy` object and integrate with other Glimmer initialized `WidgetProxy` objects). That facilitates the 80/20 rule of having Glimmer GUI DSLs automate 80% of the work while still enabling software engineers to reach down to the low-level GUI toolkit API in 20% of the cases when needed (though in practice, it's probably more like 1% of the cases).
1373
+
1374
+ It is great that Shoes paved the way for creating desktop GUI DSLs in Ruby. Glimmer took that approach to its maximum and produced the ultimate evolution of Shoes.
1375
+
1376
+ **What is the difference between Glimmer and Glimmer DSL for SWT?**
1377
+
1378
+ Glimmer DSL for SWT was the first GUI DSL created as part of the Glimmer project to enable building desktop applications, and it was originally just called Glimmer. It relied on the Eclipse SWT library to render native GUI (Graphical User Interface) widget controls (View components) on every platform (Mac, Windows, and Linux). Eventually, the idea of a Glimmer DSL proved itself so successful and viable for building desktop apps with a fraction of the effort needed in other programming languages/technologies that it was expanded to support other GUI toolkits. So, Glimmer got renamed to Glimmer DSL for SWT, and the core Glimmer DSL engine got extracted to Glimmer (becoming a DSL framework), which then got reused to build other Glimmer GUI DSLs such as Glimmer DSL for LibUI and Glimmer DSL for GTK, among many others.
1379
+
1380
+ **What is the difference between Glimmer DSL for SWT and Glimmer DSL for LibUI?**
1381
+
1382
+ Both Glimmer DSL for SWT and Glimmer DSL for LibUI support rendering platform native widgets/controls, which enable building native desktop apps that look 100% native on every platform (Mac, Windows, and Linux).
1383
+
1384
+ However, Glimmer DSL for SWT runs in JRuby (Ruby running in the JVM [Java Virtual Machine]) whereas Glimmer DSL for LibUI runs in standard Ruby (aka MRI Ruby or CRuby).
1385
+
1386
+ Glimmer DSL for SWT is 100% feature-complete and has a final release. Glimmer DSL for LibUI is 100% complete as far as covering the LibUI features, but LibUI itself is still a mid-alpha library, so it is missing a few features that will get added eventually.
1387
+
1388
+ **What is the difference between Glimmer DSL for LibUI, Glimmer DSL for GTK, Glimmer DSL for Tk, Glimmer DSL for FX, and Glimmer DSL for WX?**
1389
+
1390
+ All of Glimmer DSL for LibUI, Glimmer DSL for GTK, Glimmer DSL for Tk, Glimmer DSL for FX, and Glimmer DSL for WX run in standard Ruby (aka MRI Ruby or CRuby).
1391
+
1392
+ However, only Glimmer DSL for LibUI and Glimmer DSL for WX render native controls on every platform. The other libraries do not render native controls on every platform, albeit Glimmer DSL for GTK renders native controls on Linux distributions utilizing Gnome.
1393
+
1394
+ Also, Glimmer DSL for LibUI does not require any prerequisites beyond installing the Ruby gem, so you can install it and get instant GUI with very little effort, whereas Glimmer DSL for GTK, Glimmer DSL for Tk, Glimmer DSL for FX, and Glimmer DSL for WX do require extra dependencies in general, albeit Glimmer DSL for GTK has everything it needs in Linux Gnome flavors and both Glimmer DSL for FX and Glimmer DSL for WX have everything they need on Windows by including pre-built binaries.
1395
+
1396
+ You may learn more about the differences between various Glimmer DSLs by checking out the [Glimmer DSL Comparison Table](#glimmer-dsl-comparison-table).
1397
+
1398
+ **What is the difference between Glimmer DSL for SWT, Glimmer DSL for Swing, and Glimmer DSL for JFX?**
1399
+
1400
+ Glimmer DSL for SWT relies on the Eclipse SWT library, which renders native widgets on every platform (Mac, Windows, and Linux) to build desktop apps that look 100% native on every platform (Mac, Windows, and Linux).
1401
+
1402
+ Glimmer DSL for Swing relies on Swing, which does not render native widgets on every platform. Glimmer DSL for JFX relies on JavaFX, which also does not render native widgets on every platform.
1403
+
1404
+ Also, SWT initializes native widgets in memory using non-Java code (e.g. C/C++), thus ensuring native OS high performance for rendering native widgets without being prone to Java garbage collection pauses. On the other hand, Swing and JavaFX initialize non-native widgets in memory using Java code, thus depend on the performance of the Java Virtual Machine while being prone to Java garbage collection pauses. As a result, SWT provides a better user experience than Swing and JavaFX.
1405
+
1406
+ You may learn more about the differences between various Glimmer DSLs by checking out the [Glimmer DSL Comparison Table](#glimmer-dsl-comparison-table).
1407
+
1408
+ **Why not just use SWT, LibUI, GTK, Tk, FOX Toolkit, wxWidgets, Swing, or JavaFX from Ruby directly?**
1409
+
1410
+ GUI Toolkits implement low-level GUI rendering concerns. And, while some of them do offer object-oriented APIs, their APIs are very verbose and imperative by design due to being low-level APIs. As such, they require software engineers to write a lot more low-level code that does not map intuitively to the structure of the GUI visually, slowing down productivity and making maintainability more expensive.
1411
+
1412
+ Glimmer GUI DSLs on the other hand are fully declarative and follow Rails' Convention Over Configuration maxim by including smart defaults and automation of low-level details, so they enable software engineers to write the simplest most minimalistic code that maps to the actual visual GUI concepts, maximizing productivity and resulting in code that is very maintainable and intuitive to reason about.
1413
+
1414
+ Furthermore, Glimmer GUI DSLs offer advanced Bidirectional/Unidirectional Data-Binding Support, which enables syncing View data with Model attributes with the tersest code syntax possible to greatly simplify reasoning about the code while supporting proper separation of concerns through correct adherence to MVC (Model-View-Controller) and MVP (Model-View-Presenter).
1415
+
1416
+ That's in addition to scaffolding and native executable packaging in some Glimmer GUI DSLs. As a result, productivity increases even further and maintainability becomes even less expensive, thus enabling software engineers to deliver pieces of software in a matter of minutes or hours for desktop application MVPs (Minimal Viable Products). As such, Glimmer GUI DSLs significantly shorten the feedback cycle and enable incrementally releasing features at a very fast pace, not possible with GUI toolkit low-level APIs.
1417
+
1341
1418
  ## Resources
1342
1419
 
1343
1420
  * [Glimmer DSL for SWT Video Tutorials](https://andymaleh.blogspot.com/search/label/Tutorial+SWT)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.7.3
1
+ 2.7.4
data/glimmer.gemspec CHANGED
@@ -2,17 +2,17 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: glimmer 2.7.3 ruby lib
5
+ # stub: glimmer 2.7.4 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "glimmer".freeze
9
- s.version = "2.7.3"
9
+ s.version = "2.7.4".freeze
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["AndyMaleh".freeze]
14
- s.date = "2022-03-26"
15
- s.description = "Glimmer is a Ruby DSL Framework for Ruby GUI and More, consisting of a DSL Engine and an Observable / Observer / Data-Binding Library (including Observable Model, Observable Array, and Observable Hash). Used in Glimmer DSL for SWT (JRuby Desktop Development GUI Framework), Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps), Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library), Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library), Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library), Glimmer DSL for FX (FOX Toolkit Ruby Desktop Development GUI Library), Glimmer DSL for Swing (JRuby Swing Desktop Development GUI Library), Glimmer DSL for JFX (JRuby JavaFX Desktop Development GUI Library), Glimmer DSL for XML (& HTML), and Glimmer DSL for CSS.".freeze
14
+ s.date = "2023-12-20"
15
+ s.description = "Glimmer is a Ruby DSL Framework for Ruby GUI and More, consisting of a DSL Engine and a Data-Binding Library (including Observer Design Pattern, Observable Model, Observable Array, and Observable Hash). Used in Glimmer DSL for SWT (JRuby Desktop Development GUI Framework), Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps), Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library and Winner of Fukuoka Ruby Award Competition 2022 Special Award), Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library), Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library), Glimmer DSL for FX (FOX Toolkit Ruby Desktop Development GUI Library), Glimmer DSL for WX (wxWidgets Ruby Desktop Development GUI Library), Glimmer DSL for Swing (JRuby Swing Desktop Development GUI Library), Glimmer DSL for JFX (JRuby JavaFX Desktop Development GUI Library), Glimmer DSL for XML (& HTML), and Glimmer DSL for CSS.".freeze
16
16
  s.email = "andy.am@gmail.com".freeze
17
17
  s.extra_rdoc_files = [
18
18
  "CHANGELOG.md",
@@ -53,39 +53,22 @@ Gem::Specification.new do |s|
53
53
  ]
54
54
  s.homepage = "http://github.com/AndyObtiva/glimmer".freeze
55
55
  s.licenses = ["MIT".freeze]
56
- s.rubygems_version = "3.3.1".freeze
56
+ s.rubygems_version = "3.5.1".freeze
57
57
  s.summary = "Glimmer - DSL Framework for Ruby GUI and More".freeze
58
58
 
59
- if s.respond_to? :specification_version then
60
- s.specification_version = 4
61
- end
59
+ s.specification_version = 4
62
60
 
63
- if s.respond_to? :add_runtime_dependency then
64
- s.add_runtime_dependency(%q<array_include_methods>.freeze, ["~> 1.4.0"])
65
- s.add_runtime_dependency(%q<facets>.freeze, [">= 3.1.0", "< 4.0.0"])
66
- s.add_development_dependency(%q<rspec-mocks>.freeze, ["~> 3.5.0"])
67
- s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
68
- s.add_development_dependency(%q<puts_debuggerer>.freeze, ["~> 0.13"])
69
- s.add_development_dependency(%q<rake>.freeze, [">= 10.1.0", "< 14.0.0"])
70
- s.add_development_dependency(%q<jeweler>.freeze, [">= 2.0.0", "< 3.0.0"])
71
- s.add_development_dependency(%q<rdoc>.freeze, [">= 6.2.1", "< 7.0.0"])
72
- s.add_development_dependency(%q<coveralls>.freeze, [">= 0"])
73
- s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.16.1"])
74
- s.add_development_dependency(%q<simplecov-lcov>.freeze, ["~> 0.7.0"])
75
- s.add_development_dependency(%q<rake-tui>.freeze, ["> 0"])
76
- else
77
- s.add_dependency(%q<array_include_methods>.freeze, ["~> 1.4.0"])
78
- s.add_dependency(%q<facets>.freeze, [">= 3.1.0", "< 4.0.0"])
79
- s.add_dependency(%q<rspec-mocks>.freeze, ["~> 3.5.0"])
80
- s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
81
- s.add_dependency(%q<puts_debuggerer>.freeze, ["~> 0.13"])
82
- s.add_dependency(%q<rake>.freeze, [">= 10.1.0", "< 14.0.0"])
83
- s.add_dependency(%q<jeweler>.freeze, [">= 2.0.0", "< 3.0.0"])
84
- s.add_dependency(%q<rdoc>.freeze, [">= 6.2.1", "< 7.0.0"])
85
- s.add_dependency(%q<coveralls>.freeze, [">= 0"])
86
- s.add_dependency(%q<simplecov>.freeze, ["~> 0.16.1"])
87
- s.add_dependency(%q<simplecov-lcov>.freeze, ["~> 0.7.0"])
88
- s.add_dependency(%q<rake-tui>.freeze, ["> 0"])
89
- end
61
+ s.add_runtime_dependency(%q<array_include_methods>.freeze, ["~> 1.4.0".freeze])
62
+ s.add_runtime_dependency(%q<facets>.freeze, [">= 3.1.0".freeze, "< 4.0.0".freeze])
63
+ s.add_development_dependency(%q<rspec-mocks>.freeze, ["~> 3.5.0".freeze])
64
+ s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0".freeze])
65
+ s.add_development_dependency(%q<puts_debuggerer>.freeze, ["~> 0.13".freeze])
66
+ s.add_development_dependency(%q<rake>.freeze, [">= 10.1.0".freeze, "< 14.0.0".freeze])
67
+ s.add_development_dependency(%q<jeweler>.freeze, [">= 2.0.0".freeze, "< 3.0.0".freeze])
68
+ s.add_development_dependency(%q<rdoc>.freeze, [">= 6.2.1".freeze, "< 7.0.0".freeze])
69
+ s.add_development_dependency(%q<coveralls>.freeze, [">= 0".freeze])
70
+ s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.16.1".freeze])
71
+ s.add_development_dependency(%q<simplecov-lcov>.freeze, ["~> 0.7.0".freeze])
72
+ s.add_development_dependency(%q<rake-tui>.freeze, ["> 0".freeze])
90
73
  end
91
74
 
@@ -30,16 +30,16 @@ module Glimmer
30
30
  def can_interpret?(parent, keyword, *args, &block)
31
31
  keyword == 'observe' and
32
32
  block_given? and
33
- (args.size == 2) and
34
- textual?(args[1])
33
+ (args.size >= 1) and
34
+ (args[1].nil? || args[1].is_a?(Hash) || textual?(args[1]))
35
35
  end
36
36
 
37
37
  def interpret(parent, keyword, *args, &block)
38
38
  observer = DataBinding::Observer.proc(&block)
39
39
  if args[1].to_s.match(REGEX_NESTED_OR_INDEXED_PROPERTY)
40
- observer_registration = observer.observe(DataBinding::ModelBinding.new(args[0], args[1]))
40
+ observer_registration = observer.observe(DataBinding::ModelBinding.new(*args))
41
41
  else
42
- observer_registration = observer.observe(args[0], args[1])
42
+ observer_registration = observer.observe(*args)
43
43
  end
44
44
  observer_registration
45
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.3
4
+ version: 2.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-26 00:00:00.000000000 Z
11
+ date: 2023-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: array_include_methods
@@ -203,15 +203,17 @@ dependencies:
203
203
  - !ruby/object:Gem::Version
204
204
  version: '0'
205
205
  description: Glimmer is a Ruby DSL Framework for Ruby GUI and More, consisting of
206
- a DSL Engine and an Observable / Observer / Data-Binding Library (including Observable
206
+ a DSL Engine and a Data-Binding Library (including Observer Design Pattern, Observable
207
207
  Model, Observable Array, and Observable Hash). Used in Glimmer DSL for SWT (JRuby
208
208
  Desktop Development GUI Framework), Glimmer DSL for Opal (Pure Ruby Web GUI and
209
209
  Auto-Webifier of Desktop Apps), Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop
210
- Development GUI Library), Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library),
211
- Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library), Glimmer DSL for
212
- FX (FOX Toolkit Ruby Desktop Development GUI Library), Glimmer DSL for Swing (JRuby
213
- Swing Desktop Development GUI Library), Glimmer DSL for JFX (JRuby JavaFX Desktop
214
- Development GUI Library), Glimmer DSL for XML (& HTML), and Glimmer DSL for CSS.
210
+ Development GUI Library and Winner of Fukuoka Ruby Award Competition 2022 Special
211
+ Award), Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library), Glimmer DSL
212
+ for GTK (Ruby-GNOME Desktop Development GUI Library), Glimmer DSL for FX (FOX Toolkit
213
+ Ruby Desktop Development GUI Library), Glimmer DSL for WX (wxWidgets Ruby Desktop
214
+ Development GUI Library), Glimmer DSL for Swing (JRuby Swing Desktop Development
215
+ GUI Library), Glimmer DSL for JFX (JRuby JavaFX Desktop Development GUI Library),
216
+ Glimmer DSL for XML (& HTML), and Glimmer DSL for CSS.
215
217
  email: andy.am@gmail.com
216
218
  executables: []
217
219
  extensions: []
@@ -269,7 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
269
271
  - !ruby/object:Gem::Version
270
272
  version: '0'
271
273
  requirements: []
272
- rubygems_version: 3.3.1
274
+ rubygems_version: 3.5.1
273
275
  signing_key:
274
276
  specification_version: 4
275
277
  summary: Glimmer - DSL Framework for Ruby GUI and More