Beginner alert! LOL

Just got my Oxygene installed and started converting my first project from Delphi XE. I am getting the hang of creating the forms and using VS2012 Pro. I copied my first block of code over for and ran into my first learning curve…

Where do I find all the standard library procedured and functions (methods) such as TryStrToInt() and such that Delphi had?

Is there a good document or web site for beginners to read and reference while converting from Delphi to Oxygene?

Thanks!

John

John,
have you looked at http://wiki.oxygenelanguage.com/en/Delphi_vs._Oxygene?
Patrick

Hi.

Oxygene for .Net is .Net based and you’ll need use .Net classes or components instead of VCL.

AND the Xaml based controls are MUCH easier to modify and combine than the VCL ones. Things that were a royal pain with VCL (such as changing a cell appearance in DBGrid) are much easier AND flexible in xaml.

Indeed, WPF is awesome. Makes VCL feel like something designed in the precious century :wink:

I’m starting to work with Oxygene for Java. After working two weeks on it, and hit many stones on the road, i need to confess it make developers life easiest than i never imagine. I think the same experience must be using dot net. I was a VCL lover until this experience… Now im thinking start to work on some projects on oxygene for net.

I LOVE xaml. And I used to like VCL. As long as the VCL did exactly what you wanted and looked exactly like you wanted too. But trying to make new components and doing a component install, etc. Blech! And each component was version specific. Blech! It is such fun to just pull out a piece of xaml and say, “That’s a new component” and move the xaml inside a new UserControl, and make the original code reference the new UserControl. Such a breath of fresh air.

Amongst other things that are nice including having FLOW controls. Very cool. I do wish it had Form inheritance like Delphi, but I don’t seen any way to do that. Although it is not as big a deal as all the other features that xaml offers.

I forget to say, the only thing i missed on Android development is a visual designer. :wink:

Indeed, WPF is awesome. Makes VCL feel like something designed in the precious century ;)

Mark,
to be correct, VCL was designed previous millenium. :-))
Patrick

I know there is going to be a learning curve, but what I was looking for is some sort |of document that says, “if you did this [code|procedure|VCL Component] in Delphi, the new way to do it in Oxygene is this…”

There has to be a bunch of us Delphi users that are willing to make the jump that were not c# programmers, so we don’t know all the cool things and how they work. I’m not afraid to buy a book either, so long as it has examples.

Is this something that Oxidizer is support to try to do?

The app I am converting makes heavy use of ADO and DevExpress. The latter I purchased the upgrade to .NET and am happy with seeing all the same controls I was used to. However, I did not see any ADODataset, ADOStoredProc, etc controls so this is I am researching.

Winforms or WPF or XAML… Lions and Tigers and Bears, oh my! The app I am converting is 1.5m lines and 50+ forms, so I thought I would start by cloning the forms and populating them with the matching components, then work my way through converting the code under the hood as I go. But, maybe this is not the way to go and thus the need for direction. :slight_smile:

Regardless, here’s to learning new ways and not looking back.

cheers!

Indeed, WPF is awesome. Makes VCL feel like something designed in the precious century ;)

Mark,
to be correct, VCL was designed previous millenium. :-))
Patrick

I know. Sneaky, what I did there, huh? :wink:

Johnfriel,

There is a lot to learn. Not only the .Net framework (which includes the ADODB stuff and a WHOLE lot more), but also Xaml.

AND, I’d STRONGLY recommending studying the MVVM (Model View Viewmodel) pattern. It is a GREAT pattern to learn to use with Xaml. It will make things easier actually. But you have to “get” the pattern.

There used to be some GREAT videos on Silverlight.net, but since they moved that to MSDN, they didn’t port A BUNCH of the videos. But there are others out there. And I would strongly recommend Silverlight, except Microsoft has “de-emphasized” it. I think it is still the best framework to work with, but WPF is pretty much the same. And, if you are doing Windows 8, it will be similar also.

You still might find some useful videos on:

http://msdn.microsoft.com/en-us/silverlight/bb187358.aspx

This might be a good place to start with the ADO stuff:

http://msdn.microsoft.com/en-us/library/e80y5yhx(v=vs.80).aspx

The concepts are a little different with Xaml that VCL. VCL leaned towards components that were “data aware” where that data was a TDataset or a TQuery or TADOQuery or the like. The Xaml controls can be bound to ANYTHING. A list of Strings, a list of Objects, or whatever. That makes it more “generic” than the VCL approach.

You should be able to find the controls to use within the xaml designer of Visual Studio. You can just drag and drop, or, what I do, just type in in the xaml text and let the Intellisense help you out.

The new stuff will be the Binding. That allows you to hookup your control to data that is your “viewmodel”. And the Xaml doesn’t really have to know what kind it is being hooked up to.

If you find some examples in C#, you can just do a “paste C# as Oxygene” and it will do a fair job of converting it. Another tool you should get is Reflector from RedGate. There is a free version there and it lets you look inside assembled code and will translate from whatever it was coded in, into Oxygene (or whichever language you want of the available ones).

Hope that gives you a little direction.

And be sure to look through the wiki patrick pointed out. That page and more. Online documentation is pretty good.

Mark,
unfortunately, RedGate’s Reflector is no more free. A good free alternative is Telerik’s JustDecompile. Or JetBrains’ dotPeek. Or the open sourceILSpy.
Patrick

Hi JohnFriel.

As other wrote already, you should start to learn. :wink:
I’m old Delphi programer and i started with some Oxygene tests 6 months ago.

Now i have some small finished project behing and lot of books.

If i summarize - you should consider:

  1. What concept would you choose for GUI (Winforms, WPF, silverlight)
  2. What concept would you choose for connecting to datasources (ADO.NET, LINQ, DataAbstract, EntityFramework, etc)
  3. What kind of application you need (client/server, multi tier, …)

After you decide what you choose, you should start to learn all that stuff.
To learn oxygene is very small part of all that.

After intensive testing i decide to use:

  1. On desktop: WPF with MVVM pattern
  2. DataAbstract with DA LINQ to connect to SQL datasources
  3. RO SKD to implement some services
  4. All project are multitier (In future i can create other clients not just WPF)

To learn all that stuff i’m using:

  1. RemObjects Wiki
  2. Oxygene wiki
  3. MSDN .NET web reference
  4. Some bought books:
    • Professional Visual Studio 2012
    • Professional C# 2012 and .Net 4.5
    • Pro WPF and Silverlight MVVM
    • WPF 4 Unleashed

Regards

Edvin

Thank you everyone for your comments so far. I am moving forward and have a smile on my face. :slight_smile:

Hi. I’m starting the same journey! Also struggling a bit with using ADO like I used to in Delphi. Given that 4 years have passed, do you have any thoughts on how you tackled this? Any comments would be welcome.

Regards Bob Russell

For ADO, I suggest to look either at ADO.NET (standard Microsoft API, part of .NET), or at Data Abstract.

For standard Delphi APIs, look au our new Delphi RTL library (https://docs.elementscompiler.com/Oxygene/Delphi/DelphiRTL/).

Thanks for feedback Marc. My thought was, if I’m moving off Delphi, I should really focus on using the “standard” Dot Net functionality as available in Elements, and not “cling on” to the Delphi stuff (other than of course using the Pascal language). So I’d rather not get into the Delphi RTL stuff. Do you think that makes sense?

Yeah, that’s a good, if you can. Delphi RTL is there to help with the migration, eg if you have some. its of code you just wanna get to compile, quickly, it can help. The long term goal should be to not rely on it, use pure .NET or (especially if your eventual goal is cross-platform) Elements RTL.