first steps to submitting - boost :: observers
G'afternoon, This is my first time submitting to a public repo, please be gentle I'd like to submit a series of classes I have been using since '90. The initial set implements a thread safe subject/observer pattern. I have included a handful of example programs, two fairly trivial and the third more in-depth. All examples are single file examples to make compilation trivial. This is the first re-work of my original tools, making them more boost-friendly. I expect to add more default observer templates and observable objects, but that will come with time. WHY? -- The reason for these classes is to help insure the mathematical integrity of your data model in relation to your business rules. If at any time you were to change one of your data elements without updating all those dependent on it, then your data integrity would be compromised. These classes look to solve that. As an example: -- using namespace boost::observers ; Numeric<long> x, y, z ; // rules: y = x + 2; z = y * 3 ; x = 5 ; printf( "%d \n", z ) ; x = 1 ; printf( "%d \n", z ) ; -- Setting the rules properly, the classes allow for 'z' to be correct each time it's printed using code almost exactly like this. This will remove the possibility of accidently forgetting to trigger the rule update. WHERE? -- The repo can be found here: git clone https://github.com/tiny/boost_observers.git Any input on how to continue from this point would also be much appreciated. I have skype and ventrilo servers available if that helps. Thanks in advance, Rob -- Robert McInnis
Robert:
Its nice to see people getting involved with the energy and desire to
contribute. Looking briefly through the materials that you provided, I
think that the addition of a few things would make your library much
more appealing and presentable:
1. Html documentation
2. Some continuous integration, e.g. Travis or CircleCI, code coverage report
3. More explanation and examples of how this might be relevant / which
use cases it addresses
There are several resources out there which help folks who want to
submit their libraries to the Boost review process. One I found is:
https://svn.boost.org/trac/boost/wiki/BestPracticeHandbook
There are also some things that you can do which will better prepare
your library for a review, they are described here:
http://www.boost.org/development/requirements.html
Hope this helps!
Vinnie
On Sat, Sep 17, 2016 at 2:10 PM, Robert McInnis
G'afternoon,
This is my first time submitting to a public repo, please be gentle
I'd like to submit a series of classes I have been using since '90. The initial set implements a thread safe subject/observer pattern. I have included a handful of example programs, two fairly trivial and the third more in-depth. All examples are single file examples to make compilation trivial.
This is the first re-work of my original tools, making them more boost-friendly. I expect to add more default observer templates and observable objects, but that will come with time.
WHY?
--
The reason for these classes is to help insure the mathematical integrity of your data model in relation to your business rules. If at any time you were to change one of your data elements without updating all those dependent on it, then your data integrity would be compromised. These classes look to solve that.
As an example:
--
using namespace boost::observers ;
Numeric<long> x, y, z ;
// rules: y = x + 2; z = y * 3 ;
x = 5 ;
printf( "%d \n", z ) ;
x = 1 ;
printf( "%d \n", z ) ;
--
Setting the rules properly, the classes allow for 'z' to be correct each time it's printed using code almost exactly like this. This will remove the possibility of accidently forgetting to trigger the rule update.
WHERE?
--
The repo can be found here: git clone https://github.com/tiny/boost_observers.git
Any input on how to continue from this point would also be much appreciated. I have skype and ventrilo servers available if that helps.
Thanks in advance,
Rob
--
Robert McInnis
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Follow me on Github: https://github.com/vinniefalco
Thanks for the advice, Vinnie.
I added a quick doc explaining how and why to use the general object
pattern.
http://htmlpreview.github.io/?https://github.com/tiny/boost_observers/blob/m
aster/doc/boost_observers.htm
^ that should allow you to view the html page
I'll add more objects if these are interesting and useful to people. The
event template is already there, though I didn't describe it in the docs
(I'll keep adding). Observable containers are probably the most useful and
would be the classes I would add next.
Would you say this is similar to most sub libs that get submitted?
Rob
-----Original Message-----
From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Vinnie Falco
Sent: Saturday, September 17, 2016 3:59 PM
To: boost@lists.boost.org
Subject: Re: [boost] first steps to submitting - boost :: observers
Robert:
Its nice to see people getting involved with the energy and desire to
contribute. Looking briefly through the materials that you provided, I think
that the addition of a few things would make your library much more
appealing and presentable:
1. Html documentation
2. Some continuous integration, e.g. Travis or CircleCI, code coverage
report
3. More explanation and examples of how this might be relevant / which use
cases it addresses
There are several resources out there which help folks who want to submit
their libraries to the Boost review process. One I found is:
https://svn.boost.org/trac/boost/wiki/BestPracticeHandbook
There are also some things that you can do which will better prepare your
library for a review, they are described here:
http://www.boost.org/development/requirements.html
Hope this helps!
Vinnie
On Sat, Sep 17, 2016 at 2:10 PM, Robert McInnis
G'afternoon,
This is my first time submitting to a public repo, please be gentle
I'd like to submit a series of classes I have been using since '90. The initial set implements a thread safe subject/observer pattern. I have included a handful of example programs, two fairly trivial and the third more in-depth. All examples are single file examples to make compilation trivial.
This is the first re-work of my original tools, making them more boost-friendly. I expect to add more default observer templates and observable objects, but that will come with time.
WHY?
--
The reason for these classes is to help insure the mathematical integrity of your data model in relation to your business rules. If at any time you were to change one of your data elements without updating all those dependent on it, then your data integrity would be compromised. These classes look to solve that.
As an example:
--
using namespace boost::observers ;
Numeric<long> x, y, z ;
// rules: y = x + 2; z = y * 3 ;
x = 5 ;
printf( "%d \n", z ) ;
x = 1 ;
printf( "%d \n", z ) ;
--
Setting the rules properly, the classes allow for 'z' to be correct each time it's printed using code almost exactly like this. This will remove the possibility of accidently forgetting to trigger the rule update.
WHERE?
--
The repo can be found here: git clone https://github.com/tiny/boost_observers.git
Any input on how to continue from this point would also be much appreciated. I have skype and ventrilo servers available if that helps.
Thanks in advance,
Rob
--
Robert McInnis
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Follow me on Github: https://github.com/vinniefalco _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
On September 18, 2016 2:39:58 AM EDT, Robert McInnis
Thanks for the advice, Vinnie.
When posting to the Boost Developers mailing list, please follow the policies at http://www.boost.org/community/policy.html#quoting. Note particularly not to top post or over-quote.
I added a quick doc explaining how and why to use the general object pattern.
http://htmlpreview.github.io/?https://github.com/tiny/boost_observers/blob/m aster/doc/boost_observers.htm
^ that should allow you to view the html page
How does your library differ from Boost.Signals2* aside from your apparent use (reliance?) on active objects rather than providing components to make publishers and subscribers? * http://www.boost.org/doc/libs/1_61_0/doc/html/signals2.html#idp394515904 -- Rob (Sent from my portable computation device.)
On 09/18/2016 01:39 AM, Robert McInnis wrote:
Thanks for the advice, Vinnie.
I added a quick doc explaining how and why to use the general object pattern.
http://htmlpreview.github.io/?https://github.com/tiny/boost_observers/blob/m aster/doc/boost_observers.htm
^ that should allow you to view the html page
[snip] On page that page, under the section: How do I use it? the variables x, y, and z are of type: boost::observers::Numeric< long > yet the description says: We now have three(3) observables X, Y, and Z. which is confusing. Are they observers (as the type name suggests), or are they observables (as the descriptions suggests). Also, the description uses capital letters, but the code uses small letters. It would ease the reading if better names were used ;( -regards, Larry
Larry Evans wrote:
the variables x, y, and z are of type:
boost::observers::Numeric< long >
yet the description says:
We now have three(3) observables X, Y, and Z.
which is confusing. Are they observers (as the type name suggests), or are
they observables (as the descriptions suggests). I had considered having two sub lib names, observers and observables, but was unsure how that would be received. If that's ok, I can make that change. My personal library is called 'GOTools' for 'guarded and observable tools'. I didn't go with that as most would have no idea what it meant. The original Subject class was called MsgCB, but that was originally done around 1991 and doesn't quite fit with the observer pattern as described. Many times I've had objects with multiple Subjects to observe (usually UI objects). Hooking the activateCB on one button would trigger a hide/show on another UI component. Or maybe the rgbCB would trigger as the user drags the control, which would trigger an image to re-render using the new colors. Flexibility is the key and the ability for the developer to make any event produced by any object, observed by any other object, is the goal.
Also, the description uses capital letters, but the code uses small letters.
It would ease the reading if better names were used ;(
I used X, Y, and Z as the formulas are simple algebraic equations. I've modified the case to match. Lower case felt like it 'got lost' in the description text
On 17 Sep 2016 7:18 pm, "Robert McInnis"
G'afternoon,
This is my first time submitting to a public repo, please be gentle
Welcome to the meat grinder :)
I'd like to submit a series of classes I have been using since '90. The initial set implements a thread safe subject/observer pattern. I have included a handful of example programs, two fairly trivial and the third more in-depth. All examples are single file examples to make compilation trivial.
This is the first re-work of my original tools, making them more boost-friendly. I expect to add more default observer templates and observable objects, but that will come with time.
I do like the idea. It seems vaguely related to Functional Reactive Programming (of which I have no experience). It would be nice to have a discussion of similarities and differences. Possibly this is discussed in the docs, but they are not immediately accessible via mobile. I would like thread safety to be optional. A few quick comments: * Code conventions do not follow the boost stile. * Macros are injected outside the BOOST namespace. * Lock free mutexes aren't. -- gpd
On Sunday, September 18, 2016 7:23 PM Giovanni Piero Deretta said:
Welcome to the meat grinder :)
Thanks, I think. ;)
I do like the idea. It seems vaguely related to Functional Reactive Programming (of which I have no experience). It would be nice to have a discussion of similarities and differences. Possibly this is discussed in the docs, but they are not immediately accessible via mobile. I would like thread safety to be optional.
Triggering the observers into action when an object fires off an event is definitely reactive programming. Designing a data model and rule set around such constructs immediately produces dependency driven calculations. Dependency driven calcs would be the minimalist set of calculations required when updating a data model. The original system I created with these tools was a tax system (US tax code). Hundreds of forms each with numerous interdependent calculations. Prior to these tools, making any change would require a full re-calc of the entire data model. This actually took a significant amount of time back then (66MHz box would take 5+ minutes). Once we implemented the calcs using dependency driven calcs, re-calcs were no longer needed. The data would refresh within a blink, as a fraction of the data needed to be updated due to the change. Beyond simple data model updates, I would make UI elements react to changes in the various dependent fields. This allowed for the UI to be updated immediately whenever the data changed and just that element, not all elements would necessarily have to be updated. Here is a screencap of one of the forms being worked on. http://i.imgur.com/XCunjx3.jpg BTW, I have added oVector and oMap to the observables folder (the 'o' in oVector means observable) along with two simple test programs. This would allow for the developer to be notified whenever new data arrived in one of those containers (and maybe update the list on the screen).
participants (5)
-
Giovanni Piero Deretta
-
Larry Evans
-
Rob Stewart
-
Robert McInnis
-
Vinnie Falco