StrataFrame Forum

VFP and Strataframe collaboration

http://forum.strataframe.net/Topic8162.aspx

By AlexSosa - 4/17/2007

I am planning a time and attendance app as a sister product to our current payroll app.  The latter one was developed with VFP.  Because of the complicated labor laws here both applications require a lot of data massaging (SELECTs and more SELECTs), for which VFP is ideal.

On the other hand, we are evaluating using Strataframe for the front end to ease into your world.

The question is, how should the application be layered to take advantage of Strataframe facilities yet place the majority of the calculations in a VFP component?  As user enters data and calculations are performed by the VFP layer, how would the data be shared between the layers?

TIA,

Alex

By StrataFrame Team - 4/17/2007

We have a VfpDataSourceItem that can directly talk to a VFP database.  However, if you want most of your calculations to be in VFP, when you'll most likely want them to be in stored procedures in the dbc or in .prgs that are visible from the dbc.  Then, you can use the BusinessLayer.FillByStoredProcedure to retrieve the values from the sprocs or the DbDataSourceItem.ExecuteStoredProcedure() method to call sprocs directly.  Other than that, if you need to interface with VFP, you'll need to write some sort of COM or use some sort of cross-process communication; named pipes are ugly in VFP, so we generally use UDP across the loopback if we need cross-process communication.
By AlexSosa - 4/17/2007

Hi Ben,

The VfpDataSourceItem would be best if you just need pull data from the VFP database, right? 

Does FillByStoredProcedure mean you make a call to a prg that is visible from the VFP database and and data is brought into the business object?  I need to see code for FillByStoredProcedure and ExecuteStoredProcedure() to understand better.

Please explain what you mean by "we generally use UDP across the loopback if we need cross-process communication".

I thought it may be possible to run locally a "shadow" VFP executable that communicates with Strataframe via some DBFs in a local directory.  What do you think?

Thank you for the answer.  Alex

By Trent L. Taylor - 4/17/2007

The VfpDataSourceItem would be best if you just need pull data from the VFP database, right? 

Correct.

Does FillByStoredProcedure mean you make a call to a prg that is visible from the VFP database and and data is brought into the business object?

No.  This is when you would call a method that is within the DBC stored procedures.  A prg is not going to be accessible in this manner unless called through a VFP stored procedure.

I need to see code for FillByStoredProcedure and ExecuteStoredProcedure() to understand better.

There is really not much to show, bottom line is a procedure must exist within the DBC, for example let's assume that we have a procedure in the DBC named MyProcedure.  You would call it like this:

MyBO.FillByStoredProcedure("MyProcedure")

If it required parms, then you would pass the parms in the second parameter of the FillByStoredProcedure method or create a OleDbCommand with the parameters already set when called.

"we generally use UDP across the loopback if we need cross-process communication".

UDP is a networking protocol that allows a port to be occupied and listened on.  When we need to make two disparate EXEs or applications talk between each other, i.e. a VFP app talking to a .NET app, we create a UDP session within each application that can send and listen which allows us to communicate between the two apps.  You can reference the advanced sample that comes with the framework that shows how to run a VFP application within a .NET environment.

What do you think?

You do not want to do this....talking to a database will be slow, cumbersome, and open up a huge potential for failure at run-time.  This is why we use the UDP method.

By AlexSosa - 4/17/2007

Oops... Is there any way to make Strataframe run with VB Express?  I do have full VS, but it is an older version.
By AlexSosa - 4/17/2007

Brent, sorry to ask about this here, but don't know where else.  I don't have enough rights to edit a previous command entered by myself.

Thanks.  Alex

By Ivan George Borges - 4/17/2007

ahaaa... so Ben and Trent are two personalities of the same person, Brent.

(I know, I know, silly... I promise to go back to my pills in a daily basis)

Hehe

By Keith Chisarik - 4/17/2007

LOL IVAN, that made my day!
By StrataFrame Team - 4/18/2007

The install requires a full version of Visual Studio to install.  The reason being that Microsoft has choosen to make the VS Express editions not support the full range of extensibility that the VS Standard, Pro, and Team Suite products do.  The Express editions do not support VsPackages and lots of macro and add-in stuff.  So, our extensibility doesn't work completely with it.  The Express editions are basically meant to allow you to "get your feet wet," but once you're in, if you want to work with just about any 3rd party tool, you'll have to spring for the full version of VS.
By AlexSosa - 4/18/2007

The latest version I have of VS is 2003 w00t  I uninstalled it a long time ago.

It doesn't seem to make sense to purchase VS2005 now since Orcas is around the corner.   Will Strataframe work with the Orcas beta while the product ships?  Also, do you start the year's worth of updates of Strataframe from the day of activation or the date of purchase?

Thank you,

Alex

By Ivan George Borges - 4/18/2007

Hi Alex.

Have you considered purchasing an MSDN year subscription? I have enrolled in the ISV program, and that entitled us to pay US$ 560.00 for the VStudio and MSDN Premium. You get it all, except fot the Team System. Better than buying VS alone, and you don't need to worry about upgrades.

By Trent L. Taylor - 4/18/2007

It doesn't seem to make sense to purchase VS2005 now since Orcas is around the corner.

Actually it does.  VS2005 will actually have a pretty long life since so many dramatic changes will exist in .NET 3.5.  Aside from that, there are migration or upgrade paths when purchasing 2005.  FYI, if you have an MSDN membership then you can download this for no additional cost.

Will Strataframe work with the Orcas beta while the product ships?

StrataFrame will continue to evolve with the .NET platforms and future SF releases will support many of the new features such as WPF and LINQ.  As for the time frame, even the Orcas is a moving target at the moment, so I cannot tell you if these features will be available the day Orcas is released.

Also, do you start the year's worth of updates of Strataframe from the day of activation or the date of purchase?

Date of purchase.

By AlexSosa - 4/18/2007

Ivan George Borges (04/18/2007)
Hi Alex.

Have you considered purchasing an MSDN year subscription? I have enrolled in the ISV program, and that entitled us to pay US$ 560.00 for the VStudio and MSDN Premium. You get it all, except fot the Team System. Better than buying VS alone, and you don't need to worry about upgrades.

Can you let me know where to go to enroll in ISV program, please?  Thanks,  Alex

By Ivan George Borges - 4/18/2007

Here you are, Alex:

https://partner.microsoft.com/global/program/competencies/isvsolutions

By Ivan George Borges - 4/18/2007

Hey, Alex, I think this is the one you need:

https://empower-isv.one.microsoft.com/isv/programguide/Default.aspx

By AlexSosa - 4/18/2007

[quote]Ivan George Borges (04/18/2007)
Hey, Alex, I think this is the one you need:

https://empower-isv.one.microsoft.com/isv/programguide/Default.aspx[/quote]

Thank you.  That sounds very good.  Just to be sure: when enrolling I pay 560 (same price as for Brazil) and get  licenses for Windows and MS Office Windows Server 2003 etc.  Does the same 560 include 5 licenses for Visual Studio in the MSDN Universal?

The site says you have to reenroll at the end of one year.  Does that include a new payment for each additional year?  What are the gotchas?

Thanks,  Alex

By Ivan George Borges - 4/18/2007


Thank you.

You're most welcome.

That sounds very good.

It does, doen't it?! And... it actually is!

Just to be sure: when enrolling I pay 560 (same price as for Brazil) and get  licenses for Windows and MS Office Windows Server 2003 etc.  Does the same 560 include 5 licenses for Visual Studio in the MSDN Universal?

Yes, you get what is now equivalent to the Universal subscription. But now it is called Premium... those marketing people, you know them... Anyway, it comes with more than you can handle, my eyes shinned when I saw all those DVDs arriving... and the download area is like been closed alone in a candy shop! Smile And this is it, 5 licenses to Visual Studio and others.

The site says you have to reenroll at the end of one year.  Does that include a new payment for each additional year?  What are the gotchas?

This is correct. As it looks like, you can reenroll for an additional year. And I'm not sure, but I would expect that we have to pay again. This is Microsoft, remmember? Well, if I were in their place, I would certainly charge too. There are no "gotchas" (am I too naive?), they only ask you to develop and market a microsoft solution, using their tools. From this point, you might climb the Microsoft Partnership program, I think.

Abraços.

By AlexSosa - 4/18/2007

Very cool.  Thank you.  Alex
By AlexSosa - 4/25/2007

Hi Trent.  Sorry for perseverating in this subject but it is one that I must solve and I am not sure that access through OleDB will be the best solution.  This is the situation:

As data is entered in this application a lot of recalculations are made to provide feedback of overall results up to that point. The recalculations include consulting this and previous transactions and use SQL SELECT commands intensively.  Since data will be stored accross the internet recalculations should be made in the server with only results sent back.  I am told that with OleDB the stored procedure would run at the client.

A solution might be to use a com object running at the server and accessed via SOAP.  Although not totally clear how to accomplish that, I believe that process would run at the server.  It also would solve the problem of keeping intermediate results between calls.  BTW, in this app there wouldn't be many simultaneous clients, so there isn't a resources problem.

Does this approach sound like something that can be done with Strataframe?

Thank you. Alex

By Trent L. Taylor - 4/25/2007

Does this approach sound like something that can be done with Strataframe?

This is a perfect place to use the Enterprise Server.  It will reside on the server and execute your queries or sprocs locally.  You can use COM, but this becomes much more cumbersome and not as efficient.

By AlexSosa - 4/25/2007

Trent L. Taylor (04/25/2007)
This is a perfect place to use the Enterprise Server.  It will reside on the server and execute your queries or sprocs locally.  You can use COM, but this becomes much more cumbersome and not as efficient.

Unfortunately Enterprise Server is too much and too expensive for this situation.  We hope to eventually have dozens of installations each with its data but only one to three users.  If later that is extended to providing centralized data for many clients, it would be another story.

How would the COM approach work?

Thanks,  Alex

By Trent L. Taylor - 4/25/2007

How would the COM approach work?

If you are going to have the need for clients to talk to a remote database, then you will have to use some type of remote approach such as Remoting, Serialization, Sockets, VPN....something before you even get to the COM class.  At that point creating the COM is the simple part.  You just have to create a class library that is COM Visible and expose the logic that will be used to talk to the databases via business objects.

By AlexSosa - 4/25/2007

Trent L. Taylor (04/25/2007)
If you are going to have the need for clients to talk to a remote database, then you will have to use some type of remote approach such as Remoting, Serialization, Sockets, VPN....something before you even get to the COM class.  At that point creating the COM is the simple part.  You just have to create a class library that is COM Visible and expose the logic that will be used to talk to the databases via business objects.

Thanks, I'll look into that.

Alex