Home Duet/Cafe Duet

Cafe Duet (Java) vs. NetLinx

joefortechjoefortech Junior MemberPosts: 7
Hi everyone,

Our company have experience with NetLinx development and we are thinking of switching to Cafe Duet (Java). Before actually switching to the new technology we want to know what are the advantages of using Duet Platform, will the development process become easier? Will we be able to create more interactive GUI or the usage of the Duet will be visible on the processing part (more independent / reusable classes, modules).
In other words we want to know what will this change give us. Note that we have experience both in NetLinx and Java languages.

Thanks in advance.

Comments

  • DHawthorneDHawthorne Junior Member Posts: 4,584
    It isn't a matter of "switching," it's a matter of adding Java to your toolset. You can't do an entire program, start to finish, in Java; you can only build modules. The jury is still out, as far as I am concerned on whether those Java modules are any better. There are certain things you can't do in NetLinx, but can with Java, so those applications and devices clearly call for a Java approach. But a simple RS-232 device, say, for example, Runco projector ... there is no real benefit there, the NetLinx language can easily do the job, and will produce a more compact and efficient module. A media server control that may need to do some database management on its own, well, that's another story and may benefit from a well-written Duet module.

    But even then, your main program has to be in NetLinx, and you add the overhead of the SNAPI router's Duet support. Just running Duet firmware increase boot times substantially ... so the choice is not necessarily cut-and-dry. If you have staff developers fluent in Java, it might be a very good idea to have them create your modules; but you are still going to need a NetLinx guy to pull them all together.
  • ColzieColzie Senior Member Posts: 470
    From what I saw at PIII last year it is definitely possible to write an entire program in Java. You do have to have a Netlinx "stub" to call the Java, but that is it.

    Doing it this way you can ovoid the (yet another) level of complexity and do away with the SNAPI layer and handle it all in Java.

    Granted, I have not experienced this first hand, but the man waving his hands around the smoke and mirrors showed it was possible.
  • ericmedleyericmedley Senior Member - 4000+ posts Posts: 4,177
    I beleive you might be suffering from a misconception that all of us have fallen prey to in dealing with the onset of Duet.

    Duet is not the next big thing that will replace Netlinx. (at least that is not its function)

    The concept of Duet was to help manufacturers of gear that we AMXers deal with. The idea was that most companies who make stuff probably have JAVA programmers on staff but the bus load but probably don't want to invest resources to training a programmer in AMX for what will essentially be a 'one-off' task: writing an AMX module to speak to their gear. So, by porting over to the JAVA platform, programmers could make quick work of creating a module following the APIs set up by AMX.

    An offshoot of that was that JAVA opens up a lot of possibilities that are not normally available in Netlinx. Naturally, all us programmers were intrigued by the possibility of working in both environments. (Or even exclusively in JAVA)

    At our class last year, we too wrote an entire program in JAVA. To be sure, however, you are still running a module in Netlinx. You'd just be running a big module or several modules as the case may be.

    You do not gain any real ability as far as the user interface is concerned. The limitations there are built into the interface itself and are not necessarily related to the programming environment.

    So, if you are a dealer or integrator using AMX to get your gig done, there is no reason to get Duet. The lion's share of what you need to do can be done more quickly in Netlinx anyway. However, if you are a gear manufacturer and just need a module, then Duet is progabaly the right choice.
  • joefortechjoefortech Junior Member Posts: 7
    Thanks a lot guys,

    Here are some questions in order to deepen my understanding of the differences.

    So basically if we want to have DBMS in our system, it is better to write the module that deals with Database with Java, right?

    Another question is that, how much of Java's capabilities can we use? I mean is the Java runtime same as in the usual JREs, do we have all the Collection, Threading, etc. features/API available, or you have implemented just a subset of JRE?

    Also we were thinking of generating some graphs, complex UI components to use in our GUI. In your opinion, is it better to use Java vs.NetLinx for solving such an issue?

    My last question, what about documentation and manuals on Cafe Duet. This is very important, since knowing and having expertise in Java is one thing, but having example code and documentation on the API is totally different.

    I am trying to give you more information on what goals we want to accomplish in our system.

    Please let me know what do you think.

    Thanks in advance.
  • HARMAN_shane-a-rooHARMAN_shane-a-roo Junior Member Posts: 39
    Duet only supports JavaME Foundation profile. JavaME (Micro Edition) is a scalable subset of the JavaSE library of Java classes. The Foundation profile means that it only contains the core java classes (java.lang, java.io, java.net, java.util, java.security) and even then, some of the APIs that would be present in JavaSE may not be present in JavaME for the same classes. It contains no "display" classes (ex. java.awt). But since the master itself is not a user interface and has no display, this should not be an issue. It also contains no secure socket support (SSL). JavaME requires all Java byte codes be Java 1.4 compliant. This is enforced by the Cafe Duet IDE when packaging a Duet module.
  • PhreaKPhreaK Senior Member Posts: 966
    Duet won't have any effect on your UI. It is best to think about the AMX UI's the same way as other devices with two way communication in your control system (ie. an rs-232 controlled DSP). None of the interface processing is handled by the NI controller, it simply sends and receives commands from the UI which is programmed completely independantly.

    That being said if you were using different hardware (tablet PC, iPhone/iPod Touch app etc) for your user interfaces duet would allow you to create much neater and more expandable communication protocols.

    In regards to the extent of java's capabilites here's a list of the libraries available - http://www.amxforums.com/showpost.php?p=11914&postcount=14

    If you happen to locate any more info and you feel like sharing please feel free to add it here
  • ipssheldonipssheldon Registered User Posts: 106
    You can also extend Duet to some extent by adding your own libraries to those provided by AMX. In a post several years back, someone had added TFTP libraries to Duet and build a TFTP module. Anything that you would add would have to be compatible with JavaME, but you can certainly do more than just the capabilities provided by default.
  • joefortechjoefortech Junior Member Posts: 7
    Thanks a lot guys,

    But going back to my previous question: what about documentation and manuals? Do we have JavaDocs for the AMX classes (in package com.amx.duet), namely the NetLinx Device API Reference and Device SDK Documentation?
  • ipssheldonipssheldon Registered User Posts: 106
    The only documentation that I am aware of is the small manual that comes with the Cafe Duet CD that describes how to build a Duet module and how to incorporate it into a Netlinx program. In addition to that, there are JavaDocs within the help files that describe the methods associated with the AMX classes.
  • ericmedleyericmedley Senior Member - 4000+ posts Posts: 4,177
    joefortech wrote: »
    Thanks a lot guys,

    But going back to my previous question: what about documentation and manuals? Do we have JavaDocs for the AMX classes (in package com.amx.duet), namely the NetLinx Device API Reference and Device SDK Documentation?

    Perhaps too to answer this question...

    If you're used to a more open community (open source) type mentality, you're probably not going to find that in the case of AMX. A common question from NooBs here is where they can find something like "AMX for Dummies" at the local Barnes And Noble store. And the answer is 'no place.'

    It's a closed system and it guards its secrets well. However, if you're willing to do the training and be part of the forum, you'll find all kinds of help and documentation.
  • HARMAN_shane-a-rooHARMAN_shane-a-roo Junior Member Posts: 39
    The Javadoc for the com.amx.duet... classes is part of Cafe Duet Help.
Sign In or Register to comment.