There are some wonderful OCX-es in the downloads section, I really like them. But the problem is that they are hard to write and even harder to customize - if you have to change it, have to compile them and install them again on all client machines. It's not really Navision-like - what we really need is an easy and server-maintained remote procedure call technology.
And there is one: Python programming language, and XMLRPC (XML Remote Procedure Call).
Python is a very easy programming language, even easier than C/AL. Lets have an example subroutine to show it:
def max(a,b):
if a>b:
return a
else:
return b
And of course there are libraries for everything, from e-mail sending to ODBC database connecting and regexps.
XMLRPC is a technology to call procedures from a server.
An article about it:
Client:
http://www.onlamp.com/pub/a/python/2000 ... lient.html
Server:
http://www.onlamp.com/pub/a/python/2001 ... erver.html
So my idea is:
1) Let's install Python to our Navision server installations and write XMLRPC-based programs
2) Let's write a general OCX that is able to call any method from any server in XMLRPC.
And then what's the win? The win is that business logic is on the server, in a interpreted language, so easy to customize.
I could write that OCX in Python, but that would be too big - "compiling" a Python script means packaging it with Python itself and all the libraries. So Delphi or .NET is a better idea for that. Is someone interested in doing that?
Comments
I would say a graphical OCX would always have to remain client side.
If you dont like distributing OCX or DLLs you can make a navision program to put the OCX/DLL into blob fields and make an automated client distribution.
Of course you could also write VB script and store these on a server i think there was an automation library where you can build automated vb script programs run time. Do if you have stored vbscripts in text files you might be able to load and execute thes at run time from an codeunit.
Or you can run Terminal Server clients.
I think we don't understand each other. It is (or rather will/might be) an experiment, a "hack" in the good sense, a completely new idea introduced to Navision - and a bridge over the unnecessary, self-imposed gap between Microsoft and Open Source. I might or might not prove practical. It's even worth to try for the "hack value" or "geek value" of it, and we cannot know whether it is practical or not until we try it. I don't think it it would work for visual controls (but it might), but f.e. it might be practical for text file processing, e-mail sending, or integrating with other software as C/AL is not very good in this area.
But this is not the real point. I think new ideas are interesting just because they are new, just because they mean a challenge and they might provide interesting and useful experiences. Who said we consultants can't be reserarchers?
Do It Yourself is they key. Standard code might work - your code surely works.
I've developed such a beast. We use a python automation server for doing xmlrpc calls to an zope (http://www.zope.org) server. In our zope server we develop things like sending email templates, database replication, etc.
Maybe, another way to make xml rpc is using a xmlrpc client developed with the "standard" m$ xml/http automation server in a codeunit.
We're using the xmlrpc technology 3 years ago. An now we're thinking in another technology like corba, ice (http://www.zeroc.com) or twisted (http://twistedmatrix.com/projects/core/ ... intro.html) to improve speed.
With xmlrpc the maximum number of remote calls per second we've reached is about 30. This is slow for us.
So, I thing that the way is not xmlrpc, but other faster technology.
Juan Carlos Coruña
Director de Informática y Sistemas
jcoruna@umd.es
UMD, S.A.
Tel.: 902-128256
Fax: 94-4750757
http://www.umd.es
I've been trying to use python com server in Navision, but no luck thus far. I followed tutorials and created a simple python com server, registered it. However, I cannot access it from Navision, it is not listed as an automation. Also it is missing in VB references. Any ideas on how to use such python automation in Navision?