What is the best way to draw a hierarchical graph in mxGraph .Net?
The JS version implements mxHierarchicalLayout, however, I failed to find similar functionality in the .Net version.
Related
I need to make a Windows Store application that exchanges xml serialized data over a TCP connection with a server. Since I need to use Direct3D rendering in the application I went for the c++/cx store application template however I ran into issues with xml serialization/deserialization.
My usual approach in C# would be to use the XmlSerializer and classes with DataContractAttribute annotations. However as soon as I try to import System.Xml.Serialization assembly I get the C1114 error - WinRT does not support #using of a managed assembly. However there are lots of examples that mention using this approach in a Windows Phone app from C#.
So the question is - is only c++/cx limited in support for .NET in Windows Store applications and C# can use all the standard components on phone as well or is switching to C# in this case also not a solution and I need to use the WinRT classes for xml serialization/deserialization?
Your confusion is understandable, what with the variety of frameworks Microsoft has put out there.
C++/Cx is a native binding to the Windows Runtime (WinRT). It does not use any managed code or the .NET framework in any way, which is why you're getting the C1114 error.
C# provides a managed binding to WinRT. It does leverage the .NET framework, so in a C# Windows Store application, you can make use of some of the base-class library. This subset is referred to as the .NET Profile. This article talks about this more: http://blogs.msdn.com/b/dotnet/archive/2012/04/17/net-for-metro-style-apps.aspx
In your specific case, you are using a C++/Cx application because you want access to Direct3D. This makes sense, although it means that you will not have access to System.Xml.Serialization. Instead, as you surmised, you will need to use APIs that are available to C++/Cx to read XML, specifically Windows.Data.Xml.Dom: https://msdn.microsoft.com/en-us/library/windows/apps/windows.data.xml.dom.aspx
I am looking for an alternative to swt for building the interface of an Eclipse plugin I want to develop.
Is it possible to build the interface of the plugin with JavaFX or HTML5 instead of swt ?.
I am targeting Eclipse Juno 4.2 or later.
Eclipse 4 defines an application model, i.e. a model of all the parts forming the application UI. The application model is decoupled from its presentation.
This means that different UI toolkits (SWT,XWT,JavaFX,etc.), can be used to implement the model. Theoretically you can build a UI using any presentation technology you want.
That said, Eclipse 4.2 (the IDE) still relies on good ol' SWT for it's UI. Which means, your plug-in will require some additional dependencies to be able to use a different toolkit.
e(fx)clipse (already mentioned by jewelsea), provides the necessary Eclipse tooling to build your plug-in. Among other things it plugs a JavaFX ViewPart plug-in template, which creates an example plug-in and adds the necessary bundle dependencies for you.
Imho, this would be your best bet.
There are lots of things going on, Eclipse versioning can be a bit confusing nowadays (at least for me), you can take a look at E4 but it is not widely used. It has the ability of desining UI with Eclipse RCP/CSS.
An other posibility is XWT. I've seen some business ready application using XWT so it seems to be mature enough. Even WindowBuilder can be used to build UI with XWT. Which is actually declarative UI constructing with XML. If you want to have only the OSGi "goodies" you can take a look at Apache Felix or Eclipse Virgo (Spring-powered). They are application servers based on OSGi so you can build module based enterprise applications.
Last but not least if you are OK with SWT/JFace but want to have web application, take a look at RAP. I have seen a full RCP application converted to RAP running in a regular browser.
I am a bit confused as to the new standards. To the best of my understanding Swing -- the former standard interface library -- is based on it's predecesor, AWT, and the Java 2D graphics libraries.
Now that JavaFx 2.0 has replaced Swing my question is where does Java 2D fit in? Is it possible to use Java 2D methods to generate graphics on JavaFX interface elements?
Thank you
From the Oracle client tech lead's 10000 foot view of JavaFX.
At various times people have written articles or blog posts or forum posts asking the question, what is JavaFX? ... Is it a replacement for Swing? (The answer would be an emphatic Yes).
Mostly, use of Java2D is unnecessary with JavaFX as JavaFX has strong immediate and retained mode 2D apis.
If really needed, you can use Java2D methods to render to a buffer backing a JavaFX WritableImage or an awt image which you can later convert to a JavaFX image.
To an extent, you can still use Swing together with JavaFX if you want or need to. For example people have embedded a JavaFX webview in the Swing based NetBeans platform.
I'm evaluating Knockout to use with JayData to create a standalone web application.
Following this tutorial (http://jaydata.org/tutorials/creating-a-stand-alone-web-application) it seems that I will be able to store my data on iPhone, Android and in HTML5 browsers...
I'm not sure how can I use JavaScript Query Language with Knockout. I've seen they will have some support it, but I probably you have an idea how can I do it myself.
I'm not sure if Knockout is the appropriate UI library for hybrid applications, hopefully you can share some know-how.
Thank you!
UPDATE:
From version 1.1.0 JayData has knockoutjs integration module. Include "jaydatamodules/knockout.js" in your html page, and have JayData provide Knockout observables with entity.asKoObservable(). With this module queryable.toArray() accepts ko.ObservableArrays as targets populating it with kendo observable entities.
Custom Bindings is just the way for the integration you are after. You have to connect the knockoutjs way of interacting with the JavaScript objects with the JayData entity metadata functions and its propertyChanged / propertyChanging events.
It shouldn't be difficult a task to do, as JayData supports simple property notation (object.property) and async property accessor pattern (get_property(cb), set_property(cb)) as well.
You can integrate Knockout with jQuery by way of Custom Bindings. That answers your question about integration. Custom bindings allow you to integrate with any JavaScript UI library, not just jQuery.
In regards to your second question... Knockout really isn't a UI library. It's more of a framework to facilitate data-binding between DOM objects and JavaScript objects. It is used to design web applications following the MVVM design paradigm.
Here is an example It is integrated in recent release probably
I have a ASP.Net 4.0 web application for which I need to create typed configuration class. What I mean is as follows:
class SettingsClass
{
int count;
string name;
decimal amount;
}
Should map to the configuration file as:
<MyAppSettings>
<xmlSerializationSection type="...">
<SettingsClass>
<count>2<count>
<name>Moiz</name>
<decimal>10.66</decimal>
</SettingsClass>
</xmlSerializationSection>
</MyAppSettings>
The configuration file was identified in the web.config as follows by a configuration section (Read ColorSettings as MyAppSettings)
This was straight forward in ASP.Net 2.0 and Enterprise library 1.0
I am trying to achieve the same thing in ASP.Net 4.0 and Enterprise Library 5.0. However, the Enterprise Library Console of 5.0 does not work the same way as the Enterprise Library Configuration tool of 1.0.
I wanted to know how I should be going about in .Net 4.0 and Ent Lib 5.0 to achieve this same requirement. Is there a better means by which configuration can be handled for typed class in .Net 4.0/ent lib 5.0?
XML configuration changed radically (and not really for the better) in .NET 2.0. You're going to want to look at the System.Configuration namespace and the classes there. This is no longer an enterprise library question, but really one about the framework itself.