Results 1 to 7 of 7

Thread: Basic asynchronous operations

  1. #1

    Thread Starter
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,684

    Basic asynchronous operations

    Developers, novice and hobbyist can avoid performance bottlenecks and enhance the overall responsiveness of your application by using asynchronous programming. Asynchrony is essential for activities that are potentially blocking, such as when your application accesses the web or local.

    Access to a web or local resource sometimes is slow or delayed. If such an activity blocks within a synchronous process, the entire application must wait. In an asynchronous process, the application can continue with other work that does not depend on the web resource until the potentially blocking task finishes.

    There are many long time coders using BackgroundWorker class which works for desktop and web applications while working with the await operator Jump and various .NET classes which offer asynchronous methods and/or running synchronous operations from a Task Jump offers more flexibility. Intent is to provide simple to intermediate code samples to assist developers, novice and hobbyist a framework to work with asynchronous operations using the await operator in tangent with Task.

    See the following GitHub repository for several code samples done with Visual Studio 2017 and will work with Visual Studio 2019. For a breakdown of code, see Microsoft TechNet article.

    Important, for the project SqlServerSimpleAsync, open DataScripts.sql, inspect the path where the database will be created and ensure it's proper for your box. Next run the script in Visual Studio or from SSMS (SQL-Server Management Studio).

    Finally, the best place to start is with AsynchronousCancellationTokenSample project.

  2. #2
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: Basic asynchronous operations

    Please provide the same for VB6 then I will be impressed!

  3. #3

    Thread Starter
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,684

    Re: Basic asynchronous operations

    Quote Originally Posted by yereverluvinuncleber View Post
    Please provide the same for VB6 then I will be impressed!
    Never, ever touched VB6 and never will.

    The code samples are not to impress but for learning.

  4. #4
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: Basic asynchronous operations

    Quote Originally Posted by kareninstructor View Post
    Never, ever touched VB6 and never will.
    You don't know what you've missed.

  5. #5

    Thread Starter
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,684

    Re: Basic asynchronous operations

    Quote Originally Posted by yereverluvinuncleber View Post
    You don't know what you've missed.
    I code in ASP.NET Core/Entity Framework Core and WPF/Entity Framework Core applications, doubt that Visual Basic classic can even come close to matching what can be done with ASP.NET Core/Entity Framework Core. And doubt Visual Basic classic can do cross platform.

  6. #6
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: Basic asynchronous operations

    Well, we do our best.

  7. #7
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Basic asynchronous operations

    Quote Originally Posted by yereverluvinuncleber View Post
    Please provide the same for VB6 then I will be impressed!
    Asynchronous methods are a compiler feature. You can't do this in VB6 without a new compiler.

    Quote Originally Posted by kareninstructor View Post
    I code in ASP.NET Core/Entity Framework Core and WPF/Entity Framework Core applications, doubt that Visual Basic classic can even come close to matching what can be done with ASP.NET Core/Entity Framework Core. And doubt Visual Basic classic can do cross platform.
    Nah it can't. There are no equivalents in the VB6 space to match heavyweights like ASP.Net, WPF and EF. There's a library called vbRichClient that VB6 users use which aims to bring a lot of modern features to VB6 and it's really good but it hardly compares to these titans in the .Net ecosystem. You're still going to have to do a lot and I mean a lot of leg work on your own to match the power and flexibility of something like EF or WPF.
    Last edited by Niya; Sep 16th, 2021 at 01:23 AM.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width