dcsimg
Results 1 to 18 of 18

Thread: .net Core possibly a proper vb6 replacement

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Posts
    362

    .net Core possibly a proper vb6 replacement

    Hello Group,

    Not sure anyone would have any deeper insight than what google provides, but it appears MS is going full circle back to native compiling with .net core

    It also looks like .net core will support GUI development soon, and also claims to be cross platform.

    In my mind this means in the near future vb6 code could possibly be converted to vb.net ( I know it will be hard, but probably easier than moving to another language ) and compiled with .net core as a native exe

    any deeper insight, possible pitfalls ... Am I looking at this wrong?

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    34,189

    Re: .net Core possibly a proper vb6 replacement

    I'm not sure whether .net core will truly support GUI development as .net core. From what I have heard, the core part will interact with the GUI part in a nice fashion, but GUI won't be a part of .net core. The reason for this would be that .net core is intended to be cross platform. As you can understand, making things like math libraries, networking (on the TCP/IP stack), and data structures be cross platform is easy, while making GUI elements be cross platform...has never really been solved all that well.

    All graphical OS will have a concept like a Window or Form, but how you interact with that in terms of moving it, expanding it, and selecting it...those can differ from one OS to the next. Making a GUI cross platform is hard. A click might do one thing on this OS, and require a Double Click on that OS. This OS might do drag and drop, the next might do some kind of selection with the same actions.

    So, MS is really WANTING to make .NET core a write-once-run-everywhere environment, and they have done that as long as you have no UI, but that last step, of getting a UI into .NET core, doesn't really sound imminent. It seems like they are trying to get to the point where everything but the UI is .NET core, then you can stick whichever UI you want to it.

    For certain, core 3.0 is moving in the right direction. You'll have to decide whether that break at the UI will work for you. However, the bit about compiling to native is already there.
    My usual boring signature: Nothing

  3. #3
    Frenzied Member wqweto's Avatar
    Join Date
    May 2011
    Posts
    1,577

    Re: .net Core possibly a proper vb6 replacement

    Last time I saw a small-to-medium .net core project compiled to native executable it was about 57MB in size.

    Does anyone know is there is any progress about compile size in final 3.0 release?

    cheers,
    </wqw>

  4. #4
    Fanatic Member
    Join Date
    Nov 2017
    Posts
    824

    Re: .net Core possibly a proper vb6 replacement

    Quote Originally Posted by axisdj View Post
    In my mind this means in the near future vb6 code could possibly be converted to vb.net ( I know it will be hard, but probably easier than moving to another language ) and compiled with .net core as a native exe
    VB6 code has been able to be converted to VB.NET since VB.NET 1.0/2002 was released.

    That being said, what does VB6 code have to do with this at all? It seems like you are insinuating that some upcoming change is going to make the VB6 code->VB.Net code transition easier. It seems unlikely (to put it mildly) that anything being done by Microsoft at this point now or at any point in the future would have a positive impact on the ease of conversion from VB6->VB.NET. That ship has sailed once the functionality to attempt to convert a VB6 project into VB.NET was removed from VB.NET many versions ago.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Posts
    362

    Re: .net Core possibly a proper vb6 replacement

    Quote Originally Posted by OptionBase1 View Post
    VB6 code has been able to be converted to VB.NET since VB.NET 1.0/2002 was released.

    That being said, what does VB6 code have to do with this at all? It seems like you are insinuating that some upcoming change is going to make the VB6 code->VB.Net code transition easier. It seems unlikely (to put it mildly) that anything being done by Microsoft at this point now or at any point in the future would have a positive impact on the ease of conversion from VB6->VB.NET. That ship has sailed once the functionality to attempt to convert a VB6 project into VB.NET was removed from VB.NET many versions ago.
    The reason I bring it up, is becuase I am in the middle of a long process migrating one of my projects to lazarus, it slow and painfull , one reason is the language difference (vb to delphi)

    I think a conversion from vb6 to vb.net would be easier, and if a .net core cross platform native exe is possible it becomes a promising proposition

    here is what sparked my curiosity: https://visualstudiomagazine.com/art...1-preview.aspx

    wp

  6. #6
    Fanatic Member
    Join Date
    Nov 2017
    Posts
    824

    Re: .net Core possibly a proper vb6 replacement

    I think a conversion from vb6 to vb.net would be easier, and if a .net core cross platform native exe is possible it becomes a promising proposition
    VB6->VB.NET is almost certainly easier than VB6->Delphi. But that's always been true.

    I guess the ambiguity is where it seems like you are also suggesting that this news means that a VB6->VB.NET migration that someone does next year is going to be easier than someone trying to do the exact VB6->VB.NET migration last year before this news was released and before these changes were made. If you do think that, I'd be curious why, because I think it should go without saying that nothing MS is currently doing in VB.NET is being done with a thought of "how can this help people who are still in the process of moving off of VB6".

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Posts
    362

    Re: .net Core possibly a proper vb6 replacement

    Quote Originally Posted by OptionBase1 View Post
    VB6->VB.NET is almost certainly easier than VB6->Delphi. But that's always been true.

    I guess the ambiguity is where it seems like you are also suggesting that this news means that a VB6->VB.NET migration that someone does next year is going to be easier than someone trying to do the exact VB6->VB.NET migration last year before this news was released and before these changes were made. If you do think that, I'd be curious why, because I think it should go without saying that nothing MS is currently doing in VB.NET is being done with a thought of "how can this help people who are still in the process of moving off of VB6".
    Becuase you get 2 benefits with .net core not previously available:

    1. native exe that runs faster (similar to vb6 exe)
    2. cross platform to be able to run on linux etc..

    those two benefits makes it viable where as before it was not. the native exe is key.

    https://www.infoq.com/articles/dotnet-core-3-hunter/

    wp
    Last edited by axisdj; Oct 18th, 2019 at 11:31 AM.

  8. #8
    Fanatic Member
    Join Date
    Nov 2017
    Posts
    824

    Re: .net Core possibly a proper vb6 replacement

    Ok, I see what you are saying. But I doubt that people who are still clinging to VB6 will see this development as THE game changer that makes them want to finally make the conversion. I don't think the lack of a native exe is what has kept them from moving on all this time. But who knows, it might make some take a new look at the benefits.

  9. #9
    Hyperactive Member
    Join Date
    Mar 2018
    Posts
    344

    Re: .net Core possibly a proper vb6 replacement

    Quote Originally Posted by wqweto View Post
    Last time I saw a small-to-medium .net core project compiled to native executable it was about 57MB in size.

    Does anyone know is there is any progress about compile size in final 3.0 release?

    cheers,
    </wqw>
    you can trim it: https://www.hanselman.com/blog/Makin...xecutable.aspx

  10. #10
    Hyperactive Member
    Join Date
    Feb 2019
    Posts
    440

    Re: .net Core possibly a proper vb6 replacement

    .Net developers had for a very long time the ability to compile to native code by using Ngen.

  11. #11
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,625

    Re: .net Core possibly a proper vb6 replacement

    The garbage collection is the performance sucker. If you carefully hand-manage disposing stuff you might tweak it up or just as easily make matters worse. As long as you max out the RAM on the system, load from SSD, etc. you can almost ignore the cost of the bloated runtime itself now.

  12. #12
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,403

    Re: .net Core possibly a proper vb6 replacement

    Quote Originally Posted by axisdj View Post
    Not sure anyone would have any deeper insight than what google provides, but it appears MS is going full circle back to native compiling with .net core
    That they did - but sadly there's no option in the compiler, to turn off the Garbage-Collector...
    (some languages/compilers allow both modes).

    So, .NET-Core is out (at least for me) ... because my "ideal native compiler" has to support class-instances,
    which will die immediately (de-allocating their instance-memory), as soon as they go "out of scope".

    And then ... a Hello-World-Console-App with no GUI at all - is apparently:
    (even after an extensive "Trim-Down", which replaces larger parts of Native-Code with IL);
    still a whopping 13MB in size.


    Quote Originally Posted by axisdj View Post
    It also looks like .net core will support GUI development soon, and also claims to be cross platform.
    No - as it is currently (and will remain), you can not have both:
    - if you use .NET-Core3's new "GUI-bindings", you tie your code-investments to the Windows-platform exclusively...
    - if you want to use it cross-platform, only HTML5-GUIs remain (Electron-like "Browser-based Desktop-Apps")...

    So - in case you use HTML5-GUIs (to remain "cross-platform") -
    there's suddenly a whole lot of competition from other languages and compilers which are already cross-platform, and have a much smaller footprint.

    So, basically you're back to square one with .NET-Core, which completely misses the mark in my opinion -
    all due to the fact, that MS is apparently unable (or unwilling) to provide "Desktop-GUI-Libs" in a platform-independent manner.

    So we have the somewhat funny situation, that for VB6:
    - a platform-independently designed GUI-Framework already exists (RC5 - with a very small footprint)
    - the only thing missing (yet), is the platform-independent Compiler - to retranslate the RC5 (along with other VB6-code)

    Whereas with .NET-Core you have:
    - a platform-independent "Core" of basic functionality in a few Dlls which abstract from a given system
    - a platform-independent compiler (with a lot of "nasty warts, other languages do not have")
    - but no "real, patform-independent Desktop-GUI-framework" (WinForms, as well as WPF are as deprecated as the old VB6-GUI-tools"

    Olaf
    Last edited by Schmidt; Oct 18th, 2019 at 01:49 PM.

  13. #13
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    34,189

    Re: .net Core possibly a proper vb6 replacement

    I'm not sure about that bit about sticking with HTML5-GUIs, but then again, I'm not so certain of anything with MS, these days. They do want to be cross platform with .NET, and Core is a part of that. However, it may be that Xamarin is the GUI solution they are leaning towards...or maybe there's an internal battle over that.

    I would say that a GUI that is cross-platform between Windows and Linux is FAR more likely than one that is cross-platform between Windows and Apple.

    As to file size, I don't think anybody cares anymore. When I can get a terrabyte in a micro-SD format that is smaller than the nail on my little finger (and most of that is the housing and leads), I have a computer that can address far more than a terrabyte, and I'm on a bus that can load 400 MB/s up to 1 GB/s from what amounts to the HD, what is it worth to me to cut my exe from 50MB down to 1 MB? Not a cent.

    I can see that for IoT and embedded systems, a large size could be an issue...except that a terrabyte can take up almost no space and minor costs, so even there it barely matters. Put a Gig into that IoT device, it won't cost you a dollar, and your 50 MB exe will be taking up less than 5% of your RAM.

    What a strange new world that has such devices in it.
    My usual boring signature: Nothing

  14. #14
    Hyperactive Member
    Join Date
    Mar 2018
    Posts
    344

    Re: .net Core possibly a proper vb6 replacement

    Quote Originally Posted by Shaggy Hiker View Post
    I would say that a GUI that is cross-platform between Windows and Linux is FAR more likely than one that is cross-platform between Windows and Apple.
    It doesn't make sense to focus on cross platform UIs on linux. The market share just isn't there (unless you want to include Android in the the linux category).

    .net core and mssql on linux are attempts to get microsoft products on the backend where linux has always had a huge lead.

  15. #15
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    34,189

    Re: .net Core possibly a proper vb6 replacement

    That feels right, to me, but cross platform on Apple just seems like a nightmare from start to finish. The way people interact with forms is different, the shortcuts are different, and the company just is not welcoming for drive-by coders who don't want to set up house in their ecosystem and remain on the leash.
    My usual boring signature: Nothing

  16. #16
    Member
    Join Date
    Jun 2019
    Posts
    38

    Re: .net Core possibly a proper vb6 replacement

    Microsoft already announced that .NET Framework will merge with .NET Core and will become .NET 5 in November, 2020. That's why they are moving lots of .NET Framework code to .NET Core and now with Core 3 we have WinForms and WPF UI but it is only for Windows. And as planned, WinForms and WPF will stay for Windows only in next years.

    About native compiling discussed in this topic I think someone misunderstood what is happening. The code is still compiled to IL (intermediate language) and will still run using JIT compiler. The difference is that now you can create native executables - EXE for Windows, ELF files for Linux. In previous .NET Core user has to type dotnet run to start the app, now can just "double click" on it.

    The "big" size of compiled apps - it is done only when the project is published with <PublishReadyToRun> flag set to true in the project file. This way the compiler will copy to the publish directory all required libraries (e.g. System.Data.dll, System.Net.dll, System.IO.dll, etc.). The result can be run on other machines which don't have .NET Core runtime installed. That's why "Hello World" app from 165KB becomes 69MB (trimmed) and 120+MB (untrimmed) in size. This is done to avoid dependencies problems when distributing the app on multiple machines where is not known what is installed. Also it is perfect for containers usage to avoid installation of full .NET Core runtime and just copy the application to the container.

    Since in this forum we are mostly interested in native desktop apps the cross platform support is not what we expected. Still Xamarin is required and for MacOS is required an Apple computer or laptop to perform the compilation. But for console/web/services apps the compilation is really cross platform and you can create executables (with .NET Core 3, for previous they are just DLLs) which will run on Linux and MacOS from Win dev environment.

  17. #17

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Posts
    362

    Re: .net Core possibly a proper vb6 replacement

    Olaf,

    Thanks for your insight in .net core, I do see your point of view.

    I am curious what are your thoughts on Lazarus?

    thanks

  18. #18
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,655

    Re: .net Core possibly a proper vb6 replacement

    Quote Originally Posted by Schmidt View Post
    So we have the somewhat funny situation, that for VB6:
    - a platform-independently designed GUI-Framework already exists (RC5 - with a very small footprint)
    - the only thing missing (yet), is the platform-independent Compiler - to retranslate the RC5 (along with other VB6-code)

    Olaf
    Olaf, we'd like to know what you have planned for the future of RC5. Perhaps releasing a commercial RC5-based development platform will be more valuable to you and RC5 users.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width