I am interested in this new platform - Tidekit. But I couldn't find any answer to my questions:
Is it possible to add C# (or at least C++/JAVA) code or Dll libraries to the solution?
Is it possible to make a package with html+js+css and native code (C#/C++/Java) working in one executable file or executable + dlls?
There are already working solutions like CefSharp, Awesomium, but there is a problem to make external resources (html, css, js) embedded inside the project.
I would like to hide my implementation from end users somehow.
I'll appreciate any answer related to my questions.
We don't support C#, but yes to the rest.
Again, no C#, but yes to answer this question.
Further explanation below:
We've developed TideKit to have a small and stable core so that the apps can be built up in a modular way with the functionality you want in your app. TideKit provides simultaneous extension in ObjC++, C++, Java, and JavaScript for web, HTML5 hybrid and native apps.
Generally, developers will consume modules without the need to write lower level code because the functionality already exists both natively and for HTML at the same time. So mostly it is about consuming modules and writing your app in JavaScript.
Modules allow a project to be built for desktop, mobile and web from a single base of code. TideKit is a uniquely develop once, deploy everywhere platform with easy-to-use JavaScript APIs and CommonJS modularity. The best way to write TideKit apps is CommonJS. More than 60K modules of CommonJS functionality is available through npm and components registries. Folks familiar with nodejs will be at home with it. You can also write conventional JavaScript or easily migrate an existing TideSDK app.
Automated packaging, installers, and distribution are part of our solution. There are packaging options that can provide bundled or network installs to take advantage of dynamic libraries for efficient runtime code to keep the amount of installable and distributable code to a minimum.
TideKit has the capability to build in different ways from your project source to optimize for AppStore compliance or even highest HTML5 compliance. You can use it to build HTML5 or native apps for virtually any platform you wish to support. On the backend, we have capabilities for the widest range of mobile and desktop operating systems and for web deployments. Beyond building your app simultaneously for multiple platforms, you can also develop, test, and deploy your APIs from the same base of code.
Our build service protects your code from exposure by encrypting and embedding the sources in a binary. Hope this helps.
I think it is possible to use DLL's with something in between using Ti.Process...
the idea to execute a DLL is to have something in return (a very especific process, only for windows desktop I believe). I'm facing the same challenge but I guess I will approach to Ambiance Air App which uses a DLL to validate the license of the product...
in short it could be
var myScript = Ti.Process.createProcess({
args:['python',Ti.API.application.resourcesPath + "/??????"]
//the unknown command for the exe that uses the dll? it should return an object! not even functions...
});
myScript.myObject;
Related
I'm planning to program an application (C#) which can draw some things on AutoCAD. After a lot of research I don't understand where i need to start. Can someone explain to me what ObjectARX is ? And if I need to use it ?
I want to create an application ! Not an AddOn (NETLOAD)
:)
Sry for my english I did my best.
CM.
Normally applications are independent processes. In some cases the processes may communicate with each other according to some standardized protocol to extend functionality.
Addons, or plugins typically refers to code that is run as part of another process. I.e. you write a library (i.e. a dll file) that is loaded by the host application. This usually requires that the plugin implements some set of standardized interface for it to work.
ObjectARX is according to wikipedia the standardized interface for autocad. It is however for C++ and not for .Net. There is facilities in .Net to use c++ code, and there is also some articles about hosting the .Net environment in a native c++ process.
If you want your "application" to run in a separate process you would need to write a plugin that communicates with your process via some form of Inter process communication method.
All the approach you suggest seem to be rather challenging since it involves several layers of communication that may cause problems. It would probably be significantly simpler to just write a c++ plugin since this is the intent behind the ObjectARX interface.
If you look in the folder where Autocad is installed you will see some managed DLL libraries.
You can create a C# .NET DLL application that references these libraries. Then, you will have access to the AutoCAD environment and can do what ever you want.
Research AutoCAD .NET to find tutorials and resources.
There is some info in the Tag Wiki but, in a nutshell, you cannot create a stand-alone application that directly references the SDK shipped with AutoCAD (or BricsCAD etc). You can automate AutoCAD via ActiveX or you need to buy an SDK from Autodesk (OEM) or the Open Design Alliance and build an app on top of that.
Anything that uses the SDKs shipped with the applications must be a plugin in the host CAD application.
I have a C++ game engine that currently supports Windows, Linux and Android (NDK). It's built on top of SDL and uses OpenGL for rendering.
One of the design constraints of this game engine is that the cost of development must be $0.00 -- building the engine should come at no cost to me (other than man hours), I must be allowed to freely redistribute the engine's code and binaries, and users should be able to sell games created using the engine with no restrictions.
Right now, I'm using a very slow interpreted scripting language for game logic -- it actually works well for writing glue code and simple responses to UI events, but not much else.
I'd like to replace this system with a C# solution -- have the user compile a C# class library (DLL) containing their game logic, and have the C++ side 'consume' this DLL and call the appropriate hooks.
It's been rather difficult to find information on how to achieve this in a cross-platform way. Each platform has a different way of hosting the needed runtimes. Also, most articles I've found suggest the use of full-fledged frameworks that provide platform abstractions that are already implemented in my engine.
Is there currently a way to run code from a C# DLL from an Android NDK-based C++ application without using an entirely different SDK, and without having to shell out hundreds of dollars for a license?
In particular, I'm eyeing some of Microsoft's recent open source .net initiatives -- anything there I could use?
EDIT: To clarify, Windows and Linux have well-documented ways of running .net code 'for free' -- this question pertains specifically to calling managed code from an Android NDK application WITHOUT paying licensing fees to Xamarin or another vendor.
It's been rather difficult to find information on how to achieve this in a cross-platform way...
I'm only going to address the issue of "write once, run everywhere."
I build and maintain a library, composed of a single set of sources, that runs on Windows, Linux, OS X, Windows Phone, Android and iOS. To do that, I had to write everything in portable C/C++, and then build DLLs or shared objects.
The project uses .Net interop to call into the DLL, and Android uses JNI to call into the shared object. On iOS a static library is created rather than a shared object.
The DLL or shared object does have some platform specific defines. For example, it must know how to get random numbers from the underlying OS. So it will have a function like:
bool GetRandomNumbers(unsigned char* ptr, size_t size)
{
#if defined(WIN32) || defined(WIN64)
...
#elif defined(__linux___) || defined(linux)
...
#elif defined(__ANDROID___)
...
#endif
}
So keep your core business logic portable and in a DLL or shared object, #define where you must to abstract platform differences, and you will be OK.
On top of the portable library, you layer the platform specific GUI stuff.
If you try to write this in C# and then use that on other platforms, you're just going to be causing yourself problems. The only way to do portability with a single set of sources is to use portable C/C++.
I've also seen folks re-implement in every language: C and Win32 for Windows, .Net for Windows, C for Linux, Cocoa for OS X, .Net for Windows Phone, Java for Android and CocoaTouch for iOS. That creates about 6x the work, and the behaviors are never quite the same across platforms.
A popular script engine for games is Lua; you might consider using that, since it's trivially easy to link with C/C++. If you use LuaJIT, it's also blazing fast on Android (and not shabby on iOS).
One alternative to consider is that if you build your custom engine on top of Cocos2d-X, you'd not only get Lua (or JavaScript) for free as a connected scripting engine, you'd also get portability to Windows (Win32 and Windows 8.1 Universal), iOS, Mac, and Linux, an IDE (!!), and a huge supportive community.
Or you can spend a lot of time figuring out how to integrate C# into your engine.
The simple answer is no, what you're looking for does not currently exist. You will need to drop/change requirements to find a solution.
The closest I know of is dot42 - which seems to support some of .net on android has recently been put on github and the main site shut-down - but there's no mention of license in the main compiler repository (I've added a bug to get that updated..)
It's not clear that it supports dynamic loading of C# .dll's though as it claims to compile to DEX. (But it may be free, depending on what the developers release as the license...)
Xamarin is the only other feasible alternative that I know of, but as you're aware only the starter edition is free.
If what you're after is purely better scripting support, I'd drop the compiled and C# requirements and find something that works well on android already. Lua is my go to solution for this kind of thing, but I've not used it on android before... and many other options exist.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I'm building an application for multiple desktop platforms: Windows, Mac, and maybe later for Linux.
I was wondering which programming language and IDE combination would be the best for me:
Programming language need to be whether C# (preferred) or Java.
Core libraries must be shared between all platforms, means all platforms must link to a single core library (by library I mean a list of classes and functions).
Windows and Mac are in priority, Linux app is for future plannings.
Design of the app is completely custom, it doesn't follow any guidelines of each platforms.
I'm stuck between these three solutions:
Use Xamarin.Mac + Visual Studio for Windows and link the core classes between them.
Use GTK# for the whole project and compile multiple builds for each platforms.
Use Java for the whole project and compile multiple builds for each platforms.
For #2 and #3, I need an advice that which language is more suitable for me, considering the design of my application. I mean, which one has a better GUI building ability for my goal?
BTW GTK# uses different libraries for each platforms, so that should be an clutter for my core architecture, or not?!
Three years later and Javascript is now also a strong contender in this debate.
There are multiple options within the space.
https://electron.atom.io/
https://github.com/nwjs/nw.js/
And others
Even Microsoft has shipped Visual Studio Code, the cross platform version of their development environment, which is written in Javascript.
What is the Visual Studio Code editor built on
The benefits include utilizing the many available web libraries, and building/using your web development skills.
This sounds like a job for Xojo or something similar: http://www.xojo.com
Mac, Windows, Linux builds with easy GUI design and native apps. Custom UI easily done also, and you'd then have one code base for all three platforms. You can download and use the software for free to develop and test, only requires a license once you decide to build your app.
You can also conside Livecode
Livecode: http://livecode.com
For any platform except web, it is opensource and it includes mobile targets as well, if your code is flexible enough to not being C# or Java.
An option is to build the core logic in a compiled library using C# and GUI independence and then plug it to livecode, leaving the UI work for that tool.
"GTK# uses different libraries for each platforms", do you mean different rendering back ends (such as X11, Cairo)?
You only need to build your GTK# app once. However, you do have to bundle the GTK# runtime (which is different for Windows and Mac) with your app. Banshee is a good example you can follow.
Probably your best bet is to use Nevron Open Vision. It is a cross-platform, C# based User Interface Platform, that implements most of the controls you need to build enterprise-ready applications. It is the framework behind MyDraw (www.mydraw.com) - a professional drawing program similar to Visio. MyDraw is built completely with Nevron Open Vision and does not require any other third-party libraries. We mainly develop it under Windows and just compile it to Mac. Soon we are going to add support for Linux and WebAssembly hosts.
Microsoft just launched .NET MAUI, a cross-platform GUI framework that builds on Xamarian.forms.
As we consider what building device applications will look like in a unified .NET, we see many devices across multiple platforms used, from Android and iOS to Windows and macOS. To address this need we are excited to announce a new first-class UI framework for doing just that: .NET Multi-platform App UI, affectionately call .NET MAUI.
This seems to meet all of your requirements. They do not explicitly mention Linux in their article, but claim to support it in the description on the Github Repo.
It depends on the audience of the app: Consumer mass market or business/IT
If its mass market consumer facing
Electron or native UI, perhaps with shared non-UI code. Visual Studio Code was made with Electron, for example (last I checked). Google Flutter is a new entrant worth evaluating. Dropbox is Python (or used to be). It is a lot of work (a) getting Python packaged properly for smooth x-platform install, and (b) GUI work will take a long time. Sadly, for mass market consumer apps (not utilities for IT people but beautiful designs for the masses like Dropbox, Skype) you will be spending a ton of time getting the installation system to work and getting the app to look and feel appropriate. This is an extremely time consuming endeavour no matter what path you take.
Consumer: Java? I don't think Java is a great fit for consumer desktop although I could be wrong. There are some Java packaging systems that are leaner/all bundled in. I'd also say JVM software companies tend to go under (more on this later). FreeMind the free mind mapper, is a good example of what can be achieved in Java.
Consumer: .NET? Yes, for the Windows side. Then use something native for Mac and shared libraries for non-GUI code. There is ".NET Core" aka Mono but its not fully matured at this time for Mac. Mono has been around for over half a decade and I haven't seen it mature for a consumer app. Ask: How many .NET Core apps are in the Mac app store? I hope it gets better but as of this writing (2020) there's very few notable ones.
Business app or IT tool
If its a basic business app or utility where a basic UI is okay, I'd evaluate Xojo and/or LiveCode mainly for comparison sake. Xojo is fairly close to .NET. Google Flutter as well since it's up and coming. By the time you read this, Flutter may be the best choice.
B2B: Java? This is a pretty tried, tested and true solution for "heavy" enterprise apps. You might not have end-users love you given Java apps tend to eat up memory. But for enterprisey apps the main concern is that the very intense business logic will work. For IT tools, it depends. If it's a 3-screen utility program, avoid Java. If it's a complex ERP then Java is good. Remember to look around for different packaging tools to avoid consumer headaches with the JVM. Again, one Java desktop app I like is Freemind. It's a great example of making a reasonable desktop app in Java. I have used it in both Windows and Mac and it's great. You can also look at Kotlin or Groovy (for test cases) which compile to Java byte code.
B2B .NET? There is so much to unpack here. The key is, in my biased view, .NET Windows desktop development is about 2X-4X faster development time than Windows Java desktop development. From making the GUI, to better code completion, to faster compile times, to less packaging and install snags. That said, at the time of this writing the ".NET Core" or Mono are pretty thin for MacOS. I really, really hope this changes. But I've been waiting years for Mono or .NET Core to provide a full suite for MacOS without the limitations and it hasn't yet happened. If it's an enterprise app, you might be able to get away with using .NET Core for Mac. But please first build a basic .NET Core "hello world" app with all the control/libraries you want to use. Then try building an installer for it on MacOS, and find someone random with a Mac to see if it actually installs and runs. You may find you're struggling in this area today (although I hope it gets better, it hasn't for years).
Overall Notes on Cross Platform
If this is a smaller app which doesn't need a fantastic UX and super-deep OS integration, then I'd consider Xojo or LiveCode, perhaps for the UX elements. Like #merlucin said, you can write the core logic in something shared- perhaps C#, python, etc.
Here's why- Xojo and LiveCode have been around for 10 years now. They are more about keeping things consistent. Whereas I find .NET and QT changes all the time. You have a lot of costs of keeping up with the Joneses and maintaining installers. So for a small app or utility- an XML editor, IT helper tool, Xojo or perhaps LiveCode will help you get there sooner.
When you hit the build button on Xojo, for example, it literally makes 3 executable files for Windows, Mac and Linux. Compare that to the madness of packaging a cross platform Python app, or even packaging a .NET app for Windows, to be honest.
The tradeoff is these tools- Xojo and LiveCode often end to be missing a few critical things you need, requiring a bit of a hack. You can read around their forums. Xojo is a bit like .NET although LiveCode is a different programming paradigm entirely based on "stacks".
Keep in mind developer happiness too. Many developers wont want to code in Xojo or LiveCode because they are lesser known languages. So ensure you get buy-in. What happens if you get laid off and have 5 years of experience in Xojo? Hmm.
In your evaluation, no matter what you choose-- you must compile a basic GUI app in the platform you're evaluating and get 3 people to install it correctly on a Mac. You'll be shocked at the libraries and madness needed. Especially if you're a web developer, you'd see that just maintaining installers is a ton of work across 3 platforms. Never mind GUI consistency.
I started work on porting an application I've written for deployment in the Windows 8 app store. This requires that the application be written against the subset of the .NET framework. My application follows an architecture where the core functionality is in it's own dll, and things like file system access are done through IoC. Basically, this means that the only dependency for the core dll is System. Because of this, I thought that porting would be a breeze - setup my IoC values and wire up a GUI then I'll be good to go. Only, I can't even reference my core dll from the windows store app (a.k.a. metro app).
Have I missed something? Do actually have to rewrite my core dll just for inclusion in the windows 8 app store? We're told that if you use a good architecture, then porting will be a breeze, and that's what I've done. Has that just been a big lie?
Windows store apps(formerly called metro style app) are limited to using the .NET Core Profile. I put some details about the Core Profile in my answer to this question. See Converting your existing .NET Framework code in this article more details. It's not your architecture, it's the subset of the .NET Framework that is available to a Windows store app. You may have to supplement some of the types you use in .NET with WinRT types instead.
I don't have an extensive knowledge and will try to stict to facts as I understand them. The Metro framework adds functionality, and limits functionality. There are heavy security restrictions and vast segments of the full .Net framework that are not available (for instance, you cannot use System.Data, some of the System.IO and file access methods have drastically changed). A Metro app is isolated, you're not going to be able to recurse all the files on the hard drive like you could in a standard application (my opinion that is, on top of security by isolation it's an encouragement to push you into the cloud for storage needs).
Unless things have changed, PInvoke is limited to "approved" Win32 API methods.
See this link for some alternatives to common Win32 API needs: http://msdn.microsoft.com/en-us/library/windows/apps/hh464945.aspx
See this link for approved Win32/COM API's: http://msdn.microsoft.com/en-us/library/windows/apps/br205762.aspx
It's hard to say whether a "good" architecture will be a breeze to port without knowing what's in the code in that architecture. In my utility framework I've had things that ported very easily (or at least were straightforward) and things that were a complete wash that required a lot of rewriting (The loss of System.Data for instance is a sore spot for me). There are things that can be designed well but when you take out the underlaying code in the framework or API it was written with it will require rewriting.
I had the same problem: a project for Metro app don't load dll create with framework .4. I changed the framework from 4 to 3.5 for the dll and now the Metro project see them.
I'm developing an application for a Windows based tablet PC. This application is pretty much a port of an application I already developed on a Windows Mobile device using .NET CF. I want to write the application from scratch, taking advantage of all of the knowledge I've gained in software development.
I'd also like to write this new application in such a way that if I so desire, I can modify my existing Windows Mobile app to use the new libraries. Ideally, I'll have a shared set of business logic and data access libraries, with the only real difference being the UI layer - WPF for the tablet version, and just a standard CF interface for the Windows Mobile app.
Taking this into account, I'll need to make sure that all of the projects I create are compatible with the .NET Compact Framework. Is there an easy way to ensure this? One thought I had was to use a Smart Device Project for each class library that I create.
As well as this, is it easy for me to reference these libraries written for a .NET CF application from a standard windows application?
Is developing an application for a tablet PC the same as developing any normal windows forms application? Is there a different version of the .NET Framework to take into account, or are tablets pretty much standard windows pcs?
There isn't a special version of .NET Framework for Tablet PC. The question of sharing code between Windows Mobile and Windows has been asked before and the accepted answer is excellent.
The tablets I've seen are running standard Windows with the "full" .NET, but I expect you can get some light-weight devices, too. One interesting possibility might be "client profile" (a subset of the regular "full" .NET dlls) - but I haven't seen much use of that myself.
CF and regular .NET share a lot of things, but ultimately there are differences; neither is a strict subset of the other. I've found that in general the only way to write code for 2 frameworks is to keep both active... for protobuf-net (which has this problem) I keep a project file for each framework so that I can quickly test that the build works everywhere (i.e. there are no missing methods etc).
You may find you need to use #if blocks to run slightly different code on the two frameworks, especially if you want to use "full" .NET features for performance reasons (that don't exist in the CF version). One way of making this easier it to hack the proj files to use recursive file inclusion:
<Compile Include="**\*.cs" />
Now you don't have to keep adding new files to both projects - it'll get picked up automatically (caveat: in the IDE you may need to unload/reload the project).