lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Apr 14, 2014 at 11:29 PM, Petite Abeille
<petite.abeille@gmail.com> wrote:
> Prepare Now For Possible Future Head Transplant
> http://database-programmer.blogspot.com/2010/11/prepare-now-for-possible-future-head.html

Hah, recommended read!  Basically, the love of abstraction leads to
unnecessary effort. Since it's about relational databases, he says
"Table-based datastores are optimally abstract ".

Remember that next time you have a urge to construct large class
hierarchies in Lua, in deference to big-gorilla best practices, which
are mostly syntax with a few little bits of implementation scattered
about...

I like the idea of dependency-injection, because it's Java embracing
its dynamic side.  Of course, being Java, a simple idea becomes a
framework with loads of little XML files,  It is something we do very
often in Lua, without getting over-fixated.

(I inherited a large-ish Java application from a colleague who ran
away to join the Benedictines (true story).  He did it by the book, so
there was lots of OOP ceremony.  But really there was a much smaller
Lua program inside all those lines, and it would have suited the
client perfectly, because VBA was familiar to him, and he would have
much less difficulty reading Lua than Java - I would not have to do
pseudo-code translations!   But being a pro means Don't Rewrite
Midstream....[1])

[1] could still leverage the JVM using LuaJava - for the few parts
that needed performance and for a Swing interface - which is actually
quite pleasant once you abstract over its ceremonies