Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Anthony D. Green
    @AnthonyDGreen
    #If COMPACT_FRAMEWORK Then
        Class Data
    #Else
        <Serializable>
        Class Data
    #End If
    I remember having to do this back in 2004 on a project because compact framework didn't support serializable.
    I'm actually working on 2 new VB projects right now but I understand that's just an anecdote and not data.
    And these aren't my projects, they're contract gigs.
    One for a VB enthusiast and another for a guy who seems to like VB and wants to maintain the project after I'm done. Someone already tried to pitch him on C# and he just doesn't want to be bothered. It's a WinForms app though. I could probably make it WPF but I'm not sure if it matters.
    Anthony D. Green
    @AnthonyDGreen
    And truthfully the biggest reason to use WPF is because of a "feeling" that I "should" use newer technologies because they're newer.
    And there was all this fear that WinForms would be killed one day and you gotta stay current if you want to be supported and here we are 15 years later and WinForms on .NET Core looking pretty good and supported.
    Mohammad Hamdy Ghanem
    @VBAndCs

    the biggest reason to use WPF is because of a "feeling" that I "should" use newer technologies because they're newer.

    I disagree. I create new Winforms only for fast samples and demos, but in any real project I use WPF, as it makes designing the UI easier especially in DB apps, as I can show the data in anyway I imagine, and make complex views by just using lists and expanders. Easier doesn't ignore that xaml needs some effort to master, but once a data form is well designed, all other forms will be done fast and easy. Also, wpf needs a lot of workaround and tricks to overcome many issues, but it is a very flexible framework, and and we have control over every component of it, so, workarounds are always available.

    Cristian FRC
    @cristianlt23
    Paul M Cohen
    @paul1956

    Yes and it is very common in large projects

    [Serializable]
    #if COMPACT_FRAMEWORK
    [SomeAttrib]
    #else
    [SomeOtherAttrib]
    #endif
    public class SampleClass
    {
        // Objects of this type can be serialized.
    }

    A lot of code looks like this and even to see the other branch required 2 passes

    Paul M Cohen
    @paul1956
    @VBAndCs it was a full time "job" keeping the converter current. I offered you the option to contribute you didn't want to, if something affects me, I fix it. The Medical App I am working on has multiple contributors of new feature (not just bug features) and testers around the word testing in different cultures. It has many orders of magnitude more users who depend on it to keep their and their children's diabetes under control using a Windows platform, people who can't use phones at work or what deeper insight into how their insulin pump works.
    CyrusNajmabadi
    @CyrusNajmabadi
    :+1:
    Communities only work when people can get help from each other. Having an expectation that people just do work to benefit someone else, without any help in reverse is not ok. It's taking advantage of someone.
    Anthony D. Green
    @AnthonyDGreen
    Well with classes you can use partial to separate individual attributes out but I get that it's still annoying and that doesn't help you with other members.
    VB doesn't permit preprocessing within a statement. This is probably the most compelling scenario for it.
    Anthony D. Green
    @AnthonyDGreen
    I also had one in C# on a consulting project where certain methods calls in a LINQ query were conditional to whether the code was compiled against full framework EF or EF Core.
    I wonder if there's actually no technical reason VB doesn't support them and we just decided not to increase scope during Roslyn so we preserved the restriction even though it's not needed.
    Paul M Cohen
    @paul1956
    @AnthonyDGreen I started looking at removing the restriction when I added _ comments and it seemed rather trivial for Attributes, but the formatter was being rewritten (also it was around announcement about no new features) and the PR was rejected.
    @AnthonyDGreen For translation it makes life a lot easier otherwise just duplicate the code. The hardest thing is when the condition is in the middle of a long list at Attributes, and you find that a lot is tests.
    John Moreno
    @jrmoreno1
    @AnthonyDGreen : my biggest question wouldn’t be WPF or WinForm but does it need to be a desktop app. Of course that may be due to the fact that I haven’t worked on a desktop app in ages and the ones I did work on would have been better off as web apps.
    @AnthonyDGreen : just out of idle curiosity do you recall any instances of doing more work in order to avoid scope creep and/or just preserving existing behavior?
    Mohammad Hamdy Ghanem
    @VBAndCs
    @paul1956
    Mohammad Hamdy Ghanem
    @VBAndCs
    If this app is yours, so congrates. It is a nice job. But if you are just one of hundreds contributers on this app, so, you are putting your experince in the wrong place, as this app will go on without you as it did before you. We ate here to save vb.net so endless of such apps can be easily done by hoppies and students anywhere for decades to come. This is wht I am pushing you to complete your important work on the converter, which does not mean anything to me personally as i use both c# and vb and have experience with many other available tools to get the job done. I am not talking about anythibg personally here. I just hope every one to use his full potintial to save vb.net. And by the way, if i decided to work on the converter you will not be able to review anything after me, because I will change million things down to every var name to fit my conventions then take over in a new fork. Luckily I have no time to do so 😊.
    Paul M Cohen
    @paul1956
    @VBAndCs I created the app because I needed it and it went virtual because all the existing apps are display only and run on phones. This app actually provides analytics (and multiple graphs) and runs on Windows and can feed data into other Windows analytics apps. You are welcome to fork the translator and try to keep up with C#. It would be more productive if your just update things that are broken so everyone can benefit.
    Mohammad Hamdy Ghanem
    @VBAndCs
    @paul1956
    Nice work.

    It would be more productive if your just update things that are broken

    This is not possible, because if i want to do so, I would need to understand the whole app first, and I will modify things while I am walking through the code, so, I can work on the app years to come!
    This is exactly one of my favorite areas in programming, but currently ModVB is my priority after i get free from sVB (If this is possible :( ).

    Anthony D. Green
    @AnthonyDGreen
    @jrmoreno1 there were a few times, yes. Nothing too big but sometimes we added an error back the we didn't need. Incidentally, comments after implicit line continuations just worked when we finished the parser. It was free because of how the parser was implemented and we discussed adding the error back but decided not to even though it meant more testing. And one thing we did that I kinda regret was redoing all the CLSCompliant validation. I would have preferred that all be handled in an FxCop style analyzer but I lost that fight. Folks felt it was wrong to move such functionality on users and the whole analyzer infrastructure wasn't at mature as it is now when it came time to implement that in the compiler.
    CyrusNajmabadi
    @CyrusNajmabadi
    This is not possible
    @VBAndCs you insist it's impossible for you to give any time at all to this, while browbeating someone else for not being able to give time to it either.
    Can you please stop doing this to other people in the community. No one owes you their time and energy. And it's particularly galling that you keep insisting they do while also remaining adamant that you will not help them in the slightest.
    CyrusNajmabadi
    @CyrusNajmabadi
    This is a community.
    Communities work when the members help each other out and are there for each other.
    John Moreno
    @jrmoreno1
    when trying to load my website, vbc.exe (assembly 3.6.0) is giving a fileloadexception for Microsoft.CodeAnalysis.VisualBasic version 4.2.0 (assembly 3.6.0 is installed when published). I checked the vbc.exe.config and it does have a binding redirect to 4.2.0. I’m referencing the 3.6.0 nuget package…anyone know what I can do to get this to publish correctly?
    John Moreno
    @jrmoreno1
    Other than simply replacing the config file with a good one (which works)
    By which I mean replacing it after publishing works, but I wouldn’t consider that a solution
    Anthony D. Green
    @AnthonyDGreen
    version 4.2.0?
    Anthony D. Green
    @AnthonyDGreen
    Hmm, so your website is ASP.NET Core or NetFx Web Forms or what?
    I guess you're referencing the Roslyn CodeDOM provider or something.
    John Moreno
    @jrmoreno1
    @AnthonyDGreen : yeah, using asp.net webforms 4.8, no core, yes referencing the codedom via nuget package 3.6.0. I have a c# mvc app in the same solution, using the same version of that nuget package, no problems with the deployment
    John Moreno
    @jrmoreno1
    There are 4 to 5 redirects that go to later versions in the vbc.exe.config for the vb project and to earlier (and correct) versions in the vbc.exe.config from the c# project.
    John Moreno
    @jrmoreno1
    On closer look, the difference could be better described as : the only thing that is the same is the startup/runtime (4.7.2) / appcontextswitchoverrides, but for the binding redirects only System.Threading.Tasks.Extensions is the same. the C# project has the correct versions and the vb project has the wrong version.
    John Moreno
    @jrmoreno1
    Must have been a bug in the web deploy packaging stack, fixed by deleting the projects build working directory on the build server and running it all again.
    Cristian FRC
    @cristianlt23

    Checking in (Wave 2)
    @AnthonyDGreen

    Congratulations Grandmaster Anthony D. Green, I really like the scope of technologies you are focusing on, keeping VB.NET competitive and with more mature technologies without an excessive number of tools is very important.

    In this new journey of VB, which begins with your leadership, not having confusion and countless tools to do the same thing is very important, being simple and direct has enormous advantages.

    VB for desktop is already wonderful.

    VB for Web needs improvement, but being in ASP.NET and being competitive in various scenarios is what matters.

    VB for mobile needs to be born, but we don’t need to have 50 different options to do the same thing, we just need a simple, objective and well-documented tool.

    VB for MS office needs to be more of an option to VBA and not just point to Python as a possible replacement.

    VB in the browser may be interesting in the future, as it is a trend of C# and Python.

    With all these precautions not to create too many tools that confuse rather than simplify the user, we can be another simple, productive, economical and very viable language option for new projects.

    We can’t make the same mistake as C# which is getting too big, unfocused, ineligible for many developers when the team is large, in addition to having totally confusing documentation due to too many tools. We don’t need to follow this path or even follow the path of C#, C# aims to commercially please new developers, and as new languages appear like Python, C# tries to approach, this in the future may be a success, but it may be make a big mess.

    We need to be practical, readable, fast and well documented, we need to go back to having the simple, easy and RAD language classification and be competitive with Python and if possible even with Golang, which today is an option for C#.

    The Community should soon help with the integration of the main C++, Python, C# and JavaScript libraries making them consumable by VB.

    Anthony D. Green
    @AnthonyDGreen
    Yep, got your message on the blog. Thanks
    Anthony D. Green
    @AnthonyDGreen
    Bob, WinForms/VB6 is easy to get started with.
    I'm reading up on Blazor and every article has like a 2 page preamble about app models.
    Mohammad Hamdy Ghanem
    @VBAndCs
    I suggested a different model for Blazor. I wish I can write a normal vb function and mark it with <RunAtClient>, so the compiler compiles it to wasm or JS. So, we can call such function from Razor pages. I see this easier that Blazor components, and if implemented in VB, it will e combined with XML literals very easily to create the razor views like I do in Vazor.
    Of curse there would be limitations on the code that can run on the client (not all code can be converted to wasm)
    Jeff Bowman
    @InteXX
    @VBAndCs — Can you not create your own RunAtClientAttribute class that accomplishes what you're after?
    @VBAndCs — BTW, I'm still wanting to take a stab at your VBlazor implementation. Time is very scarce right now, that's all. I'm juggling too many projects. This is the outlook for the foreseeable future.
    Mohammad Hamdy Ghanem
    @VBAndCs
    @InteXX
    It is not about the RunAtClientAttribute. It is about how to compile VB code to wasm, which can be done by adding the functions marked with RunAtClientAttribute in the class that Blazor generates for the Blazor component. But here I don't even want this component, so, I need to go low level to see what blazor does and if it is possible to use classes that are not Blazor components. The idea is not difficult, but it needs time to understand the Blazor source code.
    Of course one trick to try, is to use a trivial Blazor component as an empty shell for whatever code we want to execute. But we need to try t see how far it gets us.