Build for multiple platforms?

My initial read on using Silver with Fire was that I could develop an app in one language and then have the ability to publish to multiple platforms (.NET, Android, iOS). After playing with Fire for a little bit, it’s starting to look like I can code in a single language (Silver) but I still have to have 3 separate projects and three different codebases. Is that correct?

Does anybody have any examples of building an application for multiple platforms? Is it a good practice to create a single solution and then have separate projects for each platform? I’ve developed an app in Swift for iOS but I’m just having some trouble making the connection for how to start on an Android app using Silver.

thanks!

I think having a single solution with a project for each platform is the way to go. You can then have a shared project for the non-visual code and add a reference to each project.

http://docs.elementscompiler.com/Projects/SharedProjects/#q=shared%20projects

Current.

You do not want to build one app that runs on all platforms. Elements and Fire explicitly do not encourage that, as that would lead to a crappy app (and there’s plenty of toolset there that let you do just that). Elements focuses on getting you se the same tools (and shared code) to write great apps for each platform.

Thanks guys. This is very helpful. So the primary benefit of writing code in Silver and using Fire is that I at least have the same language across my applications, and for business logic, I can likely share classes between platforms. I started to come to this conclusion but your responses helped solidify it.

Is there documentation on how to use Silver for Android or Windows? All of the iOS documentation is split between objective-c and Swift, but I don’t know where to look for Android. For example, making a new button in Java looks something like this:

Button myButton = new Button(this);

but in Silver it’s going to be more like this right?

let myButton = Button(self)

Correct. We’re working on more tutorials, covering Android among other things. But in general, it’s Swift syntax (which we don’t document, because the Swift language itself is well documented b Apple), and the classes Android/Java defines.