Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

djplong

macrumors member
Original poster
Jul 9, 2015
93
182
New Hampshire
Ok, long time Windows .NET developer here (and VMS before that and RSTS/E before that and RT-11 before that and COS-310/OS-8 before that)..

I've written lots of applications and websites using VB.NET, Ajax, some libraries and the built-in ADO.NET library to access SQL Server programmatically (and with SQL Server Management Studio otherwise).

I'm getting an M1 MacBook soon and haven't been doing a lot of programming lately but the appeal of writing for something on multiple platforms was a reason I chose .NET back in 2004 (Wrote everything from PDA applications to Enterprise websites in VB.NET/ASP.NET & SQL Server)

So VB.NET isn't an option on the Mac. I'm not fond of "C" but thought about learning Swift and/or Python. One missing piece seems to be a 'default' database engine. But what I'm also looking for is a sort of "migration guide", if such a thing exists out there. So many guides to programming assume that you're just getting started and I've got over 40 years in the business.

I realize there are as many different answers as there are people out there who might read this. But I'm curious as to what kind of direction there is out there - guides, etc. I've spent almost two decades exclusively programming inside Visual Studio. It's clear that Microsoft is endorsing C# more these days so I'm going to have to start learning something new. Don't need it for my job (I'm in more of an advisory and management role now) so this is more for my personal satisfaction. Hence, I can be flexible instead of having requirements dictated to me.

So is there a bit of a 'guide' for this sort of case? ...and is there an accepted 'standard' SQL-like database?

Thanks in advance...
 
As for Databasing you might want to look into SQLite and CoreData (CoreData is built on top of an SQLite Database I believe). That's generally what Apple themselves use for various things, but I mean really you can use whatever works for you :)

If you're already familiar with programming, a lot of Apple's documentation on Swift is a good place to start for that. Some of it is aimed at newcomers, but a great deal of the documentation Apple makes available for Swift requires that you speak the lingo, know what a singleton is, etc.

C# and .NET will work for you for macOS development though, but AFAIK not for interacting with the standard GUI frontend, unless you use something like.... What's it called again? Is it GTK that has a GTK.NET or something? I've never really used the .NET framework.

I can honestly recommend learning pure C just for fun and if you already know a derivative like Java, C#, C++, whatever, it's a really simple language (in terms of amounts of language-level things to learn, though you will need to learn too use them all well, which isn't necessarily straightforward), with a high level of machine sympathy. Greatly recommend knowing enough assembly to comfortably read assembly as well. Just because it's fun - if you work in a language like Swift or C# or whatever it's not going to be that useful, but it can be useful to have the assembler mindset when working in C.

But yeah, Download Xcode, click Help in the menu bar and open the Documentation browser. Lots of good material in there and on developer.apple.com, honestly

I also recommend Paul Hudson (YouTube, books and elsewhere - His website and books are titled "hackingwithswift"), for any level. He's a great resource no matter if you're experienced coming to Swift or a newcomer to programming
 
Thanks for the input. Yeah, I know "C" (hence the reason I have an opinion on it - but that's a subjective thing, every developer has their tastes) and even had some C code I wrote back in the 90s still in production long after the turn of the century.

I've been leaning towards Swift for a variety of reasons and saw some Python examples and liked the code I saw. But the real unknown was what to do about databases. Windows has a default engine that you can use even without SQL Server or Oracle or any of the others and I was wondering what the Apple-scape looked like. One of the things I want to do is convert my code generator that takes a table definitions from SQL and generates various stored procedures along with classes, methods and properties (in VB) - and migrate it for use on macOS in hopes of replicating the development environment (functionally) I had before where (in this case) I can write for anything from the Watch to the iPhone/iPad to Macs and websites and only REALLY have to have differences in code for the user-interface layer.

Thanks again!
 
Thanks for the input. Yeah, I know "C" (hence the reason I have an opinion on it - but that's a subjective thing, every developer has their tastes) and even had some C code I wrote back in the 90s still in production long after the turn of the century.

I've been leaning towards Swift for a variety of reasons and saw some Python examples and liked the code I saw. But the real unknown was what to do about databases. Windows has a default engine that you can use even without SQL Server or Oracle or any of the others and I was wondering what the Apple-scape looked like. One of the things I want to do is convert my code generator that takes a table definitions from SQL and generates various stored procedures along with classes, methods and properties (in VB) - and migrate it for use on macOS in hopes of replicating the development environment (functionally) I had before where (in this case) I can write for anything from the Watch to the iPhone/iPad to Macs and websites and only REALLY have to have differences in code for the user-interface layer.

Thanks again!

Heh, my message was also a tad of a general rant to anyone else who might come across this thread, so the stuff about C was more generally applicable since you mentioned C and I wanted to give a follow-up take on it for others :)

As for databasing, yeah, so Apple's frameworks include CoreData which I think is similar to what you consider a "default database". I've never touched any of Microsoft's world honestly. Only ever coded for Android, Linux and Apple (and cross-platform for said devices that would also work on Windows, but never used any of the MS frameworks and such), but CoreData is an Apple only thing

Core Data can also automatically mirror on-device content to a "CloudKit" container so data can be accessible on any of Apple's devices

After doing some quick extra research, Core Data can work with different backend formats, including serialising data into XML, "raw binary" and SQLite. - Core Data is sort of an extra abstraction layer. All (at least almost?) Apple's operating systems come with SQLite ready to go as well so it's already part of the OS' native software stack and won't need to be bundled with your app or anything :)
 
  • Like
Reactions: djplong
Heh, my message was also a tad of a general rant to anyone else who might come across this thread, so the stuff about C was more generally applicable since you mentioned C and I wanted to give a follow-up take on it for others :)

As for databasing, yeah, so Apple's frameworks include CoreData which I think is similar to what you consider a "default database". I've never touched any of Microsoft's world honestly. Only ever coded for Android, Linux and Apple (and cross-platform for said devices that would also work on Windows, but never used any of the MS frameworks and such), but CoreData is an Apple only thing

Core Data can also automatically mirror on-device content to a "CloudKit" container so data can be accessible on any of Apple's devices

After doing some quick extra research, Core Data can work with different backend formats, including serialising data into XML, "raw binary" and SQLite. - Core Data is sort of an extra abstraction layer. All (at least almost?) Apple's operating systems come with SQLite ready to go as well so it's already part of the OS' native software stack and won't need to be bundled with your app or anything :)
Sounds like we have a 'winner' here. That gives me exactly the kind of direction I was looking for! Much appreciated!
 
  • Like
Reactions: casperes1996
You need three things:

1. C/ObjectiveC or Swift
2. XCode
3. Cocoa

Since you are already versed in C you can learn the simple extensions that allow you to use objective C in a few hours. Xcode/Interface builder is big and complex. The same is true for Cocoa. It will take you a long time to become a good Mac programmer.
 
Ok, long time Windows .NET developer here (and VMS before that and RSTS/E before that and RT-11 before that and COS-310/OS-8 before that)..
As you are a C programmer, either Obj-c or Swift shouldn't be a problem. I have been with C almost since it was developed and had no problem moving to Obj-c, although I can't say that I ever really liked that flavor of C. Swift is probably going to supplant Obj-c for Apple stuff so I would suggest that you might not want to spend the time required to really learn the former.

Your learning the underlying language (Obj-c or Swift) should be fairly easy. Xcode will not. It is massive, complex and Apple changes it all the time. A C-language book from the 1980s can still be used for learning. An Xcode book from just a few years ago is worthless. I have thrown away a hundred pounds of them over my Xcode years.

From your post I assume that you are moving to Mac rather than Mobile, and that is a problem for learning Xcode. You will find that the few tutorials for MacOs are buried within a mass of IOS stuff. Not a problem once you get the gist of Xcode down properly, but for an absolute beginner to Xcode it can be totally confusing to use one to learn the other. Finding a good forum or IRC channel for absolute beginners will be a great help.
 
I just did a lot of work with Blazor and WebApi. Supposedly mobile bindings for C# Blazor being official is right around the corner, which might be interesting to look at.

I have programmed in C# since its inception (I received my MCSD .NET as an 'Early Adopter'). I also programmed in Java (Sun Certified Java Developer 😂) and Python.

I had spent some time with Objective C, but did not really like it much. When Swift came out, I became a little more interested. Initially server side Swift seemed appealing, but IBM's giving up on the Kitura project, leaving only Vapor as an option, kind of made me rethink server side swift.

When SwiftUI came out, that seemed like a game changer - so again I put the brakes on and went back to C# and Python. I think as a beginner, at this point, concentrating on Swift and SwiftUI seem to be the best course of action.

As far as databases go, Swift seems much different from other languages - with native database support (other than SQLite) not really being there. I think you can look at CoreData as being analogous to Entity Framework. CloudKit can be used with or without CoreData, and provide Public, Private and Shared database options (along with a concept of Roles) which seem to be a good way to go if you don't want to depend on third party providers, like FireBase or Realm.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.