hutch-xamplr 1.1.4 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +18 -110
- data/README.rdoc.orig +118 -0
- data/Rakefile +26 -0
- data/VERSION.yml +2 -2
- metadata +5 -3
data/README.rdoc
CHANGED
@@ -1,117 +1,25 @@
|
|
1
1
|
= xamplr
|
2
2
|
|
3
|
-
xamplr is a
|
4
|
-
of xampl. It facilitates the 'M' part of an MVC architecture. It
|
5
|
-
is meant to be very easy to use, supportive of idiomatic Ruby usage,
|
6
|
-
and mostly invisible.
|
7
|
-
|
8
|
-
With it's current lack of documentation it will be hard to get going
|
9
|
-
with xampl. I am working on documentation that will be appearing
|
10
|
-
over the next little while, in the meantime if you are willing to
|
11
|
-
wade through a blog, you might try looking at:
|
12
|
-
|
13
|
-
http://recursive.ca/hutch/category/software/tools-i-use/xampl/
|
3
|
+
xamplr is a set of software tools that supports development of ruby applications.
|
14
4
|
|
15
5
|
Features:
|
16
|
-
-
|
17
|
-
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
- code generation is template driven, so the adventurous can change what
|
34
|
-
is generated
|
35
|
-
- includes a simple but powerful and fast templating engine
|
36
|
-
- includes a simple-minded but effective hash-like class that maintains
|
37
|
-
insertion order (fast insertion, lookup, and iteration, but at the
|
38
|
-
expense of delete)
|
39
|
-
- naming conventions are used when generating code (but these conventions
|
40
|
-
can be changed)
|
41
|
-
- additions to the XML will very rarely break existing code, and so
|
42
|
-
incremental development of functionality is supported
|
43
|
-
- generated code is readable and debuggable
|
44
|
-
- a command line tool to generate the code, or you can generate at runtime
|
45
|
-
- XML binding to the classes (i.e. parsing an XML file will produce an
|
46
|
-
object graph)
|
47
|
-
- can augment existing classes
|
48
|
-
- programmer adds functionality by opening the class or module, no worries
|
49
|
-
about the code generator overwriting your changes
|
50
|
-
- object structures can generate XML output (and there is an XML pretty
|
51
|
-
printer used for emphasising human readable XML output)
|
52
|
-
- easy to use persistence mechanism
|
53
|
-
- persistence is in terms of clusters of objects, the cluster is updated
|
54
|
-
all at once
|
55
|
-
- lazy loading of persisted clusters
|
56
|
-
- LRU cache (of clusters)
|
57
|
-
- the changed clusters are available for inspection
|
58
|
-
- XML, Ruby, and YAML persistence mechanism (purposely no Marshal support)
|
59
|
-
- persist to memory, or hard drive (optional persistence to an FSDB)
|
60
|
-
- sync and rollback (even with memory persistence); this is a weak form
|
61
|
-
of transaction support
|
62
|
-
- 'automatic' and 'manual' modes of persistence ('automatic' means that
|
63
|
-
any xampl cluster created while a persister is active will be
|
64
|
-
automatically managed by that persister, manual means that you have
|
65
|
-
to introduce the xampl cluster to the persister)
|
66
|
-
- fast alternative to persistence that does not support rollback
|
67
|
-
- xampl objects can hold arbitrary attribute values through the
|
68
|
-
persistence 'cycle' if using Ruby or YAML persistence (even xampl
|
69
|
-
object); with XML you won't loose anything but all attributes will
|
70
|
-
be strings after restoration.
|
71
|
-
- multiple persisters, possibly with differing persistence mechanisms,
|
72
|
-
are supported
|
73
|
-
- dead easy single user applications (e.g. desktop apps, CGI), almost as
|
74
|
-
easy for multiple user applications and webapps
|
75
|
-
- you can add your own persister types (and formats for that matter)
|
76
|
-
- general purpose Visitor pattern facility, with pre and post visit methods,
|
77
|
-
cycle and revisit detection and handling
|
78
|
-
- lots of hooks
|
79
|
-
- many unit tests, all execute without warning when run with the -w Ruby flag
|
80
|
-
- there are some examples, and the beginnings of a tutorial in the form of
|
81
|
-
a series of examples that lead you through the core parts of xampl
|
82
|
-
|
83
|
-
Features that are coming soon:
|
84
|
-
- many more hooks
|
85
|
-
- more sophisticated augmentation of existing classes
|
86
|
-
- indexing and querying of the persisted object structures
|
87
|
-
- more persisters (e.g. sqlite)
|
88
|
-
- real transactions
|
89
|
-
- a better comparison function (that deals with cyclic structures at all, and
|
90
|
-
better with non-tree acyclic structures)
|
91
|
-
|
92
|
-
Known Bugs or Potential Problems or Suspected Problems
|
93
|
-
- generated attribute names may conflict with Ruby keywords and this is not
|
94
|
-
a nice thing to witness (this is easy to fix, but I don't want to do this
|
95
|
-
until the next release at the earliest)
|
96
|
-
- I don't know if this will work on Windows -- I tried, but I don't have a
|
97
|
-
windows machine to test this with -- there might be some pathname stuff
|
98
|
-
assuming unix (but I hope not)
|
99
|
-
- some of the code is unnecessarily ugly (e.g. some of the visitor internals)
|
100
|
-
- there are no Ruby docs (but I promise... really)
|
101
|
-
- comparison of cyclic structures will crash
|
102
|
-
|
103
|
-
License: AGPLv3 (see COPYING). An alternative license may be negotiated, contact me.
|
104
|
-
|
105
|
-
While the Ruby version of xampl is brand new it is based on a Java
|
106
|
-
tool that I've been developing since 1998 and in its fifth generation.
|
107
|
-
There are many features in the Java version that are not available in
|
108
|
-
this library, but that is either just a matter of time, or they will
|
109
|
-
never be needed because Ruby programs don't need the help.
|
110
|
-
|
111
|
-
The Java version of the tool has been used to write a number of large
|
112
|
-
webapps, and a few smaller desktop applications, and even an applet.
|
113
|
-
|
114
|
-
There is a Common Lisp/CLOS version coming.
|
6
|
+
- supports Domain Driven Design in Ruby
|
7
|
+
- persistence ignornace
|
8
|
+
- clusters, entities, 'regular' objects, and repositories (corresponding approximately to DDD's aggregates, entities, value objects, and repositories)
|
9
|
+
- different peristence techniques including filesystem (XML format) and Tokyo Cabinet
|
10
|
+
- transaction support
|
11
|
+
- querying
|
12
|
+
- fast development, fast execution
|
13
|
+
- has been in use in commercial software since 2004, a Java version has been in use since 1998.
|
14
|
+
|
15
|
+
Anti-Features:
|
16
|
+
- absymal lack of documentation. If you are brave and willing to wade through (old) blog entries, you might try looking at:
|
17
|
+
|
18
|
+
http://recursive.ca/hutch/category/software/tools-i-use/xampl/
|
19
|
+
|
20
|
+
License: For the moment it is AGPLv3 (see COPYING). An alternative license
|
21
|
+
may be negotiated, contact me. In the near future this license will be
|
22
|
+
relaxed.
|
115
23
|
|
116
24
|
== Copyright
|
117
25
|
|
data/README.rdoc.orig
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
= xamplr
|
2
|
+
|
3
|
+
xamplr is a tool for developing Ruby programs, the ruby implementation
|
4
|
+
of xampl. It facilitates the 'M' part of an MVC architecture. It
|
5
|
+
is meant to be very easy to use, supportive of idiomatic Ruby usage,
|
6
|
+
and mostly invisible.
|
7
|
+
|
8
|
+
With it's current lack of documentation it will be hard to get going
|
9
|
+
with xampl. I am working on documentation that will be appearing
|
10
|
+
over the next little while, in the meantime if you are willing to
|
11
|
+
wade through a blog, you might try looking at:
|
12
|
+
|
13
|
+
http://recursive.ca/hutch/category/software/tools-i-use/xampl/
|
14
|
+
|
15
|
+
Features:
|
16
|
+
- pure Ruby, no libraries required except those shipped with Ruby 1.8.2
|
17
|
+
- uses XML to declaratively describe a class structure
|
18
|
+
- uses a collection of example XML documents, no schema are required
|
19
|
+
- supports arbitrary object graphs, not just XML-like trees
|
20
|
+
- Ruby idiomatic facilities to navigate the object structures (e.g. named
|
21
|
+
arrays, hash, iterator support, uses blocks, etc.)
|
22
|
+
- support empty, simple (text content only), data (no or limited text
|
23
|
+
content, but with arbitrary element content), and mixed content (where
|
24
|
+
text and element content can be intermingled)
|
25
|
+
- maintains 'document order' of objects
|
26
|
+
- keeps track of parents
|
27
|
+
- can compare two clusters for equality (limited, but will be improved)
|
28
|
+
- maps XML namespaces to Ruby modules (with handy defaults) and you can
|
29
|
+
suggest preferred namespace prefixes for XML output
|
30
|
+
- converts XML element and attributes names to valid (and predictable)
|
31
|
+
Ruby names
|
32
|
+
- includes an XML pull parser (very fast)
|
33
|
+
- code generation is template driven, so the adventurous can change what
|
34
|
+
is generated
|
35
|
+
- includes a simple but powerful and fast templating engine
|
36
|
+
- includes a simple-minded but effective hash-like class that maintains
|
37
|
+
insertion order (fast insertion, lookup, and iteration, but at the
|
38
|
+
expense of delete)
|
39
|
+
- naming conventions are used when generating code (but these conventions
|
40
|
+
can be changed)
|
41
|
+
- additions to the XML will very rarely break existing code, and so
|
42
|
+
incremental development of functionality is supported
|
43
|
+
- generated code is readable and debuggable
|
44
|
+
- a command line tool to generate the code, or you can generate at runtime
|
45
|
+
- XML binding to the classes (i.e. parsing an XML file will produce an
|
46
|
+
object graph)
|
47
|
+
- can augment existing classes
|
48
|
+
- programmer adds functionality by opening the class or module, no worries
|
49
|
+
about the code generator overwriting your changes
|
50
|
+
- object structures can generate XML output (and there is an XML pretty
|
51
|
+
printer used for emphasising human readable XML output)
|
52
|
+
- easy to use persistence mechanism
|
53
|
+
- persistence is in terms of clusters of objects, the cluster is updated
|
54
|
+
all at once
|
55
|
+
- lazy loading of persisted clusters
|
56
|
+
- LRU cache (of clusters)
|
57
|
+
- the changed clusters are available for inspection
|
58
|
+
- XML, Ruby, and YAML persistence mechanism (purposely no Marshal support)
|
59
|
+
- persist to memory, or hard drive (optional persistence to an FSDB)
|
60
|
+
- sync and rollback (even with memory persistence); this is a weak form
|
61
|
+
of transaction support
|
62
|
+
- 'automatic' and 'manual' modes of persistence ('automatic' means that
|
63
|
+
any xampl cluster created while a persister is active will be
|
64
|
+
automatically managed by that persister, manual means that you have
|
65
|
+
to introduce the xampl cluster to the persister)
|
66
|
+
- fast alternative to persistence that does not support rollback
|
67
|
+
- xampl objects can hold arbitrary attribute values through the
|
68
|
+
persistence 'cycle' if using Ruby or YAML persistence (even xampl
|
69
|
+
object); with XML you won't loose anything but all attributes will
|
70
|
+
be strings after restoration.
|
71
|
+
- multiple persisters, possibly with differing persistence mechanisms,
|
72
|
+
are supported
|
73
|
+
- dead easy single user applications (e.g. desktop apps, CGI), almost as
|
74
|
+
easy for multiple user applications and webapps
|
75
|
+
- you can add your own persister types (and formats for that matter)
|
76
|
+
- general purpose Visitor pattern facility, with pre and post visit methods,
|
77
|
+
cycle and revisit detection and handling
|
78
|
+
- lots of hooks
|
79
|
+
- many unit tests, all execute without warning when run with the -w Ruby flag
|
80
|
+
- there are some examples, and the beginnings of a tutorial in the form of
|
81
|
+
a series of examples that lead you through the core parts of xampl
|
82
|
+
|
83
|
+
Features that are coming soon:
|
84
|
+
- many more hooks
|
85
|
+
- more sophisticated augmentation of existing classes
|
86
|
+
- indexing and querying of the persisted object structures
|
87
|
+
- more persisters (e.g. sqlite)
|
88
|
+
- real transactions
|
89
|
+
- a better comparison function (that deals with cyclic structures at all, and
|
90
|
+
better with non-tree acyclic structures)
|
91
|
+
|
92
|
+
Known Bugs or Potential Problems or Suspected Problems
|
93
|
+
- generated attribute names may conflict with Ruby keywords and this is not
|
94
|
+
a nice thing to witness (this is easy to fix, but I don't want to do this
|
95
|
+
until the next release at the earliest)
|
96
|
+
- I don't know if this will work on Windows -- I tried, but I don't have a
|
97
|
+
windows machine to test this with -- there might be some pathname stuff
|
98
|
+
assuming unix (but I hope not)
|
99
|
+
- some of the code is unnecessarily ugly (e.g. some of the visitor internals)
|
100
|
+
- there are no Ruby docs (but I promise... really)
|
101
|
+
- comparison of cyclic structures will crash
|
102
|
+
|
103
|
+
License: AGPLv3 (see COPYING). An alternative license may be negotiated, contact me.
|
104
|
+
|
105
|
+
While the Ruby version of xampl is brand new it is based on a Java
|
106
|
+
tool that I've been developing since 1998 and in its fifth generation.
|
107
|
+
There are many features in the Java version that are not available in
|
108
|
+
this library, but that is either just a matter of time, or they will
|
109
|
+
never be needed because Ruby programs don't need the help.
|
110
|
+
|
111
|
+
The Java version of the tool has been used to write a number of large
|
112
|
+
webapps, and a few smaller desktop applications, and even an applet.
|
113
|
+
|
114
|
+
There is a Common Lisp/CLOS version coming.
|
115
|
+
|
116
|
+
== Copyright
|
117
|
+
|
118
|
+
Copyright (c) 2009 Bob Hutchison. See LICENSE and COPYING for details.
|
data/Rakefile
CHANGED
@@ -9,6 +9,7 @@ begin
|
|
9
9
|
gem.email = "hutch@recursive.ca"
|
10
10
|
gem.homepage = "http://github.com/hutch/xamplr"
|
11
11
|
gem.authors = ["Bob Hutchison"]
|
12
|
+
gem.rubyforge_project = 'xampl'
|
12
13
|
|
13
14
|
gem.add_dependency('hutch-xamplr-pp')
|
14
15
|
gem.add_dependency('libxml-ruby', ">=1.1.3")
|
@@ -57,3 +58,28 @@ Rake::RDocTask.new do |rdoc|
|
|
57
58
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
58
59
|
end
|
59
60
|
|
61
|
+
begin
|
62
|
+
require 'rake/contrib/sshpublisher'
|
63
|
+
namespace :rubyforge do
|
64
|
+
|
65
|
+
desc "Release gem and RDoc documentation to RubyForge"
|
66
|
+
task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
|
67
|
+
|
68
|
+
namespace :release do
|
69
|
+
desc "Publish RDoc to RubyForge."
|
70
|
+
task :docs => [:rdoc] do
|
71
|
+
config = YAML.load(
|
72
|
+
File.read(File.expand_path('~/.rubyforge/user-config.yml'))
|
73
|
+
)
|
74
|
+
|
75
|
+
host = "#{config['username']}@rubyforge.org"
|
76
|
+
remote_dir = "/var/www/gforge-projects/xampl/"
|
77
|
+
local_dir = 'rdoc'
|
78
|
+
|
79
|
+
Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
rescue LoadError
|
84
|
+
puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
|
85
|
+
end
|
data/VERSION.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hutch-xamplr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Hutchison
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-07 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -41,10 +41,12 @@ extensions: []
|
|
41
41
|
extra_rdoc_files:
|
42
42
|
- LICENSE
|
43
43
|
- README.rdoc
|
44
|
+
- README.rdoc.orig
|
44
45
|
files:
|
45
46
|
- CHANGES.txt
|
46
47
|
- LICENSE
|
47
48
|
- README.rdoc
|
49
|
+
- README.rdoc.orig
|
48
50
|
- Rakefile
|
49
51
|
- VERSION.yml
|
50
52
|
- examples/random-people-shared-addresses/Makefile
|
@@ -203,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
205
|
version:
|
204
206
|
requirements: []
|
205
207
|
|
206
|
-
rubyforge_project:
|
208
|
+
rubyforge_project: xampl
|
207
209
|
rubygems_version: 1.2.0
|
208
210
|
signing_key:
|
209
211
|
specification_version: 2
|