Is this a good design?

I am designing an online application. There is a super class DataItem and 3 subclasses. Also, each of the classes has a dao class with the same inheritance relationship. In each sub DAO class (extends DataItemDAO), it has its own getContentItems() method which calls getItems() method in DataItemDAO class.
The getItems() method in DataItemDAO takes DataItem as one of its parameters. So it could get all the setter methods of the object and invoke them using Java API and store the objects in a Vector and return the Vector. Basically, my idea is to have get, create, update, and delete actions all handled in the superclass level. Since each subclass has its own attributes besides the ones in the superclass, I guess I have to use Java API to get the setter methods in order to set attributes of each subclass object.
Do you think this is a good approach? Are there any cons using Java API to invoke methods? Any suggestions/alternatives? Thanks.

I guess when you write java api you really mean Java Reflection!?
If so here are my thoughts (well I guess they are there even if you refere to something completely different)
a) Reflection is slow and hard to debug since you have to do a lot of the stuff at runtime which normally the compiler gives you at compile time.
b) It sounds quite flexible
So the question is: what is more important: speed (development and execution wise) or flexibility.
You might also consider an aproach which generates your dao classes. It's flexible and fast (once you created the classes and their instances)
One serious drawback in simple using the getters and setters is that you can't simply add accessible fields which aren't persistent.
Regards
Spieler

Similar Messages

  • Is this a good design -- XI and another EAI tool in the same landscape

    Hi All,
    I am working in a project wherein the client already has an EAI tool which is based on SOA(Web Services). They are implementing SAP systems in their landscape. They now want to use SAP XI in the landscape for the purpose of integration. They want to integrate their initial EAI tool with XI and have the existing integration with NonSAP systems as it is and integrate SAP systems using XI.
    Is this a good design having two EAI tools being used for integration between two systems? What are the various issues that need to be taken into account?
    Answers will be promptly rewarded.
    Thanks and Regards,
    RM

    R M,
    There are lot of points that has to be considered when evaluating the design of EAI landscape. I heard somewhere that even SAP does not recommend to scrap the existing landscape and bring in SAP XI there. I gues dual hub gateway is very common unless it is a fresh implementation becuase changing the existing landscape is re-investing the cost again for the customers.
    If you ask me then SAP XI is not yet so robust to handle huge volumes in real time data integration and SAP XI can be used in between for integration to SAP system as it is a SAP system and it works excellent integrating with SAP systems.
    Check out this thread which is a transcript of a 10 year EAI architect :
    in my company we had more or less the same situation 2 years back, a existing BizTalk solution, and whether we should introduce XI or not.
    We concluded with the following; BizTalk should be used as the main integration engine between the different system landscapes and ALL external communication, and XI should be used as the integration engine for all data to/from our SAP system landscape. Depending on the integration scenario, we may use both.
    BizTalk will not see any SAP systems, only web services exposed by XI or using IBM MQ depending on an async/sync integration scenario.
    We believe that XI is better with integration from/to SAP, and;
    - In future SAP will deliver out of box integration for the XI system (XI content) for Enterprise Services Architecture
    - Several components in the NetWeaver stack are using XI for communication
    We have a SAP system landscape with several 46C systems (IS/OIL, HR ...) and newer NetWeaver solutions.
    I can give you a brief resume of our experiences – my background is ABAP developer since ’98, I have implemented a few BizTalk solutions to SAP 46C, and I’m a certified XI developer and developed several XI solutions between SAP 46C/640 and BizTalk.
    BizTalk ******
    Overall communication between SAP systems and BizTalk depending on the integration scenario and who is the initiator:
    SAP 46C to BizTalk:
    There are no good mechanisms available for sending data from 46C to BizTalk, we are using HTTP_POST with XML payload. Then you must use the iXML library on the SAP side, its ok, but you will spend, in my point of view, too many hours on XML programming that can be generated automatically.
    BizTalk to SAP 46C - Which SAP adapter to use for BizTalk?
    We started with SAP adapter from IWay, but that adapter gave us a lot of problems on the BizTalk server (pretty complex adapter with strange behaviour, and several integration scenarios stopped working for no reason at all (unstable)).
    Due to several severe problems, we switched to SAP adapter from Microsoft 1 year back in time. If I don’t remember wrong, back then, the SAP adapter from Microsoft did not support parameter of type string or table types – so there are/were some limitations regarding the signature of the RFC function.
    The SAP adapter from Microsoft is more stable than the previous, BUT we have some hick ups with that one as well when BizTalk does very frequent calls to SAP 46C.
    SAP 640 to/from BizTalk:
    I assume you can use the web service functionality on the SAP side in order to send/receive data, but I don’t know whether 640 support asynchronous web service.
    XI *****
    The communication mechanism between different SAP systems and XI are much better than with BizTalk:
    SAP 46C to XI:
    Configure a sender communication channel with RFC adapter; basically the XI system will be RFC server so the only thing you have to do is to create a RFC port on the 46C system “pointing” to the XI system. In the Abap program, you can do normal function calls with destination (RFC port) AND the RFC call will automatically be translated to XML on the XI side.
    Thus, you can forget all about the iXML library and XML rendering of the payload to HTTP.
    Besides, you can choose to use sRFC, tRFC or even qRFC depending on the integration scenario and whether you want guaranteed delivery.
    XI to SAP 46C:
    More or less same as BizTalk using a SAP adapter, but string and table types are supported.
    SAP 640 to/from XI:
    This is a very nice situation, every 640 has a local integration engine, so the main integration engine (XI) can send/receive XML messages both async/sync. Another advantage is using the SPROXY transaction on the 640 system, generating automatically a proxy class being able to send/receive messages based on a message interface defined in XI (outside-in programming).
    Finally *****
    BizTalk and XI are at a conceptual level identical, two integration engines with the purpose of send/receive, route and do message transformation (mapping) using adapters to different technical systems.
    Microsoft has a lot of resources available and for sure, BizTalk will be a very good choice for most companies.
    SAP came late with XI, but they are not trying to make the best integration engine, but good enough. And for sure, I think SAP will come with very nice XI content in time (interface mappings between message interfaces – business solutions) which is beyond BizTalk.
    As an ABAP programmer I just love the transport system between development, quality and production systems. We are using the CMS transport systems between our development XI, quality XI and production XI – it is so nice and fast. With BizTalk you have to create a MSI file (installation file – which files to include…) and somehow transport the file (mail or whatever) to the quality environment for installation – really tedious work compared to XI.
    So we are using BizTalk 2004 and XI 3.0 and are very happy with both.
    Note:

  • Is this a good design pattern?

    Hi,
    I am working with a team to create an application that can acquire data from up to 24 thermcouple channels.  We plan to create a wizard to assist the user in setting up the test (specifiying stop conditions, sample rate, channels to sample, output file, and email/text notifications).  After the setup, if the user does not cancel out, then the program continues.  We have defined parallel loops and their roles, trying to fit into a producer/consumer design pattern.  I have attached the main file which shows the structure of the program.  We are trying to keep it clean and modular.  Before diving into development, we are finalizing a detailed design specification so that different people can work on each of the loops' subvis.  I was hoping that people could review the block diagram and offer suggestions for improvement or validate that we have chosen a good method of implementation.
    Notes about the block diagram
    The plan is for data driven stop conditions to be detected by Event Notifier, handled by the Main UI event, and then the Data Collector is instructed to stop (as well as the Main UI loop).  When Data Collector stops, it releases queues, the queue reference becomes invalid, and then the loops with the Dequeue will be stopped.
    I am not sure if an additonal event structure should be in the DataCollector to specifically handle the Stop button on the UI because if it is in the Main UI event structure, the DataCollector would not be stopped immediately.  This is important to stop quickly because the sample rate could be VERY long.  I understand about using an event structure instead of WAIT, but didn't know if there is an efficient way leaving it down in the Main UI event structure....????
    Data Collector is the producer, it currently only collects data and passes it on.  If the program is going to contain a start collection button, or pause/resume, I need to figure out how to handle this with the Main UI event structure.
    Event Notifier consumes data from the Data Collector.  It looks at all data and should set a flag if a stop condition is met.  The flag will be handled by the Main UI event structure to tell Data Collector to stop.  The event notifier also sends a notification to the Email/Text Caller when thresholds have been exceeded warranting a reason for the user to be notified via text or email.
    Email/Text Caller waits for notification and then calls a subVI to send an email or text with certain data and channel information.  The subVI call is lengthy, so we decided to put this in its own loop instead of a case structure inside the Event Notifier.
    Report Generator logs all collected data to a file.  A second queue was used, but uses the same data as the first.  Is this the correct implementation since two consumers need the same data?
    Main UI - handles changing of sample rate, possibly the stop button, possibly start/pause/resume of data collection.  Also handles when Event Notifier sets flag for a data driven stop condition, which then should provide a mechanism to stop the Data Collector.
    A big question that i have is.... Should the Main UI event structure just be in the Data Collector so that the loop can be stopped immediately?  All of the UI events (stop button, start/pause/resume data collection) directly effect the Data Collector.  Should the data Collector have a state machine instead?
    I feel that the 3 consumer loops (Event notifier, Email/Text Caller, and Report Generator) seem like a good implementation, but i am not confident about the Data Collector and Main UI loops.  Should they be combined?
    Solved!
    Go to Solution.
    Attachments:
    updatedMain.vi ‏13 KB

    A couple of thoughts:
    Overall it looks workable- remember to name your queus and notifiers- then you can depop the BD and launch each loop in its own sub-vi without wiring all those queues between loops- Just obtain ref to named queue.
    "Data collector" needs a supervisor to control how often the data is collected- I'm thinking a QSM with "init- collect- stop" states.  A simple timed loop could produce the "time to acq ticks" under control of the sample rate control. This puts both the DAQ init and cleanup functions within the Data Collector's perview so it aids coehesion and solves the exit without waiting for the loop to iterate.
    I'm not a fan of duplicating data- I assume analisys is pretty much just some comparisons- so it is pretty quick- Why not append summary data to the same queue? And make it a single element queue- the report loop can then inspect the queue and look for a summary data "index" - if its greater than the last index written append the darn data to the report?  Preview queue works great for these situations.
    Do not combine the UI handeler with anything else! Do you see the snag?- hint: here thar be spaghetti.  keep the functions seperated for solid scalable and maintainable code.
    One last thought:  Its getting less popular to stop loops on the error out of a dequeue.  First it returns a default element that can cause your listeners some headaches.  Second it doesn't let you run cleanup code.  Use a stop command <enum> built into the element data as an executive to determine when to stop.  We'll try to get the examples updated to show current best practices.
    Jeff

  • If  a dto extends from a super class   is this a good design ?

    I am confused whether to extend my dto from another dto ,I wanted to seperate the common properties like the pagination and sort form all my search dto's, if I do this all my search dto's will extend from common dto ,but because dto is just a pojo is it good to create inheritance in DTO's ?

    Since a DTO should just contain fields and minimal logic you should have less problem with inheritance for DTO than other classes.
    Is there a specific doubt you have in this regard?
    I suggest you take the approach which seems simplest to you.

  • New to servlets - Is this a good design?

    I would like to create a web app whereby a user pastes large amounts of text (thousands of words) into a text field, then to have the text transformed and sent back and displayed to the user. To transform the text, a memory intensive model is required (currently it ranges between 500-1000mb). Therefore with my understanding I will have an html form send the text via post to an httpservlet. The servlet itself will read the data pertaining to the model (via database or file) and construct the model once during the servlet initialization stage. Then the servlet will transform the text and send it as a response to display it on a new html page for every request while the servlet is alive.
    My main concern is the life cycle of a servlet. If the servlet is not handling requests because there are no requests to handle, from my understanding the servlet will terminate. Then later on when a request does come through, a new instance of the servlet will be created. Therefore I am worried that the model to transform the text will need to be reconstructed. I'm worried because this involves large amounts of data and can take thousands of milliseconds to construct.
    My desired solution is to have the model that transforms the text constructed once, somewhere on the server for the servlet to query, preferably inside the servlet itself.
    Hopefully someone can clarify this for me and comment on my broad approach.
    Thanks

    user11105060 wrote:
    I will restate my problem since it's not exactly clear in the previous message.
    I want an HttpServlet to process text sent to it from an html form and then display this on a subsequent form. The issue confronting me is that I have to create a memory intensive object (model) that is fairly time consuming to create, before I can process the text. The fortunate thing is that the object (model) is always the same and never changes, therefore I only ever need to construct it once to process any text.
    I would like to know if it is possible to construct this model once and only once for the HttpServet that will use it to process the text, or do I have no control over this? That is, if the httpservlet is created then destroyed then recreated, will I have to reconstruct the model again? Is it possible to keep this model in memory and pass it to the httpservlet constructor as a parameter?
    If the question is not clear, could someone please say so.
    Thank you.So you need your model object to basically only exist once in the entire application, right?
    Seems like you found a reason to use a singleton.

  • What is a good design for remote Views?

    Hi All,
    I am thinking how would I design my process for performance consideration in retrieving dynamic values of table/view data.
    The requirement is like this:
    1. We have 50 databases residing on each own server counterpart (50 servers).
    2. Each database has table Patch_LeveL (apps_name, patch_level), which contains  just one row only to reflect the latest patch level applied for the apps on this database. Note that are we constantly on applying service packs for this apps.
    3. On our central monitoring server (db). I create 50 database LINKS for each of the 50 databases.
    4. I created 50 views over these links to make  it centralized to represent  the 50 Patch_Level tables. As   patch_level_view1, 2, 3.....patch_level_view50.
    5. I then create a central view as .... as  union of the 50 individual views Actually I am just planning to do the above activity.
    My question is....is this a good design for performance? Can you share be a better approach?
    Is there a limitation of joining "union" of 50 views?
    Thanks a lot,

    Is there a limitation of joining "union" of 50 views?What can happen is if the connection to one of these servers is interrupted, the big "union" view will not work. As said by above poster MV, with lets say an hourly refresh, helps with this situation as you have the data that was gathered last time (and most likely it is still valid).

  • Looking for my first Mac! I have my eye on a 2006 MacBook... $259.. Is this a good buy? I just want to be able to write essays and check social media and email.

    help!!! My tech savvy on a scale of 1-10 is a straight up 1. And a half.. Anyways.. Is this a good buy? It's on amazon.. Do you think that's a trustworthy place to. It from?

    That's good to know... has not being able to update really hindered you? I understand that a lot of Mac users want Apple because they do a bunch of editing and graphic designing... I am not at all into that. I am a Physical Education major (aka: a lot of essays!!), and I write as a hobby. So that is all I want this computer for. What do you think??

  • How to master good design with EJB and JSP?

    I use JSP to calling EJB. But the .jsp file is complex and it's difficult to maintain...I just want to work higher efficent with EJB,JSP and JavaBean. I want to know is there a good design with EJB and JSP? and is there any good material about MVC for EJB,JSP and JavaBean?

    You should read the J2EE blueprint available on this website. Better download the PDF, and print it for yourself so you can read it anytime.

  • Is this a good desing for PINGROUPS?

    Hi there guys.
    The plan is migrate the uplinks from a fews 6500 to a couple Nexus 7000 using pingroups with no trafic disruption. So i have made a desing but i not sure if this is the best way to accomplish the objective without problems.
    This is the desing:
    There will be two (new) PINGROUPS (All the server use two VNICs) that will be facing to the nexus using the PO 108 and PO 109, is this a good configuration? the nexus are using VPC towards the fabric; the fabric are in EHM.
    We made a couple of test moving the vnic into the pingroup and it work fine, but i want to know is this configuration is good.
    The PINGROUPS see like this:

    This works ok; however, best practise in UCS design is using dynamic pinning, and not static pinning (what you are doing). In your case, dynamic or static pinning will have the same result; however, the managment overhead for static pinning is bigger; for every interface, you have to add the pingroup, and if you forget, it will fall back to dynamic pinning.

  • Help me...does this look good?!?!?

    Hey all,
    I want a G4 to use in my music studio, have found one on ebay, does this look good to you...
    http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=8792713494&rd=1&sspagename= STRK%3AMEWA%3AIT&rd=1
    If you can't access that, basically it's this...
    Computer is in excellent condition, has been well loved and well upgraded:- 200GB hard disk (5400rpm) Dual 867 MHz, 1MB L3 cache per processor 1.25GB DDR SDRAM 16x DVD+/- RW (Superdrive) 4x DVD+ RW (original Superdrive) 4x USB 2.0 ports 2x USB 1.0 ports 2x Firewire ports Airport Card (WiFi) Ethernet Card 56kbps Modem Digital in/out for audio Again it is in excellent condition, well loved.
    Oh and there is still 2 slots left for memory upgrade and 4 other slots for your other upgrades, i.e. more firewire, usb, graphics card, music adaptors etc. I used the machine mostly for video editing and graphic design and it handles everything I throw at it. It is a beast of a computer but sadly by job entails I have a laptop now I will also include all the software that comes with it.
    Think it sounds good? What price do you reckon???
    Thank you!
    Olivia x
    G4 I hope    

    If you do decide to bid I'd keep in mind that it's the base model MDD G4 with a 133MHz system bus (the others had 167MHz). It's also one of the original models that got the nickname of wind tunnel as they could be fairly noisy, so much so that Apple under went a power supply replacement program using quieter fans, which may be an issue if it's intended for audio use. I'm not sure whether it's had the power supply replaced, but Verax also offered a noise reduction kit, which may give some indication of how noisy it can be.
    I'm not trying to put you off though, but I'd keep the above in mind if you do intend to place a bid.

  • Kin onem- daughter wants -is this a good phone?

    Hi, I am a first time user so please be patient. My daughter has a Samsung Intensity and now wants to upgrade to a Kin Onem. I, however, am technically stupid. Is this a good phone to get? I believe she wants a decent camera,touchscreen and maybe internet. I heard she could get this option for free on this phone.
    She gets Itunes a lot, texts a lot and does take pictures. I think the internet is the main factor this time....Is there a better one (phone) or another one with free service or is this a good choice for her? Also, do you know if you can purchase this phone in the store or do you have to order it and have it shipped in? I also read you have to enter all your contacts.Is this true?
    What are the pluses and minuses for this phone in "simple" English! Thanks.

    Yes, this is a good phone. That is the short and easy answer. I am assuming you are looking for a phone that does not require a data plan (that costs extra). Other smartphones are MUCH better, but require that data plan, so if you do get data, do not get this phone. Get and android, windows 7 phone, blackberry, etc. But this is the ONLY phone w/out data.
    Like said above, i would recommend the Twom over the Onem, simply because it has the larger screen, more memory, better camera, etc. But, that is all personal preference, if your daughter would rather have a squarish, smaller phone, then the Kin Onem is better suited.. My personal flavor is, i like the longer, rectangular phone shape, i am much more familiar with it, and it fits the hand better. The Kin Onem is $20, and the Twom is $50 with a new line/plan/contract, but for a one-time charge, that really isn't that much and is worth it in my opinion (and if you qualify for the 'new every two', you get $100 towards a single phone, that is how i got one of these for free).
    This phone is sold in stores, but they do not have them out on the 'floor' in most, if not all stores. I only imagine that it is sold in actual verizon stores, not resellers such as bestbuy, mall stands, etc. I got mine in stores last week, but i had to ask them specifically for what i wanted. They had a test device, but they had to charge it up int he back room before i could play with it. Many believe that they are just trying to clear out their inventory of devices from the first time around, when they sold less than 60,000 devices, but i think they have alternative plans too. I hope they are seeing if they sell or not (and if more people knew about a non-data phone with wifi, they would sell like crazy in my opinion), and if they do, then they will re-start production of hte phone, market it, and most importantly, add support for the software/firmware and provide updates to fix its problems.
    You heard right, this phone does not support backup assist at the moment (transferring contacts application from verizon). However, some (it should be all in the near future) stores have recieved system updates that allow them to transfer contacts with a hard-wire connection from your old phone to the new Kin, you would just have to ask your local store if they have recieved the update. I have learned, be very specific when talking to sales reps, know what you want, sound confident, and then they will help you. Most sales reps do not know all the details, but what do you expect, their main job is to sell phones (although it would actually boost their numbers if they made sure all employees provided good customer support..hint verizon). At worst, they will have to contact their manager/supervisor and they will hopefully be more helpful.
    Long story short, this phone has wonderful features.
    -8 MP camera
    -720p HD video
    -very responsive, well built capacitive touchscreen
    -full QWERTY keyboard
    -full Zune music/video player
    -FM radio
    -and most importantly, Wifi
    You will have to manually block data if you do not want any charges appearing, but that is not too hard, and it saves any headaches of a ridiculous phone bill (without a data plan, you by default sign up for a pay-per-use plan, at a ridiculous $1.99 per MB rate..thats about $2 per webpage browsed). That is explained in my review/FAQ (linked below). This phone was originally released at the beginning of the summer as a smartphone, with an emphasis on social networking, and it failed miserably, so Microsoft/verizon have rebuilt its software and released it as a feature phone.
    The physical quality of this phone isn't top notch, but it is relatively sturdy. The front portion of the phone, the touchscreen, is built very well, with high-quality plastic that does not feel like it will break, even with a few accidental drops. The back (battery cover), however, does feel weak, and is made from a slippery, thin plastic. That is nothing that a case can't fix, though, and they sell for as low as $4 ($1+ $3 shipping..so if you do order online, purchase screen protectors and other things all at once, because the shipping costs much more than the actual case).  The phone hinge is decent, it has a quality-spring action to it, but there is a little wobble in the hinge (although the spring almost completely covers that up). The keyboard keys are 'clicky', and responsive, it has a quick repeat time on keys, which i really like.
    The biggest issue with this phone is not the actual phone, it is the abundance of firmware bugs/poor design and quality check before it was released. It all depends on if your daughter will be bugged enough to not like this phone, despite its awesome features.  I am hopeful that microsoft will release firmware updates to fix these issues, but if not, many of them have work-arounds and aren't that big of a deal anyways. So, yes it does have those problems that you see other people talking about, but they are very minor compared to how nice of features you get with the phone. Some of the major bugs/poor software quality include:
    -backup assist (transferring contacts) does not work
    -no forwarding messages
    -can't delete individual messages
    -volume buttons don't lock when phone is locked
    -can't delete or rename ringtones
    -etc.
    I have created a more detailed, albeit VERY long, full review of the device, its quirks, pro's, and fixes/workarounds. If you have time for some heavy reading, or want more information, here it is:
    http://community.vzw.com/t5/KIN/Kin-TwoM-Review-FAQ-Q-amp-A-troubleshooting-etc/td-p/347662
    I hope you find the best device for your daughter. I can provide my opinions, and i love this phone, but get the phone that she would like the most.

  • Good design for property files?

    Hi
    Id like to put the property file for my application in the users home folde, and on any *nix OS (Linux, Unix, OS X,..) thats a good solution if i simply make a .xxx directory (a directory starting with a '.'), and then the user cant see the directory by default, and then place all my configuration there under. But is this a good cross platform design, or is there a better way?
    /Thanks

    I think it's pretty decent/standard. I believe System.getProperty("user.home") will give you C:\Documents and Settings\username by default on Windows XP--on my machine there are a couple of .folder configuration directories in there for other java programs (rssowl and jprofiler)

  • Good design choice, different types of customers, from webservice

    Hi, I have thoughts about good design pattern, when doing this:
    You have a webservice where customers coming into your system. The customers are private ones, business ones, and big business types.
    These 3 customer types has different needs, and must have different values like companyname, social security number, etc etc.
    The customer also has some shared types, like customerid, created, updated, etc.
    So what you want to do is to have an interface or an abstract class containing common methods for the customer, then you will create subclasses for the different types.
    I was thinking about creating a factory class and pass in the customer object retreived from the webservice, and in the factory process method create objects on the different subclasses based on what kind of object you get in (private, business, etc).
    So, webservice gets a private customer object, you serialize it and then you pass it into your factory class. And back you get a customer object.
    Now you want to do business logic on the object, storing it to a database, etc.
    So you might still have to create different scenarios based on if its customer type.
    The basic idea is that you want to get the object from webservice, pass it to a factory and get back a customer object which you want to do things with.
    What do you think, what is a good design solution to the problem described?

    To be clear "pattern" has a specific meaning. Your description is a design not a pattern.
    Is the small business one never going to become a big business one?
    Is a big business one never going to become a small business one?
    If the answer to either is yes, then you have one entity with different attributes, not two.
    I have no idea why serialization would matter in this. And your description doesn't explain that either. If you are talking about communication between different boxes then you need a communication layer (and it doesn't appear you are at the level yet where you need to decide the specifics of how that is handled.)
    It is unclear why you would want a factory. But if you just want the experience then you could probably use it.
    Your description isn't nearly complete enough to define how the overall system should behave which is what you seem to be also describing. You need to seperate what the system will do for how it will do it (the design.)

  • Good Design?

    I am not that experienced in Labview so would like to ask the experts.
    I am writing a program, which uses a main state machine and I have multiple sub-Vi's with for each sequence of operation. Within the Sub-Vi's I also use a state machine structure for operation.
    In the main VI, I use shift registers to pass data, each Sub-Vi has it's own cluster, containing Sequences and data. I also have variable clusters as well as well as the IO from the a DP DP coupler which is used in all sub-VIs.
    These clusters are large in size, each containing Sub-Clusters.
    The main VI contains about 15 shift registers
    The program is working well, but I want to have a good design structure as well.
    Any advice would help.

    I am no expert, so wait until the experts comment. Here's my two pennies' worth:
    Your program does sound intensive, having a state machine inside a statemachine may lead to an unresponsive UI. This could be because one of your subVI is trying to do something while the user presses stop button. So if user interaction is critical, you need to look at an event based producer/consumer design pattern.
    You could possibly use FGV's instead of having 15 shift registers to pass data from one iteration to the other, if not bundle all of them in to a type def cluster to make the diagram a bit more readable (I havent looked at your code, so this is just an assumption). Use bundle by name and Unbundle by name to read and write elements in the cluster as this is more or less self documenting.
    Try to use type defined data types (especially the clusters you mentioned) where possible.
    Error handling is important as well, its also a good way to enforce data flow.
    The other thing I would recommend is to go down the certification path as you learn a lot of best practices along the way.
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • Fiend class is a good design ?

    Hi All ,
    If we take a pure OOPs concept then private component of a class should not be accessed from outside.
    But this stuff we can bypass using the friend class .
    So my question is is it a good design to have friend class ?
    when to use friend class ?
    Regards,
    Ravi

    Hello,
    from the "pure" object-oriented programming paradigm view, a class should control the access to its members. Members which should be accessable by the outside have to be declared explicitly in the class interface. This information hiding principle has a lot of advantages: Other classes can use a class as a "black box" just by using the methods and fields from the class interface. They do not know and do not have to care about the internal implementation of the functionalities they use. Also, the implementation of a functionality within a class can change without any impact on the users of the class.
    The declaration of friend classes violates the information hiding principle. A friend class can access all members of the related class, so the internal implementation is transparent to it ("white box"). Thus, dependencies between both classes can exist. This may become problematic when the internal implementation of the related class is changed for some reason without taking care of the friend class. Additionally, errors within the class design are harder to find: The error might occur in the related class, but the code which produces the error can be within the friend class.
    So from my point of view, I try to avoid friend relationships between classes whereever I can. However, I have to admit that sometimes it is easier to declare a friend relationship than to avoid it, as this very likely complicates the whole class design. In my opinion, there is no general rule whether to use friend relationships or not -- it depends on the particular case.
    Regards
    David

Maybe you are looking for

  • Report not working in my system

    Dear All, I have Developed a ZHR report. But the problem is the it is working only on my ABAPers Terminal(PC) and not on mine. Not working means the Action that it should trigger in PA40 is not happening. The Client is same. The User ID is same. The

  • FI Posting of Invoice at the Line Item Level.

    Hi All Client has requirement of posting at the invoice line item level.But standard FI-AR posts at the Invoice Header level. E.g If invoice has two line items of $20 and $30 respectively. On the standard FI-AR side,one accounting document of $50 wil

  • Inkjet 1100 wont print photos and graphics on windows 7 64bit

    Hi, I have installed the alternative driver inkjet 1000 for inkjet 1100 because there is no 64bit driver available. Sometimes ago the printer worked well in Windows 7 64bit. I don't know when the problem first occured, maybe after installation of IE

  • Sharing a bean btwn two JSP's

    Hi all I have a bean that I want to use in two JSP's. When I use it the first time it works fine but for the second JSP it returns a NullPointerException. I have my scope as "application". In my JSP I am calling the bean as such: <jsp:useBean id="abc

  • Exporting PDF to Word

    I have created a table in InDesign and saved it as a PDf document. Now the client wants to be able to open it in Word. Can a PDF document be exported to a Word format?