Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When to connect
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Divers
Thread ID:
00978766
Message ID:
00978999
Vues:
56
Kevin,

I'm learning .Net, so I thought a great way to learn this would be to
jump right in and convert an existing VFP Desktop app to a VB.Net app
against SQL data.

The application is a Business Management app. It handles customers, orders,
inventory, tracks work done.

I would like this new version to be a 3 tier app, with a GUI, BizObj's
and a data layer that could access VFP, SQL or even Oracle data.

I don't see an immediate need to web enable this app, but I would like to
have the data layer return results as XML.

I've concluded that I want to access the SQL data via Stored Procs,
through Biz Objects and back to the GUI.

A couple of quick questions on all this:

1) I will need a BizObj for each table. So the customer BO will have
methods that call the appropriate Stored Proc in the DB:
'** Method boCust.GetCustomerById()
Public Function GetCustById(iCustId AS Integer) AS String
  
  Dim sRetVal AS String
  sRetVal = oDataObj.ExecuteSP("GetCustById", iCustId)

End Sub
Am I missing anything here?

2) How do I convert the results of a SQL query to XML in VB.Net?

I'm not sure if this would all be done in some fashion like VFP, with
CURSORTOXML() and XMLTOCURSOR().

Thanks



>Hey, Kevin
>
>Can you provide a few specifics about your general architecture and requirements (internal application only, or do you have some/all users who will connect remotely, is there just one database involved or could this app have to access multiple databases, is this with winforms or browser-based, etc.)
>
>Whether this is an internal-only app, or one that's distributed (or potentially may be distributed) can factor into your decisions and approaches.
>
>Rod and Bonnie gave good advice - in a distributed environment you want to open/close on demand. Open the jar, grab the cookie, neatly close the jar...or at some point you may wind up with little crumbs all over the place. ;)
>
>I agree with Bonnie, even if you're using Winforms, you'll still want to use Web Services if some users are accessing remotely. In that instance, the web service will likely work with some business object in your application layer to handle the data access to your database and return results back to your client piece.
>
>Her reference to remoting is partly because some people run into a client/company that flat out will not permit IIS to provide access across physical boundaries. (Pretty unusual, but it can happen). But aside from that, Web Services is a great way to go for a distributed app. They're fairly easy to implement, and it seems MS is investing more and more into that approach.
>
>Just one more thought...sometimes a user may need to access two different databases. Maybe one is production and one is test - or maybe the same app is used for different customer databases. The user could select which database they want to log into, and the client piece sends a flag/variable for the selection through the web service - and then the application layer determines which connection string (which might be read out of XML, might be encrypted, depending on your authentication) to associate with that flag/variable. Just some random thoughts.
>
>Great discussion! ...and Rod/Bonnie are always right! ;)
>
>Kevin
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform