Hello everyone,
I am reading the book -- Hadoop: The Definitive Guide
In chapter 2 (Page 25), it is mentioned "The new API favors abstract class over interfaces, since these are easier to evolve. For example, you can add a method (with a default implementation) to an abstract class without breaking old implementations of the class". Wh...
hi!
imagine there are two interfaces arranged via composite pattern, one of them has a dispose method among other methods:
interface IComponent extends ILeaf {
...
function dispose() : void;
}
interface ILeaf {
...
}
some implementations have some more things in common (say an id) so there are two more interfaces:
inter...
Hi,
I'm interested in having a look at a small sample project that would highlight a good technique to separate data access layer (using Entity Framework) to business logic layer. In C# would be good.
That is, it would highlight how to pass data between the layer without coupling them. That is, the assumption here is not to use the E...
I'm writing an interactive fiction game in java from scratch. I'm currently storing all of my game object references in a hashmap in a singleton called ObjectManager. ObjectManager has a function called get which takes an integer ID and returns the appropriate reference. The problem is that it returns a BaseObject when I need to retur...
What I understand so far:
Business Delegate - In the presentation tier, as an ASP component, provides an interface for ASP views to access business components without exposing their API, therefore reducing coupling between the two.
Session Facade - In the business tier, as a com+ component, encapsulates business objects, provides a cou...
I've been trying to find resources and guidelines for implementing authentication and authorization in multiple layered architectures (C#), but haven't found any "best practices" or patterns to use. And I figured, that there must be some patterns for this, as it is a pretty important area?
The application that we're developing, is layer...
Hi
I have a design question about the evolution of an object (and its state) after some sequence of methods complete. I'm having trouble articulating what I mean so I may need to clean up the question based on feedback.
Consider an object called Classifier. It has the following methods:
void initialise()
void populateTrainingSet(T...
Hi
For the last few days I've been thinking how I can solve the following programming problem and find the ideal, flexible programming structure.
(note: I'm using Flash as my platform technology but that shouldn't matter since I'm just looking for the ideal design pattern).
Our Flash website has multiple situations in which it has to ...
Hi all,
I'm not sure how to design a couple of classes in my app.
Basically that's a situation:
each user can have many preferences
each preference can be referred to an object of different classes (e.g. album, film, book etc)
the preference is expressed as a set of values (e.g. score, etc).
The problem is that many users can h...
The question wasn't clear enough, I think; here's an updated straight to the point question:
What are the common architectures used in building a meta search engine and is there any libraries available to build that type of search engine?
I'm looking at building an "enterprise" type of search engine where the indexed data could be comi...
Is it generally acceptable to allow a Visitor to modify state of the Receiver, or should that be a Command pattern instead?
...
I want to know how can I create new account using servlets in post method?
I'm currently following MVC design pattern, and I want to know if I pass the required data to register new account from JSP page, then how can I get that data in post method? As request.getParameter() method returning me null. How can I know that post method is c...
I run into this frequently enough that I thought I'd see what others had to say about it.
Using the StyleCop conventions, I find that I often have a property name that is hard to make different than the class name it is accessing. For example:
public class ProjectManager
{
// Stuff here
}
public class OtherClass
{
private Pro...
Hey guys, here's my setup
Castle Windsor is my container
NServiceBus is itself using it's own container internally, Spring by default
I'm implementing the PubSub config.
Ok, if I have my Bus.Publish happening within my IWantToRunAtStartup class, then everything is fine. As a test for example on Run() we can start a timer and it'll go...
lets say i have a method which has two parameters. i have been implementing them as:
if(aObj instance of Marble) {
if(bObj instance of Bomb) {
this.resolve((Marble)aObj,(Bomb)bObj);
}
}
as you can see its not a very pretty solution. i plan to implement using double dispatching, but with two parameters which both need d...
I'm looking for an elegant pattern to solve this problem:
I have several user roles in my system, and for many of my controller actions, I need to deal with slightly different data.
For example, take
/Users/Edit/1
This allows a Moderator to edit a users email address, but Administrators to edit a user's email address and password.
...
Hello,
An example would set the context right, the example below captures the various states of the entity, which needs to be reverted(rolled back) .
State 1 - Recorded on 01-Mar-2010
Column1 Column2
Data1 0.56
State 2 - Recorded on 02-Mar-2010
Column1 Column2
Data1 0.57
State 3 - Recorded on 03-Mar-2010
Column1 Column2
Da...
I was reading an article on Batch Processing in java over at JDJ http://java.sys-con.com/node/415321 . The article mentioned using a persistence queue as a Batch Updater instead of immediately sending an individual insert or update to the database. The author doesn't give a concrete example of this concept so I googled Persistence Queue ...
I am trying to create something like a rectangular grid with pictures. When a picture is clicked, it should zoom in pushing the other ones out. I don't know what you name you call this particular model with but does anyone have suggestions on where I should start?
Collage Example
...
I want to create a table of contents and endnotes in a Jinja2 template. How can one accomplish these tasks?
For example, I want to have a template as follows:
{% block toc %}
{# ... the ToC goes here ... #}
{% endblock %}
{% include "some other file with content.jnj" %}
{% block endnotes %}
{# ... the endnotes go here ... #}
{...