WebClient and external files

Posted by pauldownie on 26-May-2014 12:49

Hi, I am trying to convert an ADM2 SmartObject client-server application to WebClient and need to determine how to revise those procedures which deal directly with other applications and files located on the server.

For example, certain modules of the application will: load image files from a directory located on the server based on values found in the currently selected record; call external applications, which reside on the server, to perform some function and then return a result to the calling procedure; send a command to an external application to modify a file the user has identified within their local environment and place it in a predetermined folder on the server.

Can tasks like these be done in a WebClient application, through the AppServer or would users need to continue to use mapped drives or UNC pathnames to do this sort of thing? If this can be done either through the AppServer or directly, is there any advantage to doing it one way over the other?

Thanks, Paul

v10.2b, Win 7

All Replies

Posted by Mike Fechner on 26-May-2014 13:00

Hi Paul, in principle all that should be possible.

The AppServer will need to pass your image files to the client either through BLOB fields in temp-tables or RAW fields. Not sure what structure the external applications have that you need to call. But you should wrap this into an AppServer call as well.

I personally always prefer to use AppServer programs to pass these resources through. The biggest advantage I see is the centralized management of access control in your AppServer application, logging and tracing and error handling capabilities and not a mix of Windows configuration and application settings. Furthermore, the AppServer works will via Internet, the WebClient is perfect for distributed users. UNC drives are counter-productive in these environments.

 

Posted by pauldownie on 26-May-2014 14:34

Thanks Mike,

The application will only be used on our intranet but I agree that it would be better form to route all access through the AppServer. I will have to take a closer look at some of the documentation and give it a try. To date I have not had to deal with BLOB fields or do any AppServer programming. Hopefully it won't be too difficult to grasp.

I am just looking at the Developing AppServer Applications document (which doesn't mention WebClient) and am wondering if, even though these AppServer procedures are going to be part of my WebClient application (correct?), I will still have to create a separate connection to the server and then RUN my procedure ON SERVER?

Is this the best document to be looking at for me to get started with this?

Paul

Posted by Mike Fechner on 26-May-2014 14:46

Code that is executed on the server does not need to be part of the web client packages.

Most of the time, a single client does need only a single connection to the AppServer. Are you using an ADM2 application? Then you should be making your AppServer connection using something like this:

        {adecomm/appserv.i}
 
        RUN appServerConnect IN appSrvUtils
            (“partitionname”, ?, ?, OUTPUT hServer) .

 

That will allow you to share the AppServer connection with your ADM2 code (SDO’s).

The typical exception where you need a second AppServer connection would be if you need a second connection to run long running asynchronous AppServer calls in parallel to the calls done by the SDO’s. But, keep it simple to start with ;-)

Posted by pauldownie on 26-May-2014 16:06

It is an ADM2 application. The include file reference seems to be there in every .w but below that the server handle is defined and then referenced in any ADM-CREATE-OBJECTS code in the RUN constructObject statement for any SDOs present. I was coached on this by a Progress tech and ran a few find and replace procedures against my code rather than setting the partitions in various places manually. If there is a connect statement in there, I think it must have been generated by the application assembler (residing in wcapp.prowcapp?). Actually, it looks like the connection information is picked up from appsrvtt.d, I imagine by wcapp.prowcapp.

thanks, Paul

Posted by Mike Fechner on 27-May-2014 12:23

wcapp.procapp does not do anything. And it does not generate any connect statement.
 
The connection information in appsrvtt.d is read and maintained by a session super procedure called as-utils.w. It’s started by the first program that includes the adecomm/appserv.i include file I mentioned in my previous call. That’s by default included in any ADM2 Smartie – but you can use it for custom calls as well.
[collapse]
From: pauldownie [mailto:bounce-pauldownie@community.progress.com]
Sent: Montag, 26. Mai 2014 23:07
To: TU.OE.Development@community.progress.com
Subject: RE: WebClient and external files
 
Reply by pauldownie

It is an ADM2 application. The include file reference seems to be there in every .w but below that the server handle is defined and then referenced in any ADM-CREATE-OBJECTS code in the RUN constructObject statement for any SDOs present. I was coached on this by a Progress tech and ran a few find and replace procedures against my code rather than setting the partitions in various places manually. If there is a connect statement in there, I think it must have been generated by the application assembler (residing in wcapp.prowcapp?). Actually, it looks like the connection information is picked up from appsrvtt.d, I imagine by wcapp.prowcapp.

thanks, Paul

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by pauldownie on 27-May-2014 14:15

Thanks Mike. I appreciate your help with this. I have lots of things to figure out.

Paul

Posted by Mike Fechner on 27-May-2014 14:19

Let us know, when you need professional help.
 
There are people out there that can support with decades of ADM2 experience in any possible deployment scenario…
 

Posted by Peter van Dam on 27-May-2014 14:37

Hi Paul,

I have to agree with Mike and I can say this out loud because I am not in the market for offering these services myself:

Don't go down this road without proper guidance and/or training.

It will save you tons of money and time if you seek guidance from a seasoned consultant in this area (i.e. WebClient and AppServer and ADM) that helps you on the way and prevents you from making all the beginner mistakes that will cost you a lot of time and frustration.

It is up to you but don't say we did not warn you.

-peter

Posted by pauldownie on 27-May-2014 14:56

That's good to know Mike, thanks.

This thread is closed