Sample for building forms based on a Postgres DB

This forum is meant for examples of X# code.

RGreim4XS
Posts: 41
Joined: Sat Feb 08, 2020 7:47 am

Sample for building forms based on a Postgres DB

Post by RGreim4XS »

Hi,
I have now a working environment with a Postgres Server running on a IMac .
I can connect to DB with Visual Studio via npgsql.
There are many samples using C#.
But what is the best way to do it with XIDE/ VS ?
Do I need extra paid libs / runtimes ?
I remember from my past, everytime I say enterprise or server I have to spent extra money.
This is one of the reasons why.I’m still using DBFs .


Thx for pointing me to PostgressSQL in my last post ( database question)

Rainer
User avatar
wriedmann
Posts: 3784
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Sample for building forms based on a Postgres DB

Post by wriedmann »

Hi Rainer,
for a new SQL based application there is a basic question: what GUI? WPF or Windows Forms?
I'm build my new applications nearly entirely using WPF and MVVM - and using XIDE, building the forms in code and not in XAML as most others. This is because I prefer XIDE over VS, and second because I feel that building forms code based gives me more flexibility.
And if you find code using C#: why not transport that to X#?
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
RGreim4XS
Posts: 41
Joined: Sat Feb 08, 2020 7:47 am

Sample for building forms based on a Postgres DB

Post by RGreim4XS »

Hallo Wolfgang, when I start with x# I want to use the x# Infrastructure and tools.
As Im an old FoxPro and Java dude, I have tools for doing most of my work , as I worked for a long time with datadriven frameworks , code generators, ORM mappers and more.

If.taking c# code to adapt it to x# why not.

Thanks again., also for the hint about MVVM.

Rainer
User avatar
wriedmann
Posts: 3784
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Sample for building forms based on a Postgres DB

Post by wriedmann »

Hi Rainer,
unfortunately there are no such things in the X# language.
But - and this is the real great thing: you can use any C# library you like as it were a X# library.
Personally, I like the X# language as it is easy to read and understand (much easier than C#), and because there are things like the macro engine and the RDDs (and not to forget the tons of legacy code I have to maintain and to move forward).
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
RGreim4XS
Posts: 41
Joined: Sat Feb 08, 2020 7:47 am

Sample for building forms based on a Postgres DB

Post by RGreim4XS »

Hallo Wolfgang, da gehts mir besser, VFP lass ich’s wies ist, und fang neu an,

Ist schon cool, das Robert soviel Energie in X#,steckt.
In meinen News heists immer, nimm .net und Java und blos kein / VFP, /…
6:00 , schläfst Du eigentlich auch…
VG Rainer
User avatar
wriedmann
Posts: 3784
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Sample for building forms based on a Postgres DB

Post by wriedmann »

Hi Rainer,
fortunately my VO applications are critical for my customers businesses, so I need to keep them running and need also to modernize the base.
And using X# you are effectively using .NET - and you can use all the tools and libraries and code samples that are available.
Wolfgang
P.S. my working day starts at 5:30 and normally ends at 19:00 - my home and my office are in the same building
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
ic2
Posts: 1865
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Sample for building forms based on a Postgres DB

Post by ic2 »

Hello Wolfgang,
RGreim4XS wrote: If.taking c# code to adapt it to x# why not.
Why not? Because, even using ILSpy, I am often unable to translate more elaborate C# code to working X# code. So I end up asking it here, which always gives me the requested reply.
But, as it is very easy to have C# code and X# code in one solution and then call methods from the C# code from X#, I found that I prefer to keep the code in C#. C# is a terrible program language compared to X# but when I find a working starting point in C# it is often easier and less time consuming to continue in C# than to try to translate it first.

Dick
RGreim4XS
Posts: 41
Joined: Sat Feb 08, 2020 7:47 am

Sample for building forms based on a Postgres DB

Post by RGreim4XS »

Hello Wolfgang,with all the. work, don’t forget worklife balance..
Stay healthy Rainer
User avatar
wriedmann
Posts: 3784
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Sample for building forms based on a Postgres DB

Post by wriedmann »

Hi Rainer,
I'm so lucky to live in a place where other people comes to pass their holidays.
So, even if I'm now back to work, today I was on the first mountains peak for this year.
Wolfgang
SpitzigeLun.png
SpitzigeLun.png (1.33 MiB) Viewed 2011 times
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
RGreim4XS
Posts: 41
Joined: Sat Feb 08, 2020 7:47 am

Sample for building forms based on a Postgres DB

Post by RGreim4XS »

Hello Wolfgang,
im living at Swabian Alb near Ulm. Also a very nice place. Sometimes I can also see the Alps.
This is my summer home office..
BR Rainer
284D03DE-9803-4904-AE64-DB79BC8B03E8.jpeg
284D03DE-9803-4904-AE64-DB79BC8B03E8.jpeg (89.45 KiB) Viewed 2011 times
Post Reply