Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

Nishant Anshul

Ranch Hand
+ Follow
since Sep 10, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nishant Anshul

Messing, study guide by allen bambara is not much recommended book. But it does contain good java examples of design patterns. Alas, corresponding UMLs are not neat but worth having a look.
Sean, yeah u can take them as structurally same. OR if i put it in another way, u can get a list of flight value objects as ur search results and then the same objects have their price field updated when u r getting alt priced itineraries. Although u might have a diff pattern here to hold objects. Hope it clears ur doubt !!
Sean, yeah u can take them as structurally same. OR if i put it in another way, u can get a list of flight value objects as ur search results and then the same objects have their price field updated when u r getting alt priced itineraries. Although u might have a diff pattern here to hold objects. Hope it clears ur doubt !!
well done Roger !! congrats
congrats sanjay !! good luck ahead
Good score, congrats Sylvia !!
Not contesting ur idea. But web services does come with an overhead. Use it when u need to invoke other businesses. When u have rich client talking to ur own business systems, i would not be much enthusiastic abt it.
It's not must Depends on u. If u can justify, go for it. Otherwise model in whatever way u r comfortable...good luck !!
I m afraid most of the times answers in such tests do not take a exhaustive view. But to be fair, in such boundary questions, people might come up with varied opinions. On more simplfied and raw terms, u can always assume :-
1)When the state u r holding in ur web layer is to be propagated across ejbs also, u got to have both approaches. May be have a java object placed in HttpSession (or Custom Web Svr own session like IBMHttpSession), then persist it through replication (bcz likely u r on clustered env in production cases), and then maintain a ref to a stateful SB which will in turn be persisted thru passivation.
example is a simple http session shopping cart holding some local entity ref thru session facade
2)In simple cases when u r just concerned with navigation and state maintainance till web svr layer, always go for Svt
Messing, in all likelihood u r knowing these. I just summarised it. Byee..
i agree with u in keeping a mix often.
For state, one indicator is ur deployment scenario.
If ur websvr is clustered, rely more on stateful SB for state.
If both websvr & appsvr r clustered, go for a mix.
Very good work Andrew Nice effort...this forum is the best place for any starters..and now its all compiled info...I think it will take some time to adjust to wiki concept as we r so used to putting everything in the forum
Good, it's a fresh example...okay..so we have a Set and a LinkedList. On a parent data structure, if we have got a 'set' now, it means we have changed the data structure and possibly eliminated the duplicate ones to get a 'Set'. To get a linkedlist, we have changed the data structure to get a list(ordered coll) and then added extra fucntions like getting elements from end or begining. 'Set' here will just be an inheritance example. To some extent, linkedlist can be called decorator if u consider a LinkedList class typed over a list interface. But remember its still a static inheritance, so not a very good case for decorator. This is just my opinion and i respect ur right to disagree.
2)Both Structural and behavioral patterns can be static or dynamic. Decorator is still structural bcz we are not changing the behaviour of obj at run-time, we r giving it some extra responsiblity to do. So we say that the structure of object is changed to suit the extra responsibilities.e.g may be we have to add an internal buffer with the object to support buffering...still a structural pattern.
In chain of resp, we say that whichever obj want to be a part of this chain, it needs to implement some func ..and so if CONDITION IS MET..it
will have the responsibility to trap the request. So whenever some communication between objects is there, its a healthy indicator of behavioral pattern. 'request' being comm obj in this case.
Kylash,
There r few tools avlbl which does screen scraping. What they do, is generate classes from the fields on GUI based on language u have picked up. Next task is to map these classes (objects runtime) with the persistence layer. So i think screen scraping is what the qs 1. refers to.
One area of Object mapping is what the ejb container does for u, in order to persist ur objects to some Obj Oriented Databases.I cant think of apt examples right now..
2)ya..command pattern helps in undo kind of oprn. plz refer to GOF. best book avlbl IMO..
I disagree Dennis. Perhaps not even remote semblance between decorator and chn of responsibility. To some extent chain of responsibility is close to command pattern.
Plz refer to GOF book. Just one point i would like to add here. Decorator 'D' will never change the interface 'I' on which it is applied. That means if 'D' is applied to 'I' to give u 'I1', the old 'I' is still valid and reusable in same system. Thus it adds some behaviour dynamically. Chain of responsibility implies u are never sure which object will trap ur request. It is open ended. U r not even sure of perhaps how many probable receivers can be there.
Congrats John !!..go ahead for next two