Regarding design pattern
Hi,
This is swapna,
I don�t have any idea about design patterns, plz.anybody help me
regarding this, where I can get relevant information about design patterns
Thanks in advance
With regards
Swapna.M
Check http://hillside.net/patterns/onlinepatterncatalog.htm or http://dmoz.org/Computers/Programming/Methodologies/Patterns_and_Anti-Patterns/ for a catalog of online resources about patterns!
Or google for design patterns
Similar Messages
-
Design pattern -- using the correct one...?
I'm in need of some advice regarding design patterns in general.
I have a prototype whereby Objects B, C and D observe Object A's attribute (let's call it theAttribute -- imaginative, eh? )
In my system, every time theAttribute is changed, I've implemented the Gang's Observer pattern so that the observer objects are notified (...and do something with the information that Object A has changed in some way... they basically update a theTimestamp attribute when the subject's updated... but that really is beside the point right now).
However, only ONE observer will ever be created for each observable subject.
To my dismay, I've just been reading on the IBM Research site that the memory implications of this are horrendous (that for potentially a great many subjects only having a few observers each is bad practice) -- d'oh.
I've looked at other ways I could achieve what I need to without the above practice, but the only things I can come up with are the Mediator pattern or the State pattern, neither of which I'm sure are ideal (the former because of I'm worried that it'd be total overkill, the latter because I don't really need dynamic reclassification if the truth's told, I think).
Anyone got any thoughts on this? (I've considered referencing observers with their observables using a hash table but don't really wish to go down that route unless absolutely neccesary... it seems a bit like putting electrical tape over a sparking wire :) I'd rather just do it properly).
Sarah.However, only ONE observer will ever be created for each observable subject.If you can absolutely, positively, definitely, mathematically, logically, legally
and morally prove that fact, indeed, you're wasting some resources here,
a couple of hundred bytes mayhap ...
In the mean time, keep your Observer/Observable pattern/implementation
or have a look at the PropertyChangeSupport class ...
kind regards,
Jos -
Regarding which design pattern to use for this scenario???
hi guys
I am working on a J2EE application where I need to do translations for 3 different scenarios. It is basically a conversion from service order objects to invoices.
First from a service order object to an invoice.
Second a conversion from a transaction table.
Third a conversion from a remote system.
Finally the product is an invoice..
What design pattern can i use ....is strategy pattern a good idea??
Thanks
JHi,
I think your problem is in result state. You can you sequencial block but for approve or reject you need to set target for each result state. Here I am providing a link. I think you will get your solution here please go through it.
http://help.sap.com/saphelp_nw2004s/helpdata/en/44/429bbd709914bce10000000a155369/frameset.htm
if you have any query please let me know.
Thanks
Chandan -
Suggestions regarding corej2ee design patterns
hi all
i wanted to go through the core j2ee design pattern but i don't know which one to refer and what to
so i need suggestions that what to read in a design pattern
and which is the best book or pdf if possible send me the link tooCore J2EE patterns are not what they were. A lot of them would be considered anti-patterns, work arounds for deficiencies in the EJB 1.0 and 2.0 specs that have been addressed in EJB 3.0.
The "Core J2EE Patterns" (Amazon.com search will find it) sounds like what you want.
% -
Hello,
I heard that XI has got Design patterns such as Aggregation, Serialization etc. in the Process editor. Where do the messages get stored until the aggregation is carried? Does it make use any ODS in Integration server?
We are using TIBCO and it does not seem to have this functionality.
Thanks,
VenuHi Venu,
The XI Business Process Engine is implemented on top of SAPs workflow engine, so the state of a process (including whatever messages it contains) is stored in the database underlying the SAP Web Application Server.
Regards,
Thorsten -
Producer/Consumer Design Pattern + DAQmx + Event Structure
Dear community users,
at the moment I try to implement the Producer/Consumer Design Pattern into my current project. For this purpose I am trying to make a "minimal-example" in which I use the Producer/Consumer Design Pattern for the data acquisition and analysis (display in GraphXY, calculation etc..) process. In the Producer Loop I perform the data readings via DAQmxRead.VI and in the Consumer Loop, in this example only, I display the data in a GraphXY. At the same time I want to control the data acquisition via an Event Structure, for example Start Measurement/Stop Measurement Buttons. To configure the measurement time, for example if the user only wants to measure 150 sec, I use the Time Out Event of the Event Structure. This is a technique which is often used, when data acquisition and Event Structures are used at the same time (Excuse me if this is wrong!). Due to understand the Producer/Consumer Design Pattern I looked up in the Template\Framework of LabVIEW.
In the attachment you will find my "minimal-example", which -sadly-, not working. What should I do ?
Thank you.
Best regards,
tugrul öztürk
Attachments:
daqEngine_PCP.vi 35 KBYour VI will never stop due to the Ok Button that stops the producer loop is read OUTSIDE of the loop. Add an event case for it.
Move the Start and the Ok Button inside of their respective event cases. This will allow the latch to reset when they are read.
Change the Ok Button to a stop button.
Use a Greater Or Equal instead of Equal for the measurement time comparison. What if somebody randomly changes it to 0 on you? Again, you will never stop.
Is the DAQ only supposed to read for "Measurement Time". Right now, it constantly reads. So if you don't use the DAQmx Read, you will get a buffer overflow error. You need to put the DAQmx Start Task inside of the Start event case and then the Stop DAQmx Task inside of the Timeout event case when the measurement time is exceeded. You should also perform the read regardless inside of the Timeout event case.
I HATE telling the consumer loop to stop by destroying the queue. You can look data that way. Instead, send something an empty array. In the consumer, check for an empty array. If it is empty, stop. Destroy the queue only AFTER BOTH LOOPS HAVE COMPLETED.
You should also report your errors in some way. Simple Error Handler at the minimum.
Since you are using Continous Samples, don't limit the buffer. Leave the Samples per Channel unwired on the DAQmx Timing VI.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
Design Patterns Support in Jdev 10.1.3?
Is Design Patterns Support included as part of JDev 10.1.3. I have seen this support in SAP NetWeaver Developer Studio where you have the option of converting existing classes to implement a certain J2EE/J2SE Design Pattern or create a new class(es) to implement a Design Pattern. I believe TogetherSoft has this support.
Any chances this request is consider in the next major release of JDev 10.1.3?Dear Shmeltzer,
My company just begins the migration from Oracle Form-based application to pure Java EE one. We will be using JDeveloper v10.1.3, persuaded by it fast GUI building, data-binding features. Before that, we have been trying out Eclipse & JBoss.
We are going to use Swing & JSF for client, and JavaEE 5 for midtier. Persistence layer, will be JPA (EJB3 entity bean persistence) and Spring Framework DAO support. Spring DAO is interesting bcos it gives a consistent style of API (we want to support both JDBC & JPA) and consistent Exception hierarchy too. So our midtier will be partitioned (roughly according to Fowler's patterns) into 3 layers: Service, Domain/Biz Object, Data Access. Thus far is pretty standard.
We are still pretty new to this ADF, and are still exploring.
Now, my initial impression with ADF is that it seems to interfere too much with the kind of pattern we had in mind. The fact that ADF hides too much details from us programmers scares me -- it becomes restrictive and we are helpless as to what are going on inside (with those xml, dcx, etc). For e.g. talk about Service Locator pattern, and we cannot seem to figure out how/where it is implemented. Using ADF Data Control and Biz Components will make all the design patterns "disappear" -- we dont see DAO classes anymore bcos it has been automated. It looks more like 2-tier client-server pattern to me. :-)
We are interested to use ADF data-binding features, so
1) Is it still advisable to use Spring DAO layer?
2) Is it possible to just use ADF in the Client / web tier, while the EJB container remains free of ADF technologies?
Regards. -
Choice of design pattern for data acquisition system
Hello all
I have a trouble about selecting the suitable design pattern / architecture for a data acquisition system.
Here is the details of the desired system:
There is data acquisition hardware and I need to use it by observing parameters on User interface.
the data acquisiton period, channel list to scan should be chosen on User interface. Besides, there are many user interface interactions. e.g. if user selects a channel to add scanlist, then I need to enable and make visible some other parts on user interface.
When user completes the channel selection, then he will press the button to start data acquisition. Then I also need to show the scanned values on a graph in real time and log them in txt file.
I know that I cannot use producer consumer pattern here. because the data acquisition loop should wait for parameters to scan channels. and it works in a given period by user. so the user interface loop performs higher rate then consumer loop (data acquisition loop). it means queue will be bigger bigger. if I use notifier it will loss some data come from user interface.
is there any idea about that ? is there any suitable design pattern for this case ?
Thanks in advance
best regards
Veli BAYAR
Embedded Systems Software and Hardware Engineer
"You live in a graphical world. Why not program in one?"
Solved!
Go to Solution.johnsold wrote:
Veli,
I recommend the Producer/Consumer model with some modifications.
You might need three loops. I cannot tell for sure from your brief description.
The User Interface loop responds to the user inputs for configuration and start/stop of acquisition. The parameters and commands are passed to the Data Acquisition loop via a queue. In this loop is a state machine which has Idle, Configuration, Acquisition, and Shutdown states (and perhaps others). The data is sent to the Processing loop via a different queue. The Processing loop performs any data processing, displays the data to the user, and saves it to file. A notifier can be used to send the Stop or shutdown command from the User Interface loop to the other loops. If the amount of processing is minimal and the file write times are not too long, the Processing loop functions might be able to occur in the Timeout case of the UI loop Event structure. This simplifies things somewhat but is not as flexible when changes need to be made.
I am not sure that a Design Pattern for this exact setup exists but it is basically a combination of the Producer/Consumer (Events) and Producer/Consumer (Data) Design Patterns.
Lynn
Check out this thread: http://forums.ni.com/t5/LabVIEW/Multiple-poll-case-structures-to-event-help/td-p/2551309
There are discussions there about a 3-loop architecture that may help you.
Jeff
Jeffrey Zola -
Question regarding Command pattern
Hi!
I have a question regarding the Command pattern:
//Invoker as defined in GOF Design Patterns
public class SomeServer {
//Receiver as defined in GOF Design Patterns.
private Receiver receiver;
//Request from a network client.
public void service(SomeRequest request) {
Command cmd = CommandFactory.createCommand(request);
cmd.execute();
}The concrete command which implements the Command needs a reference to Receiver in order to execute it's operation but how is the concrete command best configured? Should I send Receiver along with the request
as a parameter to the createCommand method or should i configure the receiver inside the CommandFactory or
send it as a paramter to the execute method? Since SomeServer acts as both client and invoker, SomeServer "knows" about the Commands receiver. Is this a bad
thing?
Regards
/Fredrik#!/bin/bash
DATE=$(date '+%y-%m-%d')
if find | grep -q $DATE ; then
echo "OK - Backup files found"
exit 0
else
echo "Critical - No Backups found today!"
exit 2
fi
should work too and it's a bit shorter.
Please remember to mark the thread as solved. -
Design Pattern and ABAP Objects
Hello Friends,
I would like to know, if ABAP Objects can be used to do pattern oriented programming ?
For example GANG of four has provided almost more then 30 design pattern ( MVC, singelton, Obserable, FACADE,,,etc) can we implement patterns using ABAP ??
Many thanks
Haider SyedHi,
Take a look at the following site:
http://patternshare.org/
It has all the basic patterns from the GOF and a lot more. I can recommend the ones from Martin Fowler but be sure you start with the ones from the GOF.
All patterns are described by using UML so it's very easy to translate them into ABAP OO code.
Regarding your other question. For the observer pattern I used an interface which the SAP had already created if_cm_observer and created my own abstract observable class. The observable class is nearly a 100% copy of the java.util. one
regards
Thomas -
Observer Design Pattern: Looking for redesign ABAP OO code example
Hello folks,
I am looking for an example for ABAP OO code that has been redesigned by applying the Observer Design Pattern. I would be very interested in both the code before as well as the code after the pattern is being applied.
Thanks in advance and kind regards, AlexObserver can be implemented using the EVENTS.
I had recently implemented the observer at one of my client's place. I had screen with so many ALVs. One ALV was kind of editable and other were just showing the information of the current row as well as some total information. So, initially I started with the Main ALV and SUB(1 and 2) for other ALVs. Now, when I need to refresh my ALVs based on the main ALV data, I had to explicitly update the data of the each Sub ALV. The code was kind of static and requirement was not yet fixed.
Later on we need to add one more ALV on the same screen. It was easy to change the existing method where I was doing the explicit refresh of each ALV. But I thought of using the Events.
I created an event REFRESH_DETAILS for main ALV. so, when data gets changed (which I was catching by DATA_CHANGED event of ALV), I raise the event.
RAISE EVENT REFRESH_DETAILS
exporting new_data = it_Data.
In Sub ALVs, I created the event handler method to handle the event REFRESH_DETAILS of the main ALV.
methods: handle_refresh_details
for event REFRESH_DETAILS of ZCL_MAIN_ALV.
I also had to register the Handler.
SET HANDLER me->handle_refresh_details FOR ALL INSTANCES.
I'll soon write a post on my [ABAP Help blog|http://help-abap.zevolving.com/] with all the details.
Regards,
Naimesh Patel -
Are there any Client/Server Application (using sockets) design patterns?
Hi,
The title of the post nearly says it all. I am searching for different design patterns related with the development of a client/server application. I understand that there must be any different ways on how a client/server application can be developed.
Regards,
Sim085
Disclaimer:
When I enter in the Socket forum on this site I recieve this message "Thank you for any participation in this forum. Due to a lack of relevant activity, we have decided to archive this forum on June 16, 2006. For future posts on this topic, we suggest you use the Networking forum" and I am not allowed to create a new post! However I can see posts done yesterday! All i did is add the forum in 'my forums'. Does this happen to you people as well?Hi Sim085...How are you?
So look this:
http://forum.java.sun.com/thread.jspa?threadID=5148926&tstart=75
I don�t know if is what you want...but I hope in this^^
Ok man...If you have one example for help you is better.
[ ] -
Design patterns in portlet development
Hello,
I am a student at the Technical University in Munich, Germany and I am working on a university project on design patterns for portlets.
The focus of my work is researching the best practices when developing a web portlet, especially which design patterns are the most suitable for portlets development.
For example, the MVC pattern is one of the most popular design patterns for portlets.
I am writing to you to ask which design patterns are used in the development of your portlets from the SAP Enterprise Portal.
- What design patterns do you use for your portlets?
- Do you use MVC among others?
- Do you have your own design patterns?
- Do you use any templates or guidelines for portlet development that involve design patterns?
I am looking forward to your answer. Any answer would help with the research, as experts interviews are part of my work in the project.
I appreciate any references you consider to be related to my search.
Thank you,
Julia Alexandrescu
Department of Informatics
Technical University Munich
Email: [email protected]Hi raaj,
I have a query related to this.
I am a beginner to portlets.
Say I have an existing struts application.What all do i need to modify or add to make a .portlet file out of it so as to make it deployable in Weblogic 8.1 SP3?
Is adding a portlet.xml enough?
if yes, what would the portlet.xml look like?
Do i need to add a separate class as well?
I couldnt get any sufficient answers from other forums.
Can you please help?
Thanks & Regards,
Nishant -
Hi all,
Which design patterns could be applied in coding EJB? I don't know if my question is clear enough, but what I really want to know is which design patterns I could use with EJB and how could I use them this way? (Some example situation)
Regards,
Filipe Fedaltoi think it depends of what u intend to do..
e.g. i think (maybe i'm wrong, any relevant replies are welcome!) that u could use a stateless session bean to implement some facade, delegating entities creation to some non-bean classes? or why not a stateful session bean to implement a factory (when entities creation depend on client preferences)? -
Get instance method and design pattern
Hi All,
1. I New to abap objects and i read the help and some stuff from the forum,
l like to now more about design pattern in abap objects,
2. I saw in some abap class the use of method of GET_INSTANCE i think it's from factory pattern , what is the pros. and cons to use this method ,when i should consider to use it ?
Thanks in Advance
NinaHello Nina
A very good introduction into design patterns is the book "Head First: Design Patterns". Here you will find many good reasons why and when to use the factory pattern.
You should use the factory pattern when
- you want to prevent "direct" instantiation (i.e. using a public CONSTRUCTOR method) by the developer
- you want to hide the complexity of instantiation from the user of the class
- the instantiation creates an implementation of an interface and you want to keep control of which implementing class is returned
Regards
Uwe
Maybe you are looking for
-
I have created a class that uses a result set object. I need to scroll through the result set twice and my code is not working. My first question is: Is there a method that will return the length of a result set? If there is a length method that will
-
Show itunes in the cloud purchases won't stay checked
For months now, when I open iTunes the option "show itunes in the cloud purchases" won't stay checked. I have to restart, sign out and sign back in and then the option only shows up half the time. This is VERY frustrating. What gives?!?
-
Cant open Mail after Mountain lion update
So I updated my Macbook pro to mountain lion 10.8.2 and now when I go to open mail it says version 6.1 of mail cant be used with this version of os x
-
Very weird ORA-06502 error while creating procedure
Hi All, i try to create the following procedure (on a 10.2 database): create or replace procedure audit_report as cursor c_audit_user (b_start_date date, b_end_date date) is select user_id , os_user , session_id , host , last_program , last_action ,
-
Ebook licensed to a different user account?
I have a problem with using Adobe Digital Editions to download some free eBooks from Borders.com to my Sony PRS-300 Reader. When I select any of these problem eBooks within ADE, and click on "Item Errors", I see the message, "Document is licensed t