Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
X# examples - Hello world
Message
From
22/10/2019 03:03:01
 
 
To
21/10/2019 18:06:31
General information
Forum:
Visual FoxPro
Category:
VFP Compiler for .NET
Miscellaneous
Thread ID:
01671443
Message ID:
01671614
Views:
196
Likes (1)
Hi Thomas,
Firstly thank you for you contribution on the X# forums. It is providing a warm feeling to see efforts made on other forums bring some action from new "familiar" names.

> On the embolded: I had come to similar conclusion, hence my searches on Clipper / VO / Harbour / xHarbour / Vulcan.Net ( / xBase++ excluded,
> I had found their ideas interesting, but they still have not delivered).

Yes and no. VO is discontinued like VFP, with still a good following. Vulcan.NET does not exist anymore. The (x)Harbour guys still going strong. XBase++ we not really sure about. X# who better to have at the helm than Robert, who was on the VO/Vulcan.NET development team and used Clipper since the 80's. He understands XBase and I can already see how he is busy delivering VFP features. Mind you, as you probably see he is just pushing feature upon feature out, and that for a guy who in 2 days is suppose to be at SWFOX... Mind you, X# already support Harbour and XBase++ syntax, it is only the runtime that is still missing, but believe me when VFP syntax is complete it will be relatively quick to implement.

> On the tech side bullet points were RDDs, Forcing xBase-Access onto Servers, DBServer you explained and "SQL Classes". RDD -
> while opening some risks - clearly is an advantage vfp does not have. My guess is 80% benefit, 10% risk, 10% depending on the task at hand.
> Forcing xBase onto Servers does have great benefits over remote tables - SMB2/oplock problems a thing of the past, security, most of the time backup, replication
> and other goodies. OTOH this translates into chatty usage of the data layer ("gimme next record"), where I often preach "chunky, not chatty" when crossing layer
> boundries. While always good to have more options, for me I see only uses in edge cases, server also on local machine or highspeed LAN, much
> existing code and tables going over 2GB.

This is quite a mouthful, but RDD is probably the easiest to explain, X# extended the USE command with an optional DRIVER clause, hence
USE dbfname ALIAS myAlias DRIVER DBFCDX|DBFNTX|DBFMDX|DBFCSV|DBFSDF|DBFVFP
&& If omitted the default driver to use can be set with
RddSetDefault("DBFVFP")
&& Which is by default set if VFP syntax is selected.
all suddenly becomes available provided they follow a "flat" file structure. Beauty is the underlying BASE class RDD is in the runtime, so anybody can actually create new drivers for new data file systems and all the typical SKIP, GOTOP, .EOF. etc are working.

> On DBServer I now have an idea - thx. Any paper spelling out best usage, existing variations with pro/con, possible enhancements ?

This is a bit of a catch 22. Problem from a "paper" side is that most are part of the VO publications, hence the majority of users have them from their Clipper/VO days. We just know how to use those features. I am sure things will start moving once we get more of the other dialect users onboard.

> What and where are those "SQL classes"?

They are part of the runtime and on GitHub. There are a couple, obviously they not a 100% match to the DbServer class but close.
SQLConnection, SQLCatalogQuery, SqlData, SQL[List]Column[s]/ErrorInfo/Privileges/ForeignKeys/PrimaryKeys/ProcedureColums/Parameter/Table[s]/Select/Statement etc.
https://github.com/X-Sharp/XSharpPublic/blob/feature/Runtime/Runtime/VOSDK/Source/VOSDK/SQL_Classes_SDK/SQLSelectA.prg

> Have not found such things for your side of xBase - one well organized site was https://vivaclipper.wordpress.com/2013/07/25/c5dg-2-rdd-architecture/
> but nothing on the best practices resulting from technical background / for the "special xBase" sauce of the Clipper heritage.

Again as I said, it is still early days, due to the Clipper/VO heritage, most of us still use our Clipper/VO books, magazines etc which are still applicable. Under the Help tab on xsharp.info you will find a couple of links. Might also be good to look at the Pearls forum. Phil Hepburn (a 75 year old retired teacher) has done some good postings there. Wolfgang Riedman also runs a website with a lot of user contributions. The link is also on the Help tab.

> (I am on p.300 odd on xSharp PDF and part 5 of a small series you know better than me...)

I will inform the publisher of your interest in his series... ;-) I hope it is putting Hello World in a new perspective and provided a good (serious) chuckle inbetween...

> Any further pointers what to read (besides source...) ?
Hmmm I will have to think a bit about that one, but will definitely share when found. Long time since I actually studied XBase. Mostly use any .NET online media, easy to read c#/vb.net and produce X# code out of that. Which highlights the beauty of .NET's language augnostic property, X#, c# and VB.NET can line for line be translated given "{};" are removed from the source.

You can even make X# understand some c#:
#command INT <p> [<rest>] => LOCAL <p> [<rest>] AS INT
Regards,
Johan Nel
George, South Africa
Friend of XSharp (FOX) member
E-mail : johan(dot)nel(at)xsinet(dot)co(dot)za
Web site : https://xsharp.info
X# runtime : https://github.com/X-Sharp/XSharpPublic
Radio talk : https://blog.aksel.com/2019/07/why-xsharp-might-be-tool-foxpro.html
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform