StrataFrame Forum

Preparing BO for use with new web server middleware

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

By Greg McGuffey - 12/11/2006

I'm very interested in the new web server middleware SF is about to release. I'm wondering how to build my BO fill/get functions to use the webservice. I.e. I'm currently using SQLCommand objects and SQL with parameters or sprocs with parameters. I'm wondering if this will still work or if I would need to redo how my BOs are getting filled.



I've read the white paper and it states that one would be able to switch dynamically between the web service and using SQL directly. How's this going to work?



Mainly I'm wondering if there is something I need to be doing now to make life easier if we decide to use the new web server.



Thanks!
By Trent L. Taylor - 12/11/2006

I'm wondering if this will still work or if I would need to redo how my BOs are getting filled.

This is correct.  You just program for the target database, not the web service itself. 

I've read the white paper and it states that one would be able to switch dynamically between the web service and using SQL directly. How's this going to work?

It is a data access layer.  It is literally one line of code.  If you want to swap between SQL Server and the ES (Enterprise Server) then you will just change the DataSource to use an EnterpriseServerDataSourceItem instead of a SqlDataSourceItem.

Mainly I'm wondering if there is something I need to be doing now to make life easier if we decide to use the new web server.

Program for your target database.  It is literally a 5 minute implementation problem on the backend....that's the beauty! Smile

By Greg McGuffey - 12/11/2006

OK, I'm sure I understand...I'm just not ready to accept...it's too simple...too easy...



So, if I have the following:





Public Sub FillByProject(projectID as int32)

using cmd as SQLCommand = New SQLCommand

cmd.CommantText = "Select * From Widgets Where ProjectID = @projectID"

cmd.Parameters.Add("@projectID",int)

cmd.Parameters("@projectID").value = projectID

me.FillDataTable(cmd)

End using

End Sub





I won't need to make ANY changes? This will work against the enterprise server?



This can't be true...can it?
By StrataFrame Team - 12/12/2006

Nope, you won't have to make any change... the Enterprise server just serializes your database request over the wire as HTTP and then executes it from the Enterprise Server itself and then serializes the results back to you.  So, you only have to change your datasource to swap back and forth between a direct connection and a connection through the ES.
By Greg McGuffey - 12/12/2006

OK, I just wet myself...w00t



That is very cool! Very cool!!
By Trent L. Taylor - 12/12/2006

Hehe  Yes it is BigGrin