asp tutorials, asp.net tutorials, sample code, and Microsoft news from 15Seconds
Data Access  |   Troubleshooting  |   Security  |   Performance  |   ADSI  |   Upload  |   Email  |   Control Building  |   Component Building  |   Forms  |   XML  |   Web Services  |   ASP.NET  |   .NET Features  |   .NET 2.0  |   App Development  |   App Architecture  |   IIS  |   Wireless
 
Pioneering Active Server
 Power Search










Active News
15 Seconds Weekly Newsletter
• Complete Coverage
• Site Updates
• Upcoming Features

More Free Newsletters
Reference
News
Articles
Archive
Writers
Code Samples
Components
Tools
FAQ
Feedback
Books
Links
DL Archives
Community
Messageboard
List Servers
Mailing List
WebHosts
Consultants
Tech Jobs
15 Seconds
Home
Site Map
Press
Legal
Privacy Policy
internet.commerce














internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

HardwareCentral
Compare products, prices, and stores at Hardware Central!

Visual Basic Client Versus ASP Client
By 15 Seconds Discussion List
Rating: 3.6 out of 5
Rate this article


  • email this article to a colleague
  • suggest an article

    Arthur Asks:

    I'm trying to decide if the client for an app I'm designing would best be built as a standalone VB executable or a web-based ASP app.

    The application will basically consist of a SQL Server DB housed off site and accessible via TCP/IP. The client will be used to view data, modify data etc.--nothing too fancy. There will only be a half-dozen users or so. Having never built a VB app before, I'm just assuming that a VB client will run faster and leaner than an ASP app (with all its requisite, bandwidth-hungry HTML). But I really don't know. Giving users the convenience of connecting to the app from any web browser on any machine might be nice, but I'm really more concerned about performance.

    Anybody have any thoughts/experience/advice about such a decision?

    Rob Replies:

    If you don't have to put it on the Web, then don't.

    What i would do, is develop a good middle tier (all your business logic), and then the VB App around it for presentation. Then, when you want to (if need be) port it over to the Web, you will have very little porting to do.

    Kevin Joins In:

    I am also in a similiar situation where I will be having VB and Web front ends accessing the same middle tier. I am currently doing a lot of research to find out the best way to build the middle tier. I came across an article on MSDN about a Engine-Collection-Class design (http://msdn.microsoft.com/library/default.asp?URL=/library/techart/desipat.htm) that looks interesting. The whole problem I am having is what distributed protocol to use, DCOM or SOAP? How have you normally designed your apps? Do you know of any good articles online that may be of help?

    Rob Explains:

    If you can guarantee that you will always be faced with distribution/integration on M$ platforms then maybe DCOM would be a solution. Otherwise SOAP/Web Services is a good alternative.

    http://www.aspfree.com/devlinks
    Categories: SOAP, Web Services (WSDL), DCOM

    Dan Feels Differently:

    I would say that the ASP solution would be the better way to go. You have one centralised system that you can change, support and update easier than several VB apps lying around. The ASP html doesn't have to be bandwidth hungry, just be careful with your code.

    As for the speed. If you host the ASP app on a decent machine then it could run faster than a desktop VB App.

    Just my thoughts anyway...

    Grateful, Kevin Replies:

    Thanks for the links. I'll have to dig through the SOAP resources. I guess my biggest issues that I have to find out about is how do you restirct access to a soap service. I can guarantee that I will always be using MS platforms and my original thought was DCOM, but with everything moving to web services, I wonder if that would be a more flexible approach for this application?

    Rob Goes Into High Gear:

    Flexible yes, cross platform yes.

    If your biggest issue is to restrict access, then it's not really a problem. Basically the way a standard Web service works (built with the M$ SOAP SDK), is that it makes an HTTP request over the wire. In Version 1, it was handled mostly by either an ASP page, and an include, (or an ISAPI filter), and in Version 2, it is handle basically exclusively by a COM object.

    What I'm trying to say is, when it comes down to it, the easiest way to limit access to a web service can be done the same exact way you would limit access to any other .ASP (server resource) on your site. Some sort of login mechanism. With MSXML3, which has been out for quite some time, and was a big improvement over V2, you have the capabilities of SSL for your secure communication mechanism.

    The beauty of it all, is that you can easily hook into your standard session manager (we just hope that it is not based on cookies / session object!!)

    Arthur Rejoins the Discussion:

    Hi guys (Robert, Daniel, Kevin)

    Thanks for the great discussion...as always, you've got wonderful, helpful suggestions!

    Okay, now I'm really going to reveal my ignorance:

    When you talk about developing a good middle tier, does this mean putting all the business logic in, say, SQL Server itself? Or writing some standalone server components that would do this? Or both?

    So far, I've been focused on doing ASP stuff, and all my logic is just embedded within each page as needed--not at all portable! I've seen at least one example where an ASP developer put all his logic in a separate, giant ASP doc, then included that at the top of every presentation page...is this more along the lines of what you're talking about?

    Rob Breaks It Down:

    Tier 1: Presentation
    -no business logic
    -just transforms calls to the middle tier into something
    appropriate for your presentation
    deployment (HTML, VB Forms, etc..)
    -no data
    -ASP, php, jsp, etc..
    
    Tier 2: Business Logic
    -no presentation logic
    -queries the DB tier (tier 3)
    -transforms calls from the DB, into something useable for the 
    presentation tier
    -all business logic/rules (for example: 5+3 = 8 )
    -COM, DCOM, Beans, etc..
    
    Tier 3: Database
    -no presentation, or business rules
    -just stores & retrieves data
    -DBMS (SQL Server, oracle, access, etc..)
    

    Develop things this way, just in case, you wish to replace #3, its just a matter of plugging in a new database (change your conenction string, or whatever)..or if you want to send content to a phone/pda/whatever, you just rewrite a bit on tier 1.

    Kevin Takes It A Step Further:

    The tiers are broken down to four levels in my case

    Tier 1 is the presentation layer. Your HTML/ASP or in my case VB front ends. There is no DB access done here, just the presentation

    Tier 2 is the business logic layer. This uses the 3rd tier data access component to query the DB for the data and makes the data more presentable for the presentation layer. I am mapping one business object to each entity in my relational database. You also encapsulate the business rules here, such as validaing that required fields were entered, etc. This is also in my case where my DCOM/SOAP calls will be made to.

    Tier 3 is my data access layer. I will be writing a COM component that would wrap ADO and handle all the DB access. This allows the system to be flexible to changes in data access technology. I can take advantage of that by changing it in one place. I am thinking of passing the data back to the 2nd tier using getrows or as a recordset by providing those two methods.

    Tier 4 is the database. This is your SQL Server, Oracle, etc. You want to take advantage of store procedures as much as possible.

    My 2nd and 3rd tier will be Visual Basic components and yes they are all COM components. That is the glue that makes all the magic work. You can learn the basics of COM by reading a few high level overview articles on MSDN. If you want a more indepth discussion of VB and COM you can check out this tutorial, http://www.develop.com/dm/dev_resources.asp#vbcom.

    This conversation string was taken from the 15Seconds ASP Listserv on 4/18/01. If you have an ASP-related question or would like to share some of your knowledge with others, you may join the list by clicking here.

  • Rate This Article
    Not HelpfulMost Helpful
    1 2 3 4 5
    Other Articles
    Apr 27, 2004 - Develop and Customize Web Parts with Custom Tool Parts
    Tool Parts provide an interface for Web Part properties well beyond the capabilities of the default property pane. In this article Gayan Peiris shows how to customize Web Parts with custom Tool Parts.
    [Read This Article]  [Top]
    Apr 7, 2004 - Reusable Components in ASP.NET 2.0, Object Binding and Precompilation
    This article demonstrates how to create a reusable component in ASP.NET 2.0 and then consume it from an ASP.NET page. Also learn how the ObjectDataSource control can be used to directly bind the output of an object to the controls in an ASP.NET page and how precompilation can be used to increase the performance of the Web application and catch compilation errors.
    [Read This Article]  [Top]
    Mar 31, 2004 - Build a Managed BHO and Plug into the Browser
    Browser Helper Objects (BHOs) are COM components that communicate with Internet Explorer to enrich the browsing experience. Michele Leroux Bustamante returns to the world of COM to show you how to build a managed BHO with the help of the .NET Framework's COM interoperability features.
    [Read This Article]  [Top]
    Feb 18, 2004 - Customizing SharePoint Web Parts with Custom Properties
    In addition to creating custom Web Parts for SharePoint Portal Server, developers can actually create their own custom properties to further enhance Web Part appearance and behavior. Gayan Peiris explains the process and provides all the necessary code.
    [Read This Article]  [Top]
    Sep 26, 2003 - Accessing Shared Resources Using ASP.NET
    Accessing shared resources is a challenge for many ASP.NET developers. Tony Arslan explains how a simple serviced component can solve this infamous problem.
    [Read This Article]  [Top]
    Oct 2, 2002 - Function Pointers and COM
    Using callbacks and function pointers in VB can be risky and complicated. Ben Garcia explains his work-around for the function pointer issue he encountered while creating the VB version of his SNMP component.
    [Read This Article]  [Top]
    Sep 4, 2002 - Creating an SNMP Component - Part 2
    In part two of this intriguing article series, Ben Garcia shows how to build an updated and improved SNMP component in VC++ AND VB, and he briefly explains why limitations in VB make VC++ a better language for developing this type of application.
    [Read This Article]  [Top]
    Jul 23, 2002 - Creating an SNMP Component
    Ben Garcia sheds some light on the Simple Network Management Protocol (SNMP). First he provides a history of SNMP, then he dives right into its architecture. Finally, he shows how to build a COM component that communicates with SNMP-enabled devices.
    [Read This Article]  [Top]
    Jun 26, 2002 - Accessing Caller ID from the Web - Part 1
    Paul Apostolos begins his series on using Web services and the MSComm32.OCX component to access caller id information from a Web page. In part 1, learn how to write the Visual Basic program that runs on the server and updates a database with incoming callers.
    [Read This Article]  [Top]
    Nov 20, 2001 - Creating a Server Component with VB - Redesigned - Part 2
    Doug Dean explains different methods of retrieving and manipulating data from a database in a VB DLL so that it is ready to be rendered in a browser.
    [Read This Article]  [Top]
    Mailing List
    Want to receive email when the next article is published? Just Click Here to sign up.

    Support the Active Server Industry



    JupiterOnlineMedia

    internet.comearthweb.comDevx.commediabistro.comGraphics.com

    Search:

    Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

    Jupitermedia Corporate Info


    Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

    Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers