Author Topic: VBScript Libraries  (Read 6074 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
VBScript Libraries
« on: February 22, 2010, 06:25:30 pm »
In:  VB scripting problem, Geert Bellekens makes the observation:
Quote
I think the message is: only use VBScript for small disposable quickies.
If you want to do anything decent, use a real programming language
I know it is possible to create libraries of VBScript functionality (such as via the use of ExecuteGlobal) but these are cumbersome (and, I suspect, subtle-error prone).

Are there any suggested mechanisms for the creation of such VBScript/JScript libraries or do I just tell my customers - follow Geert's dictum (which I agree with).

TIA,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13240
  • Karma: +553/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: VBScript Libraries
« Reply #1 on: February 22, 2010, 06:27:47 pm »
Paolo,

I guess you already know my point of view  ;)

Geert

beginner

  • Guest
Re: VBScript Libraries
« Reply #2 on: February 22, 2010, 07:27:20 pm »
But you need to be a real programmer: http://en.wikipedia.org/wiki/Real_Programmer

b.

salayande

  • EA User
  • **
  • Posts: 224
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: VBScript Libraries
« Reply #3 on: February 23, 2010, 06:24:17 am »
Gentlemen,

Unfortunately, some users require EA for documenting requirements and architecture. It is so easy to fall into that frame of mind where you believe everyone has the same skill capability as yourself. I am begining to think that this probably an IT thing!

Sparxsystems should pursue an aggresive strategy of making EA easy and simple to use. If it is almost easier to knock up an application in MS Access than it is with using EA, somebody should explain to me where the productivity lies. The industry started using spreadsheets for Information Strategy Planning as espoused by the likes of James martin and Clive Finklestein (and a host of Consultancies that practice Enterprise Engineering) many years ago. Today, a consultancy which uses EA for UML modeling turned down the tool on my site because Excel was considered better than the Matrix Relationship tool.

The profiles of users of CASE tools like EA has changed so much to reflect the widespread diffusion and use of software productivity tools (includes CASE).

Given that most managers now create MS Access and Excel VBA applications with ease, the IT department loses credibility when it suggests that the new CASE tool (EA) that was purchased to create applications will take weeks longer. This might be a simplification but it suggests a technical direction for CASE functional and non-functional requirements moving into into the future.

A case in point is the transformation IDE in EA. Some of us who had the benefit of using metadata transformation tools in Data Warehouse environments are used to graphical environments that enable you to map source to target schema and visually assign your transforms based on a library. Compare this picture with what we currently have in EA and you will understand where I am coming from.

My apologies, gentlemen for this rant but sometimes when I come across comments from some of my colleagues, I visualise the scenario in the 1990s when some of us managed to undermine CASE tools and we failed to achieve the levels of productivity expected by the business. This later resulted in some high profile businesses rightsizing and outsourcing of some IT functions.

What it does suggest is we should do more user profiling, user scenario analysis, to understand the users of our tools and also some technology forecasting.

kind regards

Segun


Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: VBScript Libraries
« Reply #4 on: February 24, 2010, 12:29:09 pm »
The solution appears to be the (undocumented):
Code: [Select]
!INC [GroupName].[ScriptName]directive - as mentioned in: Call a script from within another?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

fwoolz

  • EA User
  • **
  • Posts: 435
  • Karma: +0/-0
  • We have met the enemy, and he is us.<Pogo, 1970>
    • View Profile
Re: VBScript Libraries
« Reply #5 on: February 24, 2010, 01:17:43 pm »
In my Pascal class as an undergrad, the professor handed out copies of a diatribe written by Edsger Dijkstra (RIP) in which he slammed just about all programming languages other than Pascal, Algol, and JOVIAL (and their siblings), calling Fortran "the infantile disorder" and COBOL "the fatal disease." Stuff like that. You don't want to hear what he had to say about good-old Kemeny-Kurtz BASIC*. The next day a classmate brought in a magazine article titled "Real Programmers Don't Use Pascal." And so the pissing contest commenced.

You can certainly write useful code that does neat things in VB, and I for one am glad that Sparx has made it possible to write scripts within the EA environment. Yeah, scripts have their limitations, but sometimes they're just the right weight for the odd lightweight job.

* The first computer language exposure I had was to K-K BASIC on a PDP-8, and you'd be amazed how much you can do with single dimension arrays, GOSUBS, and two character global variable names. Just remember to leave lots of room between your line numbers. Score: Dartmouth 1, Dijkstra 0.

Cheers,
Fred W
Fred Woolsey
Interfleet Technology Inc.

Always be ready to laugh at yourself; that way, you beat everyone else to the punch.


mrf

  • EA User
  • **
  • Posts: 311
  • Karma: +0/-0
    • View Profile
Re: VBScript Libraries
« Reply #6 on: February 24, 2010, 02:24:53 pm »
I've found that no matter the language, it's always possible to write bad code in it  :D
Best Regards,

Michael

[email protected]
"It is more complicated than you think." - RFC 1925, Section 2.8

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: VBScript Libraries
« Reply #7 on: February 24, 2010, 03:37:27 pm »
And I can agree with that, having written exceedingly bad code in several of the 'old' languages. But people didn't mind so much in those days. Once I even got a very nice job in the Netherlands documenting CORAL-66 programs on the strength of sighing that I was having trouble with Sort Routines. I was referring to a BASIC program to sort playing cards into Bridge hands. They were talking about the ground control software for the GIOTTO satellite. Ahhh - what's the difference, really?
Best Regards, Roy

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13240
  • Karma: +553/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: VBScript Libraries
« Reply #8 on: February 24, 2010, 06:04:15 pm »
Quote
I've found that no matter the language, it's always possible to write bad code in it  :D

Absolutely agree, moreover, the language you write in is never an excuse for bad code. (even if it is PHP or VB)

Geert