What is your preferred language for plugin development?

Discussions relating to plugin development, and the Jiwa API.

What is your preferred language for plugin development?

C#
10
50%
VB.NET
10
50%
 
Total votes : 20

Re: What is your preferred language for plugin development?

Postby SBarnes » Tue Nov 10, 2015 10:14 am

Hi Mike,

I am aware of Swagger given its popularity though I have not used it personally in a project, I had assumed that you would be using Asp.net Web API, from this can I ask the following:

1. Is the api going to allow for any type of pluggable interface into the pipeline for such things as media formatters (to support other formats besides json and xml), security or error handling etc. ?
2. What over all security will be supported and will this reside within Jiwa itself and will it support SSL?
3. Will the api require IIS or be self hosted?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: What is your preferred language for plugin development?

Postby Mike.Sheen » Mon Nov 16, 2015 9:43 am

Hi Stuart,

SBarnes wrote:1. Is the api going to allow for any type of pluggable interface into the pipeline for such things as media formatters (to support other formats besides json and xml), security or error handling etc. ?

I hadn't planned on doing so, but we're open to such suggestions.
SBarnes wrote:2. What over all security will be supported and will this reside within Jiwa itself and will it support SSL?

Security will be implemented by API keys which will have an ACL type set of permissions controlling what the API key can access. And yes, SSL is going to be supported.
SBarnes wrote:3. Will the api require IIS or be self hosted?

It will require IIS. It won't require IIS, but that will be an option.

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: What is your preferred language for plugin development?

Postby Mike.Sheen » Wed Jun 29, 2016 9:57 pm

We've got a proof-of-concept API running using ServiceStack at api.jiwa.com.au. This is all in flux and will change over time.

There are many issues we need to address, so don't build anything against this yet. We've got this running as an Azure App Service, and it connects to our Azure SQL database for a JiwaDemo database.

To use it you need to first authenticate via a HTTP GET request :https://api.jiwa.com.au/swagger-ui/#!/auth/Authenticate_Get (you can just use a web browser)

Then you can GET or POST from the available methods - such as https://api.jiwa.com.au/swagger-ui/#!/S ... GETRequest - this will read a sales order from the database and return it in the format specified in the accept header, or you can override that and return in XML or CSV.

We're still experimenting and trying to work out what we need to do, but I just wanted to show we're progressing (albeit slowly).

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: What is your preferred language for plugin development?

Postby pricerc » Mon Apr 01, 2019 10:51 am

Since Mike was complaining (viewtopic.php?f=26&t=1114) about the lack of activity in this thread...

Since Microsoft have open-sourced the C# and VB compilers, there is opportunity for anyone to have input into the development of the languages. The respective GitHub urls are:

https://github.com/dotnet/csharplang/ for C#

and

https://github.com/dotnet/vblang for VB

They make for interesting reading, and they accept suggestions from anyone.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: What is your preferred language for plugin development?

Postby Mike.Sheen » Mon Apr 01, 2019 7:09 pm

pricerc wrote:Since Mike was complaining (viewtopic.php?f=26&t=1114) about the lack of activity in this thread...

Since Microsoft have open-sourced the C# and VB compilers, there is opportunity for anyone to have input into the development of the languages. The respective GitHub urls are:

https://github.com/dotnet/csharplang/ for C#

and

https://github.com/dotnet/vblang for VB

They make for interesting reading, and they accept suggestions from anyone.


I was actually referring to the Announcement Read Before Posting which I now realise the post that brought you here incorrectly mentioned a sticky topic which is probably why you thought it was this topic.
We don't actually know who votes on polls or how they vote - so we ask people to specify in their post which language (and Jiwa version amongst other details) so we can best answer their question - as despite preference of language you might be simply trying to modify some code not in the preferred language, so it makes sense for that to be mentioned on a case by case basis.

Anyway, on the topic of the Microsoft Github projects - those VB enthusiasts out there might want to indicate their desire for VB in ASP.Net Core in this Github issue: Visual Basic .NET (VB.NET) support in ASP.NET Core #2738.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: What is your preferred language for plugin development?

Postby pricerc » Mon Apr 01, 2019 7:23 pm

I see a total of 17 votes, 9 for VB and 8 for C#.

Since one of those VB votes is mine, and I'm actually on the fence, that still leaves you at 50/50 :)
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: What is your preferred language for plugin development?

Postby SBarnes » Mon Apr 01, 2019 7:32 pm

To be honest I've never really understood this argument c# vs vb.net, if either will get the job done people should work with what they are comfortable with, it's a bit like the British Brexit no clear answer and just so long as the compromise is not Mike's suggestion from earlier today :lol: as in that case I go with Jexit with no deal

The only reason I switched from vb.net was the amount of code samples that are out there and the fact the Microsoft went c# on .Net core first.

But Mike's little joke did highlight one important functionality that would be helpful it would be good if we could translate plugins from Vb.net to c# and vice versa easily may be that would end the argument.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: What is your preferred language for plugin development?

Postby pricerc » Mon Apr 01, 2019 7:40 pm

SBarnes wrote:To be honest I've never really understood this argument c# vs vb.net, if either will get the job done people should work with what they are comfortable with, it's a bit like the British Brexit no clear answer and just so long as the compromise is not Mike's suggestion from earlier today :lol: as in that case I go with Jexit with no deal

The only reason I switched from vb.net was the amount of code samples that are out there and the fact the Microsoft went c# on .Net core first.

But Mike's little joke did highlight one important functionality that would be helpful it would be good if we could translate plugins from Vb.net to c# and vice versa easily may be that would end the argument.


Actually, for the scale of code usually involved in the discussions here; a method here, a method there, the online conversion tools are pretty good. There are better commercial ones too, but I'm too cheap :P. I think the best ones actually compile and then decompile into the target language.

They only break down if someone's using some really funky edge case on the source language.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: What is your preferred language for plugin development?

Postby pricerc » Wed Dec 01, 2021 3:12 pm

Because I don't want to drag https://forums.jiwa.com.au/viewtopic.php?f=26&t=1613 off-topic.

SBarnes wrote:Whilst this could start a debate over which language is better I say go with the one that works better for you as both largely can do the same job.

I prefer c# for two very honest reasons:

  • When looking for something I can usually find a c# example quicker on google
  • I will be honest and admit it means I have to type less


I don't think either is 'better' (in case it appears that I have an opinion on it).

As you say, they can both largely do the same job, especially when you're talking about business software. And EXTRA especially when you're talking about writing Jiwa plugins.

Except XML. C# sucks at XML. Which is why if I'm doing serious XML stuff, I prefer VB. In Jiwa, that can mean adding a plugin just for that, which you can then reference as needed.

I have built up a small library of bits and pieces in both languages, and just work with whatever I've got; I see no value in translating just for the sake of it.

Now. When Jiwa's plugin compilers get right up-to-date, that might change, since C# has continued getting new language features while VB is officially on "no new features" at Microsoft.

SBarnes wrote:I will be honest and admit it means I have to type less


There are many good arguments for C#, but this isn't one of them.

It *is* a common argument I see for C#, and over at vblang on github there have been several complaints about the amount of typing required to do something in VB, typically using an example of 'poorly' written VB - often a bit of C# directly translated instead of 'interpreted' into a decent VB style.

However, in practice, if you are using a modern editor with intelligent auto-completion, there is little in it, and even ignoring XML, there are cases where VB can require typing *fewer* characters, and even fewer keypresses if you factor in the need to use your shift key (which you need for C#'s squiggly brackets).

Quick e.g. Given these two bits of code, using visual Studio 2019 and intellisense, the difference in the number of keystrokes required is C# winning by about four (give-or-take, depending on your project and how intellisense behaves).
Code: Select all
// C#.
bool test(int a, int b)
{
    return a == b;
}

'' VB.
Function test(a As Integer, b As Integer) As Boolean
      Return a = b
End Function


However, expand it a bit, and things get a bit hazy. In this case, you will likely hit fewer keys in VB:
Code: Select all
    bool test2(int a, int b)
    {
        if (a == b)
        {
            return true;
        }
        else
        {
            return false;
        }
    }

    Function test2(a As Integer, b As Integer) As Boolean
        If a = b Then
            Return True
        Else
            Return False
        End If
    End Function


And if you use VB's built-in LINQ instead of lambdas:
Code: Select all
// C# - lots of shift key action.
return items.Where(i=>i.Key==1).Select(i=>i.Value).Take(1);

'' VB - spaces instead of parentheses
Return From i In items Where i.Key=1 Select i.Value Take 1
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: What is your preferred language for plugin development?

Postby SBarnes » Thu Dec 02, 2021 7:44 am

Why is this starting to feel like one of those discussions that you can have with your other half that starts as a discussion and ends in an argument and the statement honey if we agree what are we arguing about? :lol:

The discussion of vb vs c# always seems to focus on the defence of if you do this, this and this vb is really doesn't really involve more typing, regardless vb is a more verbose language than c# just like XML is more verbose than Json, this is not necessarily a bad thing, recently I saw an argument that put forward in c# alone why verbose is often better for example in c# we can write

Code: Select all
if(!condition)


which is shorter than

Code: Select all
if(condition == false)


whilst the second is longer it is definitely clearer and easier to understand when you come back to the code later as its easy to miss the !, so in my view trying to argue or defend vb's verboseness is quite often defending one of its strengths.

I will always favour c# as we all have a tendency to go with what we know or dance with the one that brung ya and having spent a large part of the time working with Jiwa and other ERPs with web based technologies which all favour c# but even here Microsoft have a number of different technologies and its not one size fits all.

In my view arguing one in favour of the other is not a worthwhile thing to to spend time doing as one of the greatest issues in either is the skill set of the developer doing the job and just getting the job done.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

PreviousNext

Return to Technical and or Programming

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron