alternatives to java, in the enterprise

Tech gurus routinely predicate the decline of java [1], but my question is “Who will /displace/ java in the enterprise?”. Let’s restrict ourselves to app programming languages. I think the gorillas/challengers of the past have been

– COBOL
– C/CPP
– Java
– CS (dotnet is not a language)

Pattern: OO is the only option. For Perl or PHP to enter the enterprise, OO needs strongthening.
pattern: scripting languages are never serious contenders. Now,

Q: What are the fundamental technical reasons beside (beneath) vendor support? Even the most conservative big business was and is open to scripting or open-source — Perl/Shell, PHP, Javascript, Tomcat, Linux … “Open” but short of adopting in a bigger way.
A: Performance? Another blog post discusses strong typing.

Answer to the opening question: From the list above, the challenger list boils down to 1 — C#

[1] as well as other technologies. They do that to every player.

Advertisements

learning design patterns

Initially, reduce the number of classes/interfaces to the essential participating objects, ie “the players”.

The #1 type of knowledge-pearl to *notice* is the HAS-A relationships among the players. Simple! But authors don’t always highlight them enough.

Whenever possible, look at methods (in a run-time context) as “calls” instead of “methods”.

Interesting [1] calls are mostly instance-methods rather than static methods.

[1] interesting to the pattern.

Key quetions to always bear in mind:

– {method} hosting object of the method?
– {method} intended client objects, according to the pattern? Not always intuitive.
– – } How would the client object get a pointer to the hosting object? Via a setter/constructor or arg?
– {call} objects in the argument? Not always easy to remember
– – } How did the client object get a pointer to the arg object? Via a setter/constructor or arg?
– For each object, instantiated by which creator object?

q(use strict) in perl

“use strict” is the most important pragma for defensive, maintainable coding in a large team.
I think there are 3 main things to be strict about.

1) use strict ‘refs’ # forbids symbolic references
2) use strict ‘subs’ # interprets all barewords (ie ambiguous) as syntax errors. P860 has a good first paragraph.

I think the most important “use strict” is on global variables. I guess it is
3) use strict ‘vars’ # ???? confirmed.

I think it only accepts my, local, our vars, built-in vars and *package-qualified* (ie global) vars. Now I know it also allows imported vars via

  use MyModule3 qw(sub8 $var2_with_dollar)

Footnote: Why is $var2_with_dollar rarely seen in “use” statements@@ P409 [[ perl best practices ]] warns against exporting/importing vars.

"referential-integrity" explained by outer join, subset

see posts on “unmatched prikey”

DB designers often create healthy subset relationships between Table A’s prikey and Table B’s forkey. Any forkey’s #1 purpose is a join column. Subset => outer join.

Why prikey is never a subset of forkey? Such a freak subset means one of the forkey entries is unmatched in the prikey column — breaking referential integrity.

xx ejb with xml dd(deployment-descriptor)

–val@dd for learning purpose
 
 
 
for beginners, source code could be too much to swallow.
 
dd xml format is very structured, concise compared to source code, which contains lots of seemingly “useless” code.
 
relationships between several java objects are not clear by reading source code. dd is better.
 
many critical infrastructure pieces are not defined in source code.

safety in a dynamic financial environment

* to promote testing, try to write tests first, at least in 1% of the cases. Over time u may find shortcuts and simplified solutions
* Many systems aren’t easy to unit-test or regression-test. To increase the applicability of testing, allocate time/budget to study best practices
* allocate resources to learn automation tools like Perl, Shell, IDE, diff tools, Windows tools
* automated test
* regression test
* automated doc-generation
* keep track of volumes of written messages
* pair-programming
* involve the users early and at every step

anon ^ named programs ] pl/sql

As far as I know, every pl/sql program is either A) anonymous or B) named. You need to know them because

– Both are demonstrated frequently in literature.
– Their syntax differ, causing confusion to programmers.
– Authors don’t point out their sample code is A or B, causing confusion to programmers.

Triggers and functions must be named to be invoked. A procedure actually takes parameters just like functions. I would say a procedure [1], too, must be named to be invoked.

[1] some define “procedure” differently and accept “anonymous procedures”.

B is not always created/replaced in DB. It can be “created” in an anon-block and thrown away. see [[ making sense of …]] for a wider explanation.

A is also known as an “anonymous block”, essentially a throw-away program, not worth saving. Lacking a name, you can’t save in the DB such as in a pl/sql package.

Nevertheless, anon blocks are popular — You type up the text into sqlplus, run it and throw it away. => You can also save the text, and later copy-paste.

The most confusing thing about anon is nested anon. In anon-block1’s DECLARE section, you an put an entire function (named) or procedure (named to be invoked).