Software architecture question. + second question as bonus)

Hi, my little friends! I have 2 questions about architecture.
1) What is the approach for interactive GUI? Suppose, I need in my gui hierarchy to change panel (and all objects it contains) to new panel . I need it by clicking button1. So, where should i put Action Listeners buttonclicked method? At JFrame or where? Is it a good idea to have static class ContentBuilder which will return all kind of elements? For example getMainMenu(ContentBuilder.NEW_CLIENT_CAME_FOR_HALLOWEEN)
2) I have database... my application connects to it. I need new customer... I created JTextField for first name, last name... then input data... gui generate an object client (Class Client) then one by one get strings from Jtextfields to object attributes. Then never guess, this object went to model(according to model view controller pattern) and then there all strings one by one goes from object attributes to table fields... The end. Is it good? or not?
Thanks in advance. God bless you.
Sincerely yours, Mr. America. (:

America70 wrote:
Hi, my little friends! I have 2 questions about architecture.
Your first question is really four.
1) What is the approach for interactive GUI? Suppose, I need in my gui hierarchy to change panel (and all objects it contains) to new panel . I need it by clicking button1. So, where should i put Action Listeners buttonclicked method? At JFrame or where? Is it a good idea to have static class ContentBuilder which will return all kind of elements? For example getMainMenu(ContentBuilder.NEW_CLIENT_CAME_FOR_HALLOWEEN)
The ActionListeners are part of the controller. I'd have a controller that instantiated the UI elements and injected them with the Listeners they need. That way you can change the Listeners if you have to on the fly.
I'd want to see /ui, /controller, and /model packages in your solution. The /ui package would have interfaces for injecting Listeners, but it should have JPanels that the Controller could assemble into JFrames for display.
2) I have database... my application connects to it. I need new customer... I created JTextField for first name, last name... then input data... gui generate an object client (Class Client) then one by one get strings from Jtextfields to object attributes. Then never guess, this object went to model(according to model view controller pattern) and then there all strings one by one goes from object attributes to table fields... The end. Is it good? or not?
"One by one"? No. Create the Client class, pass it to the Controller, and let it deal with the database.
%

Similar Messages

  • Best practices, software architecture question

    I'd like to offer a challenge to everyone in good software architectural design principles. Here is a mocked up version of some code that I've been working with, grossly over-simplified for this example. Take a look at the following classes and see if you can determine what the parentComponent will be for the JOptionPane that is displayed in the HardDriveController's constructor:
    public abstract class Controller {
        private JFrame parentFrame = null;
        public void setParentFrame(JFrame parent) {
            this.parentFrame = parent;
        public JFrame getParentFrame() {
            return parentFrame;
    public class MyGUI extends JFrame {
        private CPUController cpuController = null;
        public MyGUI() {
            setSize(300, 300);
            setVisible(true);
            cpuController = new CPUController();
            cpuController.setParentFrame(this);
        public static void main(String [] args) {
            new MyGUI();
    public class CPUController extends Controller {
        private RAMController ramController = null;
        public CPUController() {
            ramController = new RAMController();
    public class RAMController extends Controller {
        private BusController busController = null;
        public RAMController() {
            busController = new BusController();
    public class BusController extends Controller {
        private HardDriveController hardDriveController = null;
        public BusController() {
            hardDriveController = new HardDriveController();
    public class HardDriveController extends Controller {
        public HardDriveController() {
            JOptionPane.showMessageDialog(
                    getParentFrame(), "Hey! We're inside the HardDriveController!");
    }Did you figure it out? If you said the parentComponent will be null, then you are correct. The logic behind the code had intended to set the parentComponent to refer to MyGUI, but of course, the code does not behave as expected. Now this seems simple enough, but the legacy code I'm working with is full of many examples like this. Notice how MyGUI creates an instance of CPUController which creates an instance of RAMController, which creates an instance of BusController, etc...In some cases, I see a "Controller" class that is 8 or 9 "levels" deep with respect to one controller creating another, creating another, etc.
    Let's say that I want the JOptionPane in the above example to have its parentComponent refer to the instance of MyGUI. The following code is one means of passing the reference down to the HardDriveController, while still using the getParentFrame() method in HardDriveController:
    public class MyGUI extends JFrame {
        private CPUController cpuController = null;
        public MyGUI() {
            setSize(300, 300);
            setVisible(true);
            cpuController = new CPUController(this);
        public static void main(String [] args) {
            new MyGUI();
    public class CPUController extends Controller {
        private RAMController ramController = null;
        public CPUController(JFrame frame) {
            setParentFrame(frame);
            ramController = new RAMController(frame);
    public class RAMController extends Controller {
        private BusController busController = null;
        public RAMController(JFrame frame) {
            setParentFrame(frame);
            busController = new BusController(frame);
    public class BusController extends Controller {
        private HardDriveController hardDriveController = null;
        public BusController(JFrame frame) {
            setParentFrame(frame);
            hardDriveController = new HardDriveController(frame);
    public class HardDriveController extends Controller {
        public HardDriveController(JFrame frame) {
            setParentFrame(frame);
            JOptionPane.showMessageDialog(
                    getParentFrame(), "Hey! We're inside the HardDriveController!");
    }Note that the reason I'm calling the Controller class's setParentFrame() method in each extended class's constructor is that I want to ensure that any call to getParentFrame() in these classes will return a reference to MyGUI, and not null.
    After this long description, I want to ask all you Java gurus the following question: What is the best means of offering the JOptionPane a reference to MyGUI? My solution passes a JFrame reference all the way down from the CPUController to the HardDriveController. Is this an "acceptable" solution, or is there a more elegant means of getting a reference to MyGUI to the JOptionPane (for example, modifying the MyGUI class to follow the singleton pattern)? Thanks for your input. 

    Proflux, One thing I failed to mention is that this is a very old codebase and the likelihood of the object graph being reworked is slim to none. I agree with you 100% that the dependency doesn't feel right. But I have to live with it. I mentioned the idea of using a singleton pattern. Here's a mock up of how that would look:
    public class FrameRetriever {
        private static FrameRetriever instance = null;
        private HashTable frameHash = new HashTable();
        private FrameRetriever() {
        public static getInstance() {
            if(instance == null) {
                instance = new FrameRetriever();
            return instance;
        public void addFrame(JFrame frame)
            frameHash.put(frame.getTitle(), frame);
        public JFrame getFrame(String frameTitle)
            return (JFrame) frameHash.get(frameTitle);
    public class MyGUI extends JFrame {
        private CPUController cpuController = null;
        public MyGUI() {
            setTitle("Test GUI");
            setSize(300, 300);
            setVisible(true);
            FrameRetriever.getInstance().addFrame(this);
            cpuController = new CPUController();
        public static void main(String [] args) {
            new MyGUI();
    public class HardDriveController extends Controller {
        public HardDriveController() {
            JFrame parentFrame = FrameRetriever.getInstance().getFrame("Test GUI");
            JOptionPane.showMessageDialog(
                    parentFrame, "Hey! We're inside the HardDriveController!");
    }My only concern with this solution is that it couples the HardDriveController to MyGUI because we need to know the frame's title in order to get the frame instance. But at the same time, I won't have to add constructor arguments to any "in between" classes for the sole purpose of passing a reference down the object graph. Any thoughts?

  • Hi - was looking to buy a macbook air soon but wanted to get it with lion software....anyone know when that is available and second question is what is best software for personal money management that works with lion.....use quicken now   thanks

    Hi - was looking to buy a macbook air soon but wanted to get it with lion software....anyone know when that is available and second question is what is best software for personal money management that works with lion.....use quicken now   thanks

    quicken should work with lion.
    Quicken Essentials will work with Lion.  Most people that have used Quicken for a while (i.e. Quicken 2007) have found that Quicken Essentials isn't much better than a basic spreadsheet.  It is a significant step down from previous versions and does not offer many of the features previously offered.  Right now, it seems like the two most common options are iBank and MoneyDance.
    Frankly... this is a major opportunity for these companies.  The largest commercial distributor of this type of product has been Intuit (Quicken).  That makes it hard for any other company to get any of that market as so many people were already using Quicken and may have had years of data stored in it.  Now, with Quicken effectively out of the picture, it's a great chance for another company.  Just imagine if iPhones were suddenly off the market.  That would give other manufacturers a tremendous opportunity since they wouldn't have to fight an up hill battle against a market giant.

  • Project stalls after second question slide

    The project (swf file) keeps freezing on the second quiz question. if i start the project on another slide, it still freezes on the second question slide presented.
    I have cleared the cashe, tried setting it to a survey question. tried rebuilding the question slide. tried taking scorm off of it. tried to daisy chain the project (made more of a mess).
    I have no clue why it wont play thru.
    Any suggestions? I need to get this project published today.
    There are 6 quiz questions in the project total.
    Thanks,
    Stephanie

    I am thinking the file is corrupt. I rebuilt the question slides in a new file and copied and pasted the old text files over and it is now working.

  • The second question about Apple ID

    The second question is : i have a apple id but my staff he make it , now he get out of my store and he change my apple password  and e-mail rescue , how can i got the new password

    Hi dam sumo,
    Welcome to the Apple Support Communities!
    I know you are not able to reset the Apple ID password by email because the rescue email address has changed. Have you tried resetting the password by answering the security questions? Please refer to the attached article for information on resetting Apple ID password.
    If you forgot your Apple ID password
    http://support.apple.com/kb/HT5787
    Have a great day,
    Joe

  • HT1920 recently set up itune apple id when purchased iphone, cannot answer both security questions to allow a puchase on my iphone HELP cannot remeber second question - thought was childhood nickname!!

    I recently purchased an iphone and set up apple id on my home computer.  when i try to make purchase on iphone asks 2 questions - i do not recall putting in answer to second question cuz I thought second question was childhood nickname and now i cannot puchase on my account through my phone...help!

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then go to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you should see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down this page to add a rescue email address for potential future use : http://support.apple.com/kb/HT5312

  • Hey, my first question is that if I need to be connected to iCloud on my phone for my Imessages to work on my Mac? And my second question is if someone is looking into my Imessages on my Mac, how can I disconnect it from my phone right away?

    Hey, my first question is that do I need to be connected to iCloud on my phone for my Imessages to work on my Mac?
    And my second question is if someone is looking into my Imessages on my Mac, how can I disconnect it from my phone right away?

    you will need to do a hard wipe or remember the password hard wipe can be found on youtube how to. but this will erase all data

  • HT201269 Have new iPhone 5s and older iPad ( looking to buy new iPad ) question for both is should I hook them up to mu computer and back up the computer on each devise and sink and than the next one.  The second question is should I do the I pad first ca

    Have new iPhone 5s and older iPad ( looking to buy new iPad ) question for both is should I hook them up to y computer and back up the computer on each devise and sink and than the next one.  The second question is should I do the I pad first cause it has photos in my email that have not been downloaded and it is one of or is the first model

    No it's not stealing. They have an allowance that you can share with so many computers/devices. You'll have to authorize her computer to play/use anything bought on your acct. You can do this under the Store menu at top when iTunes is open on her computer.
    As far as getting it all on her computer....I think but I am not sure (because I don't use the feature) but I think if you turn on Home Sharing in iTunes it may copy the music to her computer. I don't know maybe it just streams it. If nothing else you can sign into your acct on her computer and download it all to her computer from the cloud. Not sure exactly how to go about that, I haven't had to do that yet. I wonder if once you authorize her computer and then set it up for automatic downloads (under Edit>Preferences>Store) if everything would download. Sorry I'm not much help on that.

  • Java software architecture - discussion forum

    Hello,
    I am looking for a forum where you can discuss software architecture topics. There are so many questions and controversal discussions in this field. I did not really find a forum for that in particular.
    A few days ago I posted a question in the RMI-forum (by the way: with no answers so far) where I wanted to know how to distribute data from one source to many receivers (on the same JVM and also on different JVMs). The receiver should be able to select the data they need (so it not always the same data which is send to the different listeners.
    My idea/suggestion was, to create this interface for example
    public interface DataReceiver extends Remote {
      public boolean isRemoteObject() throws RemoteException�
      public void transmitData(MyData data);
    }With that interface I am able to use RMI to access Objects on other JVMs as well as Object on the same JVM which are only implementing this interface.
    Now I implement an ArrayList with DataReceiver-Objects and if data changes I can call the transmitData(..)-method of all these objects.
    Is this a good way to do this, or are there better solutions. I am open to any help here.
    I think this is not only a RMI-topic, because maybe a JMS-solution would be maybe a better solution. And why use RMI at all? Maybe a network/socket solution is faster.
    By the way: Does anyone have experience in building a trading system (for algorithmic trading) ?
    thanks
    tk

    Hello duffymo...
    duffymo wrote:
    1) Speed
    If I use the RMI/interface-solution you can directly use the methods of the interface without having some layer in between if you are in the same JVM. This should be faster as JVM. I have no idea what the situation is like if the receiver is not on the same JVM. How fast is the RMI/interface-solution? How fast is the JMS-solution?RMI? Same JVM? No you're not - each remote client runs in its own JVM. What are you talking about? If they'er all in the same JVM, there's no need for RMI. That's just JavaBeans and events.o.k....from the start....some clients are on the same machine AND some are on different ones. Speed is essential here, especially for the clients on the same machine (components of the server itself). In using this interface you could manage clients no matter whether they are local objects or remote objects. The object that have to notify the clients even do not have to know whether the clients are on the same JVM or the data is forwarded via RMI (or sockets).
    If the objects are local the "notification" is just a method call (therefore very fast) and if they are remote you have a pure RMI remote object call. Which also should be faster than JMS.
    JMS, by definition, is asynchronous. The publisher sends off the message and doesn't wait for any response. It also doesn't worry about who responds, because it's up to subscribers to indicate their wish to receive the message.yes, so there is a lack of control, what I said. There many tasks where you need this, but there also many tasks where you cannot use MOM.
    I have no idea why you're so worried about speed in that case....because this is the requirement !!!! I mentioned it several times. We are talking here about milliseconds. Each detour of the data flow or every data-copying (within the memory or even worse to a database/HDD) takes valuable time.
    2) Control
    the RMI/interface-solution provides more control. How can you say "more control" when you admit that you don't know JMS?You can get the idea of MOM (i.e. JMS) very fast I think. And I dealt with the topic for some time. I am working in the computer science for 17 years now, believe me, I am able to learn.
    I�ve explored the acknowledge-methods of JMS and they all are very slow. You can not use this in a system where speed matters. And you get no direct feedback. (If receiver A and B subscribed to some data, how to find out that both got the data? The sender do not know its receivers and this is one source of the lack of control)
    And: If you send the data via a method call, you can get a return value and exceptions. You are free to do (almost) eveything you want. Do you really want to say, that with JMS you have this kind of control?
    The sender knows all the clients and can check, whether they have really received the message or not. Maybe even provide some feedback. Can you provide this with JMS?The whole idea behind publish/subscribe is that the publisher doesn't have to know.
    JMS can be set up to guarantee delivery.Yes....BUT: I want to find the best solution to a GIVEN problem.
    I think here speed is really what matters. And that is the main reason against using JMS. Therefore I think I do not have to deal with JMS any more. The idea of JMS is nice, and I will use surely use it in the future for some other projects, but here - I think - I cannot use it.
    and something to "guarantee delivery" ... this is not always a good thing. In some cases the receiver do not want to receive "old data". It depends on the task to accomplish.
    3) Messages
    in the RMI-Interface-solution I can send almost all kind of objects to the client (serializable). As I can see you can also send java-objects via JMS, but it seems to be more complicated (messages have to match a standard (header, properties, body)...).Read more about JMS. Ditto for it if you send an ObjectMessage.???
    And I said.....?????
    I think the RMI/interface-solution is not easy. For example you have to use threads (incl. thread-pool) to send all the messages almost at the same time. On the other hand I think it is not too difficult and maybe worth the effort.RMI isn't easy, and it's brittle. Change the interface and all the clients change.yes, I agree. I faced a lot of problems with RMI. But then provide some alternatives. JMS seems to be too slow (and I do not have the time for coding an interface on the socket basis).
    I think it is difficult and not worth the effort. JMO, of course.
    JMS is done for you. You don't have to maintain that code.except the performance problem
    The most important points are here reliability and speed. JMS is more reliable than anything you'll ever write, and it's fast enough."fast enough" .... how can you decide. I can tell you, it is not fast enough.
    and reliable: yes I would prefer JMS here. really! I have to admit while reading the specs I began to like JMS. really. There are some chat-functions to implement. This should be very ease with JMS.
    I think going down an RMI road for this would be foolish. I wouldn't do it.Maybe there are some other solutions. I will keep looking. And I will check the frameworks stefan.schulz mentioned.
    I am very sorry, but I think this is a justified question. And this comment is not very nice at all. There are so many different areas in the Java-World, and no one can be expert in every field. I think this is what all the forums are about. Share knowledge and help others. It's not intended to be mean or demeaning. I don't know if you're aware that excellent commercial trading systems exist, written by people that wouldn't have to ask about RMI or JMS to do it. The fact that you have to ask suggests to me that you aren't one of those experts. If you're doing this as a learning exercise, I'd say go for it. Do it both ways in that case and learn for yourself. Just be realistic about the end goal: it won't be a system that will be used in production anywhere.I am in the financial business for almost 8 years now. And there are many different areas and roles. You have no idea what the systems are like, that I usually design (and they are very, very successful). I think your comments are rather unrefined. And maybe you should think about beeing a little bit more open-minded. You cannot prejudge everything.
    Software development is very complex because of all the tools and methods in this field. Knowing when to use a tool/framework/method... is as important as knowing when NOT to use a tool/framework/method/...Yes, and knowing your limitations is also very important.what is the purpose of this last sentence?!
    I really want to know!
    You are the one, who wrote
    JMS is more reliable than anything you'll ever write, and it's fast enough.Without knowing anything about the system (that is not true: I mentioned several times that speed is very important).
    Without knowing anything about me...
    I really appreciate your contribution here (it really helps), but I stick to it: it is not very nice to goof on someone.
    regards
    tk

  • Software architecture for multiple device interface

    Hi everybody!
    I'm quite new at LabVIEW and I have a question regarding software architecture.
    I have to program a software for controlling 3 motorized stage, a camera and a pump. I have separately programmed VI's that control each of them and now I would like to merge them in a single program and I don't know what is the best way to do it.
    So far my sub-VIs are made of "event-based" structure that reacts when the users click on pushbuttons. Should I simply put all my sub-VIs (i.e. multiple event structures) in one big while loop? Is it the best way to do it? I've been looking for a while for references about that but I couldn't find any relevant ones and I would really appreciate your help. Also if you know good references please share them to me.
    Many thanks!
    Bests,
    Julien

    If you could give me more details or send me a link to references about it it would be awesome.
    Sure, have a look at the attachement and see if it could be extended for your use?
    It is a fairly simple implementation. I use it for reading for a number of different InputStream devices, such as FPGA DMA FIFO's, sockets, files, etc..
    Br,
    /Roger
    Attachments:
    LV2009 InputStreams.zip ‏1694 KB

  • How can I download the software for a second time without a backup but with  the serial number?

    Hi guys,
    stupidly my hardware got broken and I've missed to do a backup for the programs. May it's a stupid question but how can I download the Lightroom software for a second time? I've got the serial number for this, but can't find a link without buying it again....
    Thanks a lot for your help!!!!
    Cheers,
    Hannah

    Lightroom - all versions
    Windows
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Windows
    Mac
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Macintosh

  • Difference between n-layer software architecture and MVVM design pattern?

    hello everyone,
    I am not clear with this concepts of Software architecture pattern and design pattern.
    I am developing an wpf application using MVVM. Now, my question is, does MVVM come under n-layered architecture? 
    or n-layer architecture and MVVM both are different? 
    Regards,
    Rakesh.N
    Rakesh murthy

    "
    Now my question is, i want to process the data which i get from database. where should i write that processing logic after getting the data from database? in model classes? or in view model classes?
    The model is however the data comes from wherever it comes from.
    If there is any processing after you get it then that would be in the viewmodel.
    The viewmodel adapts your data to the view.
    If it needs any adapting then the viewmodel does that, not the model.
    EG here
    protected async override void GetData()
    ThrobberVisible = Visibility.Visible;
    ObservableCollection<CustomerVM> _customers = new ObservableCollection<CustomerVM>();
    var customers = await (from c in db.Customers
    orderby c.CustomerName
    select c).ToListAsync();
    foreach (Customer cust in customers)
    _customers.Add(new CustomerVM { IsNew = false, TheEntity = cust });
    Customers = _customers;
    RaisePropertyChanged("Customers");
    ThrobberVisible = Visibility.Collapsed;
    That logic is in a viewmodel.
    in this context , in which layer the viewmodel and model classes are put under in n-tier architecture?
    They're in two of the n layers/tiers.
    Or they're in one.
    Depending on how someone decides to classify a layer or a tier.
    There is no absolute definition.
    Why would you care?
    Hope that helps.
    Technet articles: Uneventful MVVM;
    All my Technet Articles

  • Upgrading to CU3, quick question - more questions after upgrade

    So I am finally getting around to installing CU3 to our environment, upgrading from the base SCCM 2012 R2 install.  I am running SCCM in a 1 CAS and 3 Primary server environment.  I'll be upgrading the CAS first, and the update gives the option
    of importing the client packages for upgrades into SCCM Software Library.  The question is, is should I be doing this on the CAS, as our CAS does not have any clients reporting to it?  Obviously I'll be importing them into the Primary sites, and
    I wasn't planning on importing them into our CAS, but wanted to verify that is the correct action.

    So I updated the CAS, and the primary sites, and I deployed the client upgrade packages to about 25 test machines. All the test machines received and updated successfully.  They have the updated version of x.1401 on the client sided, however it has
    been almost 24 hours for some, and I only see three clients in the Device Collection node that's in the SCCM console that are reporting the new client version.  The ones that have reported back are those that have performed a hardware scan after the update.
     Is this normal? 
    Also when I go into Administration > Sites and look at the version being reported here, it is also on the old version, despite being correct in the About System Center Configuration Manager, and seeing the CU registry key reporting "3".  Is
    this normal?

  • Software architecture  to utilize XML DB

    Hi,
    We're using currently using Toplink 9.0.4 with an Oracle 9i DB.
    I'm interested to find out what level of support there is in Toplink for the "new" XML DB features (in the Oracle 10g database for example).
    The material I've seen so far on the Toplink developer preview suggests that Toplink will manage mappings from an object model to a XML representation.....but that XML representation is purely an "in-memory" - i.e. it does not generate the "SQL" to store objects in an XML DB.
    There seems to be a gap in the way XML data is managed and the way Java domain models (and persistence ) are typically architected.
    The way we craft our services at the moment is based upon Java objects which encapsulate a request. Changing the contents of a request (e.g. adding a new attribute), breaks existing implementations that utilize that service (because of Java's serialization model).
    I'd like to define a service which takes a lump of metadata (passed as a generic object model, e.g. XML), but also allows that metadata to be evolving/variable/dynamic . The initial service implementation would look up a Java business object based upon the request information...include any transaction "attributes" from the request and persist it. Nothing new there, but what if I want to allow clients to attach "custom attributes" to their requests. The traditional model of request --> Java Business Object --> relational database seems to break down. Java Business Objects aren't typically very good at handling dynamic addition of properties.
    Does there exist a software architecture that allows for Java Business Object "properties" to be dynamically attached and persisted.
    It seems that the big push on XML is heading towards that goal....but at the moment I can't see how the pieces would actually fit together ......
    Apologies that my ramblings are a bit wild!
    Regards
    Mike

    TopLink 10.1.3 added XML support in three ways.
    - Object-XML mapping - Support was added to be able to map Java object to XML documents. This allows for in-memory two-way conversion between object and XML, and usage with XML messaging and web services.
    - Oracle XDB XML Type - Support was added to store a plain XML attribute of a Java object mapped in relational TopLink to an Oracle XDB XML type field.
    - EIS - Support was added to allow mapping Java objects to XML records and Interactions in a non-relational EIS system through a JCA adapter that supports XML records.
    From the sounds of things you may wish to:
    Use TopLink OX to map your XML messages to your Java object model. For the dynamic XML content you could use a Transformation mapping in TopLink OX to store this dynamic content in a plain XML field in the object. You could then use Oracle XDB and the TopLink XMLType mapping to store this dynamic XML content in an XMLType field in the database.

  • Correct software architecture

    Hello.
    I´m designing a complex application and I don´t know what software architecture is the best. I have been reading the "LabVIEW Intermediate I: Succesful Development Practices" manual. Lesson 3 gives the reader a lot of options for software architecture selection, but, although it gives a lot of explanations, I can´t find the correct one (maybe I should use a combination of some of them).
    The application runs in a PC. This application communicates with 4 controllers via CAN and with another one via Ethernet.
    Both communications are very asynchronous because I have to read a lot of data but send only a few.
    I have to receive a lot of data from the first controllers (CAN connection) and display a graph containing all data. Reception must be as fast as possible without losing any data. During graphic displaying time is important but not critical. In the other hand, is critical not to lose any data. I mean it is critical to collect all data although they aren´t displayed in "Real time".
    I have to send some data to the controllers via CAN but in this case, transmision rate can be quite slow, so I guess it can run in another loop.
    Communication with the other controller (via Ethernet) have a similar behaviour, but it don´t have to be as fast as CAN communication.
    Finally, I have a User Interface where basically I change parameters and send them to controllers so there are no intensive processing or activity.
    I have been thinking about using Master/Slave or Producer/Consumer architectures but I don´t know what architecture best fits my application.
    Can you help me?
    Thanks!

    Personally, I would stick with the producer/consumer approach for this in order to seperate out the UI code from the rest.
    Additionally, I would launch a background process (out-of-line via VI server, but I can't find any decent references at the moment) for each CAN so that the communication for each device can run in a seperate thread.  This way if one blocks up or generates an error, it won't block the others.  These VIs running in the background then send the acquired data via QUEUE to the main program.
    I've used this approach in the past for communicating in parallel with many devices and have found it to be very good.  The time required to get it up and running is maybe a bit longer, but in the end it's worth it.
    So basically, 1 VI 1 device on the level closest to the hardware and then one UI VI which communicates with the others via QUEUEs.
    That's my 2c, maybe someone else has a different approach.
    Additionally, Sorry I can't give an example of what I mean, or a decent reference but y quick saerch of the forum didn't show me anything useful.  With time it'll work, but I don't have too much time at the moment.
    Hope this helps
    Shane.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

  • Question Bank Question

    Hello
    2 Questions I'm affraid
    Question 1
    I am using Captivate 5.  Is there a way to say have 10 questions in a question bank but randomly only ever show 5 questions.
    For example two people sitting next to each other at a PC both taking the same course which has 5 questions, however they both see different questions.
    Question 2
    can I attach more than one question bank to a test.  For example:  A person is being tested on several different subjects  from say Pain management to fire saftey.  Is there away to set up several question banks and attach them to one test and randomly take questions from each bank. ie
    Question Bank 1 Fire Safety . . 10 questions
    Question Bank 2 Pain Management . . 10 Questions
    Question Bank 3 Resucitation . . 10 Questions
    I want the acutual test to randomly take five questions from each bank.
    Thanks

    What you describe should be possible using question pools in Captivate.
    A question pool can have dozens of questions but if you only have 5 slides in your movie linked to that question pool then your users will only ever see 5 randomly selected questions each time the movie is played.
    Just be aware that those same 5 questions will be visible during that session no matter how many times the learner retakes the quiz.  In order to see a different set of 5 randomised questions from the same pool the learner would need to relaunch the entire lesson again.
    If two people log onto the same PC and each launches the same lesson (separately) then they will see a different randomised set of questions from the same pool.
    You can have multiple question banks in the same project, and each can have as many questions as you need.  All you need to do is insert question slides in your movie and select the option that they are randomised questions.  When you select this option, you get the drop down menu that allows you to select which question pool the questions will be drawn from for that slide.  If you later decide you want the slide to draw from a different pool, you can easily change this in the Properties tab.

Maybe you are looking for

  • Can see usb HD in Utility, but don't know how to access it.

    Hello and thanks in advance for any help! I have the 802.11n router with a 250gb MyBook hard drive connected to it. When I double click on the router in the Airport Utility - it brings up the screen, which I can select 'Disks' on. I see the hard driv

  • How to decrease the row height in ALV Grid (OOPS).

    HI Experts, I have displayed ALV Grid using CL_GUI_ALV_GRID=>SET_TABLE_FOR_DISPLAY. I want to decrease the row height and width. Can any one suggest how to do this? Regards, Kumar.

  • 15.4" Macbook Pro Keyboard Installation

    I have a replacement keyboard. Can anybody explain to me or link me up to any tutorials for installing it?

  • Restarting A Flex Application Programmatically

    Howdy folks, I have just created a database driven user management system which works wonders, but I'm having a problem with logging out a user. By far the easiest, sure fire way of doing this would be to clear the users login in the database (not re

  • Date Format Display on report

    Is there a way to set a custom date format on a report column? I am trying to use a format mask and it doesn't appear to be working. Maybe someone can spot my mistake: Query: Hours Worked = Clock_IN - Clock_OUT Format mask for Clock In/Clock Out - DD