Does Ruby generate WINDOWS and dialog boxes?

Suraj Kurapati wrote:

David Vallner wrote:

Suraj Kurapati wrote:

I don't know why people hate it so much. They seem to prefer "desktop integration" and eye-candy instead of clean, functional interfaces. Sigh. :frowning:

Some of us have to "sell" software, at least to managers - then it matters.

Bingo! That's where we differ. I don't sell software so I haven't had to deal with market pressures and bosses and customers, etc. Thus, my claim might have more merit when viewed in the interest of programmer productivity/laziness.

I write most of my software for myself, and I'm fantastically lazy (to point of borderline clinical death), but I'm with David. Tk hurts my eyes. It annoys me in subtle ways that, over time, crawl under my skin and gnaw at my tendons and bones. Ow!

Looks matter.

···

--
James Britt

"Inside every large system there's a small system trying to get out".
    - Chet Hendrickson

Har!

A better reaction than I expected. And a better reaction than mine would
have been at that time of day too. Thanks for seeing through the flames,
and yes, for personal code, all technology calls are off by default.

David Vallner

Richard wrote:

Most of the
in-browser desktop mockups make me ask why not use Java Web Start /
ClickOnce / Flex anyway?

IMHO, Ruby + Rails is a far superior way to build both desktop and web
apps. Java is, too my taste, a lousy C++, which I felt is the most
elegant programming language ever. But I've come to see that Ruby is
the most economical yet powerful (in terms of programmer effort)
languages ever. Of course, I'm not really qualified to make such
judgments, despite 40+ years of professional programming experience
with IBM mainframe assembler, Fortran, and Cobol to desktop Visual C++.

For the client-side logic, you're still stuck to HTML and Javascript,
which are both flawed in their way. While web frameworks help with that,
it's still artificially shifting logic that could as well be done
client-side (validation which only requires checking against the data
the client is already operating on already, paginating content,
formatting data, etc.) I mentioned the above technologies because they
exist, while I'm not aware of any way to easily keep a Ruby-based client
program up-to-date conveniently, or even deliver it cross-platform
easily because of the dependency on native extensions.

I'm not very sure how Rails would be suitable to make desktop
applications, the framework doesn't seem to have a discernable core for
action processing that would be unaware of web idiosyncracies. I might
be wrong.

The namedropped (in a snarky way) experience is ad verecundiam, a
logical fallacy. To respond to it any more would be stooping down to the
same level.

I see by your disdain of some aspects of the current state of affairs
that you've thought a lot about some of these issues, so I'm
interested in knowing whether you're more sanguine about the
Ruby-Rails-WEBrick-MySQL environment.

Ruby is fine if you can juggle the complexity, but it requires more
programmer competence and dilligence for the software to be robust - a
quality that grows with importance the closer to end users you get.

I'm past my "Oooh, shiny!" Rails phase. Scaffolding is nice, yet in a
way just smoke and mirrors, ActiveRecord is just way too basic as an ORM
solution and not much simpler to use once enough of its assumptions on
the data model and physical DB schema don't hold. Convention over
configuration gets hairy in complex deployment scenarios - table names
changing (having to accomodate to a weird naming convention between
prototype and production) mean a recode, and generally the magic becomes
harmful if you need to separate the object model from the tables and
columns. I don't think this applies to your scenario though.

WEBrick is a development server. Probably Good Enough for a one server -
one user scenario, but I don't think it's meant to handle more.

As for MySQL, I more or less share the attitude of Austin Ziegler on it.
Most of MySQL users are mentally stuck with v3.x and make data schemas
that would make an onion cry. Mentioning "no security risks" if you let
arbitrary clients access your database is debatable though, I thought
you're supposed to keep production data storage behind a firewall.
Giving end-users write-access credentials sounds like way too much
potential for a malicious user to do damage to me, unless you only allow
write access through secured stored procedures, or bend your model
backwards for table-level restrictions to be sufficient. I'll have to
disclaim though that I'm far from a security expert, so the above are to
an extend half-educated guesses.

As for the whole environment, my work experience so far has been in
scenarios where that would blow up on data schema brittleness, or the
generations-of-maintaining-interns syndrome. As for any such solution
template, there are assumptions that must hold before the solution can
be an effective one. The "we have a hammer, now every problem is a nail"
approach is a very destructive self-delusion (to wit: J2EE's rap of
being overcomplex after hype led to it being used for the wrong range of
problems.) Since I don't know your problem, and the umpty other factors
that have to be considered when creating a software system's
architecture (the target audience, the deployment requirements, the
performance requirements, how well does the domain model map to being
handled over the web), I can't judge whether the approach you outlined
is a good fit. This is hugely digressing from the original topic though.

David Vallner

Wow! Someone used the words "C++" and "elegant" in the same sentence
without a negative in between and with no hint of irony.

···

On Mon, 2006-18-12 at 04:50 +0900, Richard wrote:

IMHO, Ruby + Rails is a far superior way to build both desktop and web
apps. Java is, too my taste, a lousy C++, which I felt is the most
elegant programming language ever.

--
Michael T. Richter
Email: ttmrichter@gmail.com, mtr1966@hotpop.com
MSN: ttmrichter@hotmail.com, mtr1966@hotmail.com; YIM:
michael_richter_1966; AIM: YanJiahua1966; ICQ: 241960658; Jabber:
mtr1966@jabber.cn

"I have no purpose, directly or indirectly, to interfere with the
institution of slavery in the States where it exists." --Abraham Lincoln

Martin DeMello wrote:

Apart from the TkCanvas, which is utterly brilliant. How many other
toolkits give you a vector-oriented canvas, in which you can draw
graphical objects that respond to click events, for free?

I agree. TkCanvas doesn't do rotation or scaling as nicely as opengl, but it's very nice for schematic diagrams, user interaction, and simple animation. It has saved me a lot of work lately.

···

--
        vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Martin DeMello wrote:

···

On 12/17/06, Michael T. Richter <ttmrichter@gmail.com> wrote:

On Sun, 2006-17-12 at 10:09 +0900, Suraj Kurapati wrote:
Tk is wonderful! It's really simple to manipulate widgets and graphics
in the way you'd expect. IMHO, Tk is the Ruby of GUI toolkits.

I'm with David here. Tk isn't the Ruby of GUI toolkits. But I diverge sharply from him after that. He says it's the PHP of GUI toolkits. I say it's the GWBASIC of them.

Tk-based GUIs are typically so fscking useless that I'd rather use the CLI and ed over an
app coded in Tk.

Apart from the TkCanvas, which is utterly brilliant. How many other
toolkits give you a vector-oriented canvas, in which you can draw
graphical objects that respond to click events, for free?

WPF?

I've been increasingly interested by what's going on in Ruby.NET, for exactly that reason.

--
Alex

Michael T. Richter wrote:

Being initially embarrassed is a sign of learning. Being further
embarrassed on the same topic is a sign of not learning. See what I
mean?

Understood.

> Start with The Rise of Worse is Better
> (http://www.jwz.org/doc/worse-is-better.html\).

I strive to be in the worse-is-better camp. :slight_smile:

Then pick up a book on
> good UI design. Almost any book written on the topic in, say, the past
> 20 years will open your eyes to just how much effort and thought goes
> into a good user interface, GUI or otherwise. (Here's a hint: the vast
> majority of user interfaces suck bowling balls through garden hoses.)

Agreed. I'm familiar with a bit of Jakob Nielsen's work and Marc
Rettig's wonderful "paper prototyping" technique -- but that's about it.

If you want to take this off-list, I might even
be able to direct you to some decent books on HUI design (or at least
some web pages with decent information).

If you don't mind, please post the web resources here, so that we may
all benefit from your guidance.

Thanks for your consideration.

···

--
Posted via http://www.ruby-forum.com/\.

David Vallner wrote:

The namedropped (in a snarky way) experience is ad verecundiam, a
logical fallacy. To respond to it any more would be stooping down to the
same level.
  

Still, I'm glad to see I'm not the only programmer with 40+ years of experience that likes Ruby and is still spending some time every day writing code. :slight_smile:

I'll have to
disclaim though that I'm far from a security expert, so the above are to
an extend half-educated guesses.
  

The fundamental principles of security are simple:

1. Trust nobody, even yourself. :slight_smile:
2. Satisfy the Congress, the attorneys and accountants first, then your business partners, then your customers. If you have anything left over, satisfy your employees.. :slight_smile:
3. Back everything up! And stress-test your disaster recovery mechanisms!

···

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.

Disclaimer: All my assertions about Ruby, Rails, WEBrick and MySQL are
based on a few months of experience with these products.

David Vallner wrote:

For the client-side logic, you're still stuck to HTML and Javascript,
which are both flawed in their way. While web frameworks help with that,
it's still artificially shifting logic that could as well be done
client-side (validation which only requires checking against the data
the client is already operating on already, paginating content,
formatting data, etc.) I

The app structure I outlined, Firefox+Ruby+Rails+WEBrick+MySQL, all
runs on the client's machine (except for the database server). The
user machine(s) need not be connected to the Internet, though it/they
needs a LAN connection to a database server. So everything except the
data-store is "client-side". Do you agree?

Secondly, the kind of apps I've worked on (and plan to continue working
on) all need robust user interfaces. Raw HTML is no doubt inferior to,
say, Microsoft's MFC or Java's Swing. However, Rails code is run
through Extended Ruby (erb) which programmatically generates repetitive
HTML, so it's pretty nice to use even absent a drag-n-drop GUI
builder.

I'm not aware of any way to easily keep a Ruby-based client
program up-to-date conveniently

Ruby supports Test Driven Development in a very rich way (which I never
did before). Likewise, it supports automated programming
documentation in pretty convenient way (never did that either). Add
the fact that it supports database development with an abstraction that
offers independence from variations of SQL implementations. I'm
optimistic that maintenance will be easier on these projects than any
I've been on before.

or even deliver it cross-platform
easily because of the dependency on native extensions.

Rails is based on Ruby. Ruby is based on C. And C is widely viewed as
a hardware abstraction layer. So that stuff is already ported anywhere
I'm likely to want to go.

I'm not very sure how Rails would be suitable to make desktop
applications, the framework doesn't seem to have a discernable core for
action processing

It implements an MVC architecture in a very neat way. The model
house/enforces the business logic. The views present data from the
models to the client, and pass back client actions as appropriate. The
controllers oversee the traffic between those layers. I haven't done
much of this yet, so it remains for me to see how well that works.

that would be unaware of web idiosyncracies. I might
be wrong.

That's a good point to consider. What sort of idiosynchrasies might
adversely affect this scheme, noting that we're planning for apps on
isolated machines (except for the dataset connection)?

The namedropped (in a snarky way) experience is ad verecundiam, a
logical fallacy.

I didn't intend to offend anyone. I forgot why I mentioned it.
(Unfortunately, I deleted my posted msg). I think I was making it
clear that I've had a lot of experience in a variety of software
development environments. I intended, but failed, to make it clear at
the outset that I was new to Ruby, Rails and web development. I can't
see that constitutes "the fallacy of making an illicit appeal to
authority". But, as you say, it's not worth pursuing.

Ruby is fine if you can juggle the complexity, but it requires more
programmer competence and diligence for the software to be robust - a
quality that grows with importance the closer to end users you get.

Isn't that true regardless of the language?

I'm past my "Oooh, shiny!" Rails phase. Scaffolding is nice, yet in a
way just smoke and mirrors.

Any large application requires decisions about how the code should be
factored. Rails gives you one-liners that puts stuff in the "right"
place so it will be found by other pieces and by the developer.
Wouldn't you credit that as more than smoke and mirrors. Particularly
that they've built in this scheme of "helpers" that help
developer's factor their code that IMHO is a natural way.

ActiveRecord is just way too basic as an ORM
solution and not much simpler to use once enough of its assumptions on
the data model and physical DB schema don't hold.

If you use Active Record Migration, the SQL database schema would
always be in synch, wouldn't it? And don't you value that Rails
automatically maintains a history of migrations so you can easily back
up to an earlier version if necessary; likewise for matching back up
with the program code so long as version control, e.g. Subversion that
Rubyists like.

Convention over
configuration gets hairy in complex deployment scenarios - table names
changing (having to accommodate to a weird naming convention between
prototype and production) mean a recode, and generally the magic becomes
harmful if you need to separate the object model from the tables and
columns. I don't think this applies to your scenario though.

As I understand it, only the database name changes between
development, test and production, not any of the table-names nor any
code except doe some external symbol indicating which one is targeted.

An important service Rails provides, and that I love, is in generating
single and two-way linkages for one-to-many and many-to-many
relationships with one-liners and simple column-name standards for
keys. I've only used one database system that might be an ORM:
Documentum. But all my database past and anticipated needs have been
and I expect will be satisfied E. F. Codd's style of database:
Oracle, SQL Server, DB2 and little old MySQL.

WEBrick is a development server. Probably Good Enough for a one server -
one user scenario, but I don't think it's meant to handle more.

Great: that fits my target scenario.

As for MySQL, I more or less share the attitude of Austin Ziegler on it.
Most of MySQL users are mentally stuck with v3.x and make data schemas
that would make an onion cry.

I've been using ver. 5 and the schemas Rails generates from migrations
seem OK to me. I particularly like the fact that this version supports
transactions .. IMHO a "must" for app relying on database support.

Mentioning "no security risks" if you let
arbitrary clients access your database is debatable though, I thought
you're supposed to keep production data storage behind a firewall.
Giving end-users write-access credentials sounds like way too much
potential for a malicious user to do damage to me, unless you only allow
write access through secured stored procedures, or bend your model
backwards for table-level restrictions to be sufficient. I'll have to
disclaim though that I'm far from a security expert, so the above are to
an extend half-educated guesses.

That's something I have to work on. My first thought is that the
MySQL server has to be on a machine whose physical security is
maintained. Then it needs network authentication for users and user
machines hitting on it. MySQL seems to support user security pretty
well with access levels and encrypted passwords. That encryption
scheme could be used on critically sensitive data if performance allows
it. If the LAN connecting the database to users has any Internet
connection, then the database server machine will need a firewall, too,
as you said.

It's been nice using this thread to think through some of these
issues and having the opportunity to try to "sell" my ideas and
consider the weaknesses they may suffer. So this exercise has been
good for me. Thanks for your enthusiastic participation.

Best wishes,
Richard

Hi Michael,

Wow! Someone used the words "C++" and "elegant" in the same sentence
without a negative in between and with no hint of irony.

I know you meant that in a light-hearted way. Yet, I wonder whether
you agree that there have been a lot of books sold on that topic? And
that most of those by people under no duress?

If you agree with the foregoing, you'll likely concede there are (or
at least, were) a good number of other that at least that the language
to be "good". And do you think it's possible a few them even would add
"elegant"?

Then I wonder whether you read Stroustrup's "The Design and Evolution
of C++"? It strikes me as a great engineering example. Do you agree.
(For that matter, do you think the development of C was great
engineering?)

Do you a good opinion of any of the high-level general-purpose
languages? Any that you find elegant?

How about Ruby? Rails? Do you find either of them elegant?

Is it all just a matter of taste?

Best wishes,
Richard

Alex Young schrieb:

I've been increasingly interested by what's going on in Ruby.NET, for exactly that reason.

I'm looking bout every few weeks on the site of the compiler, but there doesn't seem to happen anything more.
I've postet on their google group to ask for it, they told me, that they are working on a Ruby-Implementation-Testing suite, to compare "Vanilla"-Ruby, JRuby, and Ruby.NET on the way how they work or something else.... The last thing I heard were some discussions about implementing a new Framework for this issue (last post there Sep. 2006)

Badly, there's nothing going on - so i think its dead already.

Project Site: http://plas.fit.qut.edu.au/Ruby.NET/
Google Group (ruby.net): http://groups.google.com/group/RubyDOTNET
Google Group (RubyTest): http://groups.google.com/group/RubyTests

>>> Start with The Rise of Worse is Better
>>> (http://www.jwz.org/doc/worse-is-better.html\).

I strive to be in the worse-is-better camp. :slight_smile:

Ah. Then I hate you. It's really that simple. :smiley:

If you don't mind, please post the web resources here, so that we may
all benefit from your guidance.

Well, this isn't really a list for UI design. If there are enough
people interested?....

···

On Sun, 2006-17-12 at 15:47 +0900, Suraj Kurapati wrote:

--
Michael T. Richter
Email: ttmrichter@gmail.com, mtr1966@hotpop.com
MSN: ttmrichter@hotmail.com, mtr1966@hotmail.com; YIM:
michael_richter_1966; AIM: YanJiahua1966; ICQ: 241960658; Jabber:
mtr1966@jabber.cn

"I think it is very beautiful for the poor to accept their lot [...]. I
think the world is being much helped by the suffering of the poor
people." --Mother Theresa

M. Edward (Ed) Borasky wrote:

1. Trust nobody, even yourself. :slight_smile:

The seedy looking punk behind the window in the bathroom is ME?!

David Vallner

Richard wrote:

Disclaimer: All my assertions about Ruby, Rails, WEBrick and MySQL are
based on a few months of experience with these products.

David Vallner wrote:

For the client-side logic, you're still stuck to HTML and Javascript,
which are both flawed in their way. While web frameworks help with that,
it's still artificially shifting logic that could as well be done
client-side (validation which only requires checking against the data
the client is already operating on already, paginating content,
formatting data, etc.) I

The app structure I outlined, Firefox+Ruby+Rails+WEBrick+MySQL, all
runs on the client's machine (except for the database server). The
user machine(s) need not be connected to the Internet, though it/they
needs a LAN connection to a database server. So everything except the
data-store is "client-side". Do you agree?

Secondly, the kind of apps I've worked on (and plan to continue working
on) all need robust user interfaces. Raw HTML is no doubt inferior to,
say, Microsoft's MFC or Java's Swing. However, Rails code is run
through Extended Ruby (erb) which programmatically generates repetitive
HTML, so it's pretty nice to use even absent a drag-n-drop GUI
builder.

I'm not aware of any way to easily keep a Ruby-based client
program up-to-date conveniently

Ruby supports Test Driven Development in a very rich way (which I never
did before). Likewise, it supports automated programming
documentation in pretty convenient way (never did that either). Add
the fact that it supports database development with an abstraction that
offers independence from variations of SQL implementations. I'm
optimistic that maintenance will be easier on these projects than any
I've been on before.

or even deliver it cross-platform
easily because of the dependency on native extensions.

Rails is based on Ruby. Ruby is based on C. And C is widely viewed as
a hardware abstraction layer. So that stuff is already ported anywhere
I'm likely to want to go.

I'm not very sure how Rails would be suitable to make desktop
applications, the framework doesn't seem to have a discernable core for
action processing

It implements an MVC architecture in a very neat way. The model
house/enforces the business logic. The views present data from the
models to the client, and pass back client actions as appropriate. The
controllers oversee the traffic between those layers. I haven't done
much of this yet, so it remains for me to see how well that works.

that would be unaware of web idiosyncracies. I might
be wrong.

That's a good point to consider. What sort of idiosynchrasies might
adversely affect this scheme, noting that we're planning for apps on
isolated machines (except for the dataset connection)?

The namedropped (in a snarky way) experience is ad verecundiam, a
logical fallacy.

I didn't intend to offend anyone. I forgot why I mentioned it.
(Unfortunately, I deleted my posted msg). I think I was making it
clear that I've had a lot of experience in a variety of software
development environments. I intended, but failed, to make it clear at
the outset that I was new to Ruby, Rails and web development. I can't
see that constitutes "the fallacy of making an illicit appeal to
authority". But, as you say, it's not worth pursuing.

Ruby is fine if you can juggle the complexity, but it requires more
programmer competence and diligence for the software to be robust - a
quality that grows with importance the closer to end users you get.

Isn't that true regardless of the language?

I'm past my "Oooh, shiny!" Rails phase. Scaffolding is nice, yet in a
way just smoke and mirrors.

Any large application requires decisions about how the code should be
factored. Rails gives you one-liners that puts stuff in the "right"
place so it will be found by other pieces and by the developer.
Wouldn't you credit that as more than smoke and mirrors. Particularly
that they've built in this scheme of "helpers" that help
developer's factor their code that IMHO is a natural way.

ActiveRecord is just way too basic as an ORM
solution and not much simpler to use once enough of its assumptions on
the data model and physical DB schema don't hold.

If you use Active Record Migration, the SQL database schema would
always be in synch, wouldn't it? And don't you value that Rails
automatically maintains a history of migrations so you can easily back
up to an earlier version if necessary; likewise for matching back up
with the program code so long as version control, e.g. Subversion that
Rubyists like.

Convention over
configuration gets hairy in complex deployment scenarios - table names
changing (having to accommodate to a weird naming convention between
prototype and production) mean a recode, and generally the magic becomes
harmful if you need to separate the object model from the tables and
columns. I don't think this applies to your scenario though.

As I understand it, only the database name changes between
development, test and production, not any of the table-names nor any
code except doe some external symbol indicating which one is targeted.

An important service Rails provides, and that I love, is in generating
single and two-way linkages for one-to-many and many-to-many
relationships with one-liners and simple column-name standards for
keys. I've only used one database system that might be an ORM:
Documentum. But all my database past and anticipated needs have been
and I expect will be satisfied E. F. Codd's style of database:
Oracle, SQL Server, DB2 and little old MySQL.

If I understand correctly:

WEBrick is a development server. Probably Good Enough for a one server -
one user scenario, but I don't think it's meant to handle more.

Great: that fits my target scenario.

We have a one-user application...

That's something I have to work on. My first thought is that the
MySQL server has to be on a machine whose physical security is
maintained. Then it needs network authentication for users and user
machines hitting on it. MySQL seems to support user security pretty
well with access levels and encrypted passwords.

And lots of baggage if we use a system for multi-user applications...

That encryption
scheme could be used on critically sensitive data if performance allows
it. If the LAN connecting the database to users has any Internet
connection, then the database server machine will need a firewall, too,
as you said.

And security concerns about data leaking from the user's machine...

Might I suggest:

- use WEBrick on a firewalled port that is accessible only from the
local machine 0.0.0.0

- use the SQLite3 (http://wiki.rubyonrails.org/rails/pages/SQLite\)
because it stores data in normal (binary) files on the machine it's
running on. For example, if your Rails app is located in /foo/bar, then
the DB files will be in /foo/bar/db/

- for concerns about upgrading (i.e. it's easier to update one central
server than updating many individual machines), you could have each user
check-out your whole rails app from a version control system. Then, when
you do maintainance updates to your DB schema and so on, the user would
simply update their check-out and run "rails migrate". Done!

···

--
Posted via http://www.ruby-forum.com/\.

> Wow! Someone used the words "C++" and "elegant" in the same sentence
> without a negative in between and with no hint of irony.

I know you meant that in a light-hearted way. Yet, I wonder whether
you agree that there have been a lot of books sold on that topic? And
that most of those by people under no duress?

Point me to a single book that calls C++ "elegant" written by someone
who, you know, designs languages. C++ is a hack built on a hack.

Problem #1 with C++ (of several billion): it requires literally infinite
lookahead to fully parse. This is not something I would ever consider
even remotely elegant.

Then I wonder whether you read Stroustrup's "The Design and Evolution
of C++"? It strikes me as a great engineering example. Do you agree.
(For that matter, do you think the development of C was great
engineering?)

No and no. C was not great engineering. It was a high level assembler
full of quirks based on its first implementation platform (PDP-11) --
quirks that kill (sometimes literally) to this very day. It is
acceptable (barely) as a systems programming tool provided it is used
under intensely-inspected environments. Its use in applications verges
on the criminal culpability side of things. The list of useful (and
some necessary) features that C lacks for application programming
includes, but is not limited to, automated memory management,
bounds-checked strings and arrays, natural range notation (imagine now
nice "switch" could be if you had range notations!), no meaningful error
handling (i.e. exception handling), no true mechanism for module
management (separation of interface from implementation, in other words
-- #include doesn't cut it) ... This list could go on for days. And
the funny part is that much of this stuff was available in languages
which predate C -- so it's not as if the designers didn't have access to
the ideas behind them.

C++ is a hack layered on this hack. Despite being designed for projects
"in the large" it still has no support for automated memory management
which, given its unnatural appetite for memory (in typical C++
programming), is really funny. Further, although an "object-oriented"
language, things like iterators are an afterthought (and it shows!)
added later on in the library interface instead of being a core part of
the language. And it still sucks--despite the addition of namespaces,
classes, etc.--at actually helping in modular programming. You have to
recompile, for example, if the implementation of a class you're using
changes. (I still shake my head at this.) It's not enough just to
relink to a new object file/library/whatever. You have to recompile
your source. (This is, of course, again because of that filthy #include
thing.)

Then we have templates.... I'm not even going to begin that rant.

Do you a good opinion of any of the high-level general-purpose
languages? Any that you find elegant?

I'm getting really fond of Haskell, actually. I'm having some
difficulty with its Monads (mostly because I'm not a mathematician by
inclination so the category theory explanations fall on glazed-over eyes
here), but having found good introductions to them which don't assume
mathematical inclinations I'm ready to allocate another slice of CPU
time to tackling them once again. What I like about Haskell, however,
is its very dense structure without resorting to executable line noise
like, say, extremely hackish Perl code or the APL-descended languages
(to cite an extreme example).

I really liked Dylan. Which, sadly, died on the vine.

From the more classic line, I liked Modula-3 as well -- which also,
sadly, died on the vine.

How about Ruby? Rails? Do you find either of them elegant?

I would not call Ruby "elegant" but I will call it a joy to program in.
(The two can be disjoint.) If it didn't have Perl's magic variables, et
al. I'd be more inclined to call it elegant even.

I lack sufficient experience in Rails to call it elegant or not. I
simply have no opinion. There are some things which at first glance
appear very impressive to me, but C++ templates did once too until I had
to use them extensively. (My first run-in with ">>" vs. "> >" pretty
much ended my love affair with templates in a huge, bloody crash.)

Is it all just a matter of taste?

Yes. Bad taste and my taste. :wink:

···

On Mon, 2006-18-12 at 16:50 +0900, Richard wrote:

--
Michael T. Richter
Email: ttmrichter@gmail.com, mtr1966@hotpop.com
MSN: ttmrichter@hotmail.com, mtr1966@hotmail.com; YIM:
michael_richter_1966; AIM: YanJiahua1966; ICQ: 241960658; Jabber:
mtr1966@jabber.cn

"Sexual organs were created for reproduction between the male element
and the female element -- and everything that deviates from that is not
acceptable from a Buddhist point of view. Between a man and man, a woman
and another woman, in the mouth, the anus, or even using a hand." --The
Dalai Lama

Richard wrote:

The app structure I outlined, Firefox+Ruby+Rails+WEBrick+MySQL, all
runs on the client's machine (except for the database server). The
user machine(s) need not be connected to the Internet, though it/they
needs a LAN connection to a database server. So everything except the
data-store is "client-side". Do you agree?

Yes. However, there's still the HTTP request divisor in the middle, with
no / hacked push in the WEBrick -> Firefox direction. At least as far as
I know, prototype.js, the Javascript library Rails uses for Ajax
support, doesn't try to support any form of pub/sub messaging or
anything close to sane event support in the push direction. Of course,
it might be possible your application only needs to pull data.

Secondly, the kind of apps I've worked on (and plan to continue working
on) all need robust user interfaces. Raw HTML is no doubt inferior to,
say, Microsoft's MFC or Java's Swing. However, Rails code is run
through Extended Ruby (erb) which programmatically generates repetitive
HTML, so it's pretty nice to use even absent a drag-n-drop GUI
builder.

I don't actually find Swing superior to setup a UI, HTML, while flawed,
mirrors the UI layout in its structure, which is a good thing. However,
for me that is offset by having fine-grained data binding - for complex
UIs, it rubs me in a better way than bending my code to be essentially
request / (partial) response.

or even deliver it cross-platform
easily because of the dependency on native extensions.

Rails is based on Ruby. Ruby is based on C. And C is widely viewed as
a hardware abstraction layer. So that stuff is already ported anywhere
I'm likely to want to go.

I didn't mean work in the first place. I meant keeping an up-to-date
version on all the users' machines. Last time there was a thread on the
subject of distributing whole applications with rubygems, I think there
were quite a few gotchas mentioned. But you might want to search the
archives for that to see if the approach is viable / what you'd have to
work around.

I'm not very sure how Rails would be suitable to make desktop
applications, the framework doesn't seem to have a discernable core for
action processing

It implements an MVC architecture in a very neat way. The model
house/enforces the business logic. The views present data from the
models to the client, and pass back client actions as appropriate. The
controllers oversee the traffic between those layers. I haven't done
much of this yet, so it remains for me to see how well that works.

No / weak / coarse-grained push from the model to the view would be a
showstopper for me for the sort of problems where'd I use a rich GUI.

that would be unaware of web idiosyncracies. I might
be wrong.

That's a good point to consider. What sort of idiosynchrasies might
adversely affect this scheme, noting that we're planning for apps on
isolated machines (except for the dataset connection)?

Nothing that's really a showstopper from this point of view, just the
request / response / sessions clutter that's not really essential to the
way I would model a rich GUI application. For me, it would involve
working around those, maybe you have an architectyre / model in mind
where the mapping is straightforward.

Ruby is fine if you can juggle the complexity, but it requires more
programmer competence and diligence for the software to be robust - a
quality that grows with importance the closer to end users you get.

Isn't that true regardless of the language?

Not on a quantitative level. Easily accessible metaprogramming
facilities are a potential complexity explosion, and need competence and
/ or restraint to avoid abstraction leak between modules. (For example
introducing a method to a class at a scope where it clutters in modules
that probably won't use the functionality "because it's convenient that
way".)

ActiveRecord is just way too basic as an ORM
solution and not much simpler to use once enough of its assumptions on
the data model and physical DB schema don't hold.

If you use Active Record Migration, the SQL database schema would
always be in synch, wouldn't it? And don't you value that Rails
automatically maintains a history of migrations so you can easily back
up to an earlier version if necessary; likewise for matching back up
with the program code so long as version control, e.g. Subversion that
Rubyists like.

If creating a database schema from scratch, unless you hit some of the
more obscure deficiencies of AR (2PC and the like), in your scenario
it's probably fine.

While migrations are indeed sexy, using them means you pretty much
eschew the magic of AR, at which point it becomes only incrementally
more convenient as an ORM solution rather than revolutionary.

An important service Rails provides, and that I love, is in generating
single and two-way linkages for one-to-many and many-to-many
relationships with one-liners and simple column-name standards for
keys.

This I consider unforgivable brain-damage, AR should have supported
database metadata investigation and looking at foreign key constraints
out of the box. Same goes for migrations-generated schemas (I haven't
really seen those, I admit.).

As for MySQL, I more or less share the attitude of Austin Ziegler on it.
Most of MySQL users are mentally stuck with v3.x and make data schemas
that would make an onion cry.

I've been using ver. 5 and the schemas Rails generates from migrations
seem OK to me. I particularly like the fact that this version supports
transactions .. IMHO a "must" for app relying on database support.

And only decades after all the competition. Currently, I don't see much
of a reason why not to use MySQL in a general scenario (before
concurrency handling considerations and load tests come into play),
however I also don't see much of a reason to do so - I'll stay with
religious opinions and stick to the featurefullness of Postgres.

David Vallner

OK, I've been skimming this thread the last few days, and I'm surprised
no one else has asked the obvious question here (if someone did and I
missed it, I apologize)...

/Why/ in the world would you write a web app with RoR to be run locally
on several users' machines that connects to one central database? I
hate to be blunt, but that's just kinda dumb.

Considering you already need a central server to run the database on,
just run the web app from a central server as well. Then all these
questions about upgrading the app on the users' machines, who should
run `rake db:migrate`, etc. kinda take care of themselves.

···

On Dec 17, 11:17 pm, "Richard" <RichardDummyMailbox58...@USComputerGurus.com> wrote:

The app structure I outlined, Firefox+Ruby+Rails+WEBrick+MySQL, all
runs on the client's machine (except for the database server). The
user machine(s) need not be connected to the Internet, though it/they
needs a LAN connection to a database server. So everything except the
data-store is "client-side".

--
Regards,

John Wilger

Not to attempt to bring this back on topic or anything, but I needed this
information as well. I'd played with TK and it was, um, ugly. I can't very
well bring this to my supervisor and say "we should look into Ruby" if I
can't impress the hell out of him. I looked up VisualuRuby and followed the
first google link. I found plenty of good examples after following a few
links (http://vruby.sourceforge.net/samples-e.html).
Just an FYI, the author states that his environment is win98, but I'm
running them on winxp sp2 fully patched. Everything seems to work as
intended for win98.
C:\ruby\programs>ruby --version
ruby 1.8.4 (2005-12-24) [i386-mswin32]

This caught my eye: http://vruby.sourceforge.net/sample/traytest.rb
It adds a system tray icon, modifies one, deletes the one created, among
other things. There's a comment in there about the added task tray icon not
automagically deleting itself upon the window closing. What I'm uncertain
of, is how to go about fixing that. Some of the other programs I was able
to make minor changes too in order to make it look how I wanted, but this
problem eludes me. Can anyone suggest a way to modify the program in order
to automagically check for task bar icons before closing the program? The
bug isn't serious at all - apparently if you simply move your mouse cursor
over the icon it disappears, so that's no big deal. That said it annoys
me. Also, I'm a firm believer in the "give a man a fire and he's warm for a
day, set him on fire and he's warm for life" theory, so if anyone can
recommend further documentation that will point me towards an answer, I'd be
happy to read that as opposed to simply being given a solution. Though I'll
take either.

One other question, I didn't see any samples of how to control tabbing
through the various components. Does anyone have any info on that?

This has been one of the most informative ruby threads I've followed since I
started reading the mailing list. Thanks to all the contributors from a
nuby :slight_smile:

Ahh, sorry, I forgot to cut out the irrelevant text at the top of the
message. :frowning:

···

--
Posted via http://www.ruby-forum.com/.

Suraj Kurapati wrote:

when
you do maintainance updates to your DB schema and so on, the user would
simply update their check-out and run "rails migrate". Done!

That should be "rake migrate" not "rails migrate".

···

--
Posted via http://www.ruby-forum.com/\.